/*
 * Bootstrap Theme - Custom Styles (Optimized)
 */

/* =========================
   FONT
========================= */
@import "/wp-content/themes/babc/assets/fonts/fonts.css";

/* =========================
   HEADER
========================= */

@import "/wp-content/themes/babc/assets/css/components/header.css";
@import "/wp-content/themes/babc/assets/css/components/language-selector.css";

/* =========================
   FOOTER
========================= */

@import "/wp-content/themes/babc/assets/css/components/footer.css";

/* =========================
   CONTACT FORM
========================= */

@import "/wp-content/themes/babc/assets/css/components/contact-forms/cf7-forms.css";

/* =========================
   STILI CONDIVISI TRA I BLOCCHI GUTENBERG
========================= */

@import "/wp-content/themes/babc/assets/css/components/shared-blocks.css";

/* =========================
   MODALE SITO (#ModalSite)
========================= */

@import "/wp-content/themes/babc/assets/css/components/modal-site.css";

/* =========================
   CSS VARIABLES
========================= */

:root {
    --font-primary: "open_sans_regular", sans-serif;
    --font-primary-bold: "open_sans_bold", sans-serif;
    --font-primary-extrabold: "open_sans_extrabold", sans-serif;

    --primario: #008E95;
    --primario-chiaro: #EDF6F5;
    --secondario: #003E41;
    --secondario-lite: #1b4963;
    --primario-accessibile: #008e88;
    --primario-trasparente-solido: #1aaaa3;
    --errore: #ad2b3f;

    --primary: #0d6efd;
    --primary-hover: #0b5ed7;
    --primary-active: #0a58ca;

    --btn-hover: #008684;
    --btn-hover-grey: #f3f3f3;

    --white: #ffffff;
    --carouselpink: #ebf5f4;
    --pill-bg-light: #EDF6F5;

    --muted: #6c757d;
    --grigio-testo: #61656C;
    --divider-text: #B4B4B4;
    --divider-line: #e5e7eb;
    --dark: #212529;
    --light-bg: #f8f9fa;
    --secondario-footer: #0D2A3E;

    --border: #dee2e6;

    --font-size-sm: 12px;

    --radius: 8px;
    --radius-form-field: 12px;
    --radius-card: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* =========================
   RESET / BASE
========================= */
* {
    box-sizing: border-box;
}

/* =========================
   FOCUS / KEYBOARD NAV
========================= */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primario) !important;
    outline-offset: 3px !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

html {
    /* overflow-y: auto;
    scrollbar-gutter: stable; */

    /* Compensa l'header sticky (#masthead): senza questo, i link con ancora
       (es. <a href="#uno">) scrollano l'elemento target esattamente sotto
       l'header, che essendo sticky lo ricopre. */
    scroll-padding-top: 120px;
}

@media (max-width: 992px) {
    html {
        scroll-padding-top: 86px;
    }
}

body {
    margin: 0;
    padding: 0;
    /* min-height: 100vh; */

    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;

    background-color: var(--primario-chiaro);
    color: var(--secondario);
}

/* =========================
   ACCESSIBILITÀ
========================= */
:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background-color: var(--primario);
    color: var(--white);
    padding: 0.75rem 1rem;
    z-index: 999999;
    border-radius: var(--radius);
}

.skip-link:focus,
.skip-link:focus-visible {
    left: 20px;
    top: 20px;
    background-color: var(--primario);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
}

/* =========================
   LINKS
========================= */
a {
    text-decoration: none;
    color: inherit;
    /* color: var(--secondario); */
}

/* a:hover {
    text-decoration: underline;
    font-family: var(--font-primary-bold);
    color: var(--btn-hover);
} */

/* =========================
   H
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary-extrabold);
}

h1.wp-block-heading {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 0 0 0;
    font-size: 56px;
    font-style: normal;
    font-weight: 700;
    line-height: 60px;
    letter-spacing: -1px;
    margin-bottom: 0px;
    color: var(--primario);
    font-family: var(--font-primary-extrabold);
}

.CookieDeclaration {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 0 20px 0;
    box-sizing: border-box;
    overflow-x: auto;
}

/* =========================
   SITE CONTENT
========================= */

.site-content {
    width: 100%;
    margin: 0;
    padding: 0;
}

.site-content .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.site-content .container .padding-site {
    padding: 0px 55px;
}

.site-content .container .container-site {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0;
}

/* =========================
   ENTRY CONTENT
========================= */

.entry-content {
    margin-top: 20px;
}

/* =========================
   MAIN CONTENT
========================= */
.main-content {
    padding: 0;
}

.entry-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.entry-content p {
    margin-bottom: 24px;
}

/* =========================
   WIDGET AREA
========================= */
.widget-area {
    padding: 2rem 0;
    background-color: var(--light-bg);
}

/* =========================
   BTN EXIT
========================= */

.header-actions {
    position: fixed;
    right: 50px;
    bottom: 50px;
}

.header-actions a.btn.exit {
    border-radius: var(--radius);
    background: var(--primario);
    color: var(--white);
    font-size: 19px;
    font-family: var(--font-primary);
}

.header-actions a.btn.exit:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* =========================
   CARD
========================= */
.card {
    border: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.card:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* =========================
   FORMS
========================= */
.form-control {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* =========================
   BUTTONS
========================= */
.btn-primary {
    font-size: 19px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
    font-family: var(--font-primary-bold);
    display: flex;
    height: 48px;
    padding: 0 24px;
    justify-content: center;
    align-items: center;
    border: none;
}

.btn-primary__icon {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    flex-shrink: 0;
}

.btn-primary.btn--white {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primario);
    border-radius: var(--radius);
    transition: background-color 0.25s ease;
}

.btn-primary.btn--white:hover {
    background-color: var(--btn-hover-grey);
    border-color: var(--white);
    color: var(--primario);
    border-radius: var(--radius);
}

.btn-primary.btn--white:focus,
.btn-primary.btn--white:active {
    outline: none;
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primario);
    border-radius: var(--radius);
}

.btn-primary.btn--white:focus-visible {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primario);
    outline: 2px solid var(--white) !important;
    outline-offset: 2px;
    border-radius: var(--radius);
}

.btn-primary.btn--green {
    background-color: var(--primario);
    border-color: var(--white);
    color: var(--white);
    border-radius: var(--radius);
    transition: background-color 0.25s ease;
}

.btn-primary.btn--green:hover {
    background-color: var(--secondario);
    color: var(--white);
    border-radius: var(--radius);
}

.btn-primary.btn--green:focus,
.btn-primary.btn--green:active {
    outline: none;
    background-color: var(--secondario);
    border-color: var(--white);
    color: var(--white);
    border-radius: var(--radius);
}

.btn-primary.btn--green:focus-visible {
    background-color: var(--secondario);
    border-color: var(--white);
    color: var(--white);
    outline: 2px solid var(--primario);
    outline-offset: 2px;
    border-radius: var(--radius);
}

.error-404__cta {
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
}

button.btn.btn-primary.btn-open-footer-modal {
    height: auto;
    background: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
    margin-left: -12px;
}

/* =========================
   PAGINATION
========================= */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary);
}

.pagination .page-link:hover {
    background-color: #e9ecef;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* =========================
   COMMENTS
========================= */
.comments-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.comment-list .comment {
    margin-bottom: 2rem;
}

.comment-body {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
}

/* =========================
   SCREEN READER
========================= */
/* .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
} */

/* h1.entry-title {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
} */

/* =========================
   META INFO (UNIFICATO)
========================= */
.meta,
.entry-meta,
.byline,
.posted-on {
    /* font-size: 0.875rem;
    color: var(--muted); */
}

/* =========================
   FEATURED POSTS
========================= */
.featured-posts .col-md-4 {
    text-align: center;
}

.featured-posts h3 a {
    color: var(--dark);
    font-weight: 700;
}

.featured-posts h3 a:hover {
    color: var(--primary);
}

/* =========================
   SEARCH FORM
========================= */
.search-form .form-control {
    border-radius: 0 0.25rem 0.25rem 0;
    border-right: none;
}

.search-form .btn {
    border-radius: 0.25rem 0 0 0.25rem;
}

/* =========================
   LOGO CONTAINER
========================= */
.container-logo {
    display: flex;
    align-items: center;
}

/* =========================
   SECTION TITLES
========================= */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* =========================
   404 PAGE
========================= */
.error-404 {
    text-align: center;
    padding: 4rem 2rem;
}

.error-404 h1 {
    font-size: 5rem;
    color: #dc3545;
}

/* =========================
   LOADING
========================= */
.loading-spinner {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.wpcf7 .wpcf7-spinner {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* =========================
   SCROLLBAR
========================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primario);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primario-accessibile);
}

/* =========================
   DARK MODE
========================= */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background-color: #212529;
        color: #f8f9fa;
    }

    .dark-mode .site-header,
    .dark-mode .main-navigation {
        background-color: #343a40;
    }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1280px) {
    .site-content .container .padding-site {
        padding: 0px 20px;
    }
}

@media (max-width: 1180px) {

    h1.wp-block-heading {
        font-size: 46px;
        font-style: normal;
        font-weight: 700;
        line-height: 52px;
        margin-bottom: 16px;
        padding: 0px 20px;
    }

    .CookieDeclaration {
        padding: 0px 20px;
    }
}

@media (max-width: 1024px) {

    h1.wp-block-heading {
        font-size: 36px;
        font-style: normal;
        font-weight: 700;
        line-height: 120%;
        margin-bottom: 16px;
    }

    button.btn.btn-primary.btn-open-footer-modal {
        margin-left: -12px !important;
    }
}

@media (max-width: 992px) {
    .featured-posts .col-md-4 {
        margin-bottom: 2rem;
    }

    .navbar-collapse {
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
    }

    .site-content .container .padding-site {
        padding: 0px 20px;
    }

    .site-footer {
        /* padding: 40px 0px; */
        padding: 0px 0px 40px 0px;
    }

    .btn-primary {
        padding: 0 15px;
    }

    .site-footer-copyright button.btn.btn-primary.btn-open-footer-modal {
        margin-left: 0px !important;
    }
}

@media (max-width: 768px) {

    .entry-title,
    .page-title {
        font-size: 1.5rem;
    }

    .site-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    .btn-primary {
        padding: 0 8px;
    }
}