/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
}

/* ─── Header and Navigation ─────────────────────────────────────────────── */
.header {
    background-color: white;
    height: 80px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    max-width: 1800px;
    margin: 0 auto;
}

.logo {
    width: 140px;
    height: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.nav-menu-item {
    margin: 0 15px;
    position: relative;
}

.nav-link {
    color: rgb(136, 105, 47);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 12px;
    display: block;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.nav-menu-link_active {
    font-weight: 700;
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-radius: 4px;
    padding: 8px 0;
}

.dropdown-menu-item {
    list-style: none;
}

.dropdown-menu-item .nav-link {
    padding: 10px 20px;
    font-size: 14px;
}

.nav-menu-item:hover .dropdown-menu {
    display: block;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: rgb(136, 105, 47);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ─── Gallery ───────────────────────────────────────────────────────────── */
#gallery {
    width: 100%;
    height: 70vh;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.gallery-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.gallery-item.active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 20;
}

.nav-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.nav-button span {
    font-size: 20px;
}

/* ─── Banner ────────────────────────────────────────────────────────────── */
#espacio-en-blanco {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 15px;
}

#espacio-en-blanco img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 200px;
    object-fit: cover;
}

.texto-superpuesto {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 90%;
    max-width: 800px;
}

.texto-superpuesto p {
    font-family: "Poiret One", serif;
    font-weight: 700;
    font-size: clamp(14px, 2.5vw, 36px);
    margin: 8px 0;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.container-cards {
    background-color: #f5f5f5;
    padding: 60px 20px;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 80%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
}

.card:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
}

/* Invert image/text for even cards without direction:rtl */
.card:nth-child(even) .card-image {
    order: 2;
}

.card:nth-child(even) .card-content {
    order: 1;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.card:hover .card-image img {
    transform: scale(1.08);
}

.card-content {
    padding: 24px 20px;
    text-align: left;
    direction: ltr;
}

.card h3 {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    text-align: center;
    color: #333;
    letter-spacing: 0.5px;
}

.card-content ul {
    list-style: none;
    padding: 0;
}

.card-content li {
    margin-bottom: 8px;
    text-align: center;
}

.card-content a {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #666;
    display: block;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer {
    background-color: #203030;
    color: white;
    padding: 40px 0 20px;
    position: relative;
}



.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 30px;
}

.footer-logo img {
    width: 120px;
    height: auto;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ccc;
}

.footer-copy {
    text-align: center;
    font-size: 14px;
    margin-top: 20px;
    padding: 0 20px;
}

.footer-address {
    text-align: center;
    font-size: 13px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 20px;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 992px) {
    .nav-menu-item {
        margin: 0 10px;
    }
    .card {
        width: 88%;
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: white;
        width: 100%;
        height: calc(100vh - 70px);
        padding: 20px 0;
        transition: left 0.3s ease;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu-item {
        margin: 6px 0;
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        padding: 0;
        background-color: #f9f5ee;
        border-radius: 0;
    }

    .nav-menu-item.active .dropdown-menu {
        display: block;
    }

    #gallery {
        height: 45vh;
        margin-top: 70px;
    }

    .texto-superpuesto p {
        font-size: clamp(15px, 4.5vw, 28px);
        white-space: normal;
    }

    /* Cards: single column, full width, reset order */
    .cards-container {
        gap: 20px;
    }

    .card {
        width: 100%;
        grid-template-columns: 1fr;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .card:nth-child(even) .card-image {
        order: 0;
    }

    .card:nth-child(even) .card-content {
        order: 0;
    }

    .card-image {
        height: 200px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }


}

@media (max-width: 480px) {
    .logo {
        width: 110px;
    }

    #gallery {
        height: 38vh;
    }

    .nav-button {
        width: 34px;
        height: 34px;
    }

    .nav-button span {
        font-size: 15px;
    }

    .card-image {
        height: 170px;
    }

    .card h3 {
        font-size: 14px;
    }

    .card-content {
        padding: 16px;
    }

    .card-content a {
        font-size: 13px;
    }

    .container-cards {
        padding: 40px 14px;
    }
}

@media (max-width: 360px) {
    .logo {
        width: 95px;
    }

    .card-image {
        height: 150px;
    }

    .card h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .card-content {
        padding: 12px;
    }

    .card-content li {
        margin-bottom: 6px;
    }

    .card-content a {
        font-size: 12px;
    }
}
