@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;800&family=Outfit:wght@400;600;800&display=swap');

:root {
    --primary: #004A99;
    --primary-light: #0066CC;
    --secondary: #F8931D;
    --secondary-hover: #E08215;
    --dark: #0A0F1A;
    --dark-section: #0F1624;
    --light: #FFFFFF;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-800: #1F2937;
    --text-main: #D1D5DB;
    --text-title: #FFFFFF;
    
    --font-sans: 'Outfit', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--dark);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-title);
    font-weight: 800;
}

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

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.glass-dark {
    background: rgba(10, 15, 26, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.glass-light {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-img {
    height: 70px; /* Incrementado para mayor presencia */
    width: auto;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* Header link adjustment for light background */
#main-nav .nav-links a {
    color: var(--light);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    font-weight: 600;
}

#main-nav.scrolled .nav-links a {
    color: var(--dark);
    text-shadow: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--dark);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(248, 147, 29, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--light);
    color: var(--light);
}

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

.grid {
    display: grid;
    gap: 2rem;
}

.section {
    padding: 80px 0;
}

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

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* --- Responsive Helpers --- */
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, or 1fr); }
}

/* --- Floating Socials --- */
.floating-socials { position: fixed; bottom: 2rem; right: 2rem; display: flex; flex-direction: column; gap: 0.8rem; z-index: 2000; }
.social-btn { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--dark) !important; font-size: 1.25rem; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: var(--transition); text-decoration: none; backdrop-filter: blur(5px); background-color: var(--secondary); }
.social-btn:hover { transform: scale(1.1) translateY(-3px); background-color: var(--secondary-hover); }

@keyframes pulse-wave {
    0% { transform: scale(1); box-shadow: 0 0 0 0px rgba(248, 147, 29, 0.6); }
    70% { transform: scale(1.08); box-shadow: 0 0 0 15px rgba(248, 147, 29, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0px rgba(248, 147, 29, 0); }
}

.whatsapp { animation: pulse-wave 2s infinite; }
.pulse-btn { animation: pulse-wave 2s infinite; }

/* --- Brand Watermarks --- */
.watermark-container {
    position: absolute; /* Cambiado de fixed para permitir posicionamiento por sección */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.12; /* Ajuste sutil para que se note sobre fondo negro pero sea elegante */
}

/* Helper para marcas de agua globales fijas en otras páginas */
.watermark-fixed {
    position: fixed !important;
}

.sun-watermark {
    position: absolute;
    width: 600px;
    height: 600px;
    background-image: url('sun-watermark.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* Filtro para blanco puro (marca de agua clásica) */
    filter: brightness(0) invert(1); 
}

.wm-top-right { top: -150px; right: -150px; width: 700px; height: 700px; transform: rotate(15deg); }
.wm-bottom-left { bottom: 5%; left: -250px; width: 900px; height: 900px; transform: rotate(-20deg); }
.wm-mid-right { top: 40%; right: -250px; width: 600px; height: 600px; opacity: 0.8; }

/* Marcas de agua para sección IMPACTO (Media Luna laterales) */
.wm-impacto-l {
    top: 50%;
    left: -325px; /* Mitad de 650px */
    width: 650px;
    height: 650px;
    transform: translateY(-50%) rotate(15deg);
    opacity: 0.08;
}

.wm-impacto-r {
    top: 50%;
    right: -325px; /* Mitad de 650px */
    width: 650px;
    height: 650px;
    transform: translateY(-50%) rotate(-15deg);
    opacity: 0.08;
}

/* Asegurar que las secciones que lleven marcas tengan posición relativa */
#impacto { position: relative; }

/* --- White Reveal Section (Scroll-Triggered) --- */
.white-reveal-section {
    position: relative;
    background-color: #ffffff !important;
    color: #0A0F1A !important;
    z-index: 5;
    /* Inicio oculto con círculo pequeño en el tope superior centro */
    clip-path: circle(0% at 50% 0%);
    transition: clip-path 0.1s linear; 
}

/* Overrides para "Light Mode" dentro del contenedor blanco */
.white-reveal-section-fixed .section-title { color: #0A0F1A; }
.white-reveal-section-fixed .section-subtitle { color: rgba(10, 15, 26, 0.6); }

/* Tarjetas Glass en modo claro */
.white-reveal-section-fixed .glass {
    background: rgba(10, 15, 26, 0.03);
    border: 1px solid rgba(10, 15, 26, 0.08);
    backdrop-filter: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.white-reveal-section-fixed .gallery-info h4,
.white-reveal-section-fixed .gallery-info p { color: #0A0F1A; }
.white-reveal-section-fixed .gallery-info { background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0)); }

.white-reveal-section-fixed .product-card h3,
.white-reveal-section-fixed .product-price { 
    color: #0A0F1A; 
    font-size: 2.2rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 0.2rem;
}

.price-prefix {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: rgba(10, 15, 26, 0.4);
    letter-spacing: 1px;
    font-weight: 600;
}

.product-financing {
    color: #F8931D !important; /* Texto "Visacuotas" en Naranja */
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    display: block;
}

.product-financing strong {
    color: #22C55E !important; /* Solo el PRECIO en Verde */
    font-size: 1.25rem;
}

.white-reveal-section-fixed .plant-content h3 { color: #F8931D; }
.white-reveal-section-fixed .plant-content p { color: rgba(10, 15, 26, 0.8); }
.white-reveal-section-fixed .plant-stats { color: rgba(10, 15, 26, 0.6); }

/* --- Centrales de Generación (Custom Overrides) --- */
#plantas {
    position: relative;
    background-color: #0A0F1A !important; /* Asegurar fondo ultra oscuro */
}

#plantas .section-title {
    color: #FFFFFF !important;
}

#plantas .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.plant-card {
    background: #FFFFFF !important; /* Tarjetas blancas solicitadas */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.plant-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.plant-content h3 {
    color: #0A0F1A !important; /* Texto oscuro sobre tarjeta blanca */
    margin-bottom: 0.5rem;
}

.plant-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #F8931D; /* Color de realce */
    font-weight: 600;
}

.plant-stats i {
    margin-right: 5px;
}

.plant-content p {
    color: #4B5563 !important; /* Gris oscuro legible */
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.plant-card .btn-outline {
    border-color: #0A0F1A;
    color: #0A0F1A;
}

.plant-card .btn-outline:hover {
    background: #0A0F1A;
    color: #FFFFFF;
}

/* Marca de agua específica para Plantas (Una a la derecha a la mitad) */
#plantas .wm-side-mid {
    top: 50%;
    right: -150px;
    width: 600px;
    height: 600px;
    transform: translateY(-50%) rotate(-15deg);
    opacity: 0.15;
}

/* Marcas / Partners Carousel */
#marcas { 
    background: #0F1624 !important; /* Fondo oscuro para que logos blancos (Soluna/Growatt) resalten */
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    padding: 4rem 0 !important;
}

.brands-container {
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.brands-track {
    display: flex;
    align-items: center;
    gap: 6rem;
    width: max-content;
    animation: scroll-brands 35s linear infinite;
}

.brands-track img {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.6); /* Logos en blanco por defecto para elegancia */
    transition: var(--transition);
}

.brands-track img:hover {
    filter: brightness(1) invert(0) opacity(1); /* Color original al pasar el mouse */
    transform: scale(1.1);
}

#marcas h3 {
    color: #FFFFFF !important;
}

/* Footer (Reverted to Dark) */
footer { 
    background: #0A0F1A !important; 
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}
.footer-col h4 { color: #FFFFFF !important; }
.footer-about p,
.footer-contact-item span,
.footer-links-list a { color: rgba(255,255,255,0.7) !important; }
.footer-links-list a:hover { color: #F8931D !important; opacity: 1; }
.footer-logo-img { 
    filter: brightness(0) invert(1); 
    height: 120px !important; /* Maximizado para impacto total */
    margin-bottom: 2rem;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); }
.copyright, 
.footer-legal-links a { color: rgba(255,255,255,0.5) !important; }

/* Marca de agua específica para el Footer (Esquina inferior derecha) */
footer .wm-footer-br {
    bottom: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    transform: rotate(-15deg);
    opacity: 0.12;
}

/* --- Seamless Reveal System --- */
.white-reveal-section-fixed {
    background-color: #ffffff !important;
    color: #0A0F1A !important;
    position: relative;
    z-index: 10;
    /* FIX: Centro relativo al viewport (50vh) para que sea visible de inmediato */
    clip-path: circle(0% at 50% 50vh);
    overflow: hidden;
}

.reveal-arrow {
    position: absolute; /* Cambiado a absolute dentro del contenedor para que suba con él */
    top: 50vh; /* Centrado en el primer viewport del contenedor */
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F8931D;
    font-size: 4rem; /* Más grande para impacto */
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.reveal-arrow i {
    animation: bounce-arrow 1.5s infinite;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(15px); }
}

/* Reusamos las variantes .white-reveal-section para los overrides internos */
.white-reveal-section-fixed .section-title { color: #0A0F1A; }
.white-reveal-section-fixed .section-subtitle { color: rgba(10, 15, 26, 0.6); }

/* (Todas las demás reglas .white-reveal-section deben adaptarse a .white-reveal-section-fixed si se desea, 
   o podemos simplemente renombrar la clase de los overrides arriba) */

/* Navbar Light Mode Override */
.nav-light-mode .nav-links a { color: #0A0F1A !important; }
.nav-light-mode .nav-toggle span { background-color: #0A0F1A !important; }
.nav-light-mode { background: rgba(255, 255, 255, 0.8) !important; box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important; }

/* --- Interactive Sun Cursor & Ripples --- */
#sun-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #F8931D, #FF6A00);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #F8931D, 0 0 30px rgba(248, 147, 29, 0.5);
    transition: width 0.3s, height 0.3s, box-shadow 0.3s;
    display: none; /* Hidden on mobile by default or until mouse moves */
}

/* Solo mostrar en dispositivos con puntero (no táctiles) para mejor UX */
@media (pointer: fine) {
    #sun-cursor { display: block; }
}

.cursor-ripple {
    position: fixed;
    border: 2px solid rgba(248, 147, 29, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: ripple-out 1.5s cubic-bezier(0.1, 0, 0.3, 1) forwards;
}

@keyframes ripple-out {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 150px; height: 150px; opacity: 0; }
}

body.cursor-active #sun-cursor {
    width: 30px;
    height: 30px;
    box-shadow: 0 0 25px #F8931D, 0 0 50px rgba(248, 147, 29, 0.8);
}
