/*
Theme Name: WS-theme
Theme URI: https://www.watsonsolutions.it/
Author: Watson Solutions
Author URI: https://www.watsonsolutions.it/
Description: Watson solutions starter theme based on Underscore.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ws-theme
This theme, like WordPress, is licensed under the GPL.
*/

/* DESIGN TOKENS */
:root {
    /* Colors */
    --ws-color-white: #FFFFFF; /* Testo su sfondo non bianco. */
    --ws-color-black: #000000; /* Voci di menu e testo default. */
    --ws-color-primary: #A2185B; /* Colore caratteristico: pulsanti, bg, titoli. */
    --ws-color-primary-dark: #5E0E35; /* Bordeaux scuro: sfumatura hero produttore, tag scheda vino. */

    /* Fonts */
    --ws-font-heading: 'Jost', sans-serif;
    --ws-font-body: 'Sofia Sans Condensed', sans-serif;
}

/* FONTS */

/* Jost: single variable font file per style, pinned per weight below
   (same approach Google Fonts itself serves - the browser reads the
   matching instance from the file's wght axis via the declared weight). */
@font-face {
    font-family: 'Jost';
    src: url('fonts/jost/Jost-VariableFont.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jost';
    src: url('fonts/jost/Jost-VariableFont.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jost';
    src: url('fonts/jost/Jost-Italic-VariableFont.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Sofia Sans Condensed: same variable-font approach as Jost above. */
@font-face {
    font-family: 'Sofia Sans Condensed';
    src: url('fonts/sofia-sans-condensed/SofiaSansCondensed-VariableFont.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sofia Sans Condensed';
    src: url('fonts/sofia-sans-condensed/SofiaSansCondensed-VariableFont.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sofia Sans Condensed';
    src: url('fonts/sofia-sans-condensed/SofiaSansCondensed-VariableFont.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sofia Sans Condensed';
    src: url('fonts/sofia-sans-condensed/SofiaSansCondensed-VariableFont.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sofia Sans Condensed';
    src: url('fonts/sofia-sans-condensed/SofiaSansCondensed-VariableFont.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Sofia Sans Condensed';
    src: url('fonts/sofia-sans-condensed/SofiaSansCondensed-Italic-VariableFont.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Sofia Sans Condensed';
    src: url('fonts/sofia-sans-condensed/SofiaSansCondensed-Italic-VariableFont.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body,
html {
    height: 100%;
    animation: fadeIn .8s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

/* Base size for any text without its own rule (plugin output such as the
   cookie banner, editor lists...): the same as paragraphs, instead of
   Bootstrap's 1rem, small in a condensed face. rem values are unaffected. */
body {
    font-family: var(--ws-font-body);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--ws-color-black);
    font-synthesis: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--ws-font-heading);
    font-weight: 700;
}

p {
    font-size: 1.2rem;
}

/* Media-library images carry width/height attributes: without this the
   height attribute wins over a CSS width (e.g. .w-100) and stretches them.
   Rules that size an image on purpose (class selectors) still win. */
img {
    height: auto;
}

.skip-link {
    display: none;
}

a:link {
    color: red;
    text-decoration: none;
}
  
a:visited {
    text-decoration: none;
}
  
a:hover {
    text-decoration: none;
}
  
a:active {
    text-decoration: none;
}

/* BTN */
a.btn-basic {
    display: inline-block;
    color: red;
    border: 2px solid red;
    padding: 15px 45px;
}

/* Reusable design-system buttons: same label style (uppercase, Sofia
   Sans Condensed 400, white text), only the background changes. */
a.ws-btn {
    display: inline-block;
    font-family: var(--ws-font-body);
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--ws-color-white);
    text-decoration: none;
    padding: 9px 36px;
    border-radius: 5px;
}

a.ws-btn:visited,
a.ws-btn:hover,
a.ws-btn:active {
    color: var(--ws-color-white);
}

.ws-btn-dark {
    background-color: var(--ws-color-black);
}

.ws-btn-primary {
    background-color: var(--ws-color-primary);
}

/* White variant (for colored backgrounds): primary text, including the
   link states a.ws-btn forces to white. */
.ws-btn-white {
    background-color: var(--ws-color-white);
}

a.ws-btn.ws-btn-white,
a.ws-btn.ws-btn-white:visited,
a.ws-btn.ws-btn-white:hover,
a.ws-btn.ws-btn-white:active {
    color: var(--ws-color-primary);
}

/* Shape modifier: smaller, fully rounded pill. */
a.ws-btn.ws-btn-pill {
    padding: 6px 24px;
    border-radius: 50px;
}

/* UTILITIES */

/* Reusable 100px top/bottom section spacing. */
.ws-section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
}

.ws-pt-100 {
    padding-top: 100px;
}

.ws-pb-100 {
    padding-bottom: 100px;
}

.ws-py-150 {
    padding-top: 150px;
    padding-bottom: 150px;
}

.ws-pb-150 {
    padding-bottom: 150px;
}

/* Primary-color uppercase section heading, shared across sections. */
.ws-section-title {
    color: var(--ws-color-primary);
    text-transform: uppercase;
    font-size: 3rem;
    line-height: 1.15;
    margin: 0 0 40px;
}

/* Section title in medium weight (fw-medium) with a bold italic tail in <i>
   ("Dal produttore <i>al tuo locale</i>"): no class needed in the text. */
.ws-section-title.fw-medium i {
    font-weight: 700;
}

/* Large full-width statement heading, with an italic bold tail in <i>. */
.ws-display-title {
    font-family: var(--ws-font-body);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 4rem;
    line-height: 1.1;
    margin: 0;
}

.ws-display-title i {
    font-weight: 700;
}

/* After .ws-section-title on purpose: same specificity, so it must come
   later to override the title color on colored backgrounds. */
.ws-color-white {
    color: var(--ws-color-white);
}

/* HEADER */
.site-header {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-color: var(--ws-color-white);
    width: 100%;
    height: 100px;
    padding-right: 50px;
}

.top-bar {
    position: absolute;
    left: 0;
    top: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--ws-color-primary);
    color: var(--ws-color-white);
    width: 100%;
    height: 35px;
    padding: 0 50px;
    box-sizing: border-box;
    font-size: 1.2rem;
}

img.logo-header {
    height: 65px;
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger {
    display: none;
}

nav#site-navigation {
    margin-right: 100px;
}

nav#site-navigation ul {
    padding: 0;
    margin: 0;
}

nav#site-navigation ul li {
    display: inline-block;
    margin-right: 30px;
}

nav#site-navigation a {
    color: var(--ws-color-black);
    font-size: 1.15rem;
}

/* Current page (and the parent of a current subpage), classes added by
   wp_nav_menu(). */
nav#site-navigation .current-menu-item > a,
nav#site-navigation .current-menu-ancestor > a {
    font-weight: 600;
}

/* Contatti always stands out (class added in inc/template-functions.php).
   After the current-item rule so it keeps its color there too. */
nav#site-navigation .ws-menu-item-contact > a {
    color: var(--ws-color-primary);
}

/* HERO (ws_render_hero(), inc/hero.php) */

/* Header (.site-header) + top-bar (.top-bar) together reserve 135px,
   both position: absolute - the hero clears that space itself instead
   of relying on body padding, so only pages with a hero are affected. */
.ws-hero {
    position: relative;
    margin-top: 135px;
    height: calc(100vh - 135px);
    min-height: 500px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Plain variant (producer page): no photo or veil, as tall as its content
   instead of the viewport. Dark-to-primary gradient: it ends in the primary
   of the next section, like the photo heroes, but stands apart from it. */
.ws-hero--plain {
    height: auto;
    min-height: 0;
    padding: 80px 0;
    background: linear-gradient(to bottom, var(--ws-color-primary-dark) 0%, var(--ws-color-primary) 100%);
}

/* Two layers: the primary gradient on top, a black veil under it for
   text legibility. The gradient is opaque at the bottom, so the hero
   still ends in the pure primary color that meets the next section. */
.ws-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 0%, transparent 55%, var(--ws-color-primary) 100%),
        rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.ws-hero__content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ws-hero__eyebrow {
    font-family: var(--ws-font-body);
    font-weight: 500;
    text-transform: uppercase;
    color: var(--ws-color-white);
    font-size: 1.65rem;
    margin: 0 0 20px;
}

.ws-hero__title {
    font-family: var(--ws-font-heading);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ws-color-white);
    font-size: 3.25rem;
    line-height: 1.15;
    margin: 0 0 60px;
}

/* Reusable hero scroll-down CTA (ws_render_hero_scroll_cta()). Element +
   class so it outweighs the global a:link color. */
a.ws-hero-scroll-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ws-color-white);
    font-size: 1.3rem;
}

.ws-hero-scroll-cta img {
    display: block;
}

/* CARD (ws_render_card(), inc/card.php) */
.ws-card {
    height: 100%;
    padding: 12px 24px 40px;
    background-color: #9D19610D;
    border-radius: 40px 12px 50px 6px;
    transition: background-color .3s ease;
}

/* Negative left margin: the image sits closer to the card edge than
   the text below it. */
.ws-card__image {
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 0 20px -12px;
    border-radius: 50%;
    object-fit: cover;
}

.ws-card__title {
    font-family: var(--ws-font-body);
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: var(--ws-color-primary);
    margin: 0 0 12px;
    transition: color .3s ease;
}

.ws-card__text {
    font-weight: 300;
    margin: 0;
    transition: color .3s ease;
}

a.ws-btn.ws-card__cta {
    margin-top: 16px;
    font-size: 0.95rem;
    transition: background-color .3s ease, color .3s ease;
}

.ws-card:hover {
    background-color: var(--ws-color-primary);
}

.ws-card:hover .ws-card__title,
.ws-card:hover .ws-card__text {
    color: var(--ws-color-white);
}

.ws-card:hover a.ws-btn.ws-card__cta {
    background-color: var(--ws-color-white);
    color: var(--ws-color-primary);
}

/* TEXT SECTION (ws_render_text_section(), inc/text-section.php) */
.ws-text-section--primary {
    background-color: var(--ws-color-primary);
    color: var(--ws-color-white);
}

.ws-text-section--white {
    background-color: var(--ws-color-white);
    color: var(--ws-color-black);
}

/* The underline follows the title color via currentColor. */
.ws-text-section__title {
    font-family: var(--ws-font-body);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 3.5rem;
    line-height: 1.1;
    margin: 0 0 50px;
    padding-bottom: 4px;
    border-bottom: 2px solid currentColor;
}

.ws-text-section--white .ws-text-section__title {
    color: var(--ws-color-primary);
}

.ws-text-section__body p {
    margin-bottom: 30px;
}

.ws-text-section__body p:has(+ ul) {
    margin-bottom: 0;
}

.ws-text-section__body ul {
    margin: 0 0 30px;
    padding-left: 50px;
    font-size: 1.2rem;
}

.ws-text-section__body li::marker {
    font-size: 0.7em;
}

.ws-text-section__body > :last-child {
    margin-bottom: 0;
}

.ws-text-section__body a {
    color: inherit;
}

/* CONTACT FORM (Contact Form 7 via ws_render_contact_form(), class
   .ws-form): white on the primary background. Scoped to .ws-form so
   other CF7 forms keep the plugin's look. */
.ws-form {
    --ws-form-line: rgba(255, 255, 255, .6);
    /* White chevron of the dropdowns. */
    --ws-form-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='9' viewBox='0 0 16 9'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
    color: var(--ws-color-white);
}

/* Two columns (Contatti form), one under 992px (MOBILE block). Rows are
   spaced by the fields' own bottom margin. */
.ws-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 170px;
}

/* 992-1199px: the container is 960px, the col-lg-9 form 696px: a 170px
   gap would leave ~260px fields. (From 992 down: one column.) */
@media (min-width: 993px) and (max-width: 1199.98px) {
    .ws-form__grid {
        column-gap: 60px;
    }
}

.ws-form__field {
    display: block;
    margin-bottom: 32px;
}

.ws-form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.3rem;
    font-weight: 400;
    text-transform: uppercase;
}

.ws-form input[type="text"],
.ws-form input[type="email"],
.ws-form input[type="tel"],
.ws-form select,
.ws-form textarea {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--ws-form-line);
    border-radius: 10px;
    background: transparent;
    color: var(--ws-color-white);
    font-family: var(--ws-font-body);
    font-size: 1.1rem;
}

.ws-form input[type="text"],
.ws-form input[type="email"],
.ws-form input[type="tel"],
.ws-form select {
    height: 48px;
}

.ws-form textarea {
    height: 110px;
    resize: vertical;
}

/* Placeholders and dropdown texts in light white, as in the design. */
.ws-form ::placeholder {
    color: rgba(255, 255, 255, .8);
    font-weight: 300;
    opacity: 1;
}

/* Dropdowns: the design's chevron instead of the native arrow. */
.ws-form select {
    padding-right: 48px;
    background: var(--ws-form-chevron) no-repeat right 16px center;
    font-weight: 300;
    appearance: none;
    cursor: pointer;
}

/* The option list is drawn by the system, on a light background. */
.ws-form select option {
    color: var(--ws-color-black);
}

.ws-form input[type="text"]:focus,
.ws-form input[type="email"]:focus,
.ws-form input[type="tel"]:focus,
.ws-form select:focus,
.ws-form textarea:focus {
    border-color: var(--ws-color-white);
    outline: none;
    box-shadow: 0 0 0 1px var(--ws-color-white);
}

/* Privacy acceptance: round white box, primary dot when checked. */
.ws-form__privacy {
    margin-bottom: 40px;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.4;
}

.ws-form__privacy .wpcf7-list-item {
    margin: 0;
}

.ws-form__privacy label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.ws-form__privacy input[type="checkbox"] {
    flex: none;
    width: 14px;
    height: 14px;
    margin: 3px 0 0;
    border: 0;
    border-radius: 50%;
    background: var(--ws-color-white);
    appearance: none;
    cursor: pointer;
}

.ws-form__privacy input[type="checkbox"]:checked {
    background: var(--ws-color-primary);
    box-shadow: inset 0 0 0 3px var(--ws-color-white), 0 0 0 1px var(--ws-color-white);
}

.ws-form__privacy input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--ws-color-white);
    outline-offset: 3px;
}

/* Same specificity as the a:link placeholder rule, declared after it: wins. */
.ws-form__privacy a {
    color: var(--ws-color-white);
    text-decoration: underline;
}

/* Same look as a.ws-btn.ws-btn-white, which only applies to links. */
.ws-form .wpcf7-submit {
    padding: 14px 36px;
    border: 0;
    border-radius: 5px;
    background: var(--ws-color-white);
    color: var(--ws-color-primary);
    font-family: var(--ws-font-body);
    font-size: 1.3rem;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity .2s ease;
}

.ws-form .wpcf7-submit:hover {
    opacity: .9;
}

.ws-form .wpcf7-submit:focus-visible {
    outline: 2px solid var(--ws-color-white);
    outline-offset: 3px;
}

/* Validation and result messages: CF7's red/green/orange are unreadable
   on the primary background, so white with a thicker border. */
/* .wpcf7-form-control too: must outrank .ws-form input[type="text"]. */
.ws-form .wpcf7-form-control.wpcf7-not-valid {
    border-width: 2px;
    border-color: var(--ws-color-white);
}

.ws-form .wpcf7-not-valid-tip {
    margin-top: 6px;
    color: var(--ws-color-white);
    font-size: .95rem;
}

/* CF7 colors it per state with .wpcf7 form.<state> .wpcf7-response-output
   (0,3,1): .ws-form.wpcf7-form adds the class needed to outrank all of them. */
.wpcf7 form.ws-form.wpcf7-form .wpcf7-response-output {
    margin: 24px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--ws-color-white);
    border-radius: 10px;
    color: var(--ws-color-white);
}

@media (prefers-reduced-motion: reduce) {
    .ws-form .wpcf7-submit {
        transition: none;
    }
}

/* PRODUCERS LIST (ws_render_producers_section(), inc/producers.php) */
.ws-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 40px;
    margin-bottom: 100px;
}

.ws-filters__label {
    font-size: 1rem;
    text-transform: uppercase;
    color: #555555;
}

/* Native selects styled as the design's outlined pills: the placeholder
   option shows the filter name, a chosen value replaces it. */
.ws-filters__select {
    appearance: none;
    font-family: var(--ws-font-body);
    font-size: 1rem;
    text-transform: uppercase;
    color: #555555;
    background-color: transparent;
    border: 1px solid #555555;
    border-radius: 50px;
    padding: 2px 16px;
    cursor: pointer;
}

.ws-producers-grid {
    --bs-gutter-x: 7rem;
    --bs-gutter-y: 5.5rem;
}

.ws-producer-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    background-color: #9D19610D;
    border-radius: 8px;
}

.ws-producer-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 10;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 24px;
}

.ws-producer-card__title {
    font-family: var(--ws-font-body);
    font-weight: 400;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--ws-color-primary);
    margin: 0 0 12px;
}

.ws-producer-card__meta {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.3;
    margin: 0 0 8px;
}

.ws-producer-card__meta:last-of-type {
    margin-bottom: 16px;
}

.ws-producer-card__meta strong {
    font-weight: 500;
    text-transform: uppercase;
}

/* margin-top: auto keeps the buttons aligned across a row of cards. */
a.ws-btn.ws-producer-card__cta {
    margin-top: auto;
    text-align: center;
}

/* Editor content (the_content()) on colored backgrounds. */
.ws-rich-text a {
    color: inherit;
    text-decoration: underline;
}

.ws-rich-text > :last-child {
    margin-bottom: 0;
}

/* SINGLE PRODUTTORE (single-produttore.php) */
.ws-hero__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    padding: 16px;
    margin-bottom: 30px;
    background-color: var(--ws-color-white);
    border-radius: 8px;
}

.ws-hero__logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ws-gallery {
    --swiper-pagination-color: var(--ws-color-primary);
}

/* Room below the slides for the pagination bullets. */
.ws-gallery .swiper {
    padding-bottom: 40px;
}

.ws-gallery__image {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

a.ws-wine-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    text-align: center;
    color: var(--ws-color-black);
    text-decoration: none;
}

/* Bottle packshots are tall: fixed portrait box, image contained. Bottles
   (~1:3) fill its height, so the ratio sets their size: 3:4 makes them
   2/3 as tall as with the previous 1:2. min-height: 0 disables aspect-ratio's
   automatic minimum size, which otherwise grows the box to the image's
   own proportions (every card a different, much taller height). */
.ws-wine-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 0;
    margin-bottom: 20px;
}

.ws-wine-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ws-wine-card__title {
    font-family: var(--ws-font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.2;
    transition: color .3s ease;
}

.ws-wine-card__meta {
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 300;
}

a.ws-wine-card:hover .ws-wine-card__title {
    color: var(--ws-color-primary);
}

/* WINE SHEET (single-vino.php, second band): bottle left, tags,
   description, spec list and producer CTA right. Palette tokens are
   scoped to the block; the rest comes from the theme's variables. */
.ws-wine-sheet {
    --ws-wine-sheet-ink: #1E1418;
    --ws-wine-sheet-muted: #6B5A62;
    --ws-wine-sheet-plum: var(--ws-color-primary-dark);
    --ws-wine-sheet-line: #EFE2E8;
    --ws-wine-sheet-tag-border: #E3CBD6;
    --ws-wine-sheet-tag-bg: #F7EEF2;
    --ws-wine-sheet-cta-hover: #7A1145;

    background: var(--ws-color-white);
    color: var(--ws-wine-sheet-ink);
    font-family: var(--ws-font-body);
    padding: 112px 24px 120px;
}

.ws-wine-sheet__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    column-gap: 96px;
    align-items: center;
    max-width: 1160px;
    margin: 0 auto;
}

/* No bottle image (the wine has no featured image): content only. */
.ws-wine-sheet--no-media .ws-wine-sheet__inner {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
}

.ws-wine-sheet__media {
    display: flex;
    justify-content: center;
    margin: 0;
}

.ws-wine-sheet__bottle {
    display: block;
    width: auto;
    max-width: 100%;
    height: 620px;
    object-fit: contain;
}

.ws-wine-sheet__content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.ws-wine-sheet__intro {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* h2/h3: font-family and line-height reset, the theme's headings are Jost. */
.ws-wine-sheet__eyebrow {
    margin: 0 0 12px;
    color: var(--ws-color-primary);
    font-family: var(--ws-font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ws-wine-sheet__intro .ws-wine-sheet__eyebrow {
    margin-bottom: 0;
}

.ws-wine-sheet__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ws-wine-sheet__tag {
    padding: 7px 14px;
    border: 1px solid var(--ws-wine-sheet-tag-border);
    border-radius: 999px;
    color: var(--ws-wine-sheet-plum);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.ws-wine-sheet__tag--highlight {
    border-color: var(--ws-wine-sheet-tag-bg);
    background: var(--ws-wine-sheet-tag-bg);
}

/* Size on the <p> too: the global p rule (1.2rem) would win otherwise. */
.ws-wine-sheet__description,
.ws-wine-sheet__description p {
    margin: 0;
    font-size: 20px;
    line-height: 1.55;
}

.ws-wine-sheet__specs {
    margin: 0;
    border-bottom: 1px solid var(--ws-wine-sheet-line);
}

/* 140px label column: every value starts on the same line. */
.ws-wine-sheet__spec {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--ws-wine-sheet-line);
    font-size: 18px;
}

/* font-weight: Bootstrap's reboot makes <dt> bold. */
.ws-wine-sheet__spec dt {
    color: var(--ws-wine-sheet-muted);
    font-weight: 400;
}

.ws-wine-sheet__spec dd {
    margin: 0;
    font-weight: 600;
}

/* a.class: beats the a:link/:visited placeholders (same specificity, later). */
a.ws-wine-sheet__cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--ws-color-primary);
    color: var(--ws-color-white);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

a.ws-wine-sheet__cta:hover,
a.ws-wine-sheet__cta:focus-visible {
    background: var(--ws-wine-sheet-cta-hover);
    color: var(--ws-color-white);
}

a.ws-wine-sheet__cta:focus-visible {
    outline: 2px solid var(--ws-color-primary);
    outline-offset: 3px;
}

.ws-wine-sheet__cta svg {
    flex: none;
}

@media only screen and (max-width: 380px) {
    .ws-wine-sheet__spec {
        grid-template-columns: 112px minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    a.ws-wine-sheet__cta {
        transition: none;
    }
}

/* HOME */

/* "Selezioniamo il meglio dei vini francesi per te" section.
   z-index: 0 gives the container its own stacking context, so the
   map's z-index: -1 stays behind this section's text only. */
.ws-select-container {
    position: relative;
    z-index: 0;
}

/* Anchored to the container, not the left column, so it can span the
   whole section and spill into the (unpadded) section below. The px
   values are tied to .ws-section-padding: -100px starts it at the
   section's top edge, +320px = 100px top + 100px bottom padding +
   120px into the next section. left: 5/24 centers it on the left
   col-lg-5 (half of 5/12). */
.ws-select-map {
    position: absolute;
    top: -100px;
    left: calc(100% * 5 / 24);
    height: calc(100% + 320px);
    width: auto;
    max-width: none;
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
}

/* Vertical timeline: a #F7F7F7 track with a primary-color fill that
   grows top-to-bottom on scroll (see js/custom-scripts.js), plus a
   dot per paragraph. The track only spans dot 1 to the last dot - it
   lives in .ws-timeline-body, which wraps every item except the last
   one, so its height naturally ends exactly at the last item's top
   edge instead of running the full text height. */
.ws-timeline-body {
    position: relative;
}

.ws-timeline-track {
    position: absolute;
    left: 0;
    top: 12px;
    bottom: -12px;
    width: 8px;
    background-color: #F7F7F7;
    border-radius: 4px;
    overflow: hidden;
}

.ws-timeline-track-fill {
    width: 100%;
    height: 0;
    background-color: var(--ws-color-primary);
    border-radius: 4px;
}

/* Spacing is padding, not margin: .ws-timeline-body's height (which
   sizes the track) must include the gap before the last item, and a
   last child's margin would collapse out of it. */
.ws-timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 60px;
}

.ws-timeline-item p {
    margin-bottom: 0;
}

.ws-timeline > .ws-timeline-item:last-child {
    padding-bottom: 0;
}

.ws-timeline-dot {
    position: absolute;
    left: -8px;
    top: 0;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    border-radius: 50%;
    background-color: var(--ws-color-white);
    border: 3px solid var(--ws-color-primary);
}

/* CHI SIAMO (template-pages/06_chi_siamo.php) */

/* Full-width band as tall as its image: splitting the background at 50%
   puts the primary/white change at the image's middle at any width. */
.ws-split-band {
    background: linear-gradient(to bottom, var(--ws-color-primary) 50%, var(--ws-color-white) 50%);
}

/* Three overlapping images; positions are percentages of the box so the
   composition scales with the column. */
.ws-collage {
    position: relative;
    height: 600px;
}

/* Transform built from variables, so the entrance and hover states can
   change offset/rotation independently without overriding each other. */
.ws-collage__photo,
.ws-collage__card {
    --tx: 0px;
    --ty: 0px;
    --rot: 0deg;
    position: absolute;
    border-radius: 8px;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
    transition: transform .6s ease, opacity .6s ease;
}

.ws-collage__photo {
    object-fit: cover;
}

.ws-collage__photo--back {
    top: 0;
    right: 0;
    width: 50%;
    height: 70%;
}

.ws-collage__photo--middle {
    bottom: 0;
    right: 18%;
    width: 50%;
    height: 65%;
    z-index: 1;
}

.ws-collage__card {
    top: 12%;
    left: 0;
    width: 55%;
    height: 70%;
    --rot: -8deg;
    overflow: hidden;
    z-index: 2;
    background-color: var(--ws-color-primary);
}

/* Photo under a primary tint, as in the design's dark-red card. */
.ws-collage__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    mix-blend-mode: multiply;
}

/* The front card can be a link (Chi siamo field "collage_pagina"). */
a.ws-collage__card:focus-visible {
    outline: 2px solid var(--ws-color-primary);
    outline-offset: 4px;
}

.ws-collage__label {
    position: absolute;
    left: 30px;
    right: 30px;
    bottom: 30px;
    color: var(--ws-color-white);
    font-size: 1.3rem;
    text-transform: uppercase;
}

/* Entrance (js/custom-scripts.js): is-pending hides the images until the
   collage scrolls into view - with no transition, or adding it would fade
   the collage out on page load; is-entering staggers them in and is
   removed right after, so the delays don't slow down the hover. */
.ws-collage.is-pending .ws-collage__photo,
.ws-collage.is-pending .ws-collage__card {
    --ty: 60px;
    opacity: 0;
    transition: none;
}

.ws-collage.is-entering .ws-collage__photo--middle {
    transition-delay: .15s;
}

.ws-collage.is-entering .ws-collage__card {
    transition-delay: .3s;
}

/* Hover fan: front card straightens and lifts, the photos spread out.
   Only where a real hover exists (not on touch screens). */
@media (hover: hover) and (pointer: fine) {

    .ws-collage:hover .ws-collage__card {
        --ty: -14px;
        --rot: -2deg;
    }

    .ws-collage:hover .ws-collage__photo--back {
        --tx: 24px;
        --ty: -12px;
        --rot: 4deg;
    }

    .ws-collage:hover .ws-collage__photo--middle {
        --tx: 36px;
        --ty: 16px;
        --rot: 3deg;
    }

}

@media (prefers-reduced-motion: reduce) {

    .ws-collage__photo,
    .ws-collage__card {
        transition: none;
    }

}

/* 404 */
.container-404 {
    padding-top: 150px;
    padding-bottom: 150px;
}

.container-404 h2,
.container-404 h3 {
    font-size: 1.5rem;
}

/* FOOTER (vertical padding from .ws-section-padding) */
.site-footer {
    background-color: var(--ws-color-white);
}

.site-footer p,
.ws-footer-menu {
    font-size: 1rem;
    line-height: 1.35;
}

.site-footer p {
    margin: 0 0 20px;
}

.site-footer a {
    color: var(--ws-color-black);
}

.ws-footer-logo {
    display: block;
    height: 55px;
    width: auto;
}

.ws-footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 60px;
}

.ws-footer-social img {
    display: block;
    height: 22px;
    width: auto;
}

.ws-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ws-footer-menu li {
    margin-bottom: 8px;
}

/* MOBILE */
@media only screen and (max-width: 992px) {

    /* Header bar: logo left, hamburger right, both centered in the 100px bar. */
    img.logo-header {
        left: 20px;
        height: 50px;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 50px;
        right: 10px;
        transform: translateY(-50%);
        z-index: 100;
    }

    /* Single line on small screens: only the left text, truncated if needed. */
    .top-bar {
        padding: 0 20px;
        font-size: 1rem;
    }

    .top-bar-left {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .top-bar-right {
        display: none;
    }

    /* Menu: full-screen white panel, opened by the hamburger
       (js/custom-scripts.js toggles .is-open). The hamburger stays above it
       to close it. */
    nav#site-navigation {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 99;
        margin: 0;
        padding: 100px 20px 40px;
        background-color: var(--ws-color-white);
        overflow-y: auto;
    }

    nav#site-navigation.is-open {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    nav#site-navigation ul li {
        display: block;
        margin: 0 0 24px;
        text-align: center;
    }

    nav#site-navigation a {
        font-size: 1.6rem;
    }

    html.ws-menu-open {
        overflow: hidden;
    }

    .ws-hero__title {
        font-size: 2.2rem;
    }

    .ws-section-title {
        font-size: 2rem;
    }

    .ws-display-title {
        font-size: 2.5rem;
    }

    .ws-text-section__title {
        font-size: 2.25rem;
    }

    .ws-text-section__body ul {
        padding-left: 30px;
    }

    .ws-filters {
        margin-bottom: 50px;
    }

    .ws-producers-grid {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 3rem;
    }

    .ws-gallery__image {
        height: 300px;
    }

    .ws-collage {
        height: 420px;
    }

    /* Rotated -8deg from the column's left edge, the front card would leave
       the screen: start it further in. */
    .ws-collage__card {
        left: 6%;
    }

    .ws-hero--plain {
        padding: 60px 0;
    }

    /* Contatti form: one column. */
    .ws-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Wine sheet: one column, bottle on top. */
    .ws-wine-sheet {
        padding: 56px 20px 64px;
    }

    .ws-wine-sheet__inner {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 48px;
        max-width: 640px;
    }

    .ws-wine-sheet__bottle {
        height: 440px;
    }

    /* Columns stack here: the map leaves the background and sits above
       the title, smaller, so it never runs under the text. */
    .ws-select-map {
        position: static;
        display: block;
        width: 70%;
        height: auto;
        margin: 0 auto 40px;
        transform: none;
    }

    /* The dots stick out 8px left of the column: keep them off the screen edge. */
    .ws-timeline {
        margin-left: 12px;
    }

    .ws-timeline-item {
        padding-left: 40px;
    }

}