/* ============================================
   PUBLIC NAV - Hugo Morales & Asociados S.A.S.
   Navbar horizontal + Footer compartido
   Usado por landing + todas las subpaginas publicas
   ============================================ */

/* --- Variables compartidas --- */
:root {
    --pn-max-width: 1400px;
    --pn-nav-height: 72px;
    --pn-green: #4a5240;
    --pn-green-dark: #3a4230;
    --pn-green-deeper: #2d3520;
    --pn-gold: #c4a35a;
    --pn-gold-light: #d4b36a;
    --pn-gold-dark: #b4934a;
    --pn-text: #2d3436;
    --pn-text-mid: #636e72;
    --pn-bg: #f8f8f6;
    --pn-white: #ffffff;
    --pn-border: #e2e4de;
    --pn-radius: 16px;
    --pn-shadow: 0 4px 24px rgba(0,0,0,0.08);
    --pn-transition: 0.3s ease;
}

/* ============================================
   SUBPAGE OVERRIDES
   ============================================ */
.subpage .main-content {
    margin-left: 0 !important;
    padding-top: var(--pn-nav-height);
}

.subpage .sidebar,
.subpage .sidebar-overlay {
    display: none !important;
}

/* ============================================
   NAVBAR HORIZONTAL
   ============================================ */

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--pn-nav-height);
    z-index: 1000;
    transition: background var(--pn-transition),
                box-shadow var(--pn-transition);
}

.landing-nav.nav-transparent {
    background: transparent;
}

.landing-nav.nav-solid {
    background: rgba(58, 66, 48, 0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(12px);
}

.nav-container {
    max-width: var(--pn-max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: opacity var(--pn-transition);
}

.nav-logo:hover {
    opacity: 0.85;
}

.nav-logo-icon {
    width: 44px;
    height: 52px;
    flex-shrink: 0;
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.nav-logo-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 5px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    position: relative;
    padding-bottom: 5px;
    text-align: center;
}

/* Linea dorada decorativa bajo HMA */
.nav-logo-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--pn-gold), var(--pn-gold-light), var(--pn-gold), transparent);
    border-radius: 1px;
}

.nav-logo-name {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.85);
    letter-spacing: 1.8px;
    margin-top: 5px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.nav-logo-sub {
    font-size: 0.55rem;
    color: var(--pn-gold-light);
    letter-spacing: 0.4px;
    text-align: center;
    margin-top: 1px;
    font-weight: 400;
    font-style: italic;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all var(--pn-transition);
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

/* Dropdown arrow indicator */
.nav-links > li.has-dropdown > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255,255,255,0.5);
    transition: transform 0.2s ease;
}

.nav-links > li.has-dropdown:hover > a::after {
    transform: rotate(180deg);
    border-top-color: rgba(255,255,255,0.8);
}

/* Dropdown menus */
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(50, 58, 40, 0.97);
    backdrop-filter: blur(16px);
    border-radius: 0 0 12px 12px;
    padding: 12px 0 8px;
    min-width: 280px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    list-style: none;
    margin: 0;
    z-index: 1001;
    border: 1px solid rgba(255,255,255,0.06);
    border-top: none;
}

/* Puente invisible para que el hover no se pierda entre enlace y dropdown */
.nav-links > li.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
}

.nav-links > li.has-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 10px 24px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-dropdown-menu li a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--pn-gold);
    padding-left: 28px;
}

.nav-dropdown-menu li a.active {
    color: var(--pn-gold);
    border-left-color: var(--pn-gold);
    font-weight: 500;
}

/* Sub-dropdown (flyout derecho) dentro de dropdown */
.has-subdropdown {
    position: relative;
}

.has-subdropdown > a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.has-subdropdown > a .sub-arrow {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.has-subdropdown:hover > a .sub-arrow {
    opacity: 1;
}

.nav-subdropdown-menu {
    display: none;
    position: absolute;
    top: -12px;
    left: 100%;
    background: rgba(50, 58, 40, 0.97);
    backdrop-filter: blur(16px);
    border-radius: 0 12px 12px 0;
    padding: 12px 0 8px;
    min-width: 200px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    list-style: none;
    margin: 0;
    z-index: 1002;
    border: 1px solid rgba(255,255,255,0.06);
    border-left: none;
}

.has-subdropdown:hover > .nav-subdropdown-menu {
    display: block;
}

/* Bridge para no perder hover al mover mouse al submenu */
.has-subdropdown::after {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 8px;
    height: 100%;
}

.nav-subdropdown-menu li a {
    display: block;
    padding: 10px 24px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-subdropdown-menu li a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--pn-gold);
    padding-left: 28px;
}

.nav-subdropdown-menu li a.active {
    color: var(--pn-gold);
    border-left-color: var(--pn-gold);
    font-weight: 500;
}

/* Mobile nested submenu (indentado) */
.mobile-sub-toggle {
    font-size: 0.9rem !important;
    padding-left: 12px !important;
}

.mobile-nested-submenu li a {
    padding-left: 24px !important;
    font-size: 0.88rem;
}

/* CTA button */
.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--pn-gold);
    color: var(--pn-green-dark);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all var(--pn-transition);
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-cta-btn:hover {
    background: var(--pn-gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(196,163,90,0.35);
}

.nav-cta-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   HAMBURGER
   ============================================ */
.nav-hamburger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
    transition: background var(--pn-transition);
}

.nav-hamburger:hover {
    background: rgba(255,255,255,0.1);
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.25s ease;
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(42, 53, 32, 0.97);
    z-index: 999;
    backdrop-filter: blur(16px);
    opacity: 0;
    transition: opacity 0.35s ease;
    padding-top: var(--pn-nav-height);
    overflow-y: auto;
}

.mobile-menu.active {
    opacity: 1;
}

.mobile-menu-links {
    list-style: none;
    padding: 40px 32px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-links > li > a {
    display: block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 12px;
    transition: all var(--pn-transition);
}

.mobile-menu-links > li > a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    padding-left: 28px;
}

/* Mobile dropdown toggle */
.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 12px;
    transition: all var(--pn-transition);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    text-align: left;
}

.mobile-dropdown-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.mobile-dropdown-toggle svg {
    width: 20px;
    height: 20px;
    stroke: rgba(255,255,255,0.5);
    transition: transform 0.25s ease;
}

.mobile-dropdown-toggle.open svg {
    transform: rotate(180deg);
}

/* Mobile dropdown submenu */
.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.mobile-submenu.open {
    max-height: 400px;
}

.mobile-submenu li a {
    display: block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    padding: 10px 20px 10px 44px;
    border-left: 2px solid rgba(255,255,255,0.1);
    margin-left: 20px;
    transition: all 0.2s ease;
}

.mobile-submenu li a:hover,
.mobile-submenu li a.active {
    color: var(--pn-gold);
    border-left-color: var(--pn-gold);
}

.mobile-menu-cta {
    display: block;
    margin: 24px 32px 0;
    padding: 16px 24px;
    background: var(--pn-gold);
    color: var(--pn-green-dark);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    transition: all var(--pn-transition);
}

.mobile-menu-cta:hover {
    background: var(--pn-gold-light);
}

/* ============================================
   FOOTER COMPLETO
   ============================================ */

.landing-footer {
    background: var(--pn-green-deeper);
    color: #fff;
    padding: 64px 32px 0;
}

.footer-grid {
    max-width: var(--pn-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
}

.footer-col h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pn-gold);
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

.footer-about p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.65;
    margin-bottom: 16px;
}

.footer-nit {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all var(--pn-transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a:hover {
    color: var(--pn-gold);
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-contact-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--pn-gold);
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact-item span {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

.footer-contact-item a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color var(--pn-transition);
}

.footer-contact-item a:hover {
    color: var(--pn-gold);
}

.footer-bottom-bar {
    max-width: var(--pn-max-width);
    margin: 48px auto 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom-bar p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

/* Footer compacto (para paginas app-style) */
.landing-footer.footer-compact {
    padding: 0 32px;
}

.landing-footer.footer-compact .footer-grid {
    display: none;
}

.landing-footer.footer-compact .footer-bottom-bar {
    margin-top: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .mobile-menu {
        display: block;
        pointer-events: none;
    }

    .mobile-menu.active {
        pointer-events: auto;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }
}

@media (max-width: 768px) {
    :root {
        --pn-nav-height: 64px;
    }

    .nav-container {
        padding: 0 20px;
    }

    .nav-cta-btn {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-logo-icon {
        width: 34px;
        height: 40px;
    }
    .nav-logo-title {
        font-size: 1.6rem;
        letter-spacing: 3px;
    }
    .nav-logo-name {
        font-size: 0.5rem;
    }
    .nav-logo-sub {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-logo-icon {
        width: 30px;
        height: 36px;
    }
    .nav-logo-title {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
    .nav-logo-name,
    .nav-logo-sub {
        display: none;
    }
}

/* Respeto por preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .landing-nav,
    .nav-cta-btn,
    .nav-links > li > a,
    .mobile-menu,
    .mobile-submenu {
        transition: none;
    }
}
