/* =========================================
   1. VARIABLES & THEME CONFIGURATION
   ========================================= */
   :root {
    /* --- DARK THEME (DEFAULT) --- */
    --bg-color: #0a0a0a;
    --bg-darker: #050505;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    
    /* Brand Colors */
    --garnet: #8a1c1c; 
    --garnet-bright: #b92b2b;
    --gold: #d4af37; 
    
    /* UI Effects */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: transparent;
    --line-color: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-head: 'Playfair Display', serif;
    --font-body: 'Manrope', sans-serif;
    
    /* Spacing & Layout */
    --section-gap: 80px;
    --container-width: 1300px;
    --nav-height: 80px;
}

/* --- LIGHT THEME OVERRIDES --- */
body.light-theme {
    --bg-color: #f4f4f4;
    --bg-darker: #e8e8e8;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    
    /* Brand colors remain, but effects change */
    --glass: rgba(0, 0, 0, 0.04);
    --glass-border: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(0, 0, 0, 0.02);
    --line-color: rgba(0, 0, 0, 0.1);
}

/* Global Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    line-height: 1.6;
}

/* Hide cursor on desktop */
@media (min-width: 992px) {
    body, a, button, input, textarea { cursor: none; }
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.bg-darker { background-color: var(--bg-darker); }

/* =========================================
   2. UI ELEMENTS (Cursor, Loader, Noise)
   ========================================= */
/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 9999;
    pointer-events: none; display: none;
}
@media (min-width: 992px) {
    .cursor-dot, .cursor-outline { display: block; }
    .cursor-dot { width: 8px; height: 8px; background-color: var(--gold); }
    .cursor-outline {
        width: 40px; height: 40px;
        border: 1px solid rgba(212, 175, 55, 0.5);
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }
    body.hovering .cursor-outline {
        width: 70px; height: 70px;
        background-color: rgba(212, 175, 55, 0.1);
        border-color: transparent;
    }
}

/* Preloader */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader-text .letter {
    display: inline-block; font-family: var(--font-head);
    font-size: 5rem; color: var(--garnet); opacity: 0;
    transform: translateY(20px); animation: revealLetter 0.5s forwards;
}
@keyframes revealLetter { to { opacity: 1; transform: translateY(0); } }
.preloader.fade-out { opacity: 0; visibility: hidden; }

/* Noise Overlay */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05; z-index: 999; pointer-events: none;
}
body.light-theme .noise-overlay { opacity: 0.03; filter: invert(1); }

/* =========================================
   3. NAVIGATION & THEME BUTTON
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%; padding: 20px 0;
    z-index: 1000; mix-blend-mode: difference;
    color: #fff; /* Always white due to mix-blend-mode difference on contrast */
}

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

.logo { display: flex; align-items: center; }
.logo-symbol { 
    color: var(--gold); font-weight: 800; border: 1px solid var(--gold); 
    padding: 5px; font-size: 1rem; margin-right: 10px;
}
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; }

.nav-right { display: flex; align-items: center; gap: 25px; }

/* Language Switcher */
.lang-switch { font-size: 0.8rem; font-weight: 600; cursor: pointer; display: flex; gap: 5px; }
.lang-opt { opacity: 0.5; transition: 0.3s; }
.lang-opt.active, .lang-opt:hover { opacity: 1; color: var(--gold); }

/* Theme Button Style */
.theme-btn {
    cursor: pointer; font-size: 1.1rem; opacity: 0.8; transition: 0.3s;
    color: #fff; display: flex; align-items: center;
}
.theme-btn:hover { color: var(--gold); transform: rotate(15deg); }

/* Hamburger */
.menu-btn { width: 30px; height: 18px; position: relative; cursor: pointer; z-index: 1001; }
.line { position: absolute; width: 100%; height: 2px; background: #fff; right: 0; transition: 0.4s; }
.line-1 { top: 0; }
.line-2 { bottom: 0; width: 60%; }
.menu-btn:hover .line-2 { width: 100%; }

/* Menu Overlay */
.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-color); z-index: 998;
    display: flex; align-items: center; justify-content: center;
    transform: translateY(-100%); transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.menu-overlay.active { transform: translateY(0); }
.menu-links { text-align: center; }
.menu-links li { margin: 20px 0; }
.menu-links a { font-family: var(--font-head); font-size: 2.5rem; color: var(--text-muted); }
.menu-links a:hover { color: var(--garnet); }

/* =========================================
   4. HERO SECTION
   ========================================= */
#hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    padding-top: var(--nav-height); overflow: hidden;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* Replace URL with your image */
    background-image: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1000&auto=format&fit=crop');
    background-size: cover; background-position: center;
    z-index: -1; 
}
/* Overlay is handled via pseudo-element to adapt to theme */
#hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--bg-color));
    z-index: -1;
}

.hero-content { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.hero-text-wrapper { max-width: 800px; }

.subtitle { color: var(--gold); letter-spacing: 2px; text-transform: uppercase; font-size: 0.75rem; display: block; margin-bottom: 15px; }
.main-title { font-family: var(--font-head); font-size: clamp(3rem, 8vw, 6rem); line-height: 1.1; margin-bottom: 25px; }
.block-reveal { opacity: 0; transform: translateY(20px); transition: 0.8s ease; display: block; }
.italic-accent { font-style: italic; color: var(--garnet-bright); }
.hero-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 500px; margin-bottom: 40px; }

/* Luxury Button */
.btn-luxury {
    display: inline-flex; align-items: center; gap: 15px;
    background: var(--glass); color: var(--text-main);
    border: 1px solid var(--glass-border); padding: 14px 35px;
    border-radius: 50px; position: relative; overflow: hidden;
    font-size: 0.9rem; z-index: 1; transition: 0.4s;
}
.btn-luxury::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%;
    background: var(--garnet); transition: 0.4s; z-index: -1;
}
.btn-luxury:hover { color: #fff; border-color: var(--garnet); }
.btn-luxury:hover::before { width: 100%; }
.btn-arrow {
    width: 25px; height: 25px; background: #fff; color: #000;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
}

.hero-stats { margin-top: 50px; display: flex; gap: 40px; border-top: 1px solid var(--line-color); padding-top: 25px; }
.stat-number { font-family: var(--font-head); font-size: 1.5rem; display: block; color: var(--text-main); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 1px; }

/* =========================================
   5. MARQUEE STRIP
   ========================================= */
.marquee-section {
    padding: 20px 0; background: var(--bg-darker);
    border-top: 1px solid var(--line-color); border-bottom: 1px solid var(--line-color);
    overflow: hidden; white-space: nowrap;
}
.marquee-content {
    display: inline-block; animation: scrollText 20s linear infinite;
    font-family: var(--font-head); font-size: 1.2rem;
    color: var(--text-muted); opacity: 0.5; text-transform: uppercase;
}
@keyframes scrollText { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =========================================
   6. SECTIONS GENERAL
   ========================================= */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.section-padding { padding: var(--section-gap) 0; }
.section-tag { color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; display: block; margin-bottom: 10px; }
.section-title { font-family: var(--font-head); font-size: 2.5rem; margin-bottom: 30px; line-height: 1.2; color: var(--text-main); }
.text-body { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.text-center { text-align: center; }

/* Scroll Reveal Class (handled by JS) */
.scroll-reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000); }
.scroll-reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   7. SPLIT LAYOUT (About & FAQ)
   ========================================= */
.split-layout { display: flex; flex-direction: column; gap: 40px; }
.image-wrapper { position: relative; overflow: hidden; border-radius: 4px; height: 400px; }
.img-cover { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.image-wrapper:hover .img-cover { transform: scale(1.05); }

.feature-list li {
    display: flex; align-items: center; gap: 15px; margin-bottom: 15px;
    color: var(--text-main); font-family: var(--font-head);
}
.feature-icon { color: var(--garnet); font-size: 0.9rem; }

/* =========================================
   8. SERVICES (Interactive Grid)
   ========================================= */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

.glass-panel {
    background: var(--glass); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); padding: 30px;
    border-radius: 4px; transition: 0.4s; position: relative; overflow: hidden;
}
.service-card { min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; }
.service-card:hover { border-color: var(--garnet); }

/* Hover Image Reveal */
.card-bg-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: 0.5s; z-index: 0; filter: grayscale(100%);
}
.service-card:hover .card-bg-img { opacity: 0.15; }

.card-content { position: relative; z-index: 1; }
.service-number { font-family: var(--font-head); font-size: 2.5rem; color: var(--glass-border); position: absolute; top: -50px; right: 0; }
.service-icon { font-size: 2rem; color: var(--gold); margin-bottom: 20px; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 10px; font-family: var(--font-head); color: var(--text-main); }
.service-card p { color: var(--text-muted); font-size: 0.9rem; }

/* =========================================
   9. PROCESS (Timeline)
   ========================================= */
.timeline-wrapper {
    display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 50px;
    border-left: 1px solid var(--line-color); padding-left: 30px;
}
.timeline-step { position: relative; padding-bottom: 30px; }
.timeline-step::before {
    content: ''; position: absolute; left: -35px; top: 0;
    width: 10px; height: 10px; background: var(--bg-color);
    border: 2px solid var(--garnet); border-radius: 50%;
}
.step-num { font-size: 0.8rem; color: var(--gold); font-weight: 700; margin-bottom: 5px; display: block; }
.timeline-step h4 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 5px; color: var(--text-main); }
.timeline-step p { color: var(--text-muted); font-size: 0.9rem; }

/* =========================================
   10. GALLERY (Masonry Grid)
   ========================================= */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 4px; height: 300px; margin: 0; cursor: pointer; }
.gallery-item::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0.6; transition: 0.4s;
}
.gallery-item:hover::after { opacity: 0.3; }
.gallery-item:hover .img-cover { transform: scale(1.1); }

.gallery-caption {
    position: absolute; bottom: 20px; left: 20px; z-index: 2;
    transform: translateY(10px); transition: 0.4s;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }
.gallery-caption span { font-size: 0.7rem; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.gallery-caption h4 { font-family: var(--font-head); font-size: 1.2rem; color: #fff; margin-top: 5px; }

/* =========================================
   11. FAQ ACCORDION
   ========================================= */
.faq-list { width: 100%; display: flex; flex-direction: column; gap: 15px; }
.faq-item { border-bottom: 1px solid var(--line-color); padding-bottom: 15px; cursor: pointer; }

.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.faq-question span { font-family: var(--font-head); font-size: 1.1rem; color: var(--text-main); }
.faq-question i { color: var(--gold); transition: 0.3s; }

.faq-answer { max-height: 0; overflow: hidden; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-answer p { padding-top: 10px; color: var(--text-muted); font-size: 0.95rem; }

.faq-item.active .faq-answer { max-height: 200px; }
.faq-item.active .faq-question i { transform: rotate(45deg); color: var(--garnet); }

.btn-outline {
    padding: 12px 30px; border: 1px solid var(--text-main);
    color: var(--text-main); text-transform: uppercase;
    font-size: 0.75rem; letter-spacing: 2px; display: inline-block;
}
.btn-outline:hover { background: var(--text-main); color: var(--bg-color); }

/* =========================================
   12. CONTACT & FORM
   ========================================= */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 50px; }

.detail-item { margin-bottom: 25px; padding-left: 20px; border-left: 2px solid var(--garnet); }
.detail-item .label { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 5px; text-transform: uppercase;}
.detail-item .value { font-family: var(--font-head); font-size: 1.1rem; color: var(--text-main); }

.luxury-form { padding: 30px 20px; }
.input-group { position: relative; margin-bottom: 35px; }
.input-group input, .input-group textarea {
    width: 100%; background: var(--input-bg); border: none;
    border-bottom: 1px solid var(--line-color);
    color: var(--text-main); padding: 10px 10px; font-family: var(--font-body);
    font-size: 1rem; outline: none; border-radius: 0; transition: 0.3s;
}
.input-group label {
    position: absolute; left: 10px; top: 10px;
    color: var(--text-muted); pointer-events: none; transition: 0.3s;
}
.input-group input:focus, .input-group textarea:focus { border-bottom-color: var(--gold); }
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label, .input-group textarea:not(:placeholder-shown) ~ label {
    top: -20px; left: 0; font-size: 0.75rem; color: var(--gold);
}
.full-width { width: 100%; justify-content: center; }

/* =========================================
   13. FOOTER
   ========================================= */
footer {
    border-top: 1px solid var(--line-color);
    padding: 50px 0; background-color: var(--bg-darker);
}
.footer-content { display: flex; flex-direction: column; gap: 20px; text-align: center; }
.footer-logo { font-family: var(--font-head); color: var(--text-main); font-size: 1.5rem; margin-bottom: 5px; }
.copyright { color: var(--text-muted); font-size: 0.8rem; }

.footer-socials { display: flex; justify-content: center; gap: 20px; }
.social-link {
    width: 40px; height: 40px; border: 1px solid var(--line-color);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--text-main); font-size: 1rem;
}
.social-link:hover { border-color: var(--gold); color: var(--gold); }

/* =========================================
   14. RESPONSIVE (MEDIA QUERIES)
   ========================================= */

/* Tablet & Landscape (768px +) */
@media (min-width: 768px) {
    :root { --section-gap: 120px; }

    .hero-content { flex-direction: row; align-items: flex-end; justify-content: space-between; }
    .hero-text-wrapper { max-width: 60%; }
    
    .split-layout { flex-direction: row; align-items: center; }
    .split-layout > div { flex: 1; }
    .align-start { align-items: flex-start; }
    .image-wrapper { height: 600px; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }
    
    .timeline-wrapper {
        grid-template-columns: repeat(4, 1fr);
        border-left: none; border-top: 1px solid var(--line-color);
        padding-left: 0; padding-top: 30px;
    }
    .timeline-step::before { left: 0; top: -36px; }

    .gallery-grid { grid-template-columns: repeat(12, 1fr); height: 600px; }
    .item-large { grid-column: span 8; height: 100%; }
    .item-small { grid-column: span 4; height: calc(50% - 10px); }

    .contact-grid { grid-template-columns: 1fr 1fr; }
    .luxury-form { padding: 40px; }

    .footer-content { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* Desktop (1024px +) */
@media (min-width: 1024px) {
    .main-title { font-size: 5rem; }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-bg { opacity: 0.6; } /* Better visibility in desktop */
}
/* Agrega esto al final de style.css si usas imagen de logo */
.logo-img {
    height: 50px; /* Ajusta este número según necesites */
    width: auto;
    object-fit: contain;
}

/* =========================================
   FIX DE CONTRASTE Y LEGIBILIDAD
   (Añadir al final de style.css)
   ========================================= */

/* 1. Oscurecer más el "velo" sobre la imagen principal (Hero) */
/* Antes estaba al 0.3, lo subimos al 0.75 para que el texto resalte */
#hero::before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), var(--bg-color));
    z-index: 0; /* Asegura que esté sobre la foto pero bajo el texto */
}

/* 2. Sombra de texto potente para Títulos (Efecto 3D sutil) */
/* Esto hace que incluso si la foto es blanca, la letra se lea por la sombra negra */
.main-title, 
.subtitle, 
.hero-desc {
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
    position: relative; 
    z-index: 2; /* Asegura que el texto esté encima de todo */
}

/* 3. Aclarar la descripción del Hero */
/* Forzamos un color casi blanco en lugar del gris apagado */
.hero-desc {
    color: #f0f0f0 !important;
    font-weight: 500; /* Un poco más grueso para leerse mejor */
}

/* 4. Paneles de Vidrio (Servicios y Contacto) más legibles */
/* Aumentamos la opacidad del fondo para que no sea tan transparente */
.glass-panel {
    background: rgba(15, 15, 15, 0.75) !important; /* Más oscuro */
    backdrop-filter: blur(20px); /* Más borroso el fondo */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); /* Sombra para separar del fondo */
}

/* 5. Ajustes específicos para el TEMA CLARO (White Theme) */
/* Cuando cambies a blanco, esto asegura que los paneles sean muy blancos y legibles */
body.light-theme .glass-panel {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0,0,0,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body.light-theme .input-group input, 
body.light-theme .input-group textarea {
    color: #000 !important; /* Texto negro fuerte en inputs */
    font-weight: 600;
}

/* 6. Corrección para los textos sobre imágenes de Galería */
.gallery-caption h4 {
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}
.gallery-caption span {
    background: rgba(0,0,0,0.6); /* Pequeño fondo negro para la categoría */
    padding: 2px 6px;
    border-radius: 4px;
}