/* W-Time custom overrides */

/* === Palette del logo W-Time ===
   Blu   #0E4194 (rgb 14,65,148)  → colore principale; hover #0A3172
   Rosso #E4051F (rgb 228,5,31)   → al posto dell'arancio "danger" del tema
   Giallo #FCBF00 (rgb 252,191,0) → al posto del giallo "warning" del tema
   Blu notte #0B1A36              → sfondi scuri (ricavato dal blu del logo)
   Il verde e l'azzurro del tema sono stati riportati al blu: il sito usa solo i colori del logo.
   I colori del tema sono rimappati anche in main.css (copia originale in strumenti/originali-tema/). */
:root {
    --bs-primary: #0e4194 !important;
    --bs-primary-rgb: 14, 65, 148 !important;
    --bs-danger: #e4051f !important;
    --bs-danger-rgb: 228, 5, 31 !important;
    --bs-warning: #fcbf00 !important;
    --bs-warning-rgb: 252, 191, 0 !important;
    --bs-success: #0e4194 !important;
    --bs-success-rgb: 14, 65, 148 !important;
    --bs-info: #0e4194 !important;
    --bs-info-rgb: 14, 65, 148 !important;
    --bs-link-color: #0e4194 !important;
    --bs-link-hover-color: #0a3172 !important;
    --wt-blue: #0e4194;
    --wt-blue-dark: #0a3172;
    --wt-red: #e4051f;
    --wt-yellow: #fcbf00;
    --wt-navy: #0b1a36;
    --wt-navy-light: #132a5c;
}

.btn-primary {
    background-color: #0e4194 !important;
    border-color: #0e4194 !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: #0a3172 !important;
    border-color: #0a3172 !important;
}
/* Sui fondi scuri il pulsante principale diventa giallo, per staccare dal blu notte */
.bg-dark .btn-primary {
    background-color: #fcbf00 !important;
    border-color: #fcbf00 !important;
    color: #0b1a36 !important;
}
.bg-dark .btn-primary:hover,
.bg-dark .btn-primary:focus,
.bg-dark .btn-primary:active {
    background-color: #ffd23f !important;
    border-color: #ffd23f !important;
    color: #0b1a36 !important;
}

.btn-outline-primary {
    color: #0e4194 !important;
    border-color: #0e4194 !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: #0e4194 !important;
    border-color: #0e4194 !important;
    color: #fff !important;
}

.text-primary { color: #0e4194 !important; }
.bg-primary { background-color: #0e4194 !important; }
.border-primary { border-color: #0e4194 !important; }
.bg-primary-soft { background-color: rgba(14, 65, 148, 0.12) !important; }
.text-danger { color: #e4051f !important; }
.bg-danger { background-color: #e4051f !important; }
.bg-danger-soft { background-color: rgba(228, 5, 31, 0.1) !important; }
.text-warning { color: #fcbf00 !important; }
.bg-warning { background-color: #fcbf00 !important; }
.bg-warning-soft { background-color: rgba(252, 191, 0, 0.18) !important; }
.text-success { color: #0e4194 !important; }
.bg-success { background-color: #0e4194 !important; }
.bg-success-soft { background-color: rgba(14, 65, 148, 0.12) !important; }
.bg-dark-soft { background-color: rgba(11, 26, 54, 0.1) !important; }
/* Icone gialle su fondo chiaro: un giallo leggermente più scuro, per non sparire sul bianco */
.bg-white .text-warning,
.feature-card .text-warning,
.promo-single .text-warning,
.bg-light-subtle .text-warning { color: #e0a800 !important; }

/* Sfondi scuri del tema (#111827) → blu notte del logo */
.bg-dark { background-color: #0b1a36 !important; }
/* La sezione numeri della home ha di serie una foto scura (cta-bg.png) che copre il blu notte */
.cta-section.bg-dark { background-image: none !important; }
.cta-section.bg-dark::after { background-image: none !important; display: none !important; }
.bg-dark-light { background-color: #132a5c !important; }

a { color: #0e4194; }
a:hover { color: #0a3172; }
.link-with-icon,
.read-more-link { color: #0e4194 !important; }
.link-with-icon:hover,
.read-more-link:hover { color: #0a3172 !important; }

.form-control:focus,
.form-select:focus {
    border-color: #0e4194 !important;
    box-shadow: 0 0 0 0.25rem rgba(14, 65, 148, 0.25) !important;
}
.form-check-input:checked {
    background-color: #0e4194 !important;
    border-color: #0e4194 !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.active,
.main-menu li a.nav-link.active {
    color: #0e4194 !important;
}
.dropdown-link:hover .drop-title { color: #0e4194 !important; }

/* Tab funzionalità della home (feature-tab-list-2) */
.feature-tab-list-2 li a.active,
.feature-tab-list-2 li a:hover {
    background-color: #0e4194 !important;
    border-color: #0e4194 !important;
    color: #fff !important;
}

/* Testi e icone blu dentro le sezioni scure: in giallo, altrimenti si perdono sul blu notte */
.bg-dark .subscribe-feature-list .text-primary,
.bg-dark .pricing-feature-list .text-primary { color: #fcbf00 !important; }

/* Footer: link in hover in giallo, leggibile sul blu notte */
.footer-section .bg-dark .footer-nav-list li a:hover { color: #fcbf00 !important; }

/* === Logo === */
.navbar-brand img,
.offcanvas-header img {
    height: 48px;
    width: auto;
}
@media (max-width: 575px) {
    .navbar-brand img { height: 40px; }
}
/* Logo bianco su fondo scuro: footer e tema scuro */
.footer-section .footer-top .footer-logo {
    height: 48px;
    width: auto;
}
.preloader-icon {
    width: 64px;
    height: 64px;
}

/* === Icon box circolari === (come W-URP: forma circolare anche con glifi non quadrati) */
.feature-card .icon-box.rounded-circle,
.icon-box.rounded-circle {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0;
}
/* Il tema dà all'icona un riquadro di 55px centrato con line-height: 55px.
   Nel cerchio da 60px l'icona deve occupare solo il proprio glifo, centrato dal flex del contenitore. */
.icon-box.rounded-circle i {
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    font-size: 24px !important;
    display: block !important;
}

/* === Hero: finestra del browser + telefono con schermate reali dell'app === */
.wt-hero-mockup {
    position: relative;
    padding-bottom: 40px;
}
.wt-window {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}
.wt-window-bar {
    height: 28px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 14px;
}
.wt-window-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e4051f;
    display: block;
}
.wt-window-bar span:nth-child(2) { background: #fcbf00; }
.wt-window-bar span:nth-child(3) { background: #0e4194; }
.wt-window img { display: block; width: 100%; height: auto; }
.wt-phone {
    position: absolute;
    right: -18px;
    bottom: 0;
    width: 32%;
    max-width: 190px;
    border-radius: 26px;
    border: 7px solid #0f172a;
    background: #0f172a;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}
.wt-phone img {
    display: block;
    width: 100%;
    height: 330px;
    object-fit: cover;
    object-position: top;
    border-radius: 19px;
}
@media (max-width: 575px) {
    .wt-phone { width: 38%; right: -6px; }
    .wt-phone img { height: 230px; }
}

/* Statistiche sotto l'hero (al posto dei loghi clienti del tema) */
.wt-hero-stats .wt-stat strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.wt-hero-stats .wt-stat span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* === Schermate dell'app nelle pagine === */
.wt-shot {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    background: #fff;
    width: 100%;
    height: auto;
}
.wt-shot-frame {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}
.wt-shot-frame .wt-window-bar { height: 24px; }
.wt-shot-frame img { display: block; width: 100%; height: auto; }
.wt-shot-caption {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.75rem;
    text-align: center;
}

/* Telefono singolo nelle pagine interne */
.wt-phone-single {
    max-width: 260px;
    margin: 0 auto;
    border-radius: 30px;
    border: 8px solid #0f172a;
    background: #0f172a;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.3);
}
.wt-phone-single img { display: block; width: 100%; height: auto; border-radius: 22px; }

/* === Formati compatibili (al posto dei loghi clienti) === */
.wt-compat {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 34px;
}
.wt-compat span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #525252;
}
.wt-compat i { font-size: 1.5rem; color: #0e4194; }

/* === Integrazioni: icone Font Awesome al posto dei loghi del tema === */
.single-integration .wt-int-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(14, 65, 148, 0.1);
    color: #0e4194;
}
.single-integration h6 { font-size: 0.95rem; }
.single-integration p { font-size: 0.8rem; color: #6b7280; margin: 0.25rem 0 0; }
/* Su smartphone due integrazioni per riga invece di una */
@media (max-width: 575px) {
    .integration-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .single-integration { padding: 16px 10px !important; }
    .single-integration .wt-int-icon { width: 52px; height: 52px; font-size: 22px; }
}

/* Badge giallo (es. "Novità"): testo nel blu W-Time */
.badge.bg-warning { color: #0b1a36 !important; }

/* Numeri della sezione CTA */
.cta-card .display-5 { color: #0e4194; }

/* Articoli: indice laterale */
.blog-details-wrap h2[id],
.blog-details-wrap h3[id] { scroll-margin-top: 110px; }

/* Tabella regole */
.wt-rules-table td,
.wt-rules-table th { vertical-align: top; font-size: 0.92rem; }
.wt-rules-table code { color: #0a3172; font-size: 0.8rem; }

/* === Tema scuro === */
[data-bs-theme=dark] .wt-shot,
[data-bs-theme=dark] .wt-shot-frame { border-color: rgba(255, 255, 255, 0.1); }
[data-bs-theme=dark] .wt-compat span { color: #d4d4d4; }
[data-bs-theme=dark] .single-integration p { color: #a3a3a3; }
[data-bs-theme=dark] .cta-card .display-5 { color: #fcbf00; }
[data-bs-theme=dark] .wt-logo-color { display: none !important; }
[data-bs-theme=dark] .wt-logo-white { display: inline-block !important; }
.wt-logo-white { display: none; }

@media (prefers-reduced-motion: reduce) {
    [data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Codice negli articoli: blu scuro del logo invece del rosa predefinito di Bootstrap */
code { color: #0a3172; }

/* === Tema scuro: leggibilità con i colori del logo ===
   Il blu #0E4194 su fondo quasi nero non si legge (contrasto < 2:1): nel tema scuro link, titoletti e accenti
   blu diventano gialli (#FCBF00, contrasto ~9:1), il rosso viene schiarito e i testi grigi del tema sono resi più chiari. */
[data-bs-theme=dark] .text-primary,
[data-bs-theme=dark] a:not(.btn):not(.nav-link):not(.dropdown-link),
[data-bs-theme=dark] .link-with-icon,
[data-bs-theme=dark] .read-more-link,
[data-bs-theme=dark] .btn-link,
[data-bs-theme=dark] code,
[data-bs-theme=dark] .wt-rules-table code { color: #fcbf00 !important; }
[data-bs-theme=dark] .navbar .nav-link.active,
[data-bs-theme=dark] .navbar .nav-link:hover,
[data-bs-theme=dark] .dropdown-link:hover .drop-title { color: #fcbf00 !important; }
[data-bs-theme=dark] .text-danger { color: #ff6b78 !important; }
[data-bs-theme=dark] p,
[data-bs-theme=dark] li,
[data-bs-theme=dark] .nav-link,
[data-bs-theme=dark] .wt-shot-caption { color: #b5b5b5; }
[data-bs-theme=dark] .wt-compat i { color: #fcbf00; }
[data-bs-theme=dark] .btn-outline-primary { color: #fcbf00 !important; border-color: #fcbf00 !important; }
[data-bs-theme=dark] .btn-outline-primary:hover,
[data-bs-theme=dark] .btn-outline-primary:focus { background-color: #fcbf00 !important; border-color: #fcbf00 !important; color: #0b1a36 !important; }
[data-bs-theme=dark] .accordion-button:not(.collapsed) { color: #fcbf00 !important; }

/* === Armonia grafica (21/10/2026) === */

/* Titoli bilanciati su più righe (niente parola isolata sull'ultima riga), paragrafi senza vedove */
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .h5 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Coppie di pulsanti: affiancate e allineate; su smartphone una sotto l'altra, della stessa larghezza */
.wt-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}
.wt-actions .btn { margin: 0 !important; }
@media (max-width: 575px) {
    .wt-actions { flex-direction: column; align-items: stretch; }
    .wt-actions .btn { width: 100%; }
}

/* Elenco sotto l'invito alla dimostrazione: voci equidistanti su una riga */
.subscribe-feature-list { gap: 0.5rem 1.75rem; }
.subscribe-feature-list li span { margin: 0; }

/* Tab della home su smartphone: pulsanti a tutta larghezza, uno sotto l'altro */
@media (max-width: 767px) {
    .feature-tab-list-2 { flex-direction: column; align-items: stretch; }
    .feature-tab-list-2 li { margin: 4px 0; }
    .feature-tab-list-2 li a { display: block; margin-right: 0; text-align: center; }
}

/* Il processo: le quattro fasi allineate in alto, con la linea tratteggiata all'altezza dei numeri */
.work-process .process-card { height: 100%; }
.work-process .dots-line { align-self: flex-start; margin-top: 87px; }

/* Forma decorativa dietro i numeri: nascosta quando le schede vanno in colonna */
@media (max-width: 991px) {
    .wt-blob { display: none !important; }
}

/* Schede degli articoli: stessa altezza, titolo completo, sommario su tre righe, autore sempre in basso */
[class*="col-"]:has(> .single-article) { display: flex; flex-direction: column; }
.single-article { flex: 1 1 auto; }
.single-article .article-content { flex: 1 1 auto; display: flex; flex-direction: column; }
.single-article .article-content > .d-flex:last-child { margin-top: auto; }
.single-article .article-title.limit-2-line-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.single-article p.limit-2-line-text { -webkit-line-clamp: 3; }
.single-article:not(.feature-article) .article-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Elenchi numerati (es. il processo in Funzionalità): numero in un cerchio di dimensione fissa, non allungato */
li.d-flex > .badge.rounded-pill:first-child {
    align-self: flex-start;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Contatti: il recapito in evidenza, uguale nelle tre schede */
.wt-contact-value {
    display: block;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #0e4194;
    text-decoration: none;
    line-height: 1.5;
}
a.wt-contact-value:hover { color: #0a3172; text-decoration: underline; }
[data-bs-theme=dark] .wt-contact-value { color: #fcbf00 !important; }

/* Articoli in evidenza (immagine a sinistra): l'immagine occupa tutta l'altezza della scheda */
@media (min-width: 576px) {
    .single-article.feature-article .article-img img { height: 100%; min-height: 20rem; object-fit: cover; }
}
.single-article .avatar-name,
.single-article .article-content a.ms-auto { white-space: nowrap; }
.single-article .article-content > .d-flex:last-child { gap: 1rem; }
