/* IberLuma - Análisis de Sistemas Solares y Medio Ambiente */
/* Paleta de colores técnica: #0A1B28, #E6EBEF, #2F8F4E, #5D8B9A */

/* Reset y Variables */
:root {
    --primary-blue: #0A1B28;
    --light-gray: #E6EBEF;
    --solar-green: #2F8F4E;
    --accent-blue: #5D8B9A;
    --white: #ffffff;
    --text-primary: #0A1B28;
    --text-secondary: #3A4A5A;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    line-height: 1.7;
    background-color: var(--white);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Header y Navegación */
header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a2f3f 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--solar-green) 0%, #45a868 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--white);
    margin: 0;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--accent-blue);
    margin: 0;
    letter-spacing: 0.5px;
}

/* Menú de navegación */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--light-gray);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
    color: var(--white);
    border-bottom-color: var(--solar-green);
}

/* Botón móvil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(10, 27, 40, 0.95) 0%, rgba(26, 47, 63, 0.9) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%230A1B28" width="1200" height="600"/><circle cx="200" cy="150" r="3" fill="%232F8F4E" opacity="0.3"/><circle cx="800" cy="400" r="4" fill="%235D8B9A" opacity="0.4"/><circle cx="1000" cy="200" r="2" fill="%232F8F4E" opacity="0.5"/></svg>');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--accent-blue);
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: #45a868;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(47, 143, 78, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--accent-blue);
}

.btn-secondary:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Secciones generales */
section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header .subtitle {
    color: var(--solar-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Grid de tarjetas */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--solar-green) 0%, #45a868 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Sección con fondo alternativo */
.bg-light {
    background: linear-gradient(180deg, var(--light-gray) 0%, #f5f8fa 100%);
}

/* Features con imagen */
.feature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.feature-section.reverse {
    direction: rtl;
}

.feature-section.reverse > * {
    direction: ltr;
}

.feature-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--primary-blue) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.feature-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 400"><line x1="0" y1="200" x2="800" y2="200" stroke="%235D8B9A" stroke-width="1" opacity="0.3"/><line x1="400" y1="0" x2="400" y2="400" stroke="%235D8B9A" stroke-width="1" opacity="0.3"/><circle cx="400" cy="200" r="80" stroke="%232F8F4E" stroke-width="2" fill="none" opacity="0.5"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

/* Lista de características */
.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--solar-green);
    font-weight: bold;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--solar-green);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Footer */
footer {
    background: var(--primary-blue);
    color: var(--light-gray);
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--light-gray);
}

.footer-section a:hover {
    color: var(--solar-green);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(230, 235, 239, 0.1);
    text-align: center;
    color: var(--accent-blue);
}

/* Formulario de contacto */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--solar-green);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid #e0e6eb;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--light-gray);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--solar-green);
    font-weight: 300;
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1a2f3f 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    z-index: 10000;
    display: none;
    animation: slideUp 0.4s ease-out;
}

.cookie-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h4 {
    margin-bottom: 0.5rem;
    color: var(--white);
    font-size: 1.2rem;
}

.cookie-text p {
    margin-bottom: 0;
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-text a {
    color: var(--solar-green);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.cookie-btn-accept {
    background: var(--solar-green);
    color: white;
}

.cookie-btn-accept:hover {
    background: #267a3e;
    transform: translateY(-2px);
}

.cookie-btn-decline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.cookie-btn-decline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .feature-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .feature-section.reverse {
        direction: ltr;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-blue);
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    
    nav ul.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero {
        padding: 4rem 1.5rem;
    }
    
    section {
        padding: 3rem 1.5rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1.25rem;
    }
    
    .faq-answer {
        padding: 0 1.25rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1.25rem 1.25rem 1.25rem;
    }
    
    .cookie-banner {
        padding: 1.25rem 1.5rem;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .cookie-text {
        min-width: 100%;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 1rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utilidades */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
