@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

html,
body {
    font-family: "Nunito", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    margin: 0;
    padding: 0;
    background: white !important;
}

.ff-logo {
    font-family: "Abril Fatface", serif;
    font-optical-sizing: auto;
}

:root {
    --primary: #8c8767;
    --primary-hover: #7a755b;
    --primary-active: #6a654f;
    --primary-rgb: 140, 135, 103;

    --secondary: #e10001;
    --secondary-hover: #c60001;
    --secondary-active: #a80001;
    --secondary-rgb: 225, 0, 1;
}

/* =========================
   TEXT COLORS
========================= */

.textcolor-primary {
    color: var(--primary) !important;
}

.textcolor-secondary {
    color: var(--secondary) !important;
}

/* =========================
   LINK COLORS
========================= */

.linkcolor-primary {
    color: var(--primary) !important;
    text-decoration-color: currentColor;
}

.linkcolor-primary:hover,
.linkcolor-primary:focus {
    color: var(--primary-hover) !important;
    text-decoration-color: currentColor;
}

.linkcolor-secondary {
    color: var(--secondary) !important;
    text-decoration-color: currentColor;
}

.linkcolor-secondary:hover,
.linkcolor-secondary:focus {
    color: var(--secondary-hover) !important;
    text-decoration-color: currentColor;
}

/* =========================
   BACKGROUND COLORS
========================= */

.bgcolor-primary {
    background-color: rgba(var(--primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

.bgcolor-secondary {
    background-color: rgba(var(--secondary-rgb), var(--bs-bg-opacity, 1)) !important;
}

/* =========================
   BORDER COLORS
========================= */

.bordercolor-primary {
    border-color: rgba(var(--primary-rgb), var(--bs-border-opacity, 1)) !important;
}

.bordercolor-secondary {
    border-color: rgba(var(--secondary-rgb), var(--bs-border-opacity, 1)) !important;
}

/* =========================
   BUTTON PRIMARY
========================= */

.button-primary {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: #000;
}

.button-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #000;
}

.button-primary:focus,
.button-primary:active {
    background-color: var(--primary-active);
    border-color: var(--primary-active);
    color: #000;
}

/* =========================
   BUTTON SECONDARY
========================= */

.button-secondary {
    background-color: var(--secondary);
    border: 1px solid var(--secondary);
    color: #fff;
}

.button-secondary:hover {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    color: #fff;
}

.button-secondary:focus,
.button-secondary:active {
    background-color: var(--secondary-active);
    border-color: var(--secondary-active);
    color: #fff;
}

/* =========================
   CONTACT FORM
   Campi del partial content/theme/partials/contact-form.tpl.php.
   La classe form-control resta per compatibilita Bootstrap; form-control-contact
   contiene lo stile modificabile dal tema.
========================= */

.form-control-contact {
    padding: 1rem;
    border: 2px solid var(--primary);
    border-radius: 1rem;
    font-weight: 600;
    color: #111;
    background-color: #fff;
}

.form-control-contact:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.18);
}

.form-control-contact::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

/* =========================
   GALLERIES
   Stili modificabili per le immagini renderizzate da includes/gallery.php.
   img-gallery sostituisce classi Bootstrap come img-fluid, w-100, h-100
   quando servono solo per aspetto e dimensioni delle foto.
========================= */

.img-gallery {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    object-fit: cover;
    object-position: center;
}

.img-gallery-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.gallery-thumb {
    background-color: #f5f5f5;
}

.gallery figcaption {
    line-height: 1.45;
}

/* =========================
   CATEGORY ARCHIVE
   Stili modificabili per content/theme/category.php.
   Il contenuto HTML della categoria resta introduttivo; liste e card sono
   generate dal template a partire da sotto-categorie, articoli e pagine figlie.
========================= */

.theme-category-title {
    margin: 0 0 1rem;
    color: #111;
    font-weight: 800;
}

.theme-category-excerpt {
    max-width: 58rem;
    color: rgba(0, 0, 0, 0.68);
}

.theme-category-content {
    max-width: 72rem;
}

.theme-category-section-title {
    color: #111;
    font-weight: 800;
    letter-spacing: 0;
}

.theme-category-card {
    display: block;
    color: #111;
}

.theme-category-card:hover,
.theme-category-card:focus {
    color: #111;
}

.theme-category-card-body {
    position: relative;
    display: block;
    height: 100%;
    min-height: 10rem;
    padding: 1.5rem 3.25rem 1.5rem 1.5rem;
    border: 2px solid var(--primary);
    border-radius: 1rem;
    background: #fff;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.theme-category-card:hover .theme-category-card-body,
.theme-category-card:focus .theme-category-card-body {
    border-color: var(--primary-hover);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.theme-category-card-title {
    display: block;
    color: #111;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
}

.theme-category-card-excerpt {
    display: block;
    margin-top: 0.85rem;
    color: rgba(0, 0, 0, 0.68);
    font-weight: 600;
    line-height: 1.5;
}

.theme-category-card-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--primary);
}

.theme-category-list {
    border-top: 1px solid rgba(var(--primary-rgb), 0.28);
}

.theme-category-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem 0;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.28);
    color: #111;
    text-decoration: none;
}

.theme-category-list-item:hover,
.theme-category-list-item:focus {
    color: var(--primary-hover);
}

.theme-category-list-main {
    display: block;
    min-width: 0;
}

.theme-category-list-title {
    display: block;
    font-weight: 800;
    line-height: 1.35;
}

.theme-category-list-excerpt {
    display: block;
    margin-top: 0.35rem;
    color: rgba(0, 0, 0, 0.62);
    font-size: 0.95rem;
    line-height: 1.5;
}

.theme-category-list-date {
    display: block;
    margin-top: 0.45rem;
    color: rgba(0, 0, 0, 0.52);
    font-size: 0.85rem;
    font-weight: 700;
}

.theme-category-list-icon {
    flex: 0 0 auto;
    color: var(--primary);
}

/* =========================
   PRODUCT
   Stili modificabili per content/theme/product.php.
========================= */

.theme-product-title {
    margin: 0 0 1rem;
    color: #111;
    font-weight: 800;
}

.theme-product-description {
    max-width: 58rem;
    color: rgba(0, 0, 0, 0.68);
}

.theme-product-summary {
    padding: 1.25rem 0;
    border-top: 2px solid var(--primary);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.28);
}

.theme-product-price {
    color: #111;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.theme-product-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.theme-product-summary-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: .35rem .65rem;
    border: 1px solid rgba(var(--primary-rgb), 0.32);
    color: rgba(0, 0, 0, 0.68);
    font-size: .85rem;
    font-weight: 700;
}

.theme-product-gallery-item,
.theme-product-placeholder {
    margin: 0;
}

.theme-product-gallery-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f5f5f5;
}

.theme-product-section-title {
    color: #111;
    font-weight: 800;
    letter-spacing: 0;
}

.theme-product-detail-list {
    margin: 0;
    border-top: 1px solid rgba(var(--primary-rgb), 0.28);
}

.theme-product-detail-row {
    display: grid;
    grid-template-columns: minmax(10rem, 16rem) 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.28);
}

.theme-product-detail-row dt,
.theme-product-detail-row dd {
    margin: 0;
}

.theme-product-detail-row dt {
    color: rgba(0, 0, 0, 0.58);
    font-weight: 800;
}

.theme-product-detail-row dd {
    color: #111;
    font-weight: 700;
}

/* =========================
   EVENT
   Stili modificabili per content/theme/event.php.
========================= */

.theme-event-title {
    margin: 0 0 1rem;
    color: #111;
    font-weight: 800;
}

.theme-event-description {
    max-width: 58rem;
    color: rgba(0, 0, 0, 0.68);
}

.theme-event-summary {
    padding: 1.25rem 0;
    border-top: 2px solid var(--primary);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.28);
}

.theme-event-detail-list {
    margin: 0;
}

.theme-event-placeholder {
    margin: 0;
}

.theme-event-gallery-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f5f5f5;
}

.theme-event-detail-row {
    display: grid;
    grid-template-columns: minmax(7rem, 10rem) 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.28);
}

.theme-event-detail-row dt,
.theme-event-detail-row dd {
    margin: 0;
}

.theme-event-detail-row dt {
    color: rgba(0, 0, 0, 0.58);
    font-weight: 800;
}

.theme-event-detail-row dd {
    color: #111;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .header-bottom.offcanvas {
        --bs-offcanvas-width: 100%;
        border-left: 0;
        color: #000 !important;
    }

    .header-bottom.offcanvas .navbar-nav,
    .header-bottom.offcanvas .nav-item,
    .header-bottom.offcanvas .dropdown-submenu {
        width: 100%;
    }

    .header-bottom.offcanvas .nav-link,
    .header-bottom.offcanvas .nav-link:hover,
    .header-bottom.offcanvas .nav-link:focus,
    .header-bottom.offcanvas .nav-link.show,
    .header-bottom.offcanvas .dropdown-item,
    .header-bottom.offcanvas .dropdown-item:hover,
    .header-bottom.offcanvas .dropdown-item:focus,
    .header-bottom.offcanvas .nav-link.active,
    .header-bottom.offcanvas .dropdown-item.active,
    .header-bottom.offcanvas .dropdown-item:active {
        color: #000 !important;
    }

    .header-bottom.offcanvas .dropdown-menu {
        background-color: transparent !important;
        border: 0;
    }
}

@media (max-width: 767.98px) {
    .theme-product-detail-row {
        grid-template-columns: 1fr;
        gap: .25rem;
    }
}

.qk-gallery-carousel,
.qk-gallery-carousel .carousel-inner,
.qk-gallery-carousel .carousel-item,
.qk-gallery-carousel .gallery-carousel-image {
    border-radius: 0 !important;
}

.qk-gallery-carousel .carousel-inner {
    overflow: hidden;
}

.qk-gallery-carousel .carousel-item,
.qk-gallery-carousel .carousel-item>a,
.qk-gallery-carousel .carousel-item>img {
    height: 100%;
    min-height: 100%;
    width: 100%;
}

.qk-gallery-carousel .carousel-item>a,
.qk-gallery-carousel .carousel-item>img {
    display: block;
}

.qk-gallery-carousel .img-gallery-link-carousel {
    height: 100%;
    min-height: 100%;
}

.qk-gallery-carousel .gallery-carousel-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
}

.qk-gallery-lightbox-trigger {
    cursor: pointer;
}

.circle-64 {
    width: 64px;
    height: 64px;
}


.hero-ampersand {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0.9;
    transform: translate(-40%, -50%);
    font-weight: 700;
    line-height: 1;
    font-size: clamp(3rem, 7vw, 7rem);
    background: linear-gradient(to right, #8c8767 44%, #e10001 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    z-index: 10;
    pointer-events: none;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-60px);
    animation: slideInLeft 1s ease-out forwards;
    animation-delay: 0.15s;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(60px);
    animation: slideInRight 1s ease-out forwards;
    animation-delay: 0.3s;
}

.zoom-in {
    opacity: 0;
    transform: translate(-45%, -50%) scale(0.8);
    animation: zoomInAmp 0.9s ease-out forwards;
    animation-delay: 0.6s;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomInAmp {
    to {
        opacity: 0.9;
        transform: translate(-45%, -50%) scale(1);
    }
}

#header .navbar-brand img {
    height: 64px;
    width: auto;
    display: block;
}

#header .nav-link {
    padding: 0;
    color: #000;
    font-weight: 600;
    letter-spacing: 0.04em;
}

#header .header-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

#header .header-dropdown-toggle::after {
    display: none !important;
}

#header .header-dropdown-toggle i {
    font-size: 0.95rem;
    line-height: 1;
}

#header .nav-link:hover,
#header .nav-link.active {
    color: #8c8767;
}

#header .navbar-toggler:focus {
    box-shadow: none;
}

#header .offcanvas {
    width: 100vw !important;
    max-width: 100vw;
}

.header-mobile {
    min-height: 72px;
}

@media (min-width: 992px) {
    #header .navbar .container-fluid {
        position: relative;
    }

    .header-desktop {
        gap: 2.5rem;
        min-height: 88px;
    }

    .header-desktop-menu {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        justify-content: flex-end;
    }

    .header-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 2rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #header .header-dropdown {
        position: static;
    }

    #header .header-dropdown>.header-mega-menu {
        --header-mega-column-width: min(320px, 32vw);
        top: calc(100% + 0.5rem);
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        min-width: 0;
        min-height: 23rem;
        max-height: calc(100vh - 7rem);
        padding: 1.5rem;
        overflow: visible;
        border: 0;
        background-color: rgba(255, 255, 255, 0.96);
        box-shadow: 0 28px 72px rgba(0, 0, 0, 0.16);
        transform: none !important;
    }

    #header .header-dropdown>.header-mega-menu>li {
        width: var(--header-mega-column-width);
        list-style: none;
    }

    #header .header-dropdown>.header-mega-menu>li+li {
        margin-top: 0.35rem;
    }

    #header .header-submenu-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        width: 100%;
        padding: 0.95rem 1.1rem;
        border-radius: 1rem;
        color: #111;
        font-weight: 600;
        letter-spacing: 0.02em;
        white-space: normal;
    }

    #header .header-submenu-link:hover,
    #header .header-submenu-link:focus,
    #header .header-submenu-link.active,
    #header .header-mega-item:hover>.header-submenu-link,
    #header .header-mega-item:focus-within>.header-submenu-link {
        color: #8c8767;
        background-color: rgba(140, 135, 103, 0.1);
    }

    #header .header-mega-item {
        position: static !important;
    }

    #header .header-mega-item>.header-mega-panel {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        bottom: 1.5rem;
        left: calc(var(--header-mega-column-width) + 3rem);
        display: none;
        min-width: auto;
        margin: 0;
        padding: 0 0 0 2rem;
        overflow-y: auto;
        border: 0;
        border-left: 1px solid rgba(140, 135, 103, 0.24);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    #header .header-mega-item:hover>.header-mega-panel,
    #header .header-mega-item:focus-within>.header-mega-panel {
        display: block;
    }

    #header .header-mega-panel>li,
    #header .header-flyout-menu>li {
        list-style: none;
    }

    #header .header-mega-panel .header-flyout-link,
    #header .header-mega-panel .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.85rem;
        padding: 0.85rem 1rem;
        border-radius: 0.9rem;
        color: #111;
        font-weight: 600;
        letter-spacing: 0.02em;
        white-space: normal;
    }

    #header .header-mega-panel .header-flyout-link:hover,
    #header .header-mega-panel .header-flyout-link:focus,
    #header .header-mega-panel .header-flyout-link.active,
    #header .header-flyout-item:hover>.header-flyout-link,
    #header .header-flyout-item:focus-within>.header-flyout-link {
        color: #8c8767;
        background-color: rgba(140, 135, 103, 0.08);
    }

    #header .header-flyout-item {
        position: relative;
    }

    #header .header-flyout-item>.header-flyout-menu {
        top: -0.35rem;
        left: calc(100% + 1.15rem);
        z-index: 2;
        min-width: 17rem;
        margin: 0;
        padding: 0.75rem;
        border: 0;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
    }

    #header .header-flyout-item:hover>.header-flyout-menu,
    #header .header-flyout-item:focus-within>.header-flyout-menu {
        display: block;
    }

    #header .header-flyout-menu .header-flyout-link {
        padding: 0.8rem 0.95rem;
    }

    .header-mobile {
        display: none !important;
    }
}

.hero-classico {
    position: relative;
    background:
        radial-gradient(circle at center,
            rgba(0, 0, 0, 0.76) 0%,
            rgba(0, 0, 0, 0.54) 30%,
            rgba(0, 0, 0, 0.28) 58%,
            rgba(0, 0, 0, 0.08) 100%),
        url('https://www.sanasicucine.it/wp-content/uploads/2019/11/cucina-classica-consigli.jpg') center center / cover no-repeat;
}

.hero-moderno {
    position: relative;
    background:
        radial-gradient(circle at center,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.48) 30%,
            rgba(0, 0, 0, 0.24) 58%,
            rgba(0, 0, 0, 0.06) 100%),
        url('https://shop.fattorinidesign.com/wp-content/uploads/2021/04/cucina-lineare-pratica-11-forma-2000-la-casa-moderna.jpg') center center / cover no-repeat;
}

.text-shadow-classico {
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
}

.text-shadow-moderno {
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.hero-scroll-down {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 20;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    font-weight: 700;
    opacity: .9;
    animation: heroArrowBounce 1.8s ease-in-out infinite;
}

.hero-scroll-down i {
    font-size: 1.4rem;
    line-height: 1;
}

@keyframes heroArrowBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

.bg-opacity-90 {
    --bs-bg-opacity: 0.9;
}
