/* ============================================================
   MORETTI ALBERTO SRL - style.css v2
   Allineato alle classi HTML reali di header.php e footer.php
   ============================================================ */

/* ---- FONT (con fallback system-ui se file mancanti) ---- */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ---- CSS VARIABLES (overridden by PHP palette inline) ---- */
:root {
    --ma-primary:       #F9A825;
    --ma-secondary:     #3D3D3D;
    --ma-accent:        #FFC107;
    --ma-bg:            #FAFAFA;
    --ma-text:          #1A1A1A;
    --ma-header-bg:     #FFFFFF;
    --ma-header-text:   #3D3D3D;
    --ma-footer-bg:     #1A1A1A;
    --ma-footer-text:   #FFFFFF;
    --ma-link:          #F9A825;
    --ma-btn-bg:        #F9A825;
    --ma-btn-text:      #1A1A1A;
    --ma-radius:        0.75rem;
    --ma-shadow:        0 4px 20px rgba(0,0,0,.08);
    --ma-transition:    0.25s ease;
    --ma-primary-dark:  #d4891e;
}

/* ---- BASE ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
    overflow-x: clip;
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ma-text);
    background-color: var(--ma-bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--ma-link); transition: color var(--ma-transition); }
a:hover { color: var(--ma-primary-dark); }

/* ---- BOOTSTRAP OVERRIDES ---- */
/* ---- iOS 26 LIQUID GLASS BUTTONS ---- */
.btn-primary {
    background: rgba(249,168,37,.45) !important;
    border: 1px solid rgba(255,255,255,.5) !important;
    color: #1a1a1a !important;
    font-weight: 600;
    border-radius: 100px;
    transition: all .35s cubic-bezier(.4,0,.2,1);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    backdrop-filter: blur(50px) saturate(200%);
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 32px rgba(249,168,37,.18), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,.08) 45%, rgba(0,0,0,.02) 100%);
    pointer-events: none;
    z-index: -1;
}
.btn-primary:hover,
.btn-primary:focus {
    background: rgba(249,168,37,.6) !important;
    border-color: rgba(255,255,255,.6) !important;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 2px 6px rgba(0,0,0,.1), 0 12px 40px rgba(249,168,37,.25), inset 0 1px 0 rgba(255,255,255,.7);
}
.btn-primary:active {
    transform: scale(.97);
    box-shadow: 0 1px 2px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-outline-primary {
    border: 1px solid rgba(249,168,37,.35) !important;
    color: var(--ma-primary) !important;
    border-radius: 100px;
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    backdrop-filter: blur(50px) saturate(200%);
    background: rgba(249,168,37,.06) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.04), inset 0 1px 0 rgba(255,255,255,.35);
    transition: all .35s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-outline-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.25) 0%, transparent 55%);
    pointer-events: none;
    z-index: -1;
}
.btn-outline-primary:hover {
    background: rgba(249,168,37,.4) !important;
    color: #1a1a1a !important;
    border-color: rgba(255,255,255,.5) !important;
    box-shadow: 0 8px 32px rgba(249,168,37,.2), inset 0 1px 0 rgba(255,255,255,.5);
    transform: translateY(-1px) scale(1.02);
}
.btn-outline-light {
    border-radius: 100px;
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    backdrop-filter: blur(50px) saturate(200%);
    background: rgba(255,255,255,.1) !important;
    border: 1px solid rgba(255,255,255,.4) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.3);
    transition: all .35s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-outline-light::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,.22) !important;
    border-color: rgba(255,255,255,.55) !important;
    box-shadow: 0 8px 32px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.4);
    transform: translateY(-1px) scale(1.02);
}
.btn-outline-secondary {
    border-radius: 100px;
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    transition: all .35s cubic-bezier(.4,0,.2,1);
}
.text-primary  { color: var(--ma-primary) !important; }
.bg-primary    { background-color: var(--ma-primary) !important; }
.border-primary { border-color: var(--ma-primary) !important; }
.form-control:focus,
.form-select:focus {
    border-color: var(--ma-primary);
    box-shadow: 0 0 0 .2rem rgba(249,168,37,.25);
}
.form-check-input:checked {
    background-color: var(--ma-primary);
    border-color: var(--ma-primary);
}

/* ---- TOP BAR ---- */
.top-bar {
    background-color: var(--ma-secondary);
    padding: .5rem 0;
    font-size: .82rem;
}
.top-bar-link {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: color var(--ma-transition);
    display: inline-flex;
    align-items: center;
}
.top-bar-link:hover { color: var(--ma-primary); }

/* ---- NAVBAR (id="mainNav") ---- */
#mainNav {
    background-color: var(--ma-header-bg) !important;
    color: var(--ma-header-text);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: box-shadow .3s;
    padding: .75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}
#mainNav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.12); }

/* Logo testo */
.navbar-brand img { max-width: 50%; height: auto; }
.navbar-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ma-secondary);
    text-decoration: none;
    letter-spacing: -.02em;
}

/* Nav links */
#mainNav .nav-link {
    color: var(--ma-header-text) !important;
    font-weight: 500;
    padding: .5rem .75rem;
    border-radius: .4rem;
    transition: all var(--ma-transition);
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--ma-primary) !important;
    background: rgba(249,168,37,.08);
}
#mainNav .nav-link[aria-current="page"] { color: var(--ma-primary) !important; }

/* CTA button in navbar */
.nav-cta {
    font-size: .9rem;
    padding: .5rem 1.1rem;
    border-radius: 100px !important;
}

/* Toggler */
.navbar-toggler { border: none; padding: .4rem; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler .fas { font-size: 1.3rem; color: var(--ma-secondary); }

/* Dropdown menu prodotti (classe .dropdown-cols nell'HTML) */
.dropdown-cols {
    min-width: 460px;
    border: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    border-radius: var(--ma-radius);
    padding: .75rem;
    gap: .25rem;
}
.dropdown-cols.show {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.dropdown-cols .dropdown-item {
    border-radius: .5rem;
    font-size: .875rem;
    padding: .5rem .75rem;
    transition: background var(--ma-transition);
}
.dropdown-cols .dropdown-item:hover,
.dropdown-cols .dropdown-item.active { background: rgba(249,168,37,.1); color: var(--ma-primary); }
@media (max-width: 991px) { .dropdown-cols { min-width: 100%; grid-template-columns: 1fr; } }

/* ---- HERO SLIDER ---- */
.hero-slider {
    position: relative;
    height: 88vh;
    min-height: 520px;
    overflow: hidden;
    background: #111;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    display: flex;
    align-items: center;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 6s ease;
    transform: scale(1.03);
}
.hero-slide.active .hero-slide__bg { transform: scale(1); }
.hero-slide__overlay { position: absolute; inset: 0; }
.hero-slide__content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 650px;
    padding: 2rem;
}
.hero-slide__tag {
    display: inline-block;
    background: var(--ma-primary);
    color: #1a1a1a;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .3rem 1rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}
.hero-slide__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: .75rem;
}
.hero-slide__desc {
    font-size: 1.05rem;
    opacity: .9;
    margin-bottom: 1.5rem;
    max-width: 520px;
}
.hero-features { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.hero-feature-tag {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: .8rem;
    padding: .25rem .75rem;
    border-radius: 2rem;
}
.hero-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.hero-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer; border: none;
    transition: all var(--ma-transition);
    padding: 0;
}
.hero-dot.active { background: var(--ma-primary); width: 24px; border-radius: 4px; }
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--ma-transition);
}
.hero-arrow:hover { background: var(--ma-primary); border-color: var(--ma-primary); color: #1a1a1a; }
.hero-arrow-left  { left: 1.5rem; }
.hero-arrow-right { right: 1.5rem; }
@media (max-width: 576px) {
    .hero-slider { height: 75vh; }
    .hero-arrow  { display: none; }
}

/* ---- TRUST BAR ---- */
.trust-bar { background-color: var(--ma-secondary); padding: 2.5rem 0; }
.trust-stat { display: flex; align-items: center; gap: 1rem; }
.trust-stat__icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(249,168,37,.15);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.trust-stat__icon i { color: var(--ma-primary); font-size: 1.3rem; }
.trust-stat__value { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1; }
.trust-stat__label { font-size: .85rem; color: rgba(255,255,255,.65); }
@media (max-width: 767px) { .trust-stat { flex-direction: column; text-align: center; } }

/* ---- SECTION ---- */
.section    { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-lg { padding: 7rem 0; }
.section-dark    { background: var(--ma-secondary); }
.section-light   { background: #F5F5F5; }
.section-primary { background: var(--ma-primary); }

.section-tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ma-primary);
    margin-bottom: .75rem;
}
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: 1.05rem;
    color: #666;
    max-width: 600px;
    line-height: 1.7;
}

/* ---- CARDS GENERICHE ---- */
.card-ma {
    border: 1px solid rgba(0,0,0,.06);
    border-radius: var(--ma-radius);
    box-shadow: var(--ma-shadow);
    transition: all var(--ma-transition);
    overflow: hidden;
    background: #fff;
}
.card-ma:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,.12); }

/* ---- PRODOTTI ---- */
.product-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: var(--ma-radius);
    box-shadow: var(--ma-shadow);
    transition: all var(--ma-transition);
    height: 100%;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,.14); }
.product-card__body { padding: 1.75rem; display: flex; flex-direction: column; flex: 1; }
.product-card__icon {
    width: 56px; height: 56px;
    border-radius: var(--ma-radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1rem;
}
.product-card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.product-card__desc  { font-size: .9rem; color: #666; flex: 1; }
.product-card__link  { margin-top: 1.25rem; font-weight: 600; font-size: .9rem; color: var(--ma-primary); text-decoration: none; }
.product-card__link:hover { text-decoration: underline; }

/* ---- PROJECTS SLIDER ---- */
.projects-slider-wrap { position: relative; overflow: hidden; }
.projects-track { display: flex; gap: 1.5rem; transition: transform .5s ease; }
.project-card {
    position: relative;
    border-radius: var(--ma-radius);
    overflow: hidden;
    flex: 0 0 calc(33.333% - 1rem);
}
.project-card__img { width: 100%; height: 280px; object-fit: cover; display: block; }
.project-card__overlay {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 60%);
}
.project-card__label { color: #fff; font-size: 1.1rem; font-weight: 700; }
.project-card__sub   { color: rgba(255,255,255,.75); font-size: .85rem; }
@media (max-width: 767px) { .project-card { flex: 0 0 85%; } }

/* ---- CASE STUDIES ---- */
.case-card {
    border-radius: var(--ma-radius);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
    height: 100%;
    transition: all var(--ma-transition);
    background: #fff;
}
.case-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,.1); transform: translateY(-3px); }
.case-card__img  { width: 100%; height: 220px; object-fit: cover; }
.case-card__body { padding: 1.5rem; }
.case-card__badge {
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
}
.case-card__title  { font-size: 1.1rem; font-weight: 700; margin: .5rem 0; }
.case-card__result { font-size: .85rem; font-weight: 600; color: var(--ma-primary); }

/* ---- WHY US ---- */
.why-reason { display: flex; gap: 1rem; align-items: flex-start; }
.why-reason__icon {
    width: 48px; height: 48px;
    border-radius: .75rem;
    background: rgba(249,168,37,.12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.why-reason__icon i { color: var(--ma-primary); font-size: 1.2rem; }
.why-reason__title { font-weight: 700; font-size: 1rem; margin-bottom: .25rem; }
.why-reason__desc  { font-size: .9rem; color: #666; }

/* ---- CTA SECTION ---- */
.cta-section {
    background: var(--ma-secondary);
    padding: 5rem 0;
    text-align: center;
}
.cta-section h2 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
.cta-section p  { color: rgba(255,255,255,.75); font-size: 1.05rem; }

/* ---- PRODOTTO hero page ---- */
.product-hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #3d3d3d 100%);
    color: #fff;
}
.product-hero__badge {
    display: inline-block;
    background: var(--ma-primary); color: #1a1a1a;
    font-size: .8rem; font-weight: 700;
    padding: .35rem 1rem; border-radius: 2rem; margin-bottom: 1.25rem;
}
.product-hero__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.product-hero__desc  { font-size: 1.1rem; opacity: .85; max-width: 580px; }
.feature-item { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .5rem; }
.feature-check { color: var(--ma-primary); flex-shrink: 0; margin-top: .2rem; }

/* ---- SERVIZI ---- */
.service-icon {
    width: 56px; height: 56px;
    border-radius: var(--ma-radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 1.25rem;
}

/* ---- PORTFOLIO ---- */
.portfolio-filter .btn { border-radius: 2rem; font-size: .875rem; }
.portfolio-filter .btn.active {
    background: var(--ma-primary);
    border-color: var(--ma-primary);
    color: #1a1a1a;
}

/* ---- TEAM ---- */
.team-card {
    text-align: center;
    border-radius: var(--ma-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--ma-shadow);
    height: 100%;
}
.team-card__photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center 20%; display: block; }
.team-card__body  { padding: 1.5rem; }
.team-card__name  { font-weight: 700; font-size: 1.05rem; margin-bottom: .2rem; }
.team-card__role  { color: var(--ma-primary); font-size: .875rem; font-weight: 600; margin-bottom: .75rem; }
.team-card__desc  { font-size: .875rem; color: #666; max-height: 4.2em; line-height: 1.4; overflow: hidden; position: relative; transition: max-height .3s ease; }
.team-card__desc::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1.5em; background: linear-gradient(transparent, #fff); pointer-events: none; transition: opacity .3s; }
.team-card__desc.expanded { max-height: 600px; }
.team-card__desc.expanded::after { opacity: 0; }
.team-card__toggle { font-size: .78rem; color: #fff; background: var(--ma-primary); border: none; padding: .3rem .9rem; border-radius: 2rem; margin-top: .75rem; font-weight: 600; cursor: pointer; transition: all .2s; display: inline-block; }
.team-card__toggle:hover { background: var(--ma-primary-dark); transform: translateY(-1px); }

/* ---- AZIENDA - VALUE CARDS ---- */
.value-card {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.5rem; border-radius: var(--ma-radius);
    background: #fff; box-shadow: var(--ma-shadow);
}
.value-icon {
    width: 50px; height: 50px;
    border-radius: .65rem;
    background: rgba(249,168,37,.1);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.value-icon i { color: var(--ma-primary); font-size: 1.15rem; }

/* ---- CONTATTI ---- */
.contact-card {
    background: #fff;
    border-radius: var(--ma-radius);
    box-shadow: var(--ma-shadow);
    padding: 2rem;
}
.contact-info-item {
    display: flex; align-items: flex-start; gap: 1rem;
    margin-bottom: 1.5rem;
}
.contact-info-icon {
    width: 44px; height: 44px;
    border-radius: .65rem;
    background: rgba(249,168,37,.1);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.contact-info-icon i { color: var(--ma-primary); font-size: 1rem; }

/* ---- FOOTER ---- */
.site-footer {
    background-color: var(--ma-footer-bg);
    color: var(--ma-footer-text);
    padding: 5rem 0 0;
}
.footer-brand { margin-bottom: 1rem; }
.footer-brand img { max-width: 50%; height: auto; }
.footer-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}
.footer-tagline {
    color: rgba(255,255,255,.6);
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}
.footer-heading {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ma-primary);
    margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .9rem;
    transition: color var(--ma-transition);
}
.footer-links a:hover { color: var(--ma-primary); }

/* footer-contact-list */
.footer-contact-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.footer-contact-list li {
    display: flex; align-items: flex-start; gap: .6rem;
    margin-bottom: .6rem;
    font-size: .875rem;
}
.footer-contact-list i { color: var(--ma-primary); flex-shrink: 0; margin-top: .2rem; width: 16px; }
.footer-contact-list a,
.footer-contact-list span {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: color var(--ma-transition);
}
.footer-contact-list a:hover { color: var(--ma-primary); }

/* social icons in footer */
.footer-social { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: all var(--ma-transition);
    font-size: .9rem;
}
.footer-social a:hover { background: var(--ma-primary); color: #1a1a1a; }

/* footer bottom bar */
.footer-bottom {
    background: rgba(0,0,0,.3);
    margin-top: 3rem;
    padding: 1.1rem 0;
}
.footer-copyright {
    color: rgba(255,255,255,.45);
    font-size: .82rem;
    margin: 0;
}
.footer-legal-link {
    color: rgba(255,255,255,.45);
    text-decoration: none;
    font-size: .82rem;
    transition: color var(--ma-transition);
}
.footer-legal-link:hover { color: var(--ma-primary); }

/* ---- COOKIE BANNER ---- */
.cookie-consent {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.cookie-consent.cookie-consent--visible { opacity: 1; pointer-events: all; }
.cookie-consent__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(3px);
}
.cookie-consent__modal {
    position: relative;
    background: #fff;
    border-radius: var(--ma-radius);
    max-width: 560px;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    overflow: hidden;
    animation: slideUp .35s ease forwards;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.cookie-consent__header { padding: 1.25rem 1.5rem; background: var(--ma-secondary); }
.cookie-icon {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(249,168,37,.2);
    display: flex; align-items: center; justify-content: center;
}
.cookie-icon i { color: var(--ma-primary); font-size: 1.2rem; }
.cookie-consent__header h5 { color: #fff; margin: 0; }
.cookie-consent__header p  { color: rgba(255,255,255,.6); margin: 0; }
.cookie-consent__body  { padding: 1.5rem; }
.cookie-consent__footer { padding: 1rem 1.5rem; background: #f8f9fa; }
.cookie-categories { border: 1px solid #e9ecef; border-radius: .5rem; overflow: hidden; }
.cookie-category {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}
.cookie-category:last-child { border-bottom: none; }
.form-switch .form-check-input:checked { background-color: var(--ma-primary); border-color: var(--ma-primary); }

/* ---- ADMIN BACKEND ---- */
.admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; z-index: 1040;
    background: #1a1a2e;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}
.admin-main { margin-left: 260px; background: #f5f6fa; min-height: 100vh; }
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: .875rem 1.5rem;
    position: sticky; top: 0; z-index: 100;
}
.admin-content { padding: 1.5rem; }

.sidebar-logo {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-nav { padding: 1rem 0; }
.sidebar-nav-item a {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1.5rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .9rem; font-weight: 500;
    transition: all var(--ma-transition);
    border-left: 3px solid transparent;
}
.sidebar-nav-item a:hover,
.sidebar-nav-item a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-left-color: var(--ma-primary);
}
.sidebar-nav-item a i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-section-label {
    padding: .5rem 1.5rem;
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: rgba(255,255,255,.3);
    margin-top: .5rem;
}
.admin-stat-card {
    background: #fff;
    border-radius: var(--ma-radius);
    padding: 1.5rem;
    box-shadow: var(--ma-shadow);
    display: flex; align-items: center; gap: 1rem;
    text-decoration: none; color: inherit;
    transition: all var(--ma-transition);
}
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.admin-stat-icon {
    width: 52px; height: 52px;
    border-radius: .65rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.admin-table {
    background: #fff;
    border-radius: var(--ma-radius);
    box-shadow: var(--ma-shadow);
    overflow: hidden;
}
.admin-table .table { margin-bottom: 0; }
.admin-table .table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
}
.admin-form-card {
    background: #fff;
    border-radius: var(--ma-radius);
    box-shadow: var(--ma-shadow);
    padding: 1.75rem;
}
.palette-swatch {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,.1);
    display: inline-block; cursor: pointer;
}

/* ---- LEGAL PAGES ---- */
.legal-content h2 { font-size: 1.25rem; font-weight: 700; color: var(--ma-secondary); margin: 2rem 0 .75rem; }
.legal-content h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.legal-content p, .legal-content li { font-size: .95rem; line-height: 1.75; color: #444; }
.legal-content ul { padding-left: 1.5rem; margin-bottom: 1rem; }

#main-content, .site-footer, .top-bar { overflow-x: clip; }

/* ---- UTILITY ---- */
.rounded-xl  { border-radius: var(--ma-radius) !important; }
.shadow-ma   { box-shadow: var(--ma-shadow) !important; }
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- TABLET (max 991px) ---- */
@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); transition: transform .3s; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }

    /* Navbar: nasconde menu desktop, mostra toggler */
    #mainNav { padding: .5rem 0; }
    .navbar-brand img { max-width: 180px; }

    /* Sezioni piu' compatte */
    .section { padding: 3rem 0; }
    .section-lg { padding: 4rem 0; }
    .cta-section { padding: 3rem 0; }

    /* Hero slider adattato */
    .hero-slider { height: 70vh; min-height: 400px; }
    .hero-slide__content { max-width: 100%; padding: 1.5rem; }

    /* Product cards: 2 per riga */
    .product-card__body { padding: 1.25rem; }

    /* Footer colonne impilate */
    .site-footer { padding: 3rem 0 0; }
    .footer-bottom { margin-top: 2rem; }
}

/* ---- MOBILE (max 767px) ---- */
@media (max-width: 767px) {
    body { font-size: .95rem; }

    .section { padding: 2.5rem 0; }
    .section-lg { padding: 3rem 0; }
    .cta-section { padding: 2.5rem 0; }

    /* Hero */
    .hero-slider { height: 65vh; min-height: 380px; }
    .hero-slide__content { padding: 1rem; }
    .hero-slide__title { font-size: 1.8rem; }
    .hero-slide__desc { font-size: .9rem; margin-bottom: 1rem; }
    .hero-feature-tag { font-size: .7rem; padding: .2rem .6rem; }
    .hero-arrow { display: none; }
    .hero-controls { bottom: 1rem; }
    .hero-slide__content .btn-lg { font-size: .85rem; padding: .5rem 1rem; }
    .hero-slide__content .d-flex { flex-direction: column; gap: .5rem !important; }
    .hero-slide__content .btn { width: 100%; }

    /* Section titoli */
    .section-title { font-size: 1.5rem; margin-bottom: .75rem; }
    .section-subtitle { font-size: .95rem; }
    .section-tag { font-size: .7rem; margin-bottom: .5rem; }

    /* Trust bar: stack verticale */
    .trust-bar { padding: 1.5rem 0; }
    .trust-stat { flex-direction: column; text-align: center; gap: .5rem; }
    .trust-stat__icon { width: 40px; height: 40px; }
    .trust-stat__icon i { font-size: 1rem; }
    .trust-stat__value { font-size: 1.3rem; }
    .trust-stat__label { font-size: .75rem; }

    /* Product cards: full width */
    .product-card__body { padding: 1.25rem; }
    .product-card__icon { width: 44px; height: 44px; font-size: 1.2rem; }
    .product-card__title { font-size: 1rem; }
    .product-card__desc { font-size: .85rem; }

    /* Case study cards */
    .case-card__img { height: 180px; }
    .case-card__body { padding: 1rem; }
    .case-card__title { font-size: 1rem; }

    /* Why us */
    .why-reason { gap: .75rem; }
    .why-reason__icon { width: 40px; height: 40px; }
    .why-reason__title { font-size: .9rem; }
    .why-reason__desc { font-size: .85rem; }
    .why-us-img img { border-radius: .75rem; }

    /* CTA */
    .cta-section h2 { font-size: 1.4rem; }
    .cta-section p { font-size: .9rem; }
    .cta-section .btn-lg { font-size: .85rem; padding: .6rem 1.2rem; }
    .cta-section .d-flex { flex-direction: column; }
    .cta-section .btn { width: 100%; }

    /* Product hero */
    .product-hero { padding: 3rem 0 2rem; }
    .product-hero__title { font-size: 1.6rem; }
    .product-hero__desc { font-size: .95rem; }
    .product-hero .btn-lg { font-size: .85rem; padding: .5rem 1rem; width: 100%; }
    .product-hero .d-flex { flex-direction: column; }

    /* Team cards */
    .team-card__body { padding: 1rem; }
    .team-card__name { font-size: .95rem; }
    .team-card__role { font-size: .8rem; }

    /* Value cards */
    .value-card { padding: 1rem; gap: .75rem; }
    .value-icon { width: 40px; height: 40px; }

    /* Contatti */
    .contact-card { padding: 1.25rem; }
    .contact-info-item { gap: .75rem; }
    .contact-info-icon { width: 36px; height: 36px; }

    /* Footer */
    .site-footer { padding: 2.5rem 0 0; }
    .footer-logo-text { font-size: 1.1rem; }
    .footer-heading { margin-top: 1.5rem; }
    .footer-bottom { margin-top: 1.5rem; padding: .75rem 0; }
    .footer-bottom .d-flex { flex-direction: column; gap: .5rem; text-align: center; }
    .footer-copyright { font-size: .75rem; }

    /* Servizi: step numeri */
    .service-icon { width: 44px; height: 44px; font-size: 1.2rem; margin-bottom: 1rem; }

    /* Portfolio cards */
    .project-card { flex: 0 0 85%; }
    .project-card__img { height: 200px; }

    /* Buttons generali */
    .btn-lg { font-size: .9rem; padding: .6rem 1.25rem; }

    /* Logo navbar mobile */
    .navbar-brand img { max-width: 150px; }

}

/* ---- SMALL MOBILE (max 375px) ---- */
@media (max-width: 375px) {
    .hero-slider { height: 60vh; min-height: 320px; }
    .hero-slide__title { font-size: 1.5rem; }
    .section-title { font-size: 1.3rem; }
    .trust-stat__value { font-size: 1.1rem; }
    .product-card__body { padding: 1rem; }
    .contact-card { padding: 1rem; }
    .navbar-brand img { max-width: 120px; }
}
