.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999;
    background: rgba(230, 230, 230, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(150, 150, 150, 0.2);
    display: flex;
    align-items: center;
    height: 80px;
}

.header .nav {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 30px;
}

.nav nav {
    margin-left: auto;
    display: flex;
    gap: 20px;
    flex: 1;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: #333333;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    transition: 0.3s;
}

.nav a:hover {
    color: #FF5733;
}

.logo img {
    max-height: 90px;
    width: auto;
}

/* HAMBURGER BUTTON */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
    margin-left: auto;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333333;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 📌 TABLET (<= 1024px) */
@media (max-width: 1024px) {
    .nav {
        padding: 0 20px;
    }

    .nav nav {
        gap: 15px;
    }

    .nav a {
        font-size: 13px;
    }
}

/* 📌 TABLET (<= 768px) */
@media (max-width: 768px) {

    /* HEADER Y NAV */
    .nav {
        padding: 0 15px;
    }

    .hamburger {
        display: flex;
    }

    /* Menú desplegable */
    .nav nav {
        position: absolute;
        top: 80px; /* justo debajo del header */
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(230,230,230,0.95), rgba(255,255,255,0.98));
        flex-direction: column;
        padding: 20px 0;
        display: none;
        backdrop-filter: blur(6px);
        border-bottom: 1px solid rgba(0,0,0,0.06);
        z-index: 9998;
    }

    .nav nav.active {
        display: flex;
    }

    .nav nav a {
        font-size: 15px;
        padding: 16px 20px;
        color: #000;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .nav nav a:last-child {
        border-bottom: none;
    }

    .nav nav a:hover {
        background-color: rgba(26,163,168,0.1);
    }

    /* 🎯 HERO */
    .SeccionPrincipal {
        margin-top: 0; /* evita que el header tape el h1 */
        padding-top: 100px; /* espacio bajo el header */
        padding-bottom: 40px;
        height: auto;
        min-height: calc(100vh - 80px);
        overflow-x: hidden;
    }

    .seccionPrincipal-content {
        transform: none;
        width: 100%;
        padding: 0 20px;
        gap: 25px;
    }

    .text {
        max-width: 100%;
        text-align: center;
        padding: 0 20px;
    }

    .text h1 {
        font-size: 32px;
        line-height: 1.3;
        margin-bottom: 14px;
        word-wrap: break-word;
        word-break: break-word;
    }

    .text p {
        font-size: 18px;
        line-height: 1.45;
        margin-bottom: 28px;
    }

    /* Imagen del hero */
    .image {
        width: 100%;
        max-width: 350px;
    }

    .image img {
        width: 100%;
        height: auto;
    }
}

/* 📌 MÓVIL PEQUEÑO (<= 480px) */
@media (max-width: 480px) {

    /* El hero debe compensar la altura del header móvil */
    .SeccionPrincipal {
        margin-top: 0;
        padding-top: 100px; /* espacio consistente bajo el header */
        padding-bottom: 30px;
        height: auto;
        min-height: calc(100vh - 80px);
        overflow-x: hidden;
    }

    .seccionPrincipal-content {
        transform: none; 
        gap: 18px;
        padding: 0 14px;
        z-index: 2;
    }

    .text {
        padding: 0 6px;
        text-align: center;
    }

    .text h1 {
        font-size: 20px;
        line-height: 1.35;   /* más alto para evitar cortes */
        margin-top: 10px;    /* pequeño empuje extra */
        margin-bottom: 12px;
        word-wrap: break-word;
        word-break: break-word;
    }

    .text p {
        font-size: 14px;
        margin-bottom: 20px;
        line-height: 1.45;
    }

    .image img {
        width: 100%;
        max-width: 230px;
    }
}