/* --- Variables y Estilos Globales --- */
:root {
    --primary-color: #ffffff;   /* Fondo principal: Blanco */
    --secondary-color: #f4f4f4; /* Fondo para secciones alternas: Gris muy claro */
    --accent-color: #fbbc05;    /* Color Principal 1: Amarillo */
    --primary-color-2: #ea4335; /* Color Principal 2: Rojo */
    --text-light: #333333;      /* Texto principal: Gris oscuro */
    --text-muted: #777777;      /* Texto secundario: Gris medio */
    --font-family: 'Poppins', sans-serif;
}

/* --- Variables para Modo Oscuro --- */
html.dark-mode {
    --primary-color: #121212;   /* Fondo principal oscuro */
    --secondary-color: #1e1e1e; /* Fondo secundario oscuro */
    --accent-color: #fbbc05;    /* El amarillo se mantiene */
    --primary-color-2: #ea4335; /* El rojo se mantiene */
    --text-light: #e0e0e0;      /* Texto principal claro */
    --text-muted: #a0a0a0;      /* Texto secundario claro */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-light);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    color: var(--text-light);
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color-2);
}

/* --- Header --- */
#main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

html.dark-mode #main-header {
    background: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#main-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- CAMBIO: Estilos para el Logo --- */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
}

.logo img {
    display: block;
    max-width: 188px;
    max-height: 56pX;
    height: auto;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

/* CAMBIO: Ocultar el texto del logo por defecto en desktop */
.logo-text {
    display: none;
    font-weight: 700;
    color: var(--text-light);
}

/* --- Menú de Navegación (Desktop y Móvil) --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--text-light);
    font-weight: 400;
    position: relative;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* --- Controles de Navegación (Tema e Idioma) --- */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(20deg);
}

/* --- Language Switcher --- */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    border: 1px solid #dddddd;
    border-radius: 20px;
    padding: 3px;
}

html.dark-mode .language-switcher {
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-option {
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    color: var(--text-muted);
}

.lang-option.active {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Hero Section --- */
.hero {
    padding: 150px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero .container {
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-light);
}

.hero h1 span:not(.highlight-red) {
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-muted);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color-2);
    box-shadow: 0 10px 20px rgba(234, 67, 53, 0.3);
}

.hero-bg-animation {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(251, 188, 5, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
    z-index: 1;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero .highlight-red {
    color: var(--primary-color-2);
    background-color: #f9f9f9;
    padding: 5px 15px;
    border-radius: 5px;
    display: inline-block;
}

html.dark-mode .hero .highlight-red {
    background-color: #2a2a2a;
}

/* --- Secciones Genéricas --- */
section {
    padding: 80px 0;
}

section:nth-of-type(even) {
    background-color: var(--secondary-color);
}

/* --- Grids --- */
.services-grid, .process-grid, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* --- Service Cards --- */
.service-card, .process-step, .feature {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

html.dark-mode .service-card,
html.dark-mode .process-step,
html.dark-mode .feature {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.service-card:hover, .process-step:hover, .feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

html.dark-mode .service-card:hover,
html.dark-mode .process-step:hover,
html.dark-mode .feature:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.service-card i, .process-step i, .feature i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3, .process-step h3, .feature h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

/* --- Process Steps --- */
.process-step {
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: -15px;
    background-color: var(--primary-color-2);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

/* --- Contact Form --- */
#contacto {
    text-align: center;
}

#contacto p {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-muted);
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 5px;
    color: var(--text-light);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

html.dark-mode .form-group input,
html.dark-mode .form-group textarea {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-button {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.submit-button:hover {
    background-color: var(--primary-color-2);
    transform: translateY(-2px);
}

/* --- Footer --- */
footer {
    background-color: var(--secondary-color);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

html.dark-mode footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

footer p {
    color: var(--text-muted);
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    /* --- Header y Navegación Móvil --- */
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
        gap: 40px;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu ul {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .nav-menu a {
        font-size: 1.5rem;
        font-weight: 600;
    }

    .nav-controls {
        flex-direction: column;
        gap: 20px;
    }

    /* --- CAMBIO: Logo en Móvil --- */
    .logo img {
        max-width: 40px; /* Icono pequeño */
        height: auto;
    }
    .logo-text {
        display: block; /* Mostrar el texto */
        font-size: 1.2rem; /* Tamaño de texto legible */
        color: var(--text-light);
    }

    /* --- Hero --- */
    .hero {
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    /* --- Footer --- */
    footer .container {
        flex-direction: column;
        text-align: center;
    }
}