/* Alex Handmade — tema leggero, fedele al design originale */

:root {
    --color-text: #303030;
    --color-muted: #666;
    --color-brand: #ce0c6d;
    --color-brand-dark: #b30a5f;
    --color-bg: #fff;
    --color-bg-alt: #fafafa;
    --color-border: #d0d0d0;
    --font-body: 'Raleway', 'Raleway Fallback', system-ui, sans-serif;
    --font-heading: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
    --container: min(1140px, calc(100% - 2rem));
}

@media (min-width: 768px) {
    :root { --header-height: 106px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-brand); text-decoration: none; }
a:hover { color: var(--color-brand-dark); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-synthesis: none;
    color: var(--color-brand);
    line-height: 1.25;
}

body {
    font-synthesis: none;
}

.container {
    width: var(--container);
    margin-inline: auto;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
    position: relative;
    background: var(--color-bg);
    border-bottom: 1px solid #eee;
}

.site-header__inner {
    width: var(--container);
    margin-inline: auto;
    padding: 10px 0 14px;
}

.site-logo {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.site-logo img {
    width: 200px;
    height: 102px;
    object-fit: contain;
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

@media (min-width: 768px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 1.25rem;
        min-height: var(--header-height);
        padding: 8px 0 12px;
    }

    .site-logo {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
    }

    .site-header__bar {
        display: contents;
    }

    .site-nav {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;
        display: block;
    }

    .site-header__tools {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        margin-left: 0;
    }

    .site-header__mobile-actions {
        display: none;
    }
}

.site-nav {
    flex: 0 1 auto;
    min-width: 0;
}

.site-header__tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.site-nav__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__list a {
    display: block;
    padding: 0.35rem 1.25rem;
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.2;
    border-top: 2px solid transparent;
    border-bottom: 2px solid #d0d0d0;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a {
    color: var(--color-brand);
}

.site-search {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--color-border);
    background: #fff;
    width: 240px;
    flex: 0 0 240px;
    min-height: 42px;
}

.site-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0.55rem 0.75rem;
    font: inherit;
    font-size: 1rem;
    background: transparent;
    outline: none;
}

.site-search__button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0 0.65rem;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
}

.site-search__button:hover { color: var(--color-brand); }

.site-header__social {
    display: flex;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-header__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #c536a4;
}

.site-header__social a:last-child { color: #cb2027; }

.site-header__mobile-actions {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
    color: var(--color-brand);
}

.nav-toggle {
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin-inline: auto;
    background: var(--color-text);
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero (sezione intro + 3 box bianchi) ─────────────── */

.hero {
    position: relative;
    overflow: hidden;
}

.hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    z-index: 0;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.05);
    z-index: 1;
}

.hero__inner {
    position: relative;
    z-index: 2;
    padding: 3.5rem 0 2.5rem;
}

.hero__intro {
    max-width: 38rem;
    margin-bottom: 0;
}

.hero__title {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 400;
    color: var(--color-brand);
}

.hero__lead {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-text);
}

.hero__features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.875rem;
    margin-top: 2rem;
}

.feature-card {
    background: #fff;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    min-height: 365px;
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    object-fit: contain;
}

.feature-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-family: var(--font-heading);
    color: var(--color-brand);
}

.feature-card p {
    margin: 0;
    font-style: italic;
    color: var(--color-text);
    font-size: 0.98rem;
}

/* ── Sezioni testo ─────────────────────────────────────── */

.content-section {
    padding: 2rem 0;
}

.section-title {
    margin: 0 0 1rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
}

.section-title--center { text-align: center; }

.section-copy {
    margin: 0;
    font-size: 1.25rem;
}

.section-copy--center {
    text-align: center;
    max-width: 52rem;
    margin-inline: auto;
}

.section-copy strong { color: var(--color-brand); font-weight: 700; }

.section-cta { margin-top: 1.5rem; }
.section-cta--center { text-align: center; }

.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: var(--color-brand);
    color: #fff !important;
    font-weight: 600;
    border: 2px solid var(--color-brand);
    transition: background 0.15s, color 0.15s;
}

.btn:hover {
    background: transparent;
    color: var(--color-brand) !important;
}

.recipes-section {
    padding: 1.5rem 0 4rem;
}

.page-wrap {
    padding: 2.5rem 0 4rem;
}

.page-title {
    margin: 0 0 1.5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.page-title span { color: var(--color-brand); }

.search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results__item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.search-results__item a {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.search-results__item a:hover { color: var(--color-brand); }

.search-results__item p {
    margin: 0.35rem 0 0;
    color: var(--color-muted);
}

.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }

/* ── Fascione uncinetto (6 foto full-bleed) ────────────── */

.crochet-banner {
    width: 100%;
    overflow: hidden;
}

.crochet-banner__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.crochet-banner__cell {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}

.crochet-banner__cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

/* ── Footer ────────────────────────────────────────────── */

.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid #eee;
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.92rem;
    color: var(--color-muted);
}

.site-footer__inner {
    width: var(--container);
    margin-inline: auto;
}

.site-footer__logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.site-footer__logo img { width: 160px; height: auto; margin-inline: auto; }

.site-footer__copy,
.site-footer__note,
.site-footer__contact,
.site-footer__legal {
    margin: 0 0 0.75rem;
}

.site-footer__social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
}

.site-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-brand);
    color: #fff;
}

.site-footer__social a:hover {
    background: var(--color-brand-dark);
    color: #fff;
}

/* ── Back to top ───────────────────────────────────────── */

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-brand);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.15s;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-brand-dark);
}

.back-to-top[hidden] { display: flex; }

.back-to-top:not(.is-visible) { pointer-events: none; }

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 767px) {
    :root { --header-height: auto; }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 200;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    }

    .site-header__inner {
        min-height: 0;
        padding: 0.4rem 0;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo actions"
            "search search"
            "nav nav";
        align-items: center;
        gap: 0;
    }

    .site-logo {
        grid-area: logo;
        min-height: 0;
        margin: 0;
    }

    .site-logo img {
        width: 118px;
        height: 60px;
        object-fit: contain;
    }

    .site-header__bar {
        display: contents;
    }

    .site-nav {
        grid-area: nav;
        display: none;
        width: 100%;
        margin-top: 0.35rem;
    }

    .site-header__tools {
        grid-area: search;
        display: none;
        width: 100%;
        margin: 0.35rem 0 0;
    }

    .site-header__tools.is-open {
        display: flex;
    }

    .site-header__mobile-actions {
        grid-area: actions;
        display: flex;
    }

    .nav-toggle,
    .search-toggle {
        display: flex;
    }

    .site-header__tools .site-header__social {
        display: none;
    }

    .site-search {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .site-nav.is-open {
        display: block;
        border: 1px solid var(--color-border);
        background: #fff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .site-nav__list {
        flex-direction: column;
        gap: 0;
    }

    .site-nav__list a {
        padding: 0.85rem 1rem;
        color: var(--color-text);
        font-size: 1.125rem;
        border: 0;
        border-bottom: 1px solid #eee;
    }

    .site-nav__list li:last-child a { border-bottom: 0; }

    .site-nav__list a:hover,
    .site-nav__list .current-menu-item > a,
    .site-nav__list .current_page_item > a {
        color: var(--color-brand);
        background: #fdf5f8;
    }

    .hero__inner { padding: 2rem 0 1.5rem; }
    .hero__image { object-position: 35% 50%; }

    .hero__features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card { min-height: 0; }

    .crochet-banner__grid {
        grid-template-columns: 1fr;
    }

    .crochet-banner__cell {
        aspect-ratio: 1;
        min-height: 280px;
    }
}

@media (max-width: 575px) {
    .hero__title { font-weight: 700; }
    .hero__lead { font-size: 1.125rem; }
}
