/*Colores que usaremos. En general en el diseño siempre tenemos que elegir colores para mantener la uniformidad del sitio web*/

:root {

    --color-texto: #2b2d42;
    --color-texto-titulos: #3d405b;
    --color-texto-parrafos: #6c757d;

    --color-resaltador-fuerte: #e07a5f;    
    --color-resaltador-suave: #f4a261;
    
    --color-fondo: #f4f1de;
    --fondo-tarjeta: #ffffff;
    
}
        /* CSS RESET & VARIABLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--color-fondo);
    color: var(--color-texto);
    padding: 2rem 1rem;
}
 header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    color: var(--color-texto-titulos);
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    color: var(--color-texto-parrafos);
}
/* GRID DE TARJETAS . En nuestro caso , el contenedor de las tarjetas va a ser el main*/
main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* TARJETAS */
main .tarjeta {
    max-width: 390px;
    margin: 0 auto;
    background-color: var(--fondo-tarjeta);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

main .tarjeta:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

main .tarjeta img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

main .tarjeta .contenido {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

main .tarjeta .contenido h2 {
    font-size: 1.5rem;
    color: var(--color-texto-titulos);
    margin-bottom: 0.5rem;
}

main .tarjeta .contenido h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-resaltador-fuerte);
    margin-bottom: 1rem;
}

main .tarjeta .contenido p {
    font-size: 0.9rem;
    color: var(--color-texto-parrafos);
    margin-bottom: 1.5rem;
    line-height: 1.4;
    flex-grow: 1;
}
.btn {
    background-color: var(--color-resaltador-fuerte);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: center;
}

.btn:hover {
    background-color: #d0694e;
}

  /* ESTILOS DE LA ETIQUETA DIALOG (NATIVO) */
dialog {
    margin: auto;
    border: none;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    padding: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Fondo oscuro nativo con ::backdrop */
dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
dialog.emergente .encabezado-dialog {
    position: relative;
}

dialog.emergente .encabezado-dialog img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
dialog.emergente .encabezado-dialog button{
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
dialog.emergente .contenido-dialog {
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    max-height: calc(85vh - 220px);
}

dialog.emergente .contenido-dialog h2 {
    color: var(--secondary-color);
}

dialog.emergente .contenido-dialog h4 {
    color: var(--color-resaltador-fuerte);
    margin-bottom: 1.2rem;
}

dialog.emergente .contenido-dialog .tema {
    margin-bottom: 1rem;
}

dialog.emergente .contenido-dialog .tema h3 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
    border-bottom: 2px solid var(--color-resaltador-suave);
    display: inline-block;
}

dialog.emergente .contenido-dialog .tema p {
    font-size: 0.95rem;
    line-height: 1.5;
}

footer{
    margin: 2rem 0;
    text-align: center;
}