/* --- VARIABLES: TEMA OSCURO (POR DEFECTO) --- */
:root {
    --bg-main: #09090b;       
    --bg-surface: #18181b;    
    --bg-surface-hover: #27272a;
    --text-main: #f4f4f5;     
    --text-muted: #a1a1aa;    
    --accent: #00f0ff;        
    --accent-glow: rgba(0, 240, 255, 0.15);
    --border-color: rgba(255, 255, 255, 0.08); 
    --header-bg: rgba(9, 9, 11, 0.85);
}

/* --- VARIABLES: TEMA CLARO --- */
body.light-mode {
    --bg-main: #f8fafc;       
    --bg-surface: #ffffff;    
    --bg-surface-hover: #f1f5f9;
    --text-main: #0f172a;     
    --text-muted: #475569;    
    --accent: #0284c7;        
    --accent-glow: rgba(2, 132, 199, 0.15);
    --border-color: #e2e8f0;  
    --header-bg: rgba(248, 250, 252, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, .logo-text {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    color: var(--text-main);
    letter-spacing: 1px;
    font-weight: 700;
    transition: color 0.4s ease;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section { padding: 100px 0; position: relative; }
.bg-dark { background-color: var(--bg-main); transition: background-color 0.4s ease; }
.bg-darker { background-color: var(--bg-surface); transition: background-color 0.4s ease; }
.text-accent { color: var(--accent); transition: color 0.4s ease; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); transition: color 0.4s ease; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* --- BOTÓN DE TEMA --- */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--bg-surface-hover);
}

/* --- ANIMACIONES DE SCROLL --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}
body:not(.light-mode) .btn-primary {
    color: #000;
}
.btn-primary:hover {
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}
.btn-block { width: 100%; }

/* --- HEADER --- */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}
.header.scrolled {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-text { font-size: 2rem; margin: 0; }
.logo-text .text-accent { color: var(--accent); }
.nav ul { display: flex; list-style: none; gap: 35px; }
.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text-main); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.btn-phone {
    background: transparent;
    color: var(--text-main);
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}
.btn-phone:hover { border-color: var(--accent); color: var(--accent); }
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* --- HERO --- */
.hero {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    filter: grayscale(100%) contrast(1.2); 
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--bg-main) 0%, rgba(9, 9, 11, 0.7) 50%, rgba(9, 9, 11, 0.3) 100%);
    z-index: 2;
    transition: background 0.4s ease;
}
body.light-mode .hero-overlay {
    background: linear-gradient(to right, var(--bg-main) 0%, rgba(248, 250, 252, 0.85) 50%, rgba(248, 250, 252, 0.4) 100%);
}

/* --- MARCA DE AGUA EN EL HERO --- */
.hero-watermark {
    position: absolute;
    right: 5%;
    bottom: 10%;
    width: 400px;
    opacity: 0.05; /* Muy sutil */
    z-index: 2;
    pointer-events: none; 
    filter: grayscale(100%);
    transition: opacity 0.4s ease;
}
body.light-mode .hero-watermark {
    opacity: 0.04; 
}

.hero-content { position: relative; z-index: 3; max-width: 800px; }
.hero-tag {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
    border: 1px solid var(--accent-glow);
}
.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 25px;
}
.text-gradient {
    background: linear-gradient(90deg, var(--accent), #0070f3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; }
.hero-buttons { display: flex; gap: 15px; }

/* --- SECCIONES --- */
.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.5rem; margin-bottom: 15px; }
.separator {
    height: 3px; width: 60px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin: 0 auto 20px auto;
    border-radius: 2px;
}
.separator-left { margin: 0 0 20px 0; }

/* --- NOSOTROS --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
}
.lead-text {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 20px;
    border-left: 3px solid var(--accent);
    padding-left: 15px;
}
.about-text p { color: var(--text-muted); margin-bottom: 20px; }
.features { margin-top: 30px; }
.feature-item { display: flex; align-items: center; gap: 12px; font-weight: 600; margin-bottom: 15px; color: var(--text-main); }
.feature-item i { color: var(--accent); font-size: 1.2rem; }
.about-img img {
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}
.about-img:hover img { filter: grayscale(0%); }

.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.mv-card {
    background: var(--bg-main);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
body.light-mode .mv-card { background: var(--bg-surface); }
.mv-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.5;
}
.mv-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.mv-icon { font-size: 2rem; color: var(--accent); margin-bottom: 20px; }
.mv-card h3 { margin-bottom: 15px; font-size: 1.3rem; }
.mv-card p { font-size: 0.95rem; color: var(--text-muted); text-align: justify; }

/* --- SERVICIOS --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 8px;
    transition: all 0.4s ease;
}
body.light-mode .service-card { background: var(--bg-surface); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.service-card:hover {
    border-color: var(--accent);
    background: var(--bg-surface-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--accent-glow);
}
.service-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 25px; transition: transform 0.3s; }
.service-card:hover .service-icon { transform: scale(1.1); }
.service-card h3 { font-size: 1.3rem; margin-bottom: 20px; color: var(--text-main); }
.service-card ul { list-style: none; }
.service-card ul li { position: relative; padding-left: 20px; margin-bottom: 12px; color: var(--text-muted); font-size: 0.95rem; }
.service-card ul li::before { content: "›"; color: var(--accent); position: absolute; left: 0; font-weight: bold; font-size: 1.2rem; }

/* --- GALERÍA --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px;
}
.gallery-img {
    width: 100%;
    height: 400px; 
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    filter: grayscale(40%);
}
body.light-mode .gallery-img { filter: grayscale(0%); }
.gallery-img:hover {
    transform: scale(1.02);
    filter: grayscale(0%);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(5px);
}
.lightbox-content { margin: auto; display: block; max-width: 90%; max-height: 85vh; border-radius: 8px; border: 1px solid var(--border-color); }
.close-lightbox { position: absolute; top: 20px; right: 35px; color: var(--text-main); font-size: 40px; font-weight: bold; cursor: pointer; transition: color 0.3s; }
.close-lightbox:hover { color: var(--accent); }

/* --- CONTACTO Y MAPA --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.form-group { margin-bottom: 25px; position: relative; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}
.form-group select option { background: var(--bg-surface); color: var(--text-main); }
.info-item { display: flex; gap: 20px; margin-bottom: 30px; }
.info-item i { font-size: 1.5rem; color: var(--accent); margin-top: 5px; width: 30px; text-align: center; }
.info-item h4 { font-size: 1.1rem; margin-bottom: 5px; color: var(--text-main); }
.info-item p { color: var(--text-muted); font-size: 0.95rem; }
.info-item a:hover { color: var(--accent); }
.map-container {
    margin-top: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    filter: invert(90%) hue-rotate(180deg) contrast(1.2);
    transition: filter 0.4s ease;
}
body.light-mode .map-container { filter: none; }

/* --- PAGOS --- */
.payment-tags { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.pay-tag {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 15px 30px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
}
body.light-mode .pay-tag { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.pay-tag:hover { border-color: var(--accent); background: var(--bg-surface-hover); }
.pay-tag i { color: var(--accent); font-size: 1.2rem; }

/* --- WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    width: 60px; height: 60px;
    bottom: 30px; right: 30px;
    background-color: var(--bg-surface);
    color: var(--accent);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.whatsapp-float:hover {
    background-color: var(--accent);
    color: #fff;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 30px var(--accent-glow);
    border-color: var(--accent);
}

/* --- FOOTER --- */
.footer {
    background-color: var(--bg-surface);
    color: var(--text-muted);
    padding: 80px 0 30px 0;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.4s ease;
}

/* --- ESTILOS PARA EL LOGO EN EL FOOTER --- */
.footer-logo {
    max-width: 180px; 
    height: auto;
    margin-bottom: 15px;
    transition: filter 0.4s ease;
}
/* Si el logo es oscuro, en modo oscuro lo volvemos blanco para que se vea */
body:not(.light-mode) .footer-logo {
    filter: brightness(0) invert(1); 
}
/* En modo claro, lo dejamos normal */
body.light-mode .footer-logo {
    filter: none;
}

.footer h3, .footer h4 { color: var(--text-main); margin-bottom: 20px; font-size: 1.2rem; }
.footer h3 span { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer p { margin-bottom: 15px; display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.footer p i { color: var(--accent); }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a { color: var(--text-muted); transition: 0.3s; }
.footer-links ul li a:hover { color: var(--accent); padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid var(--border-color); font-size: 0.85rem; }

/* --- MENÚ MÓVIL OVERLAY --- */
.mobile-menu {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-main);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
}

.mobile-menu.active {
    transform: translateY(0);
}

/* --- LOGO EN MENÚ MÓVIL --- */
.mobile-logo {
    max-height: 60px;
    margin-bottom: 20px;
}

.mobile-menu a {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.close-btn {
    position: absolute;
    top: 30px; right: 5%;
    background: none; border: none;
    color: var(--text-main); font-size: 2rem; cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .about-grid, .mv-grid, .services-grid, .contact-wrapper, .footer-grid { grid-template-columns: 1fr; }
    .about-img { order: -1; }
    .nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--header-bg);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
    }
    .nav.active { display: block; }
    .nav ul { flex-direction: column; gap: 20px; text-align: center; }
    .btn-phone { display: none; }
    .mobile-menu-btn { display: block; }
    
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-img { height: 300px; }
    
    /* Ocultar marca de agua en pantallas pequeñas */
    .hero-watermark { display: none; }
}

@media (max-width: 768px) {
    .hero { height: auto; padding: 150px 0 100px 0; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    .section-title { font-size: 2rem; }
    
    .whatsapp-float { width: 50px; height: 50px; font-size: 25px; bottom: 20px; right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}