/*
 * Max Efficiency - Estilos principales
 * Paleta de colores: Azul (#0066CC), Verde energía (#00A651), Gris oscuro (#333333)
 */

/* ==================== VARIABLES Y RESET ==================== */
:root {
    --primary-blue: #0066CC;
    --primary-green: #00A651;
    --dark-gray: #333333;
    --light-gray: #F5F5F5;
    --medium-gray: #CCCCCC;
    --white: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    list-style: none;
}

/* ==================== TIPOGRAFÍA ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-light);
    max-width: 70ch;
}

/* ==================== LAYOUT ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 900px;
}

section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

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

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin: 0 auto;
}

/* ==================== HEADER Y NAVEGACIÓN ==================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary-green);
}

nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.lang-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-switcher a {
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    transition: var(--transition);
}

.lang-switcher a:hover {
    background-color: var(--light-gray);
}

.lang-switcher a.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--dark-gray);
}

/* ==================== HERO SECTION ==================== */
.hero {
    /* Fondo: degradado oscuro + imagen */
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.45),
            rgba(0, 0, 0, 0.65)
        ),
        url('/images/portada.png') center center / cover no-repeat;

    color: var(--white);
    padding: 8rem 0 6rem;
    text-align: center;
}

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

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* ==================== BOTONES ==================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e8f0f7 0%, #f0f8f5 50%, #fef9f3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.4);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

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

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

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

.card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.card-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

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

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* ==================== SECCIONES ESPECÍFICAS ==================== */
.benefits-section {
    background-color: var(--light-gray);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 2rem;
}

.benefit-icon {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.benefit-item h4 {
    margin-bottom: 0.75rem;
}

.benefit-item p {
    margin: 0 auto;
    font-size: 0.95rem;
}

/* ==================== ZONAS DE COBERTURA ==================== */
.coverage-area {
    text-align: center;
    padding: 4rem 0;
}

.coverage-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.coverage-item {
    background-color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 2px 10px var(--shadow);
    font-weight: 500;
    color: var(--text-dark);
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, #008F46 100%);
    color: var(--white);
    text-align: center;
    padding: 5rem 0;
}

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

.cta-section p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.125rem;
    margin: 0 auto 2rem;
}

/* ==================== FORMULARIO ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

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

.contact-methods {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-methods .btn {
    flex: 1;
    min-width: 200px;
}

/* ==================== BLOG ==================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

.blog-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
}

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

.blog-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.blog-content {
    padding: 2rem;
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.blog-article {
    max-width: 800px;
    margin: 3rem auto;
}

.blog-article img {
    margin: 2rem 0;
    border-radius: 8px;
}

/* ==================== FOOTER ==================== */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 4rem 0 2rem;
}

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

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-item i {
    color: var(--primary-green);
    font-size: 1.25rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ==================== WHATSAPP FLOTANTE ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #e8f0f7 0%, #f0f8f5 50%, #fef9f3 100%);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: var(--transition);
    cursor: pointer;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.7);
}

/* ==================== 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; }

.bg-light {
    background-color: var(--light-gray);
}

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

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    nav ul {
        position: fixed;
        left: -100%;
        top: 72px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow);
        padding: 2rem 0;
        gap: 1rem;
    }

    nav ul.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding: 5rem 0 4rem;
    }

    section {
        padding: 3rem 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-methods {
        flex-direction: column;
    }

    .contact-methods .btn {
        width: 100%;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.75rem;
    }

    .btn {
        padding: 0.875rem 2rem;
    }
}

/* ==================== ACCESIBILIDAD ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
/* Active menu item underline */
.nav-link.active, nav ul li.active a {
    text-decoration: underline !important;
}

/* Remove default underline from non-active items */
.nav-link, nav ul li a {
    text-decoration: none;
}
