/* Variables Globales - Estilo Verde Bosque y Beige (Basado en clubtequisquiapan.mx) */
:root {
    --color-bg: #F2EFE9; /* Beige/Cream de fondo para una textura natural */
    --color-surface: #FFFFFF; /* Blanco puro para tarjetas */
    --color-surface-light: #EAE6DF; /* Beige ligeramente más oscuro */
    --color-accent: #C2A476; /* Dorado apagado/elegante para acentos sutiles */
    --color-accent-hover: #D8B98A;
    --color-primary: #163732; /* Verde Bosque Exclusivo */
    --color-primary-hover: #1E4A43;
    --color-text: #4A4A4A; /* Gris oscuro elegante para lectura */
    --color-text-muted: #7A7A7A; 
    
    --font-heading: 'Playfair Display', serif; /* Manteniendo serif para darle porte */
    --font-body: 'Outfit', sans-serif; /* Similar a Montserrat para legibilidad moderna */
    
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    color: #000000; /* Títulos extra oscuros */
}

h2.section-title, h3 {
    color: var(--color-primary); /* Verde bosque para títulos de sección */
}

.section-subtitle {
    display: block;
    color: var(--color-accent);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 12px;
    font-weight: 600;
}

.section-title {
    font-size: 48px;
    margin-bottom: 40px;
}

/* Glassmorphism Navbar (Verde Bosque translúcido) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    background: rgba(22, 55, 50, 0.7); /* Verde Bosque con transparencia */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(22, 55, 50, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
    /* Filtro Mágico: Convierte tu logo verde/blanco a 100% BLANCO puro transparente */
    filter: grayscale(1) invert(1) brightness(3);
    mix-blend-mode: screen; 
    transition: var(--transition-smooth);
}

.logo-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 1px;
}

.logo-accent {
    color: var(--color-accent);
    font-style: italic;
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Botones Estilo "Píldora" (Club Tequisquiapan) */
.btn-primary {
    background: var(--color-primary);
    color: #FFFFFF !important;
    padding: 14px 34px;
    border: none;
    border-radius: 50px; /* Completamente redondo */
    cursor: pointer;
    font-weight: 500 !important;
    font-size: 14px;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(22, 55, 50, 0.2);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(22, 55, 50, 0.35);
}

.btn-secondary {
    background: #FFFFFF;
    color: var(--color-primary);
    padding: 14px 34px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--color-surface-light);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg, .hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: -2;
    transform: translate(-50%, -50%);
}

.hero-bg {
    animation: zoomOut 15s ease-out forwards;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado Verde Bosque profundo sutil */
    background: linear-gradient(180deg, rgba(22, 55, 50, 0.6) 0%, rgba(22, 55, 50, 0.2) 50%, var(--color-bg) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding-top: 80px;
}

.hero-title {
    font-size: 68px;
    margin-bottom: 24px;
    color: #FFFFFF; /* Título blanco vibrante */
    line-height: 1.1;
}

.hero-description {
    font-size: 20px;
    font-weight: 300;
    color: #F8F9FA;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.property-card {
    background: var(--color-surface);
    border-radius: 24px; /* Tarjetas muy redondeadas estilo moderno */
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(22, 55, 50, 0.12);
}

.property-img-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.property-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--color-surface);
    color: var(--color-primary);
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px; /* Pill badge */
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.property-img, .property-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.property-card:hover .property-img, .property-card:hover .property-video {
    transform: scale(1.05);
}

.property-info {
    padding: 35px 30px;
}

.property-title {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.property-location {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

.property-features {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0,0,0, 0.05);
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-price {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--color-primary);
    font-weight: 600;
}

.property-footer .btn-small {
    padding: 10px 24px;
}

/* Zones Grid */
.zones {
    background-color: var(--color-surface) !important;
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.zone-card {
    background: var(--color-bg);
    padding: 40px 30px;
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.zone-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--color-primary);
    transition: var(--transition-smooth);
}

.zone-card:hover {
    background: var(--color-surface-light);
    transform: translateY(-5px);
}

.zone-card:hover::before {
    height: 100%;
}

.zone-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.zone-desc {
    color: var(--color-text-muted);
    font-size: 15px;
}

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

.text-center .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Tourism Section (SEO) */
.tourism {
    background-color: var(--color-primary); /* Invierte color en esta sección */
    color: #FFFFFF;
}

.tourism .section-subtitle {
    color: var(--color-accent);
}
.tourism .section-title {
    color: #FFFFFF;
}
.tourism p {
    color: rgba(255,255,255,0.85) !important;
}

.tourism-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.tourism-card {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    height: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.tourism-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.tourism-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 70px 30px 30px;
    background: linear-gradient(180deg, transparent 0%, rgba(22, 55, 50, 0.8) 40%, rgba(22, 55, 50, 1) 100%);
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.tourism-card:hover .tourism-content {
    transform: translateY(0);
}

.tourism-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--color-accent); /* Títulos dorados */
}

.tourism-content p {
    color: #FFFFFF; 
    font-size: 15px;
    line-height: 1.6;
    font-weight: 300;
}

/* AI Assistant Glassmorphism (Gama Verde Bosque Moderna) */
.ai-agent-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.ai-toggle-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--color-primary);
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(22, 55, 50, 0.35);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-toggle-btn:hover {
    transform: scale(1.08) translateY(-5px);
    background: var(--color-primary-hover);
    box-shadow: 0 15px 35px rgba(22, 55, 50, 0.45);
}

.ai-chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 360px;
    height: 520px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px; /* Bordes suaves iOS */
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
    transform-origin: bottom right;
}

.ai-chat-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.ai-chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    background: var(--color-primary); 
    border-radius: 20px 20px 0 0;
    color: #FFFFFF;
}

.ai-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
}

.ai-header-info {
    display: flex;
    flex-direction: column;
}

.ai-name {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.ai-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
}

.ai-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.ai-close-btn:hover {
    color: #FFFFFF;
}

.ai-chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--color-surface);
}

/* Custom Scrollbar */
.ai-chat-body::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.02);
}
.ai-chat-body::-webkit-scrollbar-thumb {
    background: rgba(22, 55, 50, 0.2);
    border-radius: 10px;
}

.message {
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14px;
    max-width: 85%;
    line-height: 1.5;
    animation: fadeIn 0.3s ease forwards;
}

.ai-message {
    background: var(--color-bg);
    color: var(--color-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: var(--color-primary);
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.typing-indicator {
    padding: 12px 16px;
    background: var(--color-bg);
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--color-text-muted);
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.ai-chat-input {
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    background: #FFFFFF;
    border-radius: 0 0 20px 20px;
}

.ai-chat-input input {
    flex: 1;
    background: var(--color-surface-light);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    color: var(--color-text);
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-smooth);
}

.ai-chat-input input:focus {
    box-shadow: 0 0 0 2px var(--color-accent);
}

.ai-send-btn {
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    width: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-send-btn:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

/* Animations */
@keyframes zoomOut {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes typing {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsiveness */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.mobile-menu-btn span {
    width: 28px;
    height: 2px;
    background: #FFFFFF;
    transition: var(--transition-smooth);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    .hero-actions {
        flex-direction: column;
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .ai-chat-window {
        width: calc(100vw - 40px);
        right: -10px;
    }
}
