/* ReqI18N9 */
:lang(es) h1 {
    color: #d32f2f;
    border-bottom: 3px solid #d32f2f;
} /* ReqI18N9 */

:lang(es) .intl-date {
    font-weight: bold;
    background-color: #fff3e0;
} /* ReqI18N9 */


:lang(en) h1 {
    color: #1976d2; 
    border-bottom: 3px solid #1976d2;
} /* ReqI18N9 */

:lang(en) .intl-date {
    font-style: italic;
    background-color: #e3f2fd;
} /* ReqI18N9 */

.lang-selector {
    margin: 10px;
    text-align: right;
}

#dynamic-summary {
    padding: 10px;
    margin: 15px 0;
    border: 1px dashed #ccc;
    background-color: #f9f9f9;
}

/* REQC1 */
:root {
    --fuente-principal: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --espaciado-base: 1rem;
    /* REQC24 */
    --color-primario: #2c3e50;
    --color-acento: #3498db;
}

body {
    font-family: var(--fuente-principal);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* REQC4 */
header,
main {
    width: 80vw;
    margin: 0 auto;
    background-color: white;
    padding: var(--espaciado-base);
}

/* ESTILO DEL NAV COMO BLOQUE APARTE */
nav {
    background-color: var(--color-primario);
    width: 100%;
    /* Ocupa todo el ancho de la pantalla */
    margin-bottom: var(--espaciado-base);
    position: sticky;
    top: 0
}

/* REQC10 */
nav>ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    /* Centra los enlaces dentro del bloque */
}

nav a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    /* REQC2 */
    font-size: 1.1rem;
}

/* REQC14 */
nav a:hover,
nav a:focus {
    background-color: var(--color-acento);
    color: white;
    outline: none;
    transition: 0.3s;
}

/* TIPOGRAFÍA Y BLOQUES */
/* REQC2 */
p {
    font-size: 1rem;
    margin-bottom: var(--espaciado-base);
}

/* REQC3 */
h1 {
    font-size: 2.5rem;
    color: var(--color-primario);
}

h2 {
    font-size: 2rem;
    color: var(--color-primario);
    border-bottom: 2px solid var(--color-acento);
}

h3 {
    font-size: 1.5rem;
}

/* REQC6 */
footer {
    background-color: var(--color-primario);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: var(--espaciado-base);
}

/* REQC23 */
article {
    border: 1px solid #ddd;
    border-left: 5px solid var(--color-acento);
    padding: var(--espaciado-base);
    margin: var(--espaciado-base) 0;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);
}

figure {
    margin: 0;
}

figure img {
    width: 100%;
    background-color: rebeccapurple;
}

/* REQC8 */
.texto-destacado {
    color: var(--color-acento);
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

/* REQC9 */
#autor-info {
    font-style: italic;
    font-size: 0.9rem;
}

/* SELECTORES */
/* REQC11 */
footer p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* REQC12 */
h2+p {
    margin-top: 0.5rem;
    font-weight: 500;
}

/* REQC16 */
section ul {
    list-style-type: square;
}

/* TABLAS */
/* REQC17 */
caption {
    caption-side: bottom;
    padding: 10px;
    font-weight: bold;
    color: #666;
}

/* REQC18 */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: var(--color-primario);
    color: white;
    padding: 12px;
}

td {
    padding: 10px;
    border: 1px solid #ddd;
}

/* FORMULARIOS */
/* REQC19 */
input,
textarea {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #ccc;
    font-family: inherit;
    box-sizing: border-box;
}

input:focus {
    border-color: var(--color-acento);
    box-shadow: 0 0 5px var(--color-acento);
}

input:required {
    border-right: 5px solid #e74c3c;
}

/* REQC20 */
input[type="submit"],
input[type="reset"] {
    width: auto;
    cursor: pointer;
    background-color: var(--color-primario);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
}

.recetas_destacadas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    margin-top: 20px;
}


/* REQC21 */
@media (max-width: 600px) {

    header,
    main {
        width: 90%;
    }

    h1 {
        font-size: 1.8rem;
    }

    nav>ul {
        flex-direction: column;
        text-align: center;
    }
}

form .invalid {
    border: 2px solid red !important;
    background-color: #fceae9;
}

form .valid {
    border: 2px solid green !important;
    background-color: #eafafc;  
}