/* ========================================
   1. RESET & BASE
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background: #f4f4f4;
    overflow-y: scroll;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   2. HEADER & NAVIGATION
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: transparent;
    color: white;
    z-index: 10;
    transition: transform 0s ease;
}

header.hide {
    transform: translateY(-100%);
}

nav {
    display: flex;
    justify-content: flex-start;
    align-items: left;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #cccccc;
    transition: color 0s ease;
}

.logo:hover {
    color: white;
}

/* Main menu (desktop) */
.main-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.main-menu > li > a,
.dropdown-toggle {
    color: #cccccc;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0s ease;
}

.main-menu > li > a:hover,
.main-menu > li:hover > a,
.dropdown-toggle:hover,
.dropdown:hover > .dropdown-toggle {
    color: white;
}

/* Dropdown (desktop) */
.dropdown {
    position: relative;
}

.submenu {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    min-width: 220px;
    padding: 0rem 0;
    -webkit-backdrop-filter: blur(12px);
    list-style: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0s ease;
}

.dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu a {
    display: block;
    padding: 0.3rem 0rem;
    color: #cccccc;
    transition: color 00s ease;
}

.submenu a:hover {
    color: white;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 11;
}

.bar {
    width: 30px;
    height: 3px;
    background: #cccccc;
    transition: background 0s;
}

.hamburger:hover .bar {
    background: white;
}

/* ========================================
   3. HERO SECTIONS
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    background: no-repeat center center / cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: 4rem;
    text-transform: uppercase;
}

.hero p {
    margin: 0 0 2rem;
    font-size: 1.2rem;
    max-width: 50%;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid white;
    color: white;
    text-transform: uppercase;
    font-weight: bold;
    transition: background 0s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Backgrounds por sección */
#section1 { 
  background-image: url('/images/hero1.webp'); 
}
@supports not (background-image: url('/images/hero1.webp')) {
  #section1 { background-image: url('/images/hero1.jpg'); }
}
#section2 { background-image: url('/images/section2.jpg'); }
#section3 { background-image: url('/images/section3.jpg'); }
#section4 { background-image: url('/images/section4.jpg'); }
#section5 { background-image: url('/images/section5.jpg'); }

/* ========================================
   4. LAYOUT HOME
   ======================================== */
.home main {
    max-width: none;
    padding: 0;
    margin: 0;
}

.home-sections {
    margin-top: 0;
}

/* ========================================
   5. FOOTER
   ======================================== */
footer {
    padding: 3rem;
    background: #333;
    color: white;
    text-align: center;
}

/* ========================================
   6. RESPONSIVE (Móvil =1024px)
   ======================================== */
@media (max-width: 1024px) {
    nav {
        padding: 0 1rem;
        gap: 0;
        justify-content: space-between;
    }

    .hamburger {
        display: flex;
    }

    .main-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 1);
        padding: 2rem 1rem;
        flex-direction: column;
        gap: 1.8rem;
        text-align: left;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0s ease;
        z-index: 9;
    }

    .main-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Submenus en móvil (colapsables) */
    .submenu {
        position: static;
        background: transparent;
        backdrop-filter: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0s ease;
    }

    .submenu.open {
        max-height: 300px;
        padding: 1rem 0;
    }

    .dropdown-toggle::after {
        content: " -";
        font-size: 0.8rem;
    }

    /* Hero en móvil */
    .hero {
        justify-content: flex-end;
        padding: 0 6% 10% 6%;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        max-width: 100%;
    }
}