:root {
    --primary-color: #f4e4ca;
    --secondary-color: #c0923b;
    --background-color: #f8f9fa;
    --text-color: #2a304c;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--primary-color);
}

.navbar {
    width: 90%;
    justify-self: center;
    position: fixed;
    z-index: 6;
}

nav {
    background-color: rgba(244, 228, 202, 0.9);
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 4px 15px 2px 15px;
    gap: 0 10px; /* sin espacio vertical entre label y logo */
}

.footer-text
{
    font-size: 18px;
    color: var(--text-color);
}

/* Label de atención 24h */
.nav-phone {
    display: block;
    color: var(--text-color);
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
    font-size: 18px;
}

@keyframes nav-phone-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

nav .logo {
    font-weight: bold;
    max-width: 13rem;
}

nav .logo img {
    max-width: 100%;
    height: auto;
}

/* Ajuste de tamaño de logo en tablets para que no desplace el menú */
@media (min-width: 769px) and (max-width: 1184px) {
    nav .logo {
        max-width: 10rem !important; /* un poco más pequeño que escritorio */
    }

    nav ul li a
    {
        font-size: 1.2rem !important; /* reducir tamaño de texto en tablets */
    }

    nav ul li .dropdown a
    {
        font-size: 0.8rem !important; /* reducir tamaño de texto en dropdowns para tablets */
    }
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    position: relative;
    margin: 0 5px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    padding: 6px 10px;
    transition: color 0.3s;
    font-weight: 600;
    font-size: 1.35rem;

}

nav ul li a:hover {
    color: #007BFF;
}

/* Botón hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 4px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    pointer-events: none;
}

nav ul li .dropdown {
    display: none;
    position: absolute;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    top: 70%;
    left: 0;
    z-index: 1000;
}

.liIcon
{
    padding: 0;
    margin: 0;
    /* width: 3.5rem !important; */
}

.liIcon .menu-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.liIcon .menu-icons a {
    font-size: 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mostrar solo el dropdown hijo directo del li al hacer hover */
nav ul li:hover > .dropdown {
    display: block;
}

/* Submenus anidados: posicionar a la derecha y mostrar solo al hover del li correspondiente */
nav ul li .dropdown li {
    position: relative;
}
nav ul li .dropdown li .dropdown {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    white-space: nowrap;
    z-index: 1100;
}
nav ul li .dropdown li:hover > .dropdown {
    display: block;
}

nav ul li:hover .dropdown {
    display: block;
}

nav ul li .dropdown a {
    display: block;
    padding: 10px;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 900;
}

nav ul li .dropdown a:hover {
    background-color: #f1f1f1;
}

.phone-whatsapp {
    display: flex;
    align-items: center;
}

.phone-whatsapp a {
    margin-left: 10px;
    text-decoration: none;
    color: #333;
}

.phone-whatsapp a:hover {
    color: #007BFF;
}

/* Mobile/Tablet styles: show hamburger and collapse nav desde tablets */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    /* Mostrar el label de atención en móvil, encima del logo y hamburguesa */
    nav {
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-phone {
        display: block !important;
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
        margin: 4px 0 6px;
        order: -1;
        position: relative;
        color: transparent; /* ocultar texto estático en móvil, se usa ::before */
    }

    /* Texto de nav-phone animado solo en responsive */
    .nav-phone::before {
        content: attr(data-text);
        display: inline-block;
        padding-left: 100%;
        animation: nav-phone-marquee 18s linear infinite;
        color: var(--text-color);
    }

    .logo {
        order: 0;
    }

    /* En móviles el logo se reduce aún más */
    nav .logo {
        max-width: 8rem;
    }

    .menu-toggle {
        order: 1;
        margin-left: auto;
    }

    .nav-wrapper {
        order: 2;
        width: 100%;
    }

    /* collapsed by default */
    .nav-links {
        display: none !important;
        position: fixed;
        top: 80px;
        right: 5%;
        left: 5%;
        flex-direction: column;
        gap: 6px;
        background: rgba(244, 228, 202, 0.98);
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
        z-index: 1200;
        max-height: 70vh;
        overflow-y: auto;
    }

    /* show when open */
    .nav-links.open { 
        display: flex !important; 
    }

    .nav-links li { 
        width: 100%; 
        margin: 0;
    }
    
    .nav-links li a { 
        padding: 10px 12px; 
        font-size: 1.1rem; 
        display: block; 
    }

    /* dropdowns become collapsible blocks in mobile */
    .nav-links li .dropdown {
        position: static;
        box-shadow: none;
        padding-left: 12px;
        display: none;
        margin-top: 6px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 8px;
    }
    
    /* show only when parent li gets class 'open' (toggled in JS) */
    .nav-links li.open > .dropdown { 
        display: block; 
    }

    /* nested dropdowns hide by default, shown when their li.open */
    .nav-links li .dropdown li .dropdown { 
        padding-left: 12px; 
        display: none; 
        position: static;       /* en móvil, que hereden el flujo normal */
        left: auto;
        top: auto;
        margin-top: 4px;
    }
    
    .nav-links li .dropdown li.open > .dropdown { 
        display: block; 
    }
}

/* Visor de video fullscreen responsive */
html, body {
    height: 100%;
    margin: 0;
}

.video-viewport {
    position: relative;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: 100vh;
    min-height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 0;
}

/* El video ocupa todo el ancho y alto del viewport */
.hero-video {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    border-radius: 0;
    box-shadow: none;
    outline: none;
}

/* Botón para alternar pantalla completa (pequeño overlay) */
.video-fs-btn {
    position: absolute;
    right: 18px;
    top: 18px;
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    z-index: 1100;
}

.video-viewport.hide-ui .video-fs-btn { opacity: 0; pointer-events: none; transition: opacity .25s; }

@media (max-width: 768px) {
    .video-fs-btn { right: 12px; top: 12px; padding: 6px 8px; }
}

.hero-video::-webkit-media-controls { display: none !important; }
.hero-video::-webkit-media-controls-enclosure { display: none !important; }
.hero-video::-webkit-media-controls-panel { display: none !important; }

.hero-video {
    pointer-events: none;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    border-radius: 0;
    outline: none;
}

video.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

iframe.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    height: 56.25vw;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
}

/* Overlay de texto encima del video */
.video-overlay {
    position: absolute;
    bottom: 10%;
    width: 90%;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    text-align: center;
    z-index: 1200;
    transition: opacity .25s, transform .25s;
    max-width: 99%;
}

.overlay-title {
    margin: 0;
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
}

.video-overlay {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
}

.video-overlay .overlay-sub {
    margin: 6px 0 0;
    font-size: 1.5rem;
    opacity: 0.9;
}

.btnNuestros {
    border-radius: 50px;
    background-color: transparent;
    border: white 2px solid;
    color: white;
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 20px;
}

.video-viewport.playing .video-overlay {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
    pointer-events: none;
}

@media (max-width: 768px) {
    .video-overlay {
        top: 50%;
        bottom: auto;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 10px 14px;
        width: 90%;
    }
    .video-overlay .overlay-title { font-size: 1.2rem; }

    /* Ajustes para que el video hero ocupe el 50% de la pantalla en responsive */
    .video-viewport {
        align-items: center;
        height: 100vh;
        min-height: 100vh;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }

    .hero-video {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
        border-radius: 0;
    }

    /* Ajustes para que la imagen hero-image-section se vea completa en responsive */
    .full-width-image {
        width: 100%;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
    }
}

/* ====== marquee, gallery, map, contact styles ====== */

.marquee-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--primary-color);
    border-radius: 12px;
    padding: 10px 0;
    box-sizing: border-box;
    border: 1px solid rgba(0,0,0,0.06);
    margin: 18px 0;
}
.marquee {
    display: flex;
    gap: 30px;
    white-space: nowrap;
    animation: marquee-left 18s linear infinite;
}
.marquee span {
    font-weight: 600;
    color: #222;
    padding-left: 10px;
    font-size: 3rem;
}
.marquee-wrap:hover .marquee {
    animation-play-state: paused;
}
@keyframes marquee-left {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.hero-image-section {
    width: 100%;
    margin: 10px 0;
}
.full-width-image {
    width: 100%;
    height: 80vh;
    display: block;
    object-fit: cover;
    border-radius: 0;
}

.gallery {
    padding: 8px 6%;
    background-color: var(--primary-color);
}
.video-player-section + .gallery {
	margin-top: calc(var(--section-gap-home) * 2);
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    align-items: center;
}

.scroll-img {
    width: 100%;
    display: block;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 700ms cubic-bezier(.2,.9,.2,1), opacity 700ms ease;
    opacity: 0;
    will-change: transform, opacity;
}

.from-left { transform: translateX(-30%); }
.from-right { transform: translateX(30%); }

.scroll-img.in-view {
    transform: translateX(0);
    opacity: 1;
}

.map-section { padding: 18px 6%; background: var(--primary-color); }
.map-container {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-section { padding: 28px 6%; background: var(--primary-color); }
.contact-card {
    max-width: 820px;
    margin: 0 auto;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.04);
    background: var(--primary-color);
}
.contact-card h3 { margin-top: 0; color: var(--text-color); }
.contact-card form label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-color);
}
.contact-card input[type="text"],
.contact-card input[type="tel"],
.contact-card input[type="email"],
.contact-card textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    resize: vertical;
    margin-top: 6px;
    box-sizing: border-box;
    font-size: 0.95rem;
}
.form-actions {
    text-align: right;
    margin-top: 10px;
}
.btn-primary {
    background: #007BFF;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .marquee { animation-duration: 12s; }
    .map-container { height: 280px; }
    .contact-card { padding: 16px; }
}

/* Botón flotante de WhatsApp en lado izquierdo */
.floating-whatsapp {
    position: fixed;
    left: 14px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1200;
    text-decoration: none;
}

.floating-whatsapp i {
    font-size: 28px;
}

/* Solo escritorio: mostrar número en hover */
@media (min-width: 769px) {
    .floating-whatsapp::after {
        content: '';
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 8px;
        overflow: hidden;
        white-space: nowrap;
        max-width: 0;
        opacity: 0;
        transition: max-width 0.25s ease, opacity 0.25s ease;
        font-size: 0.9rem;
        color: #fff;
        background-color: #25D366;
        padding: 4px 10px;
        border-radius: 999px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

    .floating-whatsapp:hover::after {
        content: attr(data-label);
        max-width: 200px;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .floating-whatsapp {
        left: 10px;
        bottom: 18px;
        width: 50px;
        height: 50px;
    }

    .floating-whatsapp i {
        font-size: 24px;
    }
}

.seccion-1 {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px;
    box-sizing: border-box;
    text-align: center;
}

div.dviBtn {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn1, .btn2 {
    background-color: var(--secondary-color);
    padding: 14px 28px;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 1rem;
}

.titulo {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-color); 
    text-align: center;
}

.titulo2 {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

@media (max-width: 992px) {
    .seccion-1 {
        padding: 60px 20px;
    }
    .seccion-1 .titulo {
        font-size: 2.4rem !important;
    }
    .seccion-1 .titulo2 {
        font-size: 1.1rem !important;
    }
    div.dviBtn {
        flex-direction: column;
        align-items: center;
    }
    .btn1, .btn2 {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 576px) {
    .seccion-1 {
        padding: 40px 16px;
    }
    .seccion-1 .titulo {
        font-size: 2rem !important;
    }
    .seccion-1 .titulo2 {
        font-size: 1rem !important;
    }
}

.hServicios {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-color); 
    text-align: center;
}

/* footer */
.footer-top {
    background-color: black;
    color: white;
    text-align: center;
    padding: 20px 0 20px 0;
}
.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    gap: 8px;
}
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.3rem;
    gap: 20px;
    flex-wrap: nowrap;
}
.iconS {
    max-width: 35px;
    max-height: 35px;
}
.iconS>img {
    width: 100%;
    height: 100%;
}

/* Cremation Section */
.cremation-section {
    padding: 60px 20px;
    background-color: var(--background-primary);
}

.cremation-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
}

.cremation-text {
    flex: 1;
}

.cremation-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0 0 10px 0;
    font-weight: 400;
}

.cremation-title {
    font-size: 42px;
    color: #003d82;
    margin: 0 0 20px 0;
    font-weight: bold;
}

.cremation-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.cremation-btn {
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid #003d82;
    color: #003d82;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cremation-btn:hover {
    background-color: #003d82;
    color: #fff;
}

.cremation-image {
    flex: 1;
}

.cremation-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

@media (max-width: 900px) {
    .cremation-container {
        flex-direction: column;
        gap: 20px;
    }

    .cremation-title {
        font-size: 32px;
    }

    .cremation-description {
        font-size: 14px;
    }
}

