/* ========== LEGAL TEXT LOGIC ========== */
/*
html[lang="ca"] section.lang-es {
  display: none; }
html[lang="es"] section.lang-ca {
  display: none; }
*/
/* ========== FLEX UTILITIES ========== */
section.d-flex {
    display: flex;
    flex-wrap: nowrap;
    gap: 1em;
    justify-content: center; }
div.d-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center; }
div.d-flex.flex-vertical {
    flex-direction: column; }

@media (max-width: 900px) {
    section.d-flex {
        flex-direction: column;
        align-items: center; }
    section.d-flex, 
    section.section-bg {
        margin-left: 1em;
        margin-right: 1em; }
    div.d-flex {
        flex-direction: column; } }
/* ========== BACKGROUNDS ========== */
.section-bg {
    background: linear-gradient(rgba(255,255,255,.8), rgba(255,255,255,.8)), url("../images/20240627_INTERIOR_NAU_030.jpg");
    background-size: cover;
    background-position: center; }
/* ========== LAYOUT UTILITIES ========== */
.mw-100 { max-width: 100%; }
#contenido { min-height: 45vh; }
.column-width { max-width: 800px; margin: 0 auto; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1em; }
.mt-2 { margin-top: 2em; }
.p-relative { position: relative; }
.ws-preline { white-space: pre-line; }
.d-none { display: none; }
/* ========== HEADER ========== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5; }
.header-top {
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem; }
.logo img {
    display: block;
    height: auto;
    width: 150px; }
.site-title {
    flex: 1;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: #000;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); }
.language-selector select {
    font-size: 0.95rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0; }
/* ========== MAIN CONTENT ========== */
main {
    margin: 2em auto; }
main section {
    padding: 1em 1em 1.4em;
    margin: 2em auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
main section h2 {
    font-size: 1.4rem;
    color: #000;
    margin-top: 0;
    margin-bottom: 0.5rem; }
.title-hl { font-size: 1.8rem; }
/* ========== PROGRAM LIST ========== */
.programa-actes__list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem; }
@media (min-width: 900px) {
    .programa-actes__list { grid-template-columns: repeat(3, 1fr); } }
.programa-actes__list-element {
    background-color: #f2f2f2;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease; }
.programa-actes__list-element:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); }
.programa-actes__list-element-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover; }
.programa-actes__list-element-ttl {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: black; }
.programa-actes__list-element-date {
    margin: 0.4rem 0 0 0;
    font-size: 0.9rem;
    color: #333; }
.programa-actes__list-element-link,
.programa-actes__link-descarrega {
    display: inline-block;
    align-self: flex-start;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    background-color: #dc0526;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    margin-top: 0.75rem;
    text-align: center;
    width: auto;
    max-width: 100%; }
.programa-actes__list-element-link:hover,
.programa-actes__link-descarrega:hover {
    background-color: #b00020; }
.missa-int__list .programa-actes__link-descarrega {
    width: calc(100% - 1.4em);
    padding: 0.7rem 1rem;
    white-space: normal; }
.programa-actes__link-descarrega-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: -5px; }
.document-principal__list {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center; }
/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 1em;
    margin-top: 2em;
    font-size: 1.3rem;
    color: white;
    background: black; }
.programa-actes__footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.2rem 0 1.5rem; }
.programa-actes__footer-row > div {
    flex: 0 0 50%;
    max-width: 50%; }
.programa-actes__footer-img-basilica { width: 210px; }
.programa-actes__footer-img-unesco { width: 200px; }
footer hr { margin-top: 0.5rem !important; }
footer a, footer a:hover, footer a:focus { text-decoration: none; color: white; }
/* ========== BUTTON CATEGORIES ========== */
.cat-bg { background: #dc0526; }
.cat-bg:hover { background: #b00020; }
.esp-bg { background: #F7A800; }
.esp-bg:hover { background: #C98700; }
.eng-bg { background: #7F8C92; }
.eng-bg:hover { background: #5F6B70; }
.fra-bg { background: #004585; }
.fra-bg:hover { background: #003363; }
.ita-bg { background: #0AA458; }
.ita-bg:hover { background: #087D43; }
.cat-bg, .esp-bg, .eng-bg, .fra-bg, .ita-bg { transition: background-color 0.2s ease; }
/* ========== COOKIE MODAL ========== */
/* body.modal-open { overflow: hidden; } */
.cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 9999; }
.cookie-modal.hidden { display: none; }
.cookie-modal > div {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;}
.cookie-modal > div:not(:last-child) { margin-bottom: 0.75rem; }
.cookie-modal-header {
    font-size: 0.9rem; }
.cookie-modal-header a {
    color: #333;
    text-decoration: none; }
.cookie-modal-header a:hover { text-decoration: underline; }
.cookie-modal-content h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    color: #000;
    font-weight: bold; }
.cookie-modal-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem; }
.cookie-modal-content p {
    font-size: 1.5rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 1.5em; }
.cookie-modal-content a {
    color: #dc0526;
    text-decoration: none; }
.cookie-modal-content a:hover { text-decoration: underline; }
.cookie-modal-section {
    border: 1px solid #333;
    border-radius: 3px;
    padding: 1em; }
.cookie-modal-content .cookie-modal-section p { 
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.2; }
.cookie-modal .btn {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none; }
.cookie-modal .btn-main {
    background-color: #dc0526;
    color: #ffffff; }
.cookie-modal .btn-main:hover { background-color: #b00020; }
.cookie-modal .btn-secondary {
    background-color: #f2f2f2;
    color: #333;
    border: 1px solid #ccc; }
.cookie-modal .btn-secondary:hover { background-color: #e5e5e5; }
.cookie-modal .btn-close { 
    position: absolute;
    right:-1em;
    top: -1em;
    width: 40px; }
/* ========== RESPONSIVE ========== */
@media(max-width: 768px){
    .header-top { padding: 1rem; gap: 1rem; display: flex; align-items: stretch; }
    .header-top .logo img { width: 90px; }
    .header-top .site-title { 
        position: relative; 
        transform: none; 
        left: auto; 
        display: flex;
        align-items: center;
        justify-content: center;
        background: black;
        color: white;
        border-radius: 5px; }
    .language-selector select { padding: 0.35rem; }
    .programa-actes__footer-img-basilica { width: 125px; }
    .programa-actes__footer-img-unesco { width: 112px; }
    footer .programa-actes__footer-row:last-child {
        flex-direction: column;
        align-items: center;     }
    footer .programa-actes__footer-row:last-child > div {
        flex: 0 0 100%;
        max-width: 100%;     }
    footer .programa-actes__footer-row:last-child > div:last-child { margin-top: 1rem; } }
/* ========== LEGAL TEXT ========== */
.legal-text h3 { margin-bottom: 0.5em; }
.legal-text p, .legal-text ul { padding-bottom: 1em; }
.legal-text ul { margin: 0; }
.legal-text table {
    border-collapse: collapse;
    width: 100%;
    text-align: center;
    margin-bottom: 2em; }
.legal-text th,
.legal-text td {
    border: 1px solid black;
    padding: 8px; }
.legal-text thead {
    background-color: #333;
    color: #fff; }
