/* --- Variables y Estilo Base --- */
:root {
    --font-title: 'Playfair Display', "Times New Roman", Times, serif;
    --font-text: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --color-primary: #6D0000; /* Burdeos */
    --color-secondary: #B89B70; /* Bronce */
    --color-bg: #fdfbf5; /* Papiro */
    --color-bg-light: #ffffff; /* Blanco Contenedor */
    --color-text: #2E2E2E; /* Carbón */
    --color-text-light: #555;
}

body {
    font-family: var(--font-text);
    font-weight: 400;
    background-color: var(--color-bg);
    background-image: url('https://www.transparenttextures.com/patterns/white-marble.png');
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: var(--color-text);
}

.container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 0;
}

section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--color-bg-light);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 0;
}

h1 {
    font-size: 3.2em;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 2.5rem;
}

h3 {
    font-size: 1.6em;
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

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

a {
    color: var(--color-primary);
}

/* --- Encabezado y Héroe --- */
.hero {
    background: var(--color-bg-light);
    text-align: center;
    padding: 2rem 1rem 4rem 1rem; /* Ajustado para el selector de idioma */
    border-bottom: 5px solid var(--color-primary);
}
.emblem-container {
    text-align: center;
    margin-bottom: 2rem;
}
.emblem-container img {
    width: 100px;
    height: auto;
    opacity: 0.8;
}
.hero .subtitle {
    font-size: 1.4em;
    font-weight: 300;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
}
.cta-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    font-family: var(--font-text);
    font-weight: 700;
    font-size: 1.1em;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.cta-button:hover {
    background-color: #4a0000;
}
.cta-central {
    text-align: center;
    margin-top: 3rem;
}

/* --- Selector de Idioma (NUEVO) --- */
#lang-selector {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    padding: 10px 0;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    gap: 5px;
}
.lang-btn {
    font-family: 'Lato', sans-serif;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 12px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9em;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s;
}
.lang-btn:hover {
    background-color: #e0e0e0;
    border-color: var(--color-secondary);
}
.lang-btn.active {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    font-weight: bold;
}

/* --- Pilar 2: Servicios --- */
.servicios-grid {
    display: flex;
    gap: 2rem;
}
.servicio-card {
    flex: 1;
    background: #fff;
    padding: 2rem;
    border: 1px solid #E0E0E0;
    border-top: 3px solid var(--color-secondary);
    border-radius: 5px;
}
.servicio-card h3 {
    margin-top: 0;
}

/* --- Pilar 3: Fundador --- */
.fundador-flex {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}
.fundador-img {
    flex-basis: 35%;
}
.fundador-img img {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ddd;
}
.fundador-bio {
    flex-basis: 65%;
}
.fundador-bio ul {
    padding-left: 20px;
}
.fundador-bio li {
    margin-bottom: 0.5rem;
}

/* --- Pilar 4: Contacto --- */
.container-contacto {
    text-align: center;
}
.cta-button.secondary {
    background: none;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}
.cta-button.secondary:hover {
    background: var(--color-secondary);
    color: #fff;
}
.link-secundario {
    display: block;
    margin-top: 1.5rem;
    color: var(--color-text-light);
    font-weight: 700;
}

/* --- Footer --- */
footer {
    background: #333;
    color: #aaa;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}
footer p {
    margin: 0;
    color: #aaa;
    font-size: 0.9em;
}

/* --- Diseño Responsivo --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 2em;
    }
    .servicios-grid {
        flex-direction: column;
    }
    .fundador-flex {
        flex-direction: column;
    }
    .fundador-img {
        max-width: 250px;
        margin: 0 auto 2rem auto;
    }
    #lang-selector {
        padding: 5px;
    }
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}
