/* ========================================
   ESTILOS CSS - EL GAUCHO CASA QUINTA
   ========================================
   Landing page para alojamiento turístico
   Diseño estilo campo pampeano argentino
   Mobile-first responsive design
   ======================================== */

/* ==============================
   IMPORTACIÓN DE VARIABLES
   ============================== */
@import url('variables.css');

/* ==============================
   IMPORTACIÓN DE GOOGLE FONTS
   ============================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Lato:wght@300;400;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ==============================
   RESET Y ESTILOS BASE
   ============================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Textura de grano sutil en el fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: var(--grain-opacity);
    pointer-events: none;
    z-index: -1;
}

/* ==============================
   TIPOGRAFÍA GLOBAL
   ============================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: var(--font-size-hero); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
}

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

/* ==============================
   UTILIDADES
   ============================== */
.container {
    width: 100%;
    max-width: var(--max-width-xl);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

.section {
    padding: var(--space-section) 0;
}

.text-center {
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==============================
   TÍTULOS DE SECCIÓN
   ============================== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-md);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-accent), 
        var(--color-primary), 
        var(--color-accent), 
        transparent
    );
    border-radius: var(--radius-pill);
}

/* Icono decorativo antes del título */
.section-header .section-icon {
    display: block;
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    opacity: 0.8;
}

/* ==============================
   BOTONES
   ============================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

/* Botón primario - Fondo sólido */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-white);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md), 0 4px 0 var(--color-primary-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 6px 0 var(--color-primary-dark);
    color: var(--text-white);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: var(--shadow-sm), 0 2px 0 var(--color-primary-dark);
}

/* Botón secundario - Borde */
.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: var(--text-white);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Botón WhatsApp */
.btn-whatsapp {
    background: #25D366;
    color: var(--text-white);
    border-color: #25D366;
    box-shadow: var(--shadow-md);
}

.btn-whatsapp:hover {
    background: #128C7E;
    border-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-white);
}

/* Botón outline marrón */
.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

/* Tamaños de botón */
.btn-sm {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-base);
}

/* ==============================
   HERO SECTION
   ============================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Imagen de fondo del hero */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

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

/* Overlay oscuro para legibilidad */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(44, 36, 22, 0.4) 0%,
        rgba(44, 36, 22, 0.7) 50%,
        rgba(44, 36, 22, 0.85) 100%
    );
    z-index: -1;
}

/* Contenido del hero */
.hero-content {
    text-align: center;
    padding: var(--space-xl);
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

/* Logo en el hero */
.hero-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: fadeInDown 0.8s ease-out;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

/* Título principal H1 */
.hero-title {
    font-family: var(--font-display);
    font-size: var(--font-size-hero);
    color: var(--text-white);
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: var(--space-lg);
    letter-spacing: 2px;
}

/* Subtítulo del hero */
.hero-subtitle {
    font-family: var(--font-accent);
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--text-cream);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Botones del hero */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-cream);
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.hero-scroll svg {
    width: 32px;
    height: 32px;
}

/* ==============================
   SECCIÓN DESCRIPCIÓN
   ============================== */
.descripcion {
    background: var(--bg-warm);
    position: relative;
}

.descripcion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-secondary), 
        var(--color-accent), 
        var(--color-primary),
        var(--color-accent),
        var(--color-secondary)
    );
}

.descripcion-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.descripcion-text {
    font-family: var(--font-accent);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 2;
    color: var(--text-medium);
}

.descripcion-text p {
    margin-bottom: var(--space-lg);
}

/* Decoración floral/campo */
.descripcion-decoration {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    opacity: 0.6;
    font-size: var(--font-size-2xl);
}

/* ==============================
   SECCIÓN DETALLES
   ============================== */
.detalles {
    background: var(--bg-cream);
}

.detalles-intro {
    text-align: center;
    font-family: var(--font-accent);
    font-size: var(--font-size-lg);
    color: var(--text-medium);
    margin-bottom: var(--space-2xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.detalles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .detalles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .detalles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Cards de detalles */
.detalle-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(139, 90, 43, 0.1);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.detalle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.detalle-card-icon {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
}

.detalle-card h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-accent-light);
}

.detalle-card ul {
    list-style: none;
}

.detalle-card li {
    padding: var(--space-xs) 0;
    padding-left: var(--space-lg);
    position: relative;
    color: var(--text-medium);
    font-size: var(--font-size-sm);
}

.detalle-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-secondary);
    font-weight: bold;
}

/* Card especial para reglas importantes */
.detalle-card.importante {
    background: linear-gradient(135deg, var(--bg-warm), #FFF5E6);
    border: 2px solid var(--color-accent);
    grid-column: 1 / -1;
}

.detalle-card.importante h3 {
    color: var(--color-primary-dark);
}

.detalle-card.importante p {
    color: var(--text-medium);
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

/* ==============================
   SECCIÓN GALERÍA
   ============================== */
.galeria {
    background: var(--bg-dark);
    color: var(--text-cream);
}

.galeria .section-header h2 {
    color: var(--text-cream);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

@media (min-width: 640px) {
    .galeria-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

@media (min-width: 1024px) {
    .galeria-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Items de la galería */
.galeria-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.galeria-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 50%,
        rgba(44, 36, 22, 0.5) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.galeria-item:hover::after {
    opacity: 1;
}

/* Icono de zoom */
.galeria-item .zoom-icon {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: 2;
}

.galeria-item:hover .zoom-icon {
    opacity: 1;
    transform: translateY(0);
}

/* Botón ver video */
.galeria-video-btn {
    text-align: center;
    margin-top: var(--space-2xl);
}

/* ==============================
   LIGHTBOX (Modal de galería)
   ============================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
}

/* Controles del lightbox */
.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-white);
    font-size: var(--font-size-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--color-primary-dark);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-white);
    font-size: var(--font-size-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
    background: var(--color-primary);
}

.lightbox-prev {
    left: var(--space-md);
}

.lightbox-next {
    right: var(--space-md);
}

/* ==============================
   SECCIÓN UBICACIÓN
   ============================== */
.ubicacion {
    background: var(--bg-warm);
}

.ubicacion-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

@media (min-width: 768px) {
    .ubicacion-content {
        grid-template-columns: 1fr 1fr;
    }
}

.ubicacion-info {
    text-align: center;
}

@media (min-width: 768px) {
    .ubicacion-info {
        text-align: left;
    }
}

.ubicacion-info h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.ubicacion-direccion {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    justify-content: center;
}

@media (min-width: 768px) {
    .ubicacion-direccion {
        justify-content: flex-start;
    }
}

.ubicacion-direccion svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.ubicacion-direccion p {
    color: var(--text-medium);
    margin: 0;
}

/* Mapa de Google */
.ubicacion-mapa {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 300px;
}

@media (min-width: 768px) {
    .ubicacion-mapa {
        height: 400px;
    }
}

.ubicacion-mapa iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==============================
   SECCIÓN CONTACTO
   ============================== */
.contacto {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-white);
    text-align: center;
}

.contacto .section-header h2 {
    color: var(--text-white);
}

.contacto .section-header h2::after {
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-accent-light), 
        var(--text-white), 
        var(--color-accent-light), 
        transparent
    );
}

.contacto-text {
    font-family: var(--font-accent);
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    opacity: 0.95;
    line-height: 1.8;
}

.contacto-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .contacto-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: none;
    }
}

.contacto .btn-whatsapp {
    width: 100%;
}

@media (min-width: 640px) {
    .contacto .btn-whatsapp {
        width: auto;
    }
}

.contacto .btn-secondary {
    border-color: var(--color-accent-light);
    color: var(--text-white);
}

.contacto .btn-secondary:hover {
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
}

/* ==============================
   FOOTER
   ============================== */
.footer {
    background: var(--bg-dark);
    color: var(--text-cream);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.footer-info p {
    margin: 0;
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-cream);
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

.footer-credits {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

.footer-credits a {
    color: var(--color-accent);
    transition: color var(--transition-base);
}

.footer-credits a:hover {
    color: var(--color-accent-light);
}

/* ==============================
   ANIMACIONES
   ============================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animaciones al hacer scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger para items */
.galeria-item:nth-child(1) { animation-delay: 0.05s; }
.galeria-item:nth-child(2) { animation-delay: 0.1s; }
.galeria-item:nth-child(3) { animation-delay: 0.15s; }
.galeria-item:nth-child(4) { animation-delay: 0.2s; }
.galeria-item:nth-child(5) { animation-delay: 0.25s; }
.galeria-item:nth-child(6) { animation-delay: 0.3s; }
.galeria-item:nth-child(7) { animation-delay: 0.35s; }
.galeria-item:nth-child(8) { animation-delay: 0.4s; }
.galeria-item:nth-child(9) { animation-delay: 0.45s; }
.galeria-item:nth-child(10) { animation-delay: 0.5s; }
.galeria-item:nth-child(11) { animation-delay: 0.55s; }
.galeria-item:nth-child(12) { animation-delay: 0.6s; }

/* ==============================
   RESPONSIVE AJUSTES FINOS
   ============================== */

/* Textos levemente más grandes en mobile para mejor legibilidad */
@media (max-width: 767px) {
    body {
        font-size: 17px;
    }
    
    .descripcion-text {
        font-size: 1.15rem;
    }
    
    .detalles-intro {
        font-size: 1.1rem;
    }
    
    .detalle-card li {
        font-size: 0.95rem;
    }
    
    .detalle-card.importante p {
        font-size: 0.95rem;
    }
    
    .contacto-text {
        font-size: 1.15rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        padding: var(--space-md) var(--space-lg);
    }
}

/* ==============================
   PRINT STYLES
   ============================== */
@media print {
    .hero,
    .galeria,
    .lightbox,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
