@font-face {
    font-family: 'AMX-Black';
    src: url('../assets/Fonts/AMX-Black.ttf') format('truetype');
}
@font-face {
    font-family: 'AMX-BlackItalic';
    src: url('../assets/Fonts/AMX-BlackItalic.ttf') format('truetype');
}
@font-face {
    font-family: 'AMX-Bold';
    src: url('../assets/Fonts/AMX-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}
@font-face {
    font-family: 'AMX-Medium';
    src: url('../assets/Fonts/AMX-Medium.ttf') format('truetype');
}
@font-face {
    font-family: 'AMX-MediumItalic';
    src: url('../assets/Fonts/AMX-MediumItalic.ttf') format('truetype');
}

/* Variables CSS para colores y estilos */
:root {
    --primary-color: #2c3e50;
    --secondary-color: rgb(22, 142, 169);
    --accent-color: rgb(207, 32, 40);
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #000000;
    --border-radius: 8px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    /* CAMBIO: Se establece la fuente por defecto para el cuerpo del texto. */
    font-family: 'AMX-Medium', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

/* CAMBIO: Se aplican las fuentes a los títulos y párrafos según el estándar. */
h1, h2, h3, h5, h6, .section-title, .card-item h3, .card-overlay h4, .modal-contenido h3 {
    font-family: 'AMX-Black', sans-serif;
}

.modal-contenido h4 {
    font-family: 'AMX-BlackItalic', sans-serif;
    font-style: italic;
}

p, .card-overlay p, .modal-contenido p, span, a, li, .btn-ver-mas {
    font-family: 'AMX-Medium', sans-serif;
}

strong, b {
    font-family: 'AMX-Bold', sans-serif;
}


a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Estilos del Hero */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('https://images.unsplash.com/photo-1497366754035-f200968a6e72?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1500&q=80') 
                center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    padding-bottom: 100px; /* Espacio para el bloque inferior */
    /* CAMBIO: Se añade padding superior para evitar que el navbar tape el contenido */
    padding-top: 80px; 
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    /* CAMBIO: Se establece un tamaño de fuente base para el título del hero */
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-description-block {
    position: absolute;
    bottom: -50px; /* La mitad de la altura del bloque para que se superponga */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    padding: 2rem;
    background-image: url('../assets/images/bloque.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
}

.hero-description-block p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.hero-description-mobile {
    display: none;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #333;
}

/* Estilos del contenido principal */
.content {
    padding: 40px 0 60px; /* Aumentamos el padding-top para dejar espacio al bloque */
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(#000000);
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto;
    border-radius: 2px;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
    font-size: 1.5rem; /* Aumentado de 1.1rem a 1.5rem para que parezca un subtítulo */
    line-height: 1.8;
}

/* Card Item Styles from contenidos.css */
.card-item {
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.cards-container .card-item {
    width: 350px;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.5s ease;
}

.card-item:hover::before {
    background-color: rgba(0, 0, 0, 0.6);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
}

.card-item:hover .card-overlay {
    opacity: 1;
}

.card-overlay h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.card-overlay p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.btn-ver-mas {
    background-color: #c00000;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.card-item:hover h3 {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-item h3 {
    margin: 0;
    padding: 1rem;
    background-color: rgba(0,0,0,0.5);
    width: 100%;
    text-align: center;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}


/* Estilos para los botones inferiores */
.bottom-buttons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 80px 0;
    flex-wrap: wrap; /* Para que se apilen en pantallas pequeñas */
}

.custom-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    border: 2px solid #00afb0; /* Color del borde como en la imagen */
    border-radius: 30px; /* Bordes completamente redondeados */
    background-color: white;
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.custom-btn:hover {
    background-color: #00afb0;
    color: white;
}

.custom-btn img {
    height: 30px; /* Ajustar el tamaño del ícono */
}

.highlight {
    color: #d92d3e; /* Un tono de rojo, puedes ajustarlo */
}

.intro-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.intro-section .intro-text {
    flex-basis: 40%;
    font-size: 2.5rem; /* Ajusta el tamaño de la fuente según necesites */
    line-height: 1.2;
    text-align: left;
}

.intro-section .card-item {
    /* PROBLEMA: Esta propiedad, aunque útil para el diseño de escritorio (controla el ancho),
       interfiere con la altura en la vista responsive (cuando flex-direction es 'column').
       Su alta especificidad sobreescribe las reglas de altura definidas en otros ficheros.
       La corrección se aplica en la media query correspondiente más abajo. */
    flex-basis: 30%;
}

/* Responsive design */
@media (max-width: 992px) {
    .hero h1 {
        /* CAMBIO: Se ajusta el tamaño de fuente para tablets */
        font-size: 4rem;
    }
    
    .hero {
        height: 60vh;
    }

    .intro-section {
        flex-direction: column;
        gap: 2rem;
    }

    .intro-section .card-item {
        flex-basis: auto; /* SOLUCIÓN: Reseteamos flex-basis para que la propiedad height pueda funcionar correctamente en responsive. */
    }

    .intro-section .intro-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 50vh;
    }
    
    .hero h1 {
        /* CAMBIO: Se ajusta el tamaño de fuente para dispositivos más pequeños */
        font-size: 3.5rem;
    }
}

@media (max-width: 721px) {
    .hero {
        padding-bottom: 0;
    }

    .hero-description-block {
        display: none;
    }

    .hero-description-mobile {
        display: block;
    }

    .content {
        padding-top: 2rem;
    }

    .hero h1 {
        /* CAMBIO: Se ajusta el tamaño de fuente para móviles */
        font-size: 3rem;
    }

    .intro-section .intro-text {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .hero {
        height: 40vh;
    }
    
    .hero h1 {
        /* CAMBIO: Se ajusta el tamaño de fuente para pantallas muy pequeñas */
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* Estilos para el botón de "Volver" */
.btn-container {
    text-align: center;
    margin: 20px 0; /* Espacio arriba y abajo */
}