/* ==========================================================
   PANFILO TAGORA — PORTABLE THEME LAYER
   Baseline: Rand 1.3.0 -> Panfilotagora 1.3.4
   Do not add rules to Rand source CSS when they can live here.
   ========================================================== */

:root {
    --tagora-navy: #16253A;
    --tagora-white: #FFFFFF;
    --tagora-gold: #C6A776;
    --tagora-gold-ink: #7A5C2E;
}

/* 04. HEADER */
/* Header membership button only; keep newsletter form colors unchanged. */
html[data-theme="light"] .gh-head .head-member-actions .button-primary {
    background-color: #16253A;
    color: #FFFFFF;
}

html[data-theme="dark"] .gh-head .head-member-actions .button-primary {
    background-color: #FFFFFF;
    color: #16253A;
}

html[data-theme] .gh-head .head-member-actions .button-primary:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

html[data-theme] .gh-head .head-member-actions .button-primary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -5px;
}

/* 08. HOME GALLERY — mobile 2 x 2 */
@media (max-width: 767px) {
    .hero-gallery-anchor {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.6rem;
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .hero-gallery-item {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}

/* 10. BIBLIOTECA — preserve complete book covers */
article.tag-biblioteca .feed-image {
    aspect-ratio: 2 / 3 !important;
}

article.tag-biblioteca .feed-image img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

/* 12. FOOTER */
@media (min-width: 768px) {
    body.home-template .site-footer .footer-inner-main {
        padding-left: 9.2rem;
    }
}

@media (max-width: 480px) {
    .site-title-footer {
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
        -webkit-hyphens: none;
        line-height: 1;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .site-title-footer {
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
        -webkit-hyphens: none;
        line-height: 1;
    }
}

@media (max-width: 767px) {
    #site-title-footer {
        font-size: clamp(3.6rem, 13vw, 5.4rem);
    }
}
