/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #DAA520;
    --accent-color: #CD853F;
    --text-dark: #2C1810;
    --text-light: #6B4423;
    --background-light: #FDF6E3;
    --background-white: #FFFFFF;
    --border-color: #E6D7C3;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
    
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Source Sans Pro', sans-serif;
}

/* Base Styles */
body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--background-white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
}

.navbar {
    padding: 1rem 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-white) 100%);
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.hero-image {
    text-align: center;
}

.hero-map {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-hover);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #6B3410;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

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

/* Stats Section */
.stats {
    padding: 4rem 0;
    background: var(--primary-color);
    color: white;
}

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

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

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Section Titles */
.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* Historia Section */
.historia {
    padding: 5rem 0;
    background: var(--background-light);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--secondary-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-year {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    min-width: 80px;
    text-align: center;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: 45%;
    margin-top: 1rem;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: var(--font-primary);
}

/* Genealogía Section */
.genealogia {
    padding: 5rem 0;
}

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

.rama-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rama-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.rama-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.rama-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--primary-color);
    padding: 1.5rem 1.5rem 0.5rem;
}

.rama-period {
    color: var(--secondary-color);
    font-weight: 600;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}

.rama-description {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.rama-highlights {
    padding: 0 1.5rem 1.5rem;
    list-style: none;
}

.rama-highlights li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 0.9rem;
}

.rama-highlights li:last-child {
    border-bottom: none;
}

/* Servicios Section */
.servicios {
    padding: 5rem 0;
    background: var(--background-light);
}

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

.servicio-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    position: relative;
}

.servicio-card.featured {
    border: 3px solid var(--secondary-color);
    transform: scale(1.05);
}

.servicio-card:hover {
    transform: translateY(-5px);
}

.servicio-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.servicio-card h3 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.precio {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.servicio-card ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.servicio-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.5rem;
}

.servicio-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Testimonios Section */
.testimonios {
    padding: 5rem 0;
}

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

.testimonio-card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border-left: 4px solid var(--secondary-color);
}

.testimonio-card blockquote {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.testimonio-card cite {
    color: var(--primary-color);
    font-weight: 600;
}

/* Contacto Section */
.contacto {
    padding: 5rem 0;
    background: var(--background-light);
}

.contacto-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contacto-info h3 {
    font-family: var(--font-primary);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contacto-details {
    margin-top: 2rem;
}

.contacto-details p {
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.contacto-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contacto-form input,
.contacto-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-secondary);
    transition: border-color 0.3s ease;
}

.contacto-form input:focus,
.contacto-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-family: var(--font-primary);
}

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

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column;
        padding-left: 50px;
    }
    
    .timeline-year {
        left: 20px;
        transform: translateX(-50%);
    }
    
    .timeline-content {
        width: 100%;
        margin: 1rem 0 0 0 !important;
    }
    
    .contacto-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ramas-grid,
    .servicios-grid,
    .testimonios-grid {
        grid-template-columns: 1fr;
    }
}


/* Hero Region for Internal Pages */
.hero-region {
    margin-top: 120px;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-white) 100%);
    min-height: 40vh;
    display: flex;
    align-items: center;
}

.hero-region-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.hero-region-title {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-region-subtitle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-region-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* Improved Section Titles and Subtitles */
.section-title {
    font-family: var(--font-primary);
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 700;
}

.section-subtitle {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

.subsection-title {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.region-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.region-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}



/* ===== ESTILOS ESPECÍFICOS PARA PÁGINA DE GERONA ===== */

/* Inscripción hebrea */
.hebrew-inscription {
    background: #f8f9fa;
    border-left: 4px solid #8B4513;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.hebrew-text {
    font-family: 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.hebrew-text p {
    margin: 8px 0;
}

.translation {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.translation h5 {
    color: #8B4513;
    font-size: 16px;
    margin-bottom: 10px;
}

.translation p {
    font-style: italic;
    color: #555;
    font-size: 16px;
}

/* Información del museo */
.museum-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.info-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #8B4513;
}

.info-card h4 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 18px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card a {
    color: #8B4513;
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

/* Variantes del apellido */
.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.variant-card {
    background: #fff;
    border: 2px solid #8B4513;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.variant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 69, 19, 0.15);
}

.variant-card h4 {
    color: #8B4513;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
}

.variant-card p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Comparación de personajes */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.comparison-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.comparison-card h4 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 18px;
}

.comparison-card p {
    margin: 8px 0;
    font-size: 14px;
}

/* Fuentes académicas */
.sources-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.source-category {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #8B4513;
}

.source-category h4 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 18px;
}

.source-category ul {
    list-style: none;
    padding: 0;
}

.source-category li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.source-category li:last-child {
    border-bottom: none;
}

.source-category a {
    color: #8B4513;
    text-decoration: none;
}

.source-category a:hover {
    text-decoration: underline;
}

/* Enlaces internos */
.internal-link {
    color: #8B4513;
    text-decoration: none;
    font-weight: bold;
}

.internal-link:hover {
    text-decoration: underline;
}

/* Responsive para elementos de Gerona */
@media (max-width: 768px) {
    .museum-info,
    .variants-grid,
    .comparison-grid,
    .sources-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hebrew-inscription {
        padding: 15px;
        margin: 15px 0;
    }
    
    .hebrew-text {
        font-size: 16px;
    }
    
    .variant-card h4 {
        font-size: 20px;
    }
}


/* ===== MEJORAS DE TÍTULOS Y ESPACIADOS ===== */

/* Hero Region para páginas internas - Corrección de superposición */
.hero-region {
    margin-top: 80px !important;
    padding: 3rem 0 2rem 0;
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-white) 100%);
    text-align: center;
    border-bottom: 3px solid var(--border-color);
}

.hero-region h1 {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-region .subtitle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-region .description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* Mejoras de jerarquía de títulos */
h1 {
    font-family: var(--font-primary);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2rem 0 1.5rem 0;
    line-height: 1.3;
}

h2 {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 2.5rem 0 1.5rem 0;
    line-height: 1.3;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 2rem 0 1rem 0;
    line-height: 1.4;
}

h4 {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.8rem 0;
    line-height: 1.4;
}

h5 {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 1.2rem 0 0.6rem 0;
    line-height: 1.4;
}

h6 {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 1rem 0 0.5rem 0;
    line-height: 1.4;
}

/* Mejoras de espaciado de párrafos */
p {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Mejoras de listas */
ul, ol {
    margin: 1rem 0 1.5rem 0;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ===== LLAMADAS DE ACCIÓN MEJORADAS ===== */

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 3rem 2rem;
    margin: 3rem 0;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 3px solid transparent;
}

.cta-button:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* ===== ENLACES "EXPLORAR OTRAS RAMAS" MEJORADOS ===== */

.explore-links {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 10px;
    margin: 3rem 0;
    border: 2px solid var(--border-color);
}

.explore-links h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

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

.explore-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.explore-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.explore-card a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
}

.explore-card a:hover {
    color: var(--secondary-color);
}

.explore-card .region-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* ===== MEJORAS RESPONSIVE ===== */

@media (max-width: 768px) {
    .hero-region h1 {
        font-size: 2.2rem;
    }
    
    .hero-region .subtitle {
        font-size: 1.1rem;
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.3rem; }
    
    .cta-section {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }
    
    .cta-section h3 {
        font-size: 1.6rem;
    }
    
    .explore-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-region h1 {
        font-size: 1.8rem;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}



/* ===== MEJORAS DE USABILIDAD Y VISUALIZACIÓN ===== */

/* Estilos para llamadas de acción mejoradas */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: #f8f9fa;
}

/* Estilos para enlaces "Explorar Otras Ramas" mejorados */
.explore-links {
    background: var(--background-light);
    padding: 3rem 0;
}

.explore-links h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    font-size: 2rem;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.explore-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

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

.explore-card a {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.region-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Estilos para estadísticas visuales mejoradas */
.main-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.main-stat-item {
    text-align: center;
}

.stat-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-circle .stat-number {
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.main-stat-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.main-stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Gráficos visuales */
.visual-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.chart-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Gráfico de barras para períodos */
.period-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.period-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.bar-visual {
    position: relative;
    background: #f0f0f0;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bar-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.8s ease;
}

.bar-fill.medieval {
    background: linear-gradient(90deg, #8B4513, #A0522D);
}

.bar-fill.modern {
    background: linear-gradient(90deg, #4682B4, #5F9EA0);
}

.bar-fill.contemporary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.bar-value {
    position: absolute;
    right: 10px;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Gráfico de ubicaciones */
.location-chart {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.location-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.location-info {
    flex: 1;
}

.location-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.progress-bar {
    background: #f0f0f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.progress-fill.aragon {
    background: linear-gradient(90deg, #8B4513, #A0522D);
}

.progress-fill.cataluna {
    background: linear-gradient(90deg, #FFD700, #FFA500);
}

.progress-fill.international {
    background: linear-gradient(90deg, #32CD32, #228B22);
}

.location-info span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Gráfico circular (pie chart) */
.documentation-chart {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.pie-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        #28a745 0deg 216deg,
        #ffc107 216deg 324deg,
        #dc3545 324deg 360deg
    );
    position: relative;
}

.pie-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.legend-color.complete {
    background: #28a745;
}

.legend-color.partial {
    background: #ffc107;
}

.legend-color.research {
    background: #dc3545;
}

/* Datos destacados */
.highlight-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    background: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
}

.highlight-item {
    text-align: center;
    padding: 1rem;
}

.highlight-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.highlight-item p {
    color: var(--text-color);
    font-weight: 600;
}

/* Responsive design para gráficos */
@media (max-width: 768px) {
    .documentation-chart {
        flex-direction: column;
        text-align: center;
    }
    
    .visual-stats {
        grid-template-columns: 1fr;
    }
    
    .main-stats {
        grid-template-columns: 1fr;
    }
    
    .explore-grid {
        grid-template-columns: 1fr;
    }
}


/* Featured Regions Section */
.featured-regions-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.featured-regions-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.featured-regions-section .section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.featured-regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.featured-region-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.featured-region-card.primary {
    border-color: var(--primary-color);
    grid-column: span 1;
}

.featured-region-card.secondary {
    border-color: var(--accent-color);
}

.region-image {
    height: 200px;
    overflow: hidden;
}

.region-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-region-card:hover .region-image img {
    transform: scale(1.05);
}

.region-content {
    padding: 1.5rem;
}

.region-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.region-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.region-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.region-badge.origin {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
}

.region-badge.current {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.region-badge.academic {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.region-badge.active {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.region-badge.historical {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
}

.region-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.region-stats .stat {
    background: var(--background-light);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.region-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.region-highlights {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.highlight-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.region-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.region-cta:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .featured-regions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-region-card.primary {
        grid-column: span 1;
    }
    
    .region-stats {
        justify-content: center;
    }
    
    .region-highlights {
        justify-content: center;
    }
}

