/*
 Theme Name:   Webag 2026
 Theme URI:    https://webag.it
 Description:  Child theme di GeneratePress per il restyling Webag 2026. Tipografia espressiva, animazioni GSAP, ritmo chiaro/scuro.
 Author:       Webag
 Author URI:   https://webag.it
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  webag-child
*/

/* ==========================================================================
   WEBAG 2026 — Custom Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables / Design Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --webag-orange: #E8593C;
    --webag-orange-hover: #d14a2f;
    --webag-orange-light: rgba(232, 89, 60, 0.1);

    /* Backgrounds */
    --bg-light: #FAFAF8;
    --bg-dark: #141413;
    --bg-warm-gray: #F2F0ED;

    /* Text */
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-muted: #6b6b6b;
    --text-muted-light: #a0a0a0;

    /* Typography */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter Variable', 'Inter', sans-serif;
    --font-size-body: 18px;
    --line-height-body: 1.7;

    /* Spacing */
    --section-padding: clamp(60px, 8vw, 120px);
    --container-max: 1280px;
    --container-padding: clamp(20px, 4vw, 40px);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --------------------------------------------------------------------------
   Base / Reset
   -------------------------------------------------------------------------- */
body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

/* Logo + brand alignment */
.site-header .inside-header {
    display: flex;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
}

.site-header .site-branding-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header .site-logo {
    margin-bottom: 0;
    flex-shrink: 0;
}

.site-header .site-logo img {
    width: 44px;
    height: auto;
}

.site-header .site-branding {
    margin-bottom: 0;
}

.site-header .main-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1;
    margin: 0;
}

.site-header .site-description {
    display: none;
}

/* Nav links */
.main-navigation .main-nav ul li a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Mobile header */
@media (max-width: 768px) {
    .site-header .inside-header {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px;
        gap: 0;
    }

    .site-header .site-branding-container {
        flex: 0 0 auto;
        gap: 8px;
    }

    .site-header .site-logo img {
        width: 36px;
    }

    .site-header .main-title {
        font-size: 1.15rem;
    }

    /* Hamburger menu button */
    .mobile-menu-control-wrapper {
        flex: 0 0 auto;
        order: 2;
    }

    .has-inline-mobile-toggle .mobile-menu-control-wrapper {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }

    button.menu-toggle {
        padding: 8px;
        font-size: 1.2rem;
        background: none;
        border: none;
    }

    /* Prevent nav from taking full width and pushing things down */
    .has-inline-mobile-toggle .inside-header {
        flex-wrap: nowrap;
    }

    .has-inline-mobile-toggle .header-widget,
    .has-inline-mobile-toggle #site-navigation {
        flex-basis: auto;
    }

    /* Mobile menu open state */
    #site-navigation.toggled {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: var(--bg-light);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #e5e5e3;
    }

    #site-navigation.toggled .main-nav ul {
        display: block;
    }

    #site-navigation.toggled .main-nav ul li a {
        padding: 14px 20px;
        font-size: 15px;
        border-bottom: 1px solid #f0f0ee;
    }

    #site-navigation.toggled .main-nav ul ul {
        position: static;
        box-shadow: none;
        background-color: #f8f8f6;
    }

    #site-navigation.toggled .main-nav ul ul li a {
        padding-left: 36px;
        font-size: 14px;
    }

    /* Search icon in mobile */
    .menu-bar-items .menu-bar-item {
        padding: 8px;
    }
}

/* Tablet header */
@media (min-width: 769px) and (max-width: 1024px) {
    .site-header .inside-header {
        flex-direction: row;
        align-items: center;
    }

    .site-header .site-logo,
    .site-header .site-branding {
        margin-bottom: 0;
    }

    .main-navigation .main-nav ul li a {
        padding-left: 16px;
        padding-right: 16px;
        font-size: 13px;
    }
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* Accent color for highlighted words */
.text-accent,
.webag-accent {
    color: var(--webag-orange);
}

/* --------------------------------------------------------------------------
   Dark Sections
   -------------------------------------------------------------------------- */
.section-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--text-light);
}

.section-dark .text-muted {
    color: var(--text-muted-light);
}

/* --------------------------------------------------------------------------
   Warm Gray Sections
   -------------------------------------------------------------------------- */
.section-warm {
    background-color: var(--bg-warm-gray);
}

/* --------------------------------------------------------------------------
   Section Spacing
   -------------------------------------------------------------------------- */
.webag-section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.webag-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.01em;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
}

.webag-btn-primary {
    background-color: var(--webag-orange);
    color: var(--text-light);
    border-color: var(--webag-orange);
}

.webag-btn-primary:hover {
    background-color: var(--webag-orange-hover);
    border-color: var(--webag-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(232, 89, 60, 0.3);
}

.webag-btn-outline {
    background-color: transparent;
    color: var(--text-dark);
    border-color: var(--text-dark);
}

.webag-btn-outline:hover {
    background-color: var(--text-dark);
    color: var(--text-light);
    transform: translateY(-2px);
}

.section-dark .webag-btn-outline {
    color: var(--text-light);
    border-color: var(--text-light);
}

.section-dark .webag-btn-outline:hover {
    background-color: var(--text-light);
    color: var(--text-dark);
}

/* --------------------------------------------------------------------------
   Section Tags (small labels above headings)
   -------------------------------------------------------------------------- */
.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--webag-orange);
    margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Project Cards
   -------------------------------------------------------------------------- */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #1a1a1a;
    transition: transform var(--transition-medium);
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card__image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-card__image {
    transform: scale(1.05);
}

.project-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.project-card__category {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--webag-orange);
    margin-bottom: 8px;
}

.project-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.project-card__metric {
    position: absolute;
    top: 16px;
    right: 16px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--webag-orange);
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-medium);
}

.project-card:hover .project-card__metric {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Service Cards
   -------------------------------------------------------------------------- */
.service-card {
    padding: 32px;
    border: 1px solid #e5e5e3;
    border-radius: 8px;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--webag-orange);
    transform: scaleX(0);
    transition: transform var(--transition-medium);
    transform-origin: left;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    border-color: var(--webag-orange);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.service-card__number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.06);
    line-height: 1;
    margin-bottom: 16px;
}

.service-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card__desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-card__link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--webag-orange);
    text-decoration: none;
    transition: gap var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.service-card__link:hover {
    gap: 12px;
}

/* --------------------------------------------------------------------------
   Animated Counters
   -------------------------------------------------------------------------- */
.counter-item {
    text-align: center;
}

.counter-item__number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--webag-orange);
    line-height: 1;
    margin-bottom: 8px;
}

.counter-item__label {
    font-size: 16px;
    color: var(--text-muted-light);
}

/* --------------------------------------------------------------------------
   Testimonial
   -------------------------------------------------------------------------- */
.testimonial-quote {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 500;
    line-height: 1.5;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-attribution {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Social Proof (Client Logos)
   -------------------------------------------------------------------------- */
.client-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(24px, 4vw, 48px);
    opacity: 0.6;
    transition: opacity var(--transition-medium);
}

.client-logos:hover {
    opacity: 0.9;
}

.client-logos img {
    height: 32px;
    width: auto;
    filter: grayscale(100%);
    transition: filter var(--transition-fast);
}

.client-logos img:hover {
    filter: grayscale(0%);
}

/* --------------------------------------------------------------------------
   Blog Cards
   -------------------------------------------------------------------------- */
.blog-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

.blog-card__title:hover {
    color: var(--webag-orange);
}

/* --------------------------------------------------------------------------
   GSAP Animation States (initial hidden state, GSAP reveals)
   -------------------------------------------------------------------------- */
.gsap-fade-up {
    opacity: 0;
    transform: translateY(40px);
}

.gsap-fade-in {
    opacity: 0;
}

.gsap-scale-in {
    opacity: 0;
    transform: scale(0.95);
}

/* --------------------------------------------------------------------------
   Homepage Sections — Specific Overrides
   -------------------------------------------------------------------------- */

/* Social Proof section */
.webag-social-proof {
    padding-top: clamp(32px, 4vw, 56px);
    padding-bottom: clamp(32px, 4vw, 56px);
}

/* --------------------------------------------------------------------------
   Logos Marquee — infinite horizontal scroll
   -------------------------------------------------------------------------- */
.logos-marquee {
    overflow: hidden;
    position: relative;
    margin-top: 20px;
    /* Fade edges */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

.logos-marquee__track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.logos-marquee__set {
    display: flex;
    align-items: center;
    gap: clamp(40px, 5vw, 72px);
    flex-shrink: 0;
    padding-right: clamp(40px, 5vw, 72px);
}

.logos-marquee__set img {
    height: auto;
    width: clamp(100px, 12vw, 140px);
    max-height: 44px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.4;
    transition: all var(--transition-medium);
    flex-shrink: 0;
}

.logos-marquee:hover .logos-marquee__set img {
    opacity: 0.55;
}

.logos-marquee__set img:hover {
    filter: grayscale(0%) !important;
    opacity: 1 !important;
}

/* Projects section */
.webag-projects {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.webag-projects h2 {
    margin-bottom: clamp(32px, 4vw, 56px);
}

.projects-grid {
    gap: 20px !important;
    margin-bottom: 40px;
}

.projects-grid .project-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: #1a1a1a;
    min-height: 320px;
    padding: 0;
}

.projects-grid .project-card .wp-block-image {
    margin: 0;
    height: 100%;
}

.projects-grid .project-card .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16/10;
    transition: transform var(--transition-slow);
}

.projects-grid .project-card:hover .wp-block-image img {
    transform: scale(1.05);
}

.projects-link {
    text-align: center;
    margin-top: 32px;
}

.projects-link a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--webag-orange);
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.projects-link a:hover {
    color: var(--text-light);
}

/* Services section */
.webag-services {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.webag-services h2 {
    margin-bottom: clamp(32px, 4vw, 56px);
}

.services-grid {
    gap: 20px !important;
}

.services-grid .service-card {
    background-color: var(--bg-light);
}

.service-card__link-wrap {
    margin-bottom: 0;
}

/* Identity section */
.webag-identity {
    text-align: center;
}

.identity-heading {
    margin-bottom: 24px;
}

.identity-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-muted-light);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: clamp(40px, 5vw, 72px);
}

.counters-row {
    gap: clamp(24px, 5vw, 64px) !important;
}

.counter-item {
    flex: 1;
    min-width: 120px;
}

/* AI section */
.webag-ai-section {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.ai-columns {
    align-items: center;
    gap: clamp(32px, 4vw, 64px);
}

.ai-text {
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.7;
}

.ai-visual-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-visual img {
    border-radius: 16px;
}

/* Testimonial section */
.webag-testimonial {
    text-align: center;
}

/* Blog section */
.webag-blog {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.webag-blog h2 {
    margin-bottom: clamp(32px, 4vw, 48px);
}

.blog-grid .wp-block-post-template {
    gap: 24px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e5e3;
    transition: all var(--transition-medium);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.blog-card .wp-block-post-featured-image {
    margin: 0;
}

.blog-card .wp-block-post-featured-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.blog-card .wp-block-post-title {
    padding: 16px 20px 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.35;
}

.blog-card .wp-block-post-title a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

.blog-card .wp-block-post-title a:hover {
    color: var(--webag-orange);
}

.blog-card .wp-block-post-excerpt {
    padding: 8px 20px 20px;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

.blog-card .wp-block-post-excerpt__more-link {
    color: var(--webag-orange);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

/* CTA Final section */
.webag-cta-final {
    text-align: center;
}

.cta-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-muted-light);
    margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   Smart Slider Overrides
   -------------------------------------------------------------------------- */
.n2-section-smartslider {
    /* Ensure slider respects our typography */
}

/* --------------------------------------------------------------------------
   GeneratePress theme overrides for homepage
   -------------------------------------------------------------------------- */

/* Remove separate-containers styling on homepage */
.home.separate-containers .inside-article,
.home.separate-containers .site-main > .separate-containers,
.home .inside-article {
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.home .entry-content {
    padding: 0;
    margin: 0;
}

.home .entry-header {
    display: none;
}

/* Break sections out of the container to go full-width */
.home .webag-section,
.home .webag-social-proof {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    box-sizing: border-box;
}

/* Constrain inner content */
.home .webag-section > .wp-block-group__inner-container,
.home .webag-social-proof > .wp-block-group__inner-container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

/* Hero needs no extra padding */
.home .gb-element-hero-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Ensure full-width sections break out of container */
.home .site-content .content-area {
    width: 100%;
}

/* Override GP's default link underline in our custom sections */
.webag-section a:not(.webag-btn):not(.service-card__link):not(.wp-block-post-title a):not(.wp-block-post-excerpt__more-link) {
    text-decoration: none;
}

/* Remove GP's default body background showing between sections */
.home .site-content {
    background-color: var(--bg-light);
}

/* Remove any GP group padding that may interfere */
.home .site-main .wp-block-group__inner-container {
    padding: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-muted-light);
}

.site-footer a {
    color: var(--text-muted-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--webag-orange);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .ai-columns {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .service-card {
        padding: 24px;
    }

    .project-card__metric {
        opacity: 1;
        transform: translateY(0);
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
    }

    .counters-row {
        flex-wrap: wrap !important;
        gap: 32px !important;
    }

    .counter-item {
        flex-basis: 45%;
    }

    .blog-grid .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }

    .identity-heading {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* ==========================================================================
   PROGETTI ARCHIVE — Grid + Filters
   ========================================================================== */

/* Full-width overrides for archive and single progetto */
.post-type-archive-progetto .site-content .content-area,
.single-progetto .site-content .content-area {
    width: 100%;
}

.post-type-archive-progetto.separate-containers .site-main > *,
.single-progetto.separate-containers .site-main > * {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.post-type-archive-progetto .entry-header,
.single-progetto .entry-header {
    display: none;
}

.progetti-archive,
.case-history {
    width: 100%;
}

/* Full-width sections on project pages */
.progetti-archive .webag-section,
.case-history .webag-section,
.case-history .ch-hero,
.case-history .ch-gallery {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

/* Hero */
.progetti-hero {
    text-align: center;
    padding-top: clamp(80px, 12vw, 160px);
    padding-bottom: clamp(60px, 8vw, 100px);
}

.progetti-hero__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.progetti-hero__subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-muted-light);
    margin-top: 20px;
    line-height: 1.6;
}

/* Filters */
.progetti-filters__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.filter-btn {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 100px;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg-warm-gray);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.filter-btn:hover {
    color: var(--text-dark);
    border-color: var(--text-dark);
    background: white;
}

.filter-btn--active {
    background: var(--text-dark);
    color: white;
    border-color: var(--text-dark);
}

/* Project Grid */
.progetti-grid-section {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.progetti-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.progetto-card {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 1px solid #e5e5e3;
    transition: all var(--transition-medium);
}

.progetto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.progetto-card__image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.progetto-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.progetto-card:hover .progetto-card__image {
    transform: scale(1.04);
}

.progetto-card__placeholder {
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.progetto-card__metric {
    position: absolute;
    top: 16px;
    right: 16px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    background: var(--webag-orange);
    padding: 6px 14px;
    border-radius: 100px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all var(--transition-medium);
}

.progetto-card:hover .progetto-card__metric {
    opacity: 1;
    transform: translateY(0);
}

.progetto-card__info {
    padding: 20px 24px 24px;
}

.progetto-card__category {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--webag-orange);
    display: block;
    margin-bottom: 6px;
}

.progetto-card__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 6px;
}

.progetto-card__services {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .progetti-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SINGLE CASE HISTORY — asborsoni-inspired layout
   ========================================================================== */

/* ── Hero: full-width colored bg, title centered ── */
.ch-hero {
    color: var(--text-light);
    padding: clamp(100px, 14vw, 180px) var(--container-padding) 0;
    position: relative;
    overflow: hidden;
}

.ch-hero__content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: clamp(40px, 5vw, 64px);
}

.ch-hero__tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--webag-orange);
    margin-bottom: 20px;
}

.ch-hero__title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.05;
}

.ch-hero__excerpt {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto 24px;
}

.ch-hero__details {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ch-hero__detail {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.ch-hero__detail--accent {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--webag-orange);
}

/* Hero featured image — bleeds into the next section */
.ch-hero__image {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.15);
}

.ch-hero__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Text band: centered prose ── */
.ch-text-band {
    background: var(--bg-light);
    padding: clamp(48px, 7vw, 96px) var(--container-padding);
}

.ch-text-band__inner {
    max-width: 780px;
    margin: 0 auto;
}

.ch-text-band__inner p {
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    color: var(--text-muted);
    margin-bottom: 1.5em;
}

.ch-text-band__inner p:last-child {
    margin-bottom: 0;
}

.ch-text-band__inner h2 {
    color: var(--text-dark);
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.ch-text-band__inner h2:first-child {
    margin-top: 0;
}

.ch-text-band__inner h3 {
    color: var(--text-dark);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* ── Gallery: full-bleed image bands ── */
.ch-gallery {
    background: var(--bg-light);
    padding: 0 0 clamp(48px, 7vw, 96px);
}

.ch-band {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.ch-band--full .ch-band__item {
    width: 100%;
}

.ch-band--pair .ch-band__item {
    flex: 1;
    min-width: 0;
}

.ch-band__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ch-band--pair .ch-band__item img {
    aspect-ratio: 16/9;
}

@media (max-width: 768px) {
    .ch-band--pair {
        flex-direction: column;
    }
    .ch-band--pair .ch-band__item img {
        aspect-ratio: auto;
    }
}

/* ── Info bar: project metadata ── */
.ch-info {
    background: var(--bg-warm-gray);
    padding: clamp(40px, 5vw, 64px) var(--container-padding);
}

.ch-info__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 24px 48px;
    justify-content: center;
    align-items: center;
}

.ch-info__item {
    text-align: center;
}

.ch-info__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ch-info__value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}

.ch-info__link {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--webag-orange);
    text-decoration: none;
}

.ch-info__link:hover {
    color: var(--webag-orange-hover);
}

/* ── Prev/Next navigation ── */
.ch-nav {
    padding: clamp(32px, 4vw, 56px) var(--container-padding);
    border-top: 1px solid #e5e5e3;
}

.ch-nav__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.ch-nav__link {
    text-decoration: none;
    color: var(--text-dark);
    transition: color var(--transition-fast);
    max-width: 45%;
}

.ch-nav__link:hover {
    color: var(--webag-orange);
}

.ch-nav__next {
    text-align: right;
    margin-left: auto;
}

.ch-nav__dir {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ch-nav__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .ch-nav__inner {
        flex-direction: column;
    }
    .ch-nav__link { max-width: 100%; }
    .ch-nav__next { text-align: left; }
}

/* ── CTA section ── */
.ch-cta {
    padding: clamp(64px, 8vw, 100px) var(--container-padding);
}

.ch-cta__inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.ch-cta__inner h2 {
    color: var(--text-light);
    margin-bottom: 16px;
}

.ch-cta__inner p {
    color: var(--text-muted-light);
    margin-bottom: 32px;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
}
