/* HEADER */
.menu-toggle {
    display: none;
}

header {
    position: relative;
    height: 30vh;
    min-height: 320px; 
    color: var(--light);
    overflow: hidden;
}

.logo,
.logo a {
    font-family: 'Poppins', sans-serif;
}

.logo a {
    color: var(--light);
    text-decoration: none;
}

.logo a:hover {
    color: inherit;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
}

.page-header__slides {
    position: absolute;
    inset: 0;
}

.page-header__slides .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: opacity;
}

.page-header__slides .slide.is-active {
    opacity: 1;
}

header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1;
    pointer-events: none;
}

.page-header__slides,
.page-header__slides .slide,
header::after {
    pointer-events: none;
}

nav, .hero {
    position: relative;
    z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  height: 80px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(0,0,0,0);
  transition: background .35s ease, box-shadow .35s ease;
}

.nav-sticky {
  background: rgba(0,0,0,1);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}


nav h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
}

nav h1 span {
    color: var(--primary);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    z-index: 1001;
}

nav a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    transition: color .3s;
}

nav a:visited {
  color: var(--light);
}

nav a,
nav a:visited,
nav a:focus,
nav a:active {
  color: var(--light);
  outline: none;
}

nav a:hover {
    color: var(--primary);
}

/* NAV DROPDOWN */
nav ul li.nav-dropdown {
    position: relative;
}

nav ul li.nav-dropdown details {
    position: relative;
}

nav ul li.nav-dropdown summary {
    list-style: none;
    cursor: pointer;
    color: var(--light);
    font-weight: 500;
    transition: color .3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

nav ul li.nav-dropdown summary::-webkit-details-marker {
    display: none;
}

nav ul li.nav-dropdown summary::after {
    content: '▾';
    font-size: .75em;
    transition: transform .2s ease;
}

nav ul li.nav-dropdown details[open] > summary::after {
    transform: rotate(-180deg);
}

nav ul li.nav-dropdown summary:hover {
    color: var(--primary);
}

nav ul li.nav-dropdown .dropdown-menu {
    list-style: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: rgba(0,0,0,.95);
    border-radius: 12px;
    padding: 8px;
    display: none;
    box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

nav ul li.nav-dropdown details[open] .dropdown-menu {
    display: block;
}

nav ul li.nav-dropdown .dropdown-menu li {
    margin: 0;
}

nav ul li.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

nav ul li.nav-dropdown .dropdown-menu a:hover {
    background: rgba(255,255,255,.1);
}

.hero {
    position: absolute;
    inset: 80px 0 0 0;
    z-index: 2;
    height: calc(100% - 80px);

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h2 {
    font-size: 58px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
}


/* RESPONSIVE */
@media (max-width: 768px) {

    nav {
        padding: 55px 20px;
        height: 70px;
    }

    header {
        height: 60vh;
        min-height: 360px;
    }

    .menu-toggle {
        display: block;
        font-size: 32px;
        cursor: pointer;
        color: var(--light);
    }

    nav ul {
        position: absolute;
        top: 70px;
        right: 20px;
        background: rgba(0,0,0,.95);
        flex-direction: column;
        width: 200px;
        padding: 20px;
        border-radius: 15px;
        display: none;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin-bottom: 0; /* quitamos separación rara */
    }

    nav ul li a {
        display: block;              /* 🔑 clave */
        width: 100%;                 /* 🔑 ocupa todo */
        padding: 14px 16px;          /* área táctil grande */
        border-radius: 10px;
    }

    nav ul li a:hover {
        background: rgba(255,255,255,.1);
    }

    nav ul li.nav-dropdown summary {
        display: block;
        width: 100%;
        padding: 14px 16px;
        border-radius: 10px;
    }

    nav ul li.nav-dropdown summary:hover {
        background: rgba(255,255,255,.1);
    }

    nav ul li.nav-dropdown .dropdown-menu {
        position: static;
        min-width: 0;
        width: 100%;
        margin-top: 4px;
        padding: 6px;
        background: rgba(255,255,255,.06);
        box-shadow: none;
    }

    nav ul li.nav-dropdown .dropdown-menu a {
        white-space: normal;
        padding: 10px;
    }

    .hero {
        padding: 20px;
        height: calc(100% - 70px);
        margin-top: 0;
    }

    .hero h2 {
        font-size: 38px;
    }
}

