:root {
    --color-primary: #00572B; 
    --color-secondary: #407E2D;
    --color-accent: #537F2C;
    --color-bg-cream: #F3F5D2;
    --color-white: #FFFFFF;
    --color-dark: #1C281A;
    --color-muted: #606C5D;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==========================================================================
   ESTILOS GENERALES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--color-dark);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Contenedor Dividido */
.split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ==========================================================================
   SECCIÓN IZQUIERDA: FORMULARIO
   ========================================================================== */
.left-side {
    flex: 1;
    background-color: var(--color-bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.form-container {
    width: 100%;
    max-width: 450px;
}

.brand-header {
    text-align: center;
    background-color: transparent; 
    padding: 40px 0 0 0; /* Espaciado mínimo arriba del logo */
    margin-bottom: 0%; /* Margen negativo sutil para atraer el h2 hacia arriba */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    width: 100%;
    max-width: 270px; /* Lo compactamos un pelín para que no domine tanto espacio vertical */
    height: auto;     
    display: block;
    object-fit: contain; 
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.tagline {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-top: 5px;
    font-weight: 600;
}

h2 {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-top: -30px;     /* Reducimos de 10px a 5px para acercarlo más al logo */
    margin-bottom: 10px; /* Espaciado perfecto con el texto descriptivo de abajo */
}

.form-subtitle {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Campos del Formulario */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(83, 127, 44, 0.3);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 1rem;
    background-color: var(--color-white);
    color: var(--color-dark);
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 87, 43, 0.15);
}

/* Botón de Enviar */
.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn-submit:hover {
    background-color: #004522;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* ==========================================================================
   SECCIÓN DERECHA: HERO / IMAGEN VISUAL
   ========================================================================== */
.right-side {
    flex: 1.2;
    position: relative;
    /* Usamos foto2.jpg como fondo estático (el portón) */
    background: url('../assets/img/foto7.jpg') center/cover no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 60px;
}

/* Capa oscura/filtro para asegurar legibilidad del texto */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado sutil: negro a transparente para legibilidad del texto */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 10%, rgba(0, 0, 0, 0.1) 60%);
    z-index: 1;
}

.right-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    max-width: 600px;
}

.right-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    font-weight: 700;
}

.right-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Botón Ver Más Fotos */
.btn-gallery {
    padding: 14px 28px;
    background-color: var(--color-secondary);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s /ease;
}

.btn-gallery:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   MODAL DE LA GALERÍA
   ========================================================================== */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 40, 26, 0.95);
    z-index: 1000;
    overflow-y: auto;
    padding: 60px 20px;
}

.modal-content {
    background-color: var(--color-white);
    margin: 0 auto;
    padding: 40px;
    max-width: 1000px;
    border-radius: 12px;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 30px;
    text-align: center;
}

/* Cierre del Modal */
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--color-white);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--color-secondary);
}

/* Grid de Imágenes */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   RESPONSIVE (Para celulares y tablets)
   ========================================================================== */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column-reverse; /* El formulario queda arriba en móviles */
        height: auto;
    }
    
    .left-side, .right-side {
        width: 100%;
        height: auto;
        flex: none;
    }

    .right-side {
        padding: 80px 20px 60px 20px;
        min-height: 50vh;
    }

    .left-side {
        padding: 50px 20px;
    }

    .right-content h1 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   ACTUALIZACIÓN MODAL (CARRUSEL DE IMÁGENES)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 40, 26, 0.95);
    z-index: 1000;
}

.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    padding: 0 60px;
}

#slider-image {
    max-height: 85vh;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain;
}

/* Botones de navegación (Flechas) */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

#prev-btn {
    left: 20px;
}

#next-btn {
    right: 20px;
}

/* Contador */
.slider-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    font-size: 1.1rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    letter-spacing: 2px;
}

/* Cierre del Modal */
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--color-white);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* ==========================================
   ESTILOS PARA INSTAGRAM (AL FINAL DEL ARCHIVO)
   ========================================== */
.social-links {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid rgba(0, 87, 43, 0.15); /* Línea divisoria suave */
    padding-top: 20px;
    
    /* Flexbox para centrar perfectamente el texto y el icono en el eje vertical */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.social-links p {
    font-size: 0.9rem;
    color: #606C5D; /* Color grisáceo elegante para el texto secundario */
    margin-bottom: 12px;
    font-weight: 500;
}

.social-links a {
    color: #00572B; /* El verde oscuro institucional de tu logo */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

/* Efecto al pasar el mouse por encima (Hover) */
.social-links a:hover {
    color: #407E2D; /* Cambia al verde más claro de las hojas del logo */
    transform: scale(1.15); /* Se agranda un 15% de forma fluida */
}