/* --- VARIABLES CSS --- */
:root {
    --color-primary: #2ecc71;
    --color-secondary: #27ae60;
    
    /* Tema Claro (de tu archivo styles_ORIG.css) */
    --color-background: white;
    --color-background-light: #f9f9f9;
    --color-text-primary: #333;
    --color-text-secondary: #555;
    --color-border: #ddd;
    --color-border-light: #eee;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-shadow-light: rgba(0, 0, 0, 0.05);
    --color-lang-inactive: #aaa;
}

/* --- ESTILOS GENERALES --- */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo .green {
    color: var(--color-primary);
    font-weight: 800;
    text-transform: uppercase;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 10%;
    background-color: var(--color-background);
    box-shadow: 0 2px 10px var(--color-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: bold;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-text-primary);
    z-index: 101;
}

.controls-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-switcher-desktop {
    font-weight: bold;
    font-size: 0.9rem;
}

.language-switcher-mobile {
    display: none;
}

.lang-active {
    color: var(--color-text-primary);
}

.lang-inactive {
    color: var(--color-lang-inactive);
    text-decoration: none;
    transition: color 0.3s ease;
}

.lang-inactive:hover {
    color: var(--color-primary);
}

.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('img/hero-bg.jpg') no-repeat center center/cover;
    padding: 0 10%;
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 1s ease-in-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-button {
    background-color: var(--color-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background-color: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.section {
    padding: 5rem 10%;
}

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

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-content h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    color: var(--color-primary);
}

.section-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-primary);
}

.about-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    gap: 4rem;
    margin-top: -1rem;
}

.about-text {
    flex: 2;
}

.foto-asesor {
    flex: 1;
    max-width: 350px;
    border-radius: 10px;
    box-shadow: 0 10px 30px var(--color-shadow);
}

.valor-diferencial {
    margin: 0 0 2rem 0;
    padding: 1.5rem;
    border-left: 5px solid var(--color-primary);
    background-color: var(--color-background-light);
    border-radius: 0 8px 8px 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text-secondary);
}

/* --- INICIO: SECCIÓN DE SERVICIOS (FUNCIONALIDAD ORIGINAL INTACTA) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: start;
}

.service-card {
    background: var(--color-background);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--color-shadow-light);
    border-top: 5px solid transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    max-height: 280px;
    transition: max-height 0.5s ease-in-out, border-top-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}

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

.service-card.active {
    max-height: 1200px;
    border-top-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.2);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card-description {
    text-align: left;
    border-top: 1px solid var(--color-border-light);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out 0.2s;
}

.service-card.active .card-description {
    opacity: 1;
}
/* --- FIN: SECCIÓN DE SERVICIOS --- */

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    text-align: left;
    margin-top: 3rem;
}

.contact-form-container h3, .contact-details-container h3 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-top: 0;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: var(--color-background);
    color: var(--color-text-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

.contact-form .cta-button {
    width: auto;
    align-self: flex-start;
}

.contact-details-container .contact-info {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-details-container .contact-info p {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-details-container .contact-info i {
    color: var(--color-primary);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.contact-details-container .contact-info a {
    text-decoration: none;
    color: var(--color-text-primary);
    transition: color 0.3s ease;
}

.contact-details-container .contact-info a:hover {
    color: var(--color-primary);
}

footer {
    background-color: var(--color-text-primary);
    color: #aaa;
    text-align: center;
    padding: 2rem 10%;
}

footer a {
    color: white;
}

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

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

@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    nav { padding: 1.5rem 5%; }
    .section { padding: 4rem 5%; }
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255,255,255,0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 99;
    }
    .nav-links.active { display: flex; }
    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.5s forwards;
    }
    .nav-links li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links li:nth-child(5) { animation-delay: 0.5s; }
    .menu-toggle { display: block; }
    .language-switcher-desktop { display: none; }
    .language-switcher-mobile {
        display: block;
        margin-top: 2rem;
        font-size: 1.2rem;
        padding-bottom: 0;
    }
    .hero { height: 85vh; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-text { margin-bottom: 2rem; }
    .valor-diferencial, .focus-box ul li, .focus-box h4, .focus-box p {
        /*text-align: left;*/
    }
    .foto-asesor {
        margin: 0 auto;
        width: 100%;
        max-width: 320px;
        height: 320px;
        object-fit: cover;
    }
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 1rem 2rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 200;
    box-sizing: border-box;
    gap: 1rem;
}

.cookie-banner p {
    margin: 0;
    flex-grow: 1;
}

.cookie-banner a {
    color: var(--color-primary);
    text-decoration: underline;
}

.cookie-banner button {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}

.focus-box {
    margin-top: 2.5rem;
    padding: 1.5rem 2rem;
    border-left: 5px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
    background-color: var(--color-background-light);
}

.focus-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.focus-box p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.focus-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.focus-box ul li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.focus-box ul li:last-child {
    margin-bottom: 0;
}

.focus-box ul i {
    color: var(--color-primary);
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 25px;
}

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- MEJORA PARA PALABRAS LARGAS --- */
h1, h2, h3 {
    overflow-wrap: break-word; /* Permite romper palabras siempre */
}

/* Aplicamos guiones solo en pantallas pequeñas */
@media (max-width: 768px) {
    h1, h2, h3 {
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
    }
}

@media (max-width: 768px) {
    .service-card::after {
        content: '';
        position: absolute;
        bottom: 1.5rem;
        right: 1.5rem;
        width: 10px;
        height: 10px;
        border: solid var(--color-primary);
        border-width: 0 3px 3px 0;
        transform: rotate(45deg);
        transition: transform 0.4s ease, opacity 0.4s ease;
        opacity: 0.6;
    }
    .service-card.active::after {
        transform: rotate(-135deg);
        opacity: 1;
    }
}

/* --- TEMA OSCURO (MANUAL Y AUTOMÁTICO) --- */
@media (prefers-color-scheme: dark) {
    body:not(.light-mode) {
        --color-background: #121212;
        --color-background-light: #2c2c2c;
        --color-text-primary: #e0e0e0;
        --color-text-secondary: #a0a0a0;
        --color-border: #555;
        --color-border-light: #333;
        --color-shadow: rgba(0, 0, 0, 0.2);
        --color-shadow-light: rgba(0, 0, 0, 0.3);
        --color-lang-inactive: #777;
    }
}

body.dark-mode {
    --color-background: #121212;
    --color-background-light: #2c2c2c;
    --color-text-primary: #e0e0e0;
    --color-text-secondary: #a0a0a0;
    --color-border: #555;
    --color-border-light: #333;
    --color-shadow: rgba(0, 0, 0, 0.2);
    --color-shadow-light: rgba(0, 0, 0, 0.3);
    --color-lang-inactive: #777;
}

body.dark-mode .nav-links.active, body:not(.light-mode) .nav-links.active {
    background: rgba(44, 44, 44, 0.98);
}

body.dark-mode footer, body:not(.light-mode) footer {
    background-color: var(--color-background-light);
    color: var(--color-text-secondary);
}

body.dark-mode footer a, body:not(.light-mode) footer a {
    color: var(--color-primary);
}