/* Livello grafico comune ai template pubblici: identità tipografica, utility mancanti, card, mobile. */

/* Identità per template */
.tpl-mobility { --font-body: 'Outfit', system-ui, sans-serif; --font-head: var(--font-body); --accent: #f59e0b; --accent-ink: #0f172a; --head-track: -.02em; --head-weight: 700; }
.tpl-urban { --font-body: 'Plus Jakarta Sans', system-ui, sans-serif; --font-head: var(--font-body); --accent: #65a30d; --accent-ink: #fff; --head-track: -.025em; --head-weight: 800; }
.tpl-industrial { --font-body: 'Inter', system-ui, sans-serif; --font-head: 'Barlow Condensed', 'Inter', sans-serif; --accent: #f59e0b; --accent-ink: #111827; --head-track: 0; --head-weight: 700; }
.tpl-luxury { --font-body: 'Inter', system-ui, sans-serif; --font-head: 'Playfair Display', Georgia, serif; --accent: #b8892b; --accent-ink: #fff; --head-track: -.01em; --head-weight: 600; }
.tpl-nautica { --font-body: 'Manrope', system-ui, sans-serif; --font-head: var(--font-body); --accent: #0284c7; --accent-ink: #fff; --head-track: -.025em; --head-weight: 700; }
.tpl-sport { --font-body: 'Sora', system-ui, sans-serif; --font-head: var(--font-body); --accent: #65a30d; --accent-ink: #fff; --head-track: -.03em; --head-weight: 700; }
.tpl-drive_orange { --font-body: 'Poppins', system-ui, sans-serif; --font-head: var(--font-body); --accent: #ea580c; --accent-ink: #fff; --head-track: -.02em; --head-weight: 700; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body[class*="tpl-"] { font-family: var(--font-body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
body[class*="tpl-"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .hero-title, .navbar-brand) { font-family: var(--font-head); letter-spacing: var(--head-track); }
body[class*="tpl-"] :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6, .hero-title) { font-weight: var(--head-weight); line-height: 1.12; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent, #0284c7); outline-offset: 2px; }
.tpl-industrial :is(h1, h2, h3, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6) { text-transform: uppercase; }

/* Utility usate nei template ma assenti in Bootstrap */
.bg-opacity-15 { --bs-bg-opacity: .15; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.fw-extrabold, .font-extrabold { font-weight: 800 !important; }
.mb-1\.5 { margin-bottom: .375rem !important; }
.me-1\.5 { margin-right: .375rem !important; }
.ms-1\.5 { margin-left: .375rem !important; }
.mt-1\.5 { margin-top: .375rem !important; }
.gap-1\.5 { gap: .375rem !important; }
.gap-2\.5 { gap: .625rem !important; }
.p-2\.5 { padding: .625rem !important; }
.p-3\.5 { padding: .875rem !important; }
.py-0\.5 { padding-top: .125rem !important; padding-bottom: .125rem !important; }
.py-1\.5 { padding-top: .375rem !important; padding-bottom: .375rem !important; }
.py-2\.5 { padding-top: .625rem !important; padding-bottom: .625rem !important; }
.px-2\.5 { padding-left: .625rem !important; padding-right: .625rem !important; }
.px-3\.5 { padding-left: .875rem !important; padding-right: .875rem !important; }
.object-fit-cover { object-fit: cover; }

/* Navbar: ogni template mantiene i propri colori */
.navbar .nav-link, .navbar .btn { white-space: nowrap; }
.navbar { --bs-navbar-padding-y: .65rem; }
.navbar-brand { font-weight: 800; }
.tpl-drive_orange .navbar-drivelux, .tpl-luxury .navbar-supreme, .tpl-sport .navbar-sportrent, .tpl-urban .navbar-ridegreen { background: rgba(255, 255, 255, .96) !important; backdrop-filter: blur(10px); border-bottom: 1px solid #e2e8f0; }
.tpl-drive_orange .navbar-toggler-icon, .tpl-luxury .navbar-toggler-icon, .tpl-sport .navbar-toggler-icon, .tpl-urban .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f172a' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
.tpl-nautica .navbar-toggler-icon, .tpl-industrial .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23fff' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
.navbar-toggler { border: 0; box-shadow: none !important; padding: .4rem .5rem; }
@media (min-width: 992px) and (max-width: 1399.98px) {
    .tpl-luxury .navbar .nav-link, .tpl-sport .navbar .nav-link, .tpl-drive_orange .navbar .nav-link, .tpl-urban .navbar .nav-link { padding-inline: .5rem !important; font-size: .8rem; }
}
@media (max-width: 991.98px) {
    .navbar .navbar-collapse { max-height: calc(100vh - 90px); overflow-y: auto; }
    .tpl-drive_orange .navbar-collapse, .tpl-luxury .navbar-collapse, .tpl-sport .navbar-collapse, .tpl-urban .navbar-collapse { background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 12px 30px rgba(15, 23, 42, .12); }
    .tpl-drive_orange .navbar-collapse .nav-link { color: #1e293b !important; }
}

/* Hero: foto leggibile, testi sempre su fondo scuro a sinistra */
.hero-slider-img { object-position: center; }
.hero-slider-slide.active .hero-slider-img { transform: none; animation: none; }
.hero-slider-overlay { background: linear-gradient(95deg, rgba(8, 13, 24, .86) 0%, rgba(8, 13, 24, .62) 38%, rgba(8, 13, 24, .16) 72%, rgba(8, 13, 24, .22) 100%) !important; }
.tpl-nautica .hero-slider-overlay { background: linear-gradient(95deg, rgba(3, 25, 46, .82) 0%, rgba(3, 25, 46, .52) 40%, rgba(3, 25, 46, .08) 75%) !important; }
.tpl-luxury .hero-slider-overlay { background: linear-gradient(95deg, rgba(11, 13, 18, .84) 0%, rgba(11, 13, 18, .56) 42%, rgba(11, 13, 18, .08) 76%) !important; }
.hero-foreground :is(h1, .hero-title) { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero-foreground p { color: rgba(255, 255, 255, .92) !important; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.hero-foreground form p, .hero-foreground .card p { text-shadow: none; }
@media (max-width: 767.98px) {
    .hero-slider-overlay { background: linear-gradient(180deg, rgba(8, 13, 24, .5) 0%, rgba(8, 13, 24, .78) 100%) !important; }
    .hero-section-wrapper, .hero-mobility { min-height: 0; }
}

/* Foto delle card: stesso formato, mai deformate o fuori misura */
.card-img-top, .pro-vehicle-image, .fleet-photo-img, .hub-photo-img { width: 100%; object-fit: cover; }
.fleet-photo-container { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e8edf3; }
.fleet-photo-container .fleet-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fleet-pro-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.fleet-pro-card .fleet-pro-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }

/* Cookie: barra compatta, non copre la pagina */
.cookie-bar { position: fixed; z-index: 1060; left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); padding: 16px 18px; background: #fff; color: #334155; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 16px 44px rgba(15, 23, 42, .2); font-size: .82rem; line-height: 1.45; display: none; }
.cookie-bar strong { display: block; color: #0f172a; font-size: .9rem; margin-bottom: 2px; }
.cookie-bar a { color: inherit; text-decoration: underline; }
.cookie-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cookie-bar__actions .btn { font-size: .78rem; font-weight: 600; padding: .4rem .75rem; }
.cookie-bar__link { background: none; border: 0; padding: .4rem .25rem; color: #475569; text-decoration: underline; font-size: .78rem; margin-left: auto; }

/* Barra accessibilità e toolbar flottanti non devono spingere la pagina */
.skip-to-content { position: absolute; top: -60px; left: 8px; z-index: 2000; background: #0f172a; color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip-to-content:focus { top: 8px; }

/* Mobile */
@media (max-width: 575.98px) {
    body[class*="tpl-"] h1, .hero-title, body[class*="tpl-"] .display-3, body[class*="tpl-"] .display-4 { font-size: clamp(1.9rem, 8.4vw, 2.5rem) !important; }
    body[class*="tpl-"] h2, body[class*="tpl-"] .display-5, body[class*="tpl-"] .display-6 { font-size: clamp(1.45rem, 6.4vw, 1.9rem) !important; }
    .container { --bs-gutter-x: 2rem; }
    input, select, textarea { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Footer e griglie: niente sforamenti su smartphone */
footer .d-flex { flex-wrap: wrap; }
footer form { max-width: 100%; }
footer form input[type="email"] { flex: 1 1 180px; min-width: 0; }
@media (max-width: 991.98px) {
    main .row.g-5 { --bs-gutter-x: 1.5rem; }
}

/* Dettagli */
.navbar span { white-space: nowrap; }
.hero-foreground .badge { white-space: normal; text-align: left; line-height: 1.35; max-width: 100%; }
.tpl-industrial .accessibility-toggle, .tpl-industrial [id*="accessibility"][style*="fixed"] { transform: scale(.85); }
@media (max-width: 767.98px) {
    .hero-foreground .row.g-3.mt-3, .hero-foreground .hero-feature-circle { font-size: .85rem; }
}

/* Pagine di contenuto: FAQ, Offerte, newsletter */
.content-hero { padding: 56px 0 52px; background: #0f172a; color: #fff; }
.tpl-nautica .content-hero { background: #0a2540; }
.content-hero__eyebrow { display: block; margin-bottom: 8px; color: var(--accent); filter: brightness(1.25); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
body[class*="tpl-"] .content-hero h1 { margin: 0; color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.content-hero p { max-width: 620px; margin: 12px 0 0; color: rgba(255, 255, 255, .78); font-size: 1.05rem; }
.content-page { padding-top: 56px; padding-bottom: 72px; }
.faq-nav { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 4px; }
.faq-nav a { padding: 8px 12px; border-left: 2px solid #e2e8f0; color: #475569; font-size: .92rem; font-weight: 500; text-decoration: none; }
.faq-nav a:hover { border-color: var(--accent); color: #0f172a; }
.faq-group { margin-bottom: 40px; scroll-margin-top: 110px; }
body[class*="tpl-"] .faq-group h2 { margin-bottom: 16px; font-size: 1.35rem; }
.faq-group .accordion-header { font-family: var(--font-body); letter-spacing: 0; }
.faq-group .accordion-button { font-weight: 600; }
.faq-group .accordion-button:not(.collapsed) { background: #f1f5f9; color: #0f172a; box-shadow: none; }
.content-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding: 28px; background: #f1f5f9; border-radius: 16px; }
body[class*="tpl-"] .content-cta h2 { margin: 0 0 4px; font-size: 1.3rem; }
.content-cta p { margin: 0; color: #475569; }
.content-cta__btn, .newsletter-form__submit { background: var(--accent); border: 0; color: var(--accent-ink); font-weight: 700; padding: .65rem 1.4rem; }
.content-cta__btn:hover, .newsletter-form__submit:hover { background: var(--accent); color: var(--accent-ink); filter: brightness(.93); }
.content-empty, .newsletter-status { max-width: 560px; margin: 0 auto; text-align: center; }
.content-empty > i, .newsletter-status > i { color: var(--accent); font-size: 3rem; }
body[class*="tpl-"] .content-empty h2, body[class*="tpl-"] .newsletter-status h1 { margin: 12px 0; font-size: 1.8rem; }
.newsletter-status__code code { display: inline-block; padding: 10px 22px; background: #f1f5f9; border: 1px dashed #94a3b8; border-radius: 10px; color: #0f172a; font-size: 1.4rem; font-weight: 700; letter-spacing: .06em; }
.offer-card { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; }
.offer-card__value { padding: 24px; background: #0f172a; color: #fff; font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.offer-card__value small { display: block; margin-top: 6px; color: rgba(255, 255, 255, .7); font-family: var(--font-body); font-size: .85rem; font-weight: 500; }
.offer-card__body { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; }
body[class*="tpl-"] .offer-card h2 { margin-bottom: 8px; font-size: 1.2rem; }
.offer-card p { color: #475569; font-size: .94rem; }
.offer-card ul { margin: 0 0 18px; padding: 0; list-style: none; color: #64748b; font-size: .85rem; }
.offer-card__code { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding: 10px 14px; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 10px; }
.offer-card__code code { color: #0f172a; font-size: 1rem; font-weight: 700; letter-spacing: .05em; }
.offer-card__code span { color: #475569; font-size: .8rem; font-weight: 600; }
.newsletter-strip { padding: 34px 0; background: #111827; color: #fff; }
.newsletter-strip .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.newsletter-strip__text { display: flex; align-items: center; gap: 16px; flex: 1 1 340px; }
.newsletter-strip__text > i { color: var(--accent); filter: brightness(1.2); font-size: 2rem; }
body[class*="tpl-"] .newsletter-strip h2 { margin: 0 0 2px; color: #fff; font-size: 1.25rem; }
.newsletter-strip p { margin: 0; color: rgba(255, 255, 255, .7); font-size: .9rem; }
.newsletter-form { flex: 1 1 340px; max-width: 460px; }
.newsletter-form__row { display: flex; gap: 8px; }
.newsletter-form__row input { flex: 1; min-width: 0; }
.newsletter-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter-form__consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; color: rgba(255, 255, 255, .72); font-size: .76rem; line-height: 1.35; }
.newsletter-form__consent input { margin-top: 2px; }
.newsletter-form__consent a { color: inherit; text-decoration: underline; }
.newsletter-form__status { min-height: 1.2em; margin-top: 6px; color: #fff; font-size: .82rem; font-weight: 600; }
.newsletter-form__status.is-error { color: #fda4af; }

/* Firma online */
.contract-summary, .contract-sign-box { height: 100%; padding: 26px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; }
body[class*="tpl-"] .contract-summary h2, body[class*="tpl-"] .contract-sign-box h2 { margin-bottom: 14px; font-size: 1.3rem; }
.contract-summary dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin-bottom: 20px; }
.contract-summary dt { color: #64748b; font-weight: 500; }
.contract-summary dd { margin: 0; color: #0f172a; font-weight: 600; }
.contract-sign-box__icon { display: block; margin-bottom: 8px; color: #16a34a; font-size: 2.6rem; }
#otpCode { font-size: 1.5rem; letter-spacing: .3em; }

/* Selettore lingua */
.lang-switcher { display: inline-flex; align-items: center; gap: 2px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.lang-switcher a { padding: 4px 6px; border-radius: 6px; color: inherit; opacity: .62; text-decoration: none; }
.lang-switcher a:hover { opacity: 1; }
.lang-switcher a.is-active { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.navbar-dark .lang-switcher, .tpl-mobility .navbar .lang-switcher, .tpl-nautica .navbar .lang-switcher, .tpl-industrial .navbar .lang-switcher { color: #fff; }
.tpl-urban .navbar .lang-switcher, .tpl-luxury .navbar .lang-switcher, .tpl-sport .navbar .lang-switcher, .tpl-drive_orange .navbar .lang-switcher { color: #0f172a; }
