/* ================================================ */
/* MENÚ HAMBURGUESA - NOTARÍA CHÁVEZ MONDRAGÓN */
/* ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* ================================================ */
/* HEADER PRINCIPAL */
/* ================================================ */
.hdr-contenedor {
    position: fixed;
    top: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: contents;
}

.hdr-logo-container {
    background: var(--primary-color);
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hdr-logo-container img {
    height: 100px;
    border: 1px solid rgba(104, 112, 153, 0.253);
    padding: 10px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.hdr-logo-container img:hover {
    transform: scale(1.1);
}

/* ================================================ */
/* BOTÓN HAMBURGUESA - Oculto en desktop */
/* ================================================ */
.hdr-menu-toggle {
    display: none;
}

/* ================================================ */
/* OVERLAY - Oculto por defecto */
/* ================================================ */
.menu-overlay {
    display: none;
}

/* ================================================ */
/* NAVEGACIÓN DESKTOP */
/* ================================================ */
.hdr-menu-container {
    background: #2c2c2c;
    border-bottom: 2px solid #d4af37;
}

.hdr-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0 auto;
}

.contendor-top {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hdr-nav-item {
    flex: 0 1 auto;
    position: relative;
        width: inherit;
}

.nav-btn {
    width: 100%;
    background: #474747;
    color: #fff;
    border: none;
    border-right: 1px solid #8e8e8e;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.nav-btn-tramites {
    width: 100%;
    background: #474747;
    color: #fff;
    border: none;
    border-right: 1px solid #8e8e8e;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.nav-btn i {
    display: block;
    padding: 0 10px 0 0;
}

.hdr-nav-item:first-child .nav-btn {
    border-left: 1px solid #8e8e8e;
}

.nav-btn:hover {
    background: #1c2127;
}

.nav-btn.active {
    background: #162a6075;
    border-left: 1px solid #d4af37;
    border-right: 1px solid #d4af37;
}

/* Ocultar elementos móviles en desktop */
.menu-divider,
.menu-social {
    display: none;
}

/* ========================================== */
/* MENÚ DESPLEGABLE - TRÁMITES EN LÍNEA */
/* ========================================== */

/* Icono de flecha */
.accordion-icon {
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* Dropdown Menu - Estado inicial */
.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    background: #1a2332;
    opacity: 0;
    visibility: hidden;
    padding: 0;
}

/* Dropdown abierto (por click en móvil) */
.dropdown-menu.w--open {
    max-height: 800px;
    opacity: 1;
    visibility: visible;
}

/* Rotación del ícono cuando está abierto */
.hdr-nav-item.w--open .accordion-icon {
    transform: rotate(180deg);
}

/* Items del dropdown */
.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: #f0ce8a;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(207, 207, 207, 0.2);
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    padding-left: 28px;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Desktop: mostrar con hover */
@media (min-width: 769px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        width: max-content;
        min-width: 280px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        z-index: 1000;
    }

    .hdr-nav-item[data-hover="true"]:hover .dropdown-menu {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
    }

    .hdr-nav-item[data-hover="true"]:hover .accordion-icon {
        transform: rotate(180deg);
    }

    .dropdown-item {
        color: var(--color-texto, #333);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dropdown-item:hover {
        background: #b1d7fd;
        color: var(--color-primario, #2a2544);
    }
}

/* Media queries para pantallas medianas */
@media screen and (max-width: 1024px) {
    .nav-btn,
    .nav-btn-tramites {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Media queries para pantallas pequeñas */
@media screen and (max-width: 768px) {
    .hdr-nav {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .contendor-top {
        min-width: max-content;
    }
    
    .nav-btn,
    .nav-btn-tramites {
        padding: 12px 10px;
        font-size: 12px;
    }
}

/* Media queries para pantallas muy pequeñas */
@media screen and (max-width: 480px) {
    .nav-btn,
    .nav-btn-tramites {
        padding: 10px 8px;
        font-size: 11px;
    }
    
    .nav-btn i {
        padding: 0 5px 0 0;
    }
}

/* ================================================ */
/* CONTENIDO PRINCIPAL */
/* ================================================ */
#content {
    min-height: calc(100vh - 400px);
}

/* ================================================ */
/* FOOTER */
/* ================================================ */
.ftr {
    background: linear-gradient(354deg, var(--primary-color) 0%, var(--color-primario) 100%);
    color: #fff;
    padding: 40px 20px;
}

.ftr-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: start;
    flex-wrap: wrap;
}

.ftr-logo,
.ftr-section,
.ftr-address {
    flex: 1;
    min-width: 250px;
}

.centrar {
    text-align: center;
}

.centrar img {
    width: 80%;
}

.ftr h3 {
    color: #d4af37;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.info-contacto {
    list-style: none;
}

.info-contacto li {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    align-items: flex-start;
}

.contiene-icono {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.contiene-icono i {
    color: #d4af37;
    font-size: 16px;
}

.info-contacto strong {
    display: block;
    color: #d4af37;
    font-size: 13px;
    margin-bottom: 3px;
}

.info-contacto p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.ftr-address {
    text-align: center;
}

.ftr-address-icon {
    margin-bottom: 15px;
}

.ftr-address-icon .contiene-icono {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    font-size: 20px;
}

.ftr-address-content p {
    font-size: 14px;
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.9);
}

.ftr-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    background: #1c5e8aab;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* ================================================ */
/* RESPONSIVE - MÓVIL (MENÚ LATERAL) */
/* ================================================ */
@media (max-width: 768px) {

    /* ======================================== */
    /* BOTÓN HAMBURGUESA */
    /* ======================================== */
    .hdr-menu-toggle {
        display: flex !important;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 10px;
        gap: 5px;
        z-index: 1002;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        width: 48px;
        height: 48px;
    }

    .contendor-top {
        height: 100vh;
        display: block;
        min-height: auto;
    }

    .hdr-menu-toggle:hover {
        background: #fff;
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    }

    .hdr-menu-toggle:active {
        transform: translateY(-50%) scale(0.95);
    }

    .hdr-menu-toggle span {
        width: 26px;
        height: 3px;
        background: #2a2544;
        border-radius: 3px;
        display: block;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Animación del botón hamburguesa a X */
    .hdr-menu-toggle.menu-open span:nth-child(1) {
        transform: rotate(-45deg) translate(-6px, 7px);
        background: #d4af37;
    }

    .hdr-menu-toggle.menu-open span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .hdr-menu-toggle.menu-open span:nth-child(3) {
        transform: rotate(45deg) translate(-6px, -7px);
        background: #d4af37;
    }

    /* ======================================== */
    /* OVERLAY OSCURO */
    /* ======================================== */
    .menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.65);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 998;
        backdrop-filter: blur(4px);
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* ======================================== */
    /* CONTENEDOR DEL MENÚ */
    /* ======================================== */
    .hdr-menu-container {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        z-index: auto;
        pointer-events: auto;
        border: none;
    }

    /* ======================================== */
    /* PANEL DE NAVEGACIÓN LATERAL */
    /* ======================================== */
    .hdr-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 90px 0 30px;
        background: linear-gradient(180deg, #2a2544 0%, #1d1d3a 50%, #1a1a2e 100%);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
        z-index: 999;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Menú abierto */
    .hdr-nav.menu-open {
        left: 0;
        display: flex;
    }

    /* ======================================== */
    /* ITEMS DEL MENÚ */
    /* ======================================== */
    .hdr-nav-item {
        width: 100%;
        max-width: none;
        flex: none;
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.4s ease, transform 0.4s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .hdr-nav.menu-open .hdr-nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    /* Animación escalonada */
    .hdr-nav.menu-open .hdr-nav-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .hdr-nav.menu-open .hdr-nav-item:nth-child(2) {
        transition-delay: 0.15s;
    }

    .hdr-nav.menu-open .hdr-nav-item:nth-child(3) {
        transition-delay: 0.2s;
    }

    .hdr-nav.menu-open .hdr-nav-item:nth-child(4) {
        transition-delay: 0.25s;
    }

    /* ======================================== */
    /* BOTONES DE NAVEGACIÓN EN MÓVIL */
    /* ======================================== */
    .nav-btn {
        width: 100%;
        padding: 20px 25px;
        border: none !important;
        text-align: left;
        font-size: 15px;
        font-weight: 400;
        background: transparent;
        color: rgba(255, 255, 255, 0.9);
        display: flex;
        align-items: center;
        gap: 18px;
        letter-spacing: 0.8px;
        position: relative;
        overflow: hidden;
    }

    /* Efecto hover sutil */
    .nav-btn::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 0;
        height: 100%;
        background: rgba(212, 175, 55, 0.08);
        transition: width 0.3s ease;
        z-index: -1;
    }

    .nav-btn-tramites {
        width: 100%;
        padding: 20px 25px;
        border: none;
        text-align: left;
        font-size: 15px;
        font-weight: 400;
        background: transparent;
        color: rgba(255, 255, 255, 0.9);
        display: flex;
        align-items: center;
        gap: 18px;
        position: relative;
        justify-content: space-between;
    }

    .nav-btn-tramites::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 0;
        height: 100%;
        background: rgba(212, 175, 55, 0.08);
        transition: width 0.3s ease;
        z-index: -1;
    }

    .nav-btn:hover::before,
    .nav-btn-tramites:hover::before {
        width: 100%;
    }

    .nav-btn i {
        display: block;
        font-size: 22px;
        width: 28px;
        text-align: center;
        color: rgba(255, 255, 255, 0.85);
        transition: all 0.3s;
    }

    .nav-btn span {
        flex: 1;
    }

    .nav-btn:hover {
        background: rgba(212, 175, 55, 0.05);
        color: #fff;
    }

    .nav-btn:hover i {
        color: #d4af37;
        transform: scale(1.1);
    }

    /* Botón activo */
    .nav-btn.active {
        background: rgba(212, 175, 55, 0.15);
        border-left: 4px solid #d4af37 !important;
        color: #d4af37;
        font-weight: 600;
        padding-left: 21px;
    }

    .nav-btn.active i {
        color: #d4af37;
        transform: scale(1.15);
    }

    .nav-btn.active::before {
        width: 100%;
    }

    .nav-btn-tramites .accordion-icon {
        margin-left: auto;
    }

    /* ======================================== */
    /* DIVISOR */
    /* ======================================== */
    .menu-divider {
        display: block;
        margin: 25px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        width: calc(100% - 40px);
        opacity: 0;
        transform: scaleX(0);
        transition: opacity 0.4s ease, transform 0.4s ease;
        transition-delay: 0.3s;
    }

    .hdr-nav.menu-open .menu-divider {
        opacity: 1;
        transform: scaleX(1);
    }

    /* ======================================== */
    /* ENLACES SOCIALES */
    /* ======================================== */
    .menu-social {
        display: block;
        padding: 10px 0;
        width: 100%;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
        transition-delay: 0.35s;
    }

    .hdr-nav.menu-open .menu-social {
        opacity: 1;
        transform: translateY(0);
    }

    .menu-social-link {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 16px 25px;
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        transition: all 0.3s ease;
        font-size: 14px;
        width: 100%;
        position: relative;
    }

    .menu-social-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 0;
        height: 100%;
        background: rgba(255, 255, 255, 0.05);
        transition: width 0.3s ease;
    }

    .menu-social-link:hover::before {
        width: 100%;
    }

    .menu-social-link i {
        font-size: 20px;
        width: 28px;
        text-align: center;
        transition: transform 0.3s;
    }

    .menu-social-link:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        padding-left: 30px;
    }

    .menu-social-link:hover i {
        transform: scale(1.15);
        color: #d4af37;
    }

    /* ======================================== */
    /* FOOTER RESPONSIVE */
    /* ======================================== */
    .ftr-content {
        flex-direction: column;
        gap: 30px;
    }

    .ftr-logo,
    .ftr-section,
    .ftr-address {
        min-width: 100%;
    }
}

/* ================================================ */
/* MÓVILES MUY PEQUEÑOS */
/* ================================================ */
@media (max-width: 480px) {
    .hdr-nav {
        width: 294px;
        max-width: 85vw;
    }

    .nav-btn,
    .nav-btn-tramites {
        padding: 18px 20px;
        font-size: 14px;
        gap: 15px;
    }

    .menu-social-link {
        padding: 14px 20px;
        font-size: 13px;
        gap: 15px;
    }

    .menu-social-link i {
        font-size: 18px;
        width: 24px;
    }

    .hdr-logo-container img {
        height: 75px;
    }
}

/* ================================================ */
/* SCROLLBAR PERSONALIZADO PARA EL MENÚ */
/* ================================================ */
.hdr-nav::-webkit-scrollbar {
    width: 6px;
}

.hdr-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.hdr-nav::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.hdr-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}