/* =====================================================
   CONTROMANO.BIKE — Main Stylesheet
   ===================================================== */

:root {
    --red: #CC0000;
    --green: #2bb24c;
    --orange: #ff8c00;
    --red-dark: #aa0000;
    --black: #111111;
    --black-deep: #0a0a0a;
    --white: #ffffff;
    --off-white: #fafafa;
    --light: #f5f5f5;
    --gray: #666666;
    --gray-light: #999999;
    --border: #e5e5e5;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--off-white);
    color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Make layout a column so footer can stick to bottom on short pages */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Let the main content grow to push footer to the bottom */
.site-main {
    flex: 1 0 auto;
}

/* Ensure footer stays at the bottom when content is short */
.site-footer {
    margin-top: auto;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── COLORS & BG ── */
.bg-white {
    background: var(--white);
}

.bg-dark {
    background: var(--black);
}

.bg-light {
    background: var(--light);
}

.text-white {
    color: var(--white);
}

.text-muted {
    color: rgba(255, 255, 255, 0.55);
}

.red {
    color: var(--red);
}

/* ── SECTION UTILS ── */
.section {
    padding: 6rem 0;
}

.section-desc {
    font-size: 1rem;
    color: var(--gray);
    max-width: 500px;
    line-height: 1.7;
}

.section-body {
    color: var(--gray);
    line-height: 1.8;
}

.section-body p+p {
    margin-top: 1rem;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.75rem;
    height: 3rem;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-decoration: none;
}

.btn-black {
    background: var(--black);
    color: var(--white);
}

.btn-black:hover {
    background: var(--red);
    color: var(--white);
}

.btn-red {
    background: var(--red);
    color: var(--white);
}

.btn-red:hover {
    background: var(--red-dark);
}

.btn-outline {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}

.btn-outline:hover {
    background: var(--black);
    color: var(--white);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--black);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── RED BARS ── */
.red-bar {
    height: 3px;
    background: var(--red);
    width: 100%;
}

.red-bar-top {
    height: 3px;
    background: var(--red);
    width: 100%;
}

/* ══════════════════════════════════════
   HEADER / NAVBAR
══════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.site-header.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.site-logo {
    height: 2.5rem;
    width: auto;
}

.site-name {
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--black);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.primary-nav #primary-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.primary-nav #primary-menu a {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray);
    transition: color 0.2s;
}

.primary-nav #primary-menu a:hover {
    color: var(--red);
}

.nav-cta {
    flex-shrink: 0;
}

/* Mobile toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    transition: all 0.3s;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    gap: 0;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav #mobile-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.mobile-nav #mobile-menu li {
    border-bottom: 1px solid var(--border);
}

.mobile-nav #mobile-menu a {
    display: block;
    padding: 1rem 0;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--black);
}

.mobile-cta {
    margin-top: 1.25rem;
    width: 100%;
    justify-content: center;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero-section {
    padding-top: 5rem;
    background: var(--white);
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
    align-items: stretch;
    gap: 4rem;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
    gap: 1.5rem;
}

/* Badge pill */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(204, 0, 0, 0.07);
    width: fit-content;
}

.badge-pill span:last-child {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--red);
}

.pulse-dot {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
    color: var(--gray-light);
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    border-radius: 50%;
}

.pulse-dot.opens-today {
    color: var(--orange);
}

.pulse-dot.open {
    color: var(--green);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(2.2);
    }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.0;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: var(--black);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 420px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Hero image */
.hero-image {
    position: relative;
    min-height: 500px;
}

.hero-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-badge {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: var(--white);
    border-left: 4px solid var(--red);
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.badge-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-light);
    font-weight: 700;
}

.badge-value {
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--black);
}

/* ══════════════════════════════════════
   CHI SIAMO
══════════════════════════════════════ */
.chi-siamo-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.red-line-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--red);
}

.chi-siamo-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--black);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-light);
}

/* ══════════════════════════════════════
   CICLOFFICINA
══════════════════════════════════════ */
.ciclofficina-header {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* ── PAGINATION (button style, centered) ── */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.pagination-wrapper .page-numbers {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    align-items: center;
}

.pagination-wrapper .page-numbers li {}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    padding: 0 1rem;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 6px;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--black);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none;
}

.pagination-wrapper .page-numbers a:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.pagination-wrapper .page-numbers .current {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.pagination-wrapper .page-numbers .dots {
    background: transparent;
    border: none;
    padding: 0 0.75rem;
    height: auto;
    font-weight: 700;
    color: var(--gray);
}

.ciclofficina-logo-wrap {
    flex-shrink: 0;
}

.ciclofficina-logo {
    height: 9rem;
    width: auto;
    filter: brightness(0) invert(1);
}

.ciclofficina-intro {
    flex: 1;
}

.ciclofficina-intro .section-title {
    color: var(--white);
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.servizio-card {
    padding: 3.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.servizio-card:last-child {
    border-right: none;
}

.servizio-card:hover {
    background: var(--red);
}

.servizio-card:hover .servizio-icon {
    color: var(--white);
}

.servizio-icon {
    color: var(--red);
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

/* Specifica altezza maggiore per l'icona della Ciclofficina Itinerante */
.servizio-icon .itinerante-icon {
    height: 48px;
    max-height: 48px;
    width: auto;
    display: block;
}

.servizio-card h3 {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.servizio-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    transition: color 0.3s;
}

.servizio-card:hover p {
    color: rgba(255, 255, 255, 0.85);
}

/* ══════════════════════════════════════
   PROGETTI
══════════════════════════════════════ */
.section-header {
    margin-bottom: 3.5rem;
}

.progetti-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.progetto-card {
    background: var(--white);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s;
}

.progetto-card:hover {
    border-color: var(--red);
}

.progetto-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.progetto-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.progetto-card:hover .progetto-image img {
    transform: scale(1.05);
}

.progetto-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--red);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
}

.progetto-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 2px solid transparent;
    transition: border-color 0.3s;
}

.progetto-card:hover .progetto-body {
    border-color: var(--red);
}

.progetto-body h3 {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.progetto-body p {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 1.25rem;
    flex: 1;
    line-height: 1.6;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
    transition: gap 0.2s;
}

.link-arrow:hover {
    gap: 0.6rem;
}

/* ══════════════════════════════════════
   CONTATTI
══════════════════════════════════════ */
.contatti-inner {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 6rem;
    align-items: start;
}

.contatti-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contatti-info .section-title {
    color: var(--white);
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
}

.contact-item a {
    color: rgba(255, 255, 255, 0.55);
}

.contact-item a:hover {
    color: var(--red);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    color: var(--white);
}

.social-btn:hover {
    background: var(--red);
    border-color: var(--red);
}

/* Form */
.form-box {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 3.5rem;
}

.form-box h3 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.625rem 0;
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--red);
}

.form-group textarea {
    resize: none;
}

.form-success {
    background: rgba(0, 180, 0, 0.1);
    border: 1px solid rgba(0, 180, 0, 0.3);
    color: #6fcf97;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.form-error {
    background: rgba(204, 0, 0, 0.1);
    border: 1px solid rgba(204, 0, 0, 0.3);
    color: #ff6b6b;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
    background: var(--black-deep);
    padding: 2.5rem 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    height: 2rem;
    width: auto;
    opacity: 0.5;
    filter: brightness(0) invert(1);
}

.footer-name {
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.footer-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-nav a {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--white);
}

.footer-copy {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ══════════════════════════════════════
   PAGE HERO (pagine interne)
══════════════════════════════════════ */
.page-hero {
    padding-top: 4.5rem;
    overflow: hidden;
}

.page-hero-inner {
    padding: 5rem 0 4rem;
}

.page-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.page-hero-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 600px;
    line-height: 1.8;
}

.page-hero-small {
    padding: 8rem 0 4rem;
    background: var(--black);
}

.page-hero-small .container h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--white);
}

/* ══════════════════════════════════════
   SINGLE POST / ENTRY CONTENT
══════════════════════════════════════ */
.entry-header.page-hero-small {
    /* restored to match .page-hero-small spacing */
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.entry-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
}

.entry-content.container {
    margin-top: 2rem;
    max-width: 900px;
    background: var(--white);
    padding: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(16, 16, 16, 0.06);
    color: var(--gray);
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1rem;
    font-size: 1.02rem;
    color: var(--gray);
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--black);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* alignment helpers coming from WP: allow floated images to work */
.entry-content .alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
    max-width: 50%;
}

.entry-content .alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 50%;
}

.entry-content .aligncenter {
    display: block;
    margin: 1.5rem auto;
}

/* ensure floats don't break container layout */
.entry-content::after {
    content: "";
    display: table;
    clear: both;
}

.entry-content figure {
    margin: 1.25rem 0;
}

.entry-content figcaption {
    font-size: 0.85rem;
    color: var(--gray-light);
    text-align: center;
    margin-top: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--red);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--gray);
    font-style: italic;
    background: rgba(204, 0, 0, 0.02);
    padding: 0.75rem 1rem;
}

.entry-meta {
    color: var(--gray-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

@media (max-width: 720px) {
    .entry-content.container {
        padding: 1.25rem;
        margin-top: 1.25rem;
    }
}

/* Ciclofficina: custom list bullets (wheel icon) */
.ciclofficina-body ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.ciclofficina-body li {
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: 0.7rem;
}

.ciclofficina-body li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15rem;
    width: 1.2rem;
    height: 1.2rem;
    background-repeat: no-repeat;
    background-size: contain;
    /* small wheel SVG, stroke colored with theme red */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'> <circle cx='12' cy='12' r='9' stroke='%23CC0000' stroke-width='1.6' fill='none'/> <line x1='12' y1='3' x2='12' y2='21' stroke='%23CC0000' stroke-width='1'/> <line x1='3' y1='12' x2='21' y2='12' stroke='%23CC0000' stroke-width='1'/> </svg>");
}

/* ══════════════════════════════════════
   TEAM PAGE
══════════════════════════════════════ */
.team-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.team-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.team-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.team-card {
    background: var(--white);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.3s;
}

.team-card:hover {
    border-color: var(--red);
}

.team-card:hover .team-info {
    border-top-color: var(--red);
}

.team-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.team-photo-placeholder {
    background: var(--light);
    border: none;
    filter: grayscale(1) opacity(0.4);
}

.team-info {
    padding: 1.25rem;
    border-top: 2px solid transparent;
    transition: border-color 0.3s;
}

.team-name {
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.team-role {
    font-size: 0.75rem;
    color: var(--red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.team-bio {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.6;
}

.team-card-compact .team-photo {
    aspect-ratio: 1;
}

.team-card-compact .team-info {
    padding: 1rem;
}

/* CTA Section */
.cta-section {
    position: relative;
}

.cta-inner {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    color: var(--white);
}

.cta-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════
   SECTION HEADER ROW + CTA CENTER
══════════════════════════════════════ */
.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header-row .section-title {
    margin-bottom: 0;
}

.section-cta-center {
    display: flex;
    justify-content: center;
}

.hide-mobile {
    display: inline-flex;
}

.show-mobile {
    display: none;
}

/* ══════════════════════════════════════
   ARTICOLI (NEWS CARDS)
══════════════════════════════════════ */
.articoli-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.articolo-card {
    background: var(--white);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.25s, transform 0.25s;
    position: relative;
}

.articolo-card:hover {
    border-color: var(--red);
    transform: translateY(-2px);
}

.articolo-card:hover .articolo-body {
    border-top-color: var(--red);
}

.articolo-card:hover .articolo-image img {
    transform: scale(1.05);
}

.articolo-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.articolo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.articolo-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    border-top: 2px solid transparent;
    transition: border-color 0.25s;
}

.articolo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.articolo-tag {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.45rem;
}

.articolo-title {
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--black);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articolo-desc {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.no-posts {
    grid-column: 1/-1;
    text-align: center;
    color: var(--gray);
    padding: 3rem;
    font-size: 1rem;
}

/* Hidden modal data — not displayed in page */
.articolo-modal-data {
    display: none;
}

/* ══════════════════════════════════════
   MODAL ARTICOLI
══════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 500;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-panel {
    background: var(--white);
    width: 100%;
    max-width: 720px;
    position: relative;
    animation: slideUp 0.25s ease;
    margin: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--black);
    color: var(--white);
    border: none;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--red);
}

.modal-body {
    padding: 0;
}

.modal-img {
    aspect-ratio: 16/7;
    overflow: hidden;
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body .articolo-tags {
    padding: 1.5rem 2rem 0;
}

.modal-title {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    padding: 0.75rem 2rem 0;
    color: var(--black);
}

.modal-meta {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-light);
    padding: 0.5rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-content {
    padding: 1.5rem 2rem;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--gray);
    max-height: 40vh;
    overflow-y: auto;
}

.modal-content p+p {
    margin-top: 1rem;
}

.modal-read-more {
    margin: 0 2rem 2rem;
    width: calc(100% - 4rem);
    justify-content: center;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .team-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ciclofficina-header {
        flex-direction: column;
        gap: 2rem;
    }

    .servizi-grid {
        grid-template-columns: 1fr;
    }

    .servizio-card {
        border-right: none;
        border-bottom: none;
    }
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-image {
        min-height: 350px;
        position: relative;
    }

    .chi-siamo-inner {
        grid-template-columns: 1fr;
    }

    .contatti-inner {
        grid-template-columns: 1fr;
    }

    .progetti-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articoli-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .primary-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .section {
        padding: 4rem 0;
    }

    .progetti-grid {
        grid-template-columns: 1fr;
    }

    .articoli-grid {
        grid-template-columns: 1fr;
    }

    .team-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-box {
        padding: 1.75rem;
    }

    .hide-mobile {
        display: none;
    }

    .show-mobile {
        display: flex;
    }

    .section-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-panel {
        margin: 1rem 0;
    }

    .modal-title,
    .modal-body .articolo-tags {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .modal-meta {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .modal-content {
        padding: 1rem 1.25rem;
    }

    .modal-read-more {
        margin: 0 1.25rem 1.25rem;
        width: calc(100% - 2.5rem);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .team-grid-3,
    .team-grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}