/* --- Global Styles & Variables --- */
:root {
    --primary-color: #2c3e50; /* Dark Slate Blue */
    --secondary-color: #bdc3c7; /* Silver */
    --accent-color: #c0a172; /* Muted Gold/Tan */
    --light-color: #ecf0f1; /* Clouds White */
    --dark-color: #1a1a1a;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-color);
    color: var(--primary-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2 {
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

section {
    padding: 6rem 0;
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--light-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-color);
    text-decoration: none;
    letter-spacing: 2px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--light-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav ul li a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* --- Hero Section (#inicio) --- */
#inicio {
    background-image: url('hero-background.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    padding: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

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

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-button {
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #d4b991;
    transform: translateY(-2px);
}

/* --- About Us Section (#quienes-somos) --- */
#quienes-somos {
    background-color: #fff;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-content {
    flex: 1;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mission-vision {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.mission-vision h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--primary-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.mission, .vision {
    flex: 1;
}

/* --- Gallery Section (#galeria) --- */
.gallery-tabs {
    text-align: center;
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    font-family: var(--font-family);
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    margin: 0 0.5rem;
    color: var(--secondary-color);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active, .tab-button:hover {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.gallery-content {
    display: none;
}

.gallery-content.active {
    display: block;
}

/* --- New Photo Gallery Styles --- */
.photo-gallery-container {
    display: flex;
    gap: 1.5rem;
    height: 500px; /* Adjust height as needed */
    background-color: #fff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.thumbnails {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.75rem;
    flex-shrink: 0;
    /* Custom scrollbar for webkit browsers */
    &::-webkit-scrollbar {
        width: 8px;
    }
    &::-webkit-scrollbar-track {
        background: var(--light-color);
        border-radius: 4px;
    }
    &::-webkit-scrollbar-thumb {
        background: var(--secondary-color);
        border-radius: 4px;
    }
    &::-webkit-scrollbar-thumb:hover {
        background: #a7a9ab;
    }
}

.thumbnail-item {
    width: 120px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 5px;
    border: 3px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
    opacity: 0.7;
}

.thumbnail-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: var(--accent-color);
    opacity: 1;
}

.main-image-display {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.main-image-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
    transition: opacity 0.4s ease-in-out;
}

/* --- Original Gallery Grid (for Videos) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    position: relative;
    border-radius: 5px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.video-item {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

/* --- Modal (Lightbox) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content-container {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    animation-name: zoom;
    animation-duration: 0.4s;
}

@keyframes zoom {
    from {transform: scale(0.5); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.modal-content-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.modal-content-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    border: none;
    border-radius: 5px;
}

.close-modal {
    position: absolute;
    top: -10px;
    right: 5px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1002;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
}

/* --- Contact Section (#contacto) --- */
#contacto {
    background-color: var(--primary-color);
    color: var(--light-color);
}

#contacto h2, #contacto h3 {
    color: var(--light-color);
}

#contact-form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid var(--secondary-color);
    background-color: var(--light-color);
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--primary-color);
}

#contact-form input::placeholder, #contact-form textarea::placeholder {
    color: #95a5a6;
}

.social-media {
    text-align: center;
    margin-top: 3rem;
}

.social-media a {
    color: var(--light-color);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.social-media a:hover {
    color: var(--accent-color);
}

/* --- Footer --- */
footer {
    background-color: var(--dark-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* --- WhatsApp Floating Button --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    
    header .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    nav ul {
        justify-content: center;
        width: 100%;
    }

    nav ul li {
        margin: 0 0.8rem;
    }

    #quienes-somos {
        flex-direction: column;
    }

    .mission-vision {
        flex-direction: column;
        gap: 1.5rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}