/*
Theme Name: Comunidad Energética Granada
Theme URI: https://comunidadenergeticagranada.es
Template: generatepress
Author: Comunidad Energética Granada
Author URI: https://comunidadenergeticagranada.es
Description: Child theme de GeneratePress para la web de Comunidad Energética Granada
Version: 1.0.0
License: GPL v2 or later
Text Domain: comunidad-energetica
*/

/* ==========================================================================
   VARIABLES CSS - Sistema de Diseño
   ========================================================================== */

:root {
    /* Colores Principales */
    --ce-primary: #2D5016;        /* Verde bosque - Confianza y naturaleza */
    --ce-primary-dark: #1F3A0F;   /* Verde bosque oscuro */
    --ce-primary-light: #3D6A1F;  /* Verde bosque claro */
    
    --ce-secondary: #F39C12;      /* Amarillo sol - Energía solar */
    --ce-secondary-dark: #D68910;  
    --ce-secondary-light: #F5B041;
    
    --ce-accent: #E67E22;         /* Naranja atardecer - CTAs importantes */
    --ce-accent-dark: #CA6F1E;
    --ce-accent-light: #EB984E;
    
    /* Colores de Apoyo */
    --ce-green-leaf: #7CB342;     /* Verde hoja - Elementos frescos */
    --ce-cream: #FFF8E1;          /* Crema - Fondos alternativos suaves */
    --ce-earth: #8D6E63;          /* Marrón tierra - Detalles cálidos */
    --ce-sky: #87CEEB;            /* Azul cielo - Elementos aéreos */
    
    /* Escala de Grises */
    --ce-dark: #2C3E50;           /* Texto principal */
    --ce-gray-700: #4A5568;       /* Texto secundario */
    --ce-gray-500: #718096;       /* Texto deshabilitado */
    --ce-gray-300: #CBD5E0;       /* Bordes */
    --ce-gray-100: #F7FAFC;       /* Fondos muy suaves */
    --ce-white: #FFFFFF;          /* Blanco puro */
    
    /* Tipografía */
    --ce-font-heading: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --ce-font-body: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Tamaños de Fuente */
    --ce-text-xs: 0.75rem;        /* 12px */
    --ce-text-sm: 0.875rem;       /* 14px */
    --ce-text-base: 1rem;         /* 16px */
    --ce-text-lg: 1.125rem;       /* 18px - Base para body */
    --ce-text-xl: 1.25rem;        /* 20px */
    --ce-text-2xl: 1.5rem;        /* 24px */
    --ce-text-3xl: 1.875rem;      /* 30px */
    --ce-text-4xl: 2.25rem;       /* 36px */
    --ce-text-5xl: 3rem;          /* 48px */
    --ce-text-6xl: 3.75rem;       /* 60px */
    
    /* Espaciado */
    --ce-space-xs: 0.25rem;       /* 4px */
    --ce-space-sm: 0.5rem;        /* 8px */
    --ce-space-md: 1rem;          /* 16px */
    --ce-space-lg: 1.5rem;        /* 24px */
    --ce-space-xl: 2rem;          /* 32px */
    --ce-space-2xl: 3rem;         /* 48px */
    --ce-space-3xl: 4rem;         /* 64px */
    --ce-space-4xl: 6rem;         /* 96px */
    
    /* Bordes Redondeados */
    --ce-rounded-sm: 0.25rem;     /* 4px */
    --ce-rounded-md: 0.5rem;      /* 8px */
    --ce-rounded-lg: 1rem;        /* 16px */
    --ce-rounded-xl: 1.5rem;      /* 24px */
    --ce-rounded-full: 9999px;    /* Círculo perfecto */
    
    /* Sombras */
    --ce-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ce-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --ce-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --ce-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transiciones */
    --ce-transition-fast: 150ms ease-in-out;
    --ce-transition-base: 250ms ease-in-out;
    --ce-transition-slow: 350ms ease-in-out;
    
    /* Breakpoints (para referencia en JS) */
    --ce-screen-sm: 640px;
    --ce-screen-md: 768px;
    --ce-screen-lg: 1024px;
    --ce-screen-xl: 1280px;
    --ce-screen-2xl: 1536px;
}

/* ==========================================================================
   ESTILOS BASE - Sobrescribir GeneratePress
   ========================================================================== */

body {
    font-family: var(--ce-font-body);
    font-size: var(--ce-text-lg);
    line-height: 1.7;
    color: var(--ce-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ce-font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ce-primary);
}

h1 { font-size: var(--ce-text-5xl); }
h2 { font-size: var(--ce-text-4xl); }
h3 { font-size: var(--ce-text-3xl); }
h4 { font-size: var(--ce-text-2xl); }
h5 { font-size: var(--ce-text-xl); }
h6 { font-size: var(--ce-text-lg); }

/* Enlaces */
a {
    color: var(--ce-primary);
    text-decoration: none;
    transition: color var(--ce-transition-fast);
}

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

/* ==========================================================================
   COMPONENTES REUTILIZABLES
   ========================================================================== */

/* Botones */
.ce-btn {
    display: inline-block;
    padding: var(--ce-space-md) var(--ce-space-xl);
    font-family: var(--ce-font-heading);
    font-weight: 500;
    font-size: var(--ce-text-base);
    border-radius: var(--ce-rounded-lg);
    transition: all var(--ce-transition-base);
    cursor: pointer;
    border: none;
    text-align: center;
    text-decoration: none;
}

.ce-btn-primary {
    background-color: var(--ce-primary);
    color: var(--ce-white);
}

.ce-btn-primary:hover {
    background-color: var(--ce-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--ce-shadow-lg);
}

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

.ce-btn-secondary:hover {
    background-color: var(--ce-secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--ce-shadow-lg);
}

.ce-btn-accent {
    background-color: var(--ce-accent);
    color: var(--ce-white);
}

.ce-btn-accent:hover {
    background-color: var(--ce-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--ce-shadow-lg);
}

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

.ce-btn-outline:hover {
    background-color: var(--ce-primary);
    color: var(--ce-white);
}

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

/* Tarjetas */
.ce-card {
    background-color: var(--ce-white);
    border-radius: var(--ce-rounded-lg);
    padding: var(--ce-space-xl);
    box-shadow: var(--ce-shadow-md);
    transition: all var(--ce-transition-base);
}

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

.ce-card-header {
    margin-bottom: var(--ce-space-lg);
    padding-bottom: var(--ce-space-md);
    border-bottom: 2px solid var(--ce-cream);
}

.ce-card-title {
    font-size: var(--ce-text-2xl);
    color: var(--ce-primary);
    margin: 0;
}

.ce-card-body {
    color: var(--ce-gray-700);
}

/* Sección Hero */
.ce-hero {
    background: linear-gradient(135deg, var(--ce-cream) 0%, rgba(125, 179, 66, 0.1) 100%);
    padding: var(--ce-space-4xl) 0;
    position: relative;
    overflow: hidden;
}

.ce-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--ce-secondary) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
}

.ce-hero-content {
    position: relative;
    z-index: 1;
}

.ce-hero-title {
    font-size: clamp(var(--ce-text-3xl), 5vw, var(--ce-text-6xl));
    margin-bottom: var(--ce-space-lg);
    color: var(--ce-primary);
}

.ce-hero-subtitle {
    font-size: var(--ce-text-xl);
    color: var(--ce-gray-700);
    margin-bottom: var(--ce-space-2xl);
}

.ce-hero-buttons {
    display: flex;
    gap: var(--ce-space-lg);
    flex-wrap: wrap;
}

/* Grid de Beneficios */
.ce-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--ce-space-xl);
    margin: var(--ce-space-3xl) 0;
}

.ce-benefit-item {
    text-align: center;
    padding: var(--ce-space-xl);
}

.ce-benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--ce-space-lg);
    background: linear-gradient(135deg, var(--ce-secondary) 0%, var(--ce-accent) 100%);
    border-radius: var(--ce-rounded-xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ce-benefit-title {
    font-size: var(--ce-text-xl);
    margin-bottom: var(--ce-space-md);
    color: var(--ce-primary);
}

/* Sección con Fondo Alternativo */
.ce-section-alt {
    background-color: var(--ce-cream);
    padding: var(--ce-space-3xl) 0;
}

/* Calculadora */
.ce-calculator {
    background: var(--ce-white);
    border-radius: var(--ce-rounded-xl);
    padding: var(--ce-space-2xl);
    box-shadow: var(--ce-shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.ce-calculator-header {
    text-align: center;
    margin-bottom: var(--ce-space-2xl);
}

.ce-calculator-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--ce-space-xl);
}

.ce-calculator-step {
    flex: 1;
    height: 4px;
    background: var(--ce-gray-300);
    margin: 0 var(--ce-space-xs);
    border-radius: var(--ce-rounded-full);
    transition: background var(--ce-transition-base);
}

.ce-calculator-step.active {
    background: linear-gradient(90deg, var(--ce-secondary) 0%, var(--ce-accent) 100%);
}

.ce-form-group {
    margin-bottom: var(--ce-space-lg);
}

.ce-form-label {
    display: block;
    margin-bottom: var(--ce-space-sm);
    font-weight: 500;
    color: var(--ce-primary);
}

.ce-form-input {
    width: 100%;
    padding: var(--ce-space-md);
    border: 2px solid var(--ce-gray-300);
    border-radius: var(--ce-rounded-md);
    font-size: var(--ce-text-base);
    transition: border-color var(--ce-transition-fast);
}

.ce-form-input:focus {
    outline: none;
    border-color: var(--ce-secondary);
}

/* CTA Section */
.ce-cta {
    background: linear-gradient(135deg, var(--ce-primary) 0%, var(--ce-primary-light) 100%);
    color: var(--ce-white);
    padding: var(--ce-space-3xl) 0;
    text-align: center;
    border-radius: var(--ce-rounded-xl);
    margin: var(--ce-space-3xl) 0;
}

.ce-cta-title {
    color: var(--ce-white);
    margin-bottom: var(--ce-space-lg);
}

.ce-cta-text {
    font-size: var(--ce-text-xl);
    margin-bottom: var(--ce-space-2xl);
    opacity: 0.95;
}

/* Badge/Etiqueta */
.ce-badge {
    display: inline-block;
    padding: var(--ce-space-xs) var(--ce-space-md);
    background: var(--ce-secondary);
    color: var(--ce-primary);
    border-radius: var(--ce-rounded-full);
    font-size: var(--ce-text-sm);
    font-weight: 600;
}

/* Contenedor con Ondas */
.ce-wave-container {
    position: relative;
    padding: var(--ce-space-4xl) 0;
}

.ce-wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.ce-wave-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
    fill: var(--ce-cream);
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */

.ce-text-center { text-align: center; }
.ce-text-left { text-align: left; }
.ce-text-right { text-align: right; }

.ce-mt-sm { margin-top: var(--ce-space-sm); }
.ce-mt-md { margin-top: var(--ce-space-md); }
.ce-mt-lg { margin-top: var(--ce-space-lg); }
.ce-mt-xl { margin-top: var(--ce-space-xl); }

.ce-mb-sm { margin-bottom: var(--ce-space-sm); }
.ce-mb-md { margin-bottom: var(--ce-space-md); }
.ce-mb-lg { margin-bottom: var(--ce-space-lg); }
.ce-mb-xl { margin-bottom: var(--ce-space-xl); }

.ce-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--ce-space-lg);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --ce-text-base: 0.875rem;
        --ce-text-lg: 1rem;
    }
    
    h1 { font-size: var(--ce-text-4xl); }
    h2 { font-size: var(--ce-text-3xl); }
    h3 { font-size: var(--ce-text-2xl); }
    
    .ce-hero {
        padding: var(--ce-space-3xl) 0;
    }
    
    .ce-hero-buttons {
        flex-direction: column;
    }
    
    .ce-btn {
        width: 100%;
    }
    
    .ce-benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .ce-calculator {
        padding: var(--ce-space-lg);
    }
}

@media (max-width: 480px) {
    .ce-card {
        padding: var(--ce-space-lg);
    }
    
    .ce-cta {
        padding: var(--ce-space-2xl) var(--ce-space-lg);
    }
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

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

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

.ce-animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.ce-animate-pulse {
    animation: pulse 2s infinite;
}

/* ==========================================================================
   SOBRESCRIBIR ESTILOS DE GENERATEPRESS
   ========================================================================== */

/* Header/Navegación */
.site-header {
    box-shadow: var(--ce-shadow-md);
}

.main-navigation a {
    font-family: var(--ce-font-heading);
    font-weight: 500;
    color: var(--ce-primary);
    transition: color var(--ce-transition-fast);
}

.main-navigation a:hover {
    color: var(--ce-secondary);
}

/* Footer */
.site-footer {
    background: var(--ce-primary);
    color: var(--ce-white);
}

.site-footer a {
    color: var(--ce-secondary);
}

.site-footer a:hover {
    color: var(--ce-secondary-light);
}