/* =========================================================================
   IVI design theme - Brand stylesheet
   -------------------------------------------------------------------------
   Override visivi del tema parent con la palette e la tipografia IVI design.
   Tutte le regole qui hanno priorita' sui CSS del parent perche' caricate
   in coda (vedi functions.php).

   STRUTTURA:
       1. Custom properties (palette, spacing, font)
       2. Tipografia base
       3. Bottoni
       4. Form
       5. Header / navigazione
       6. Footer
       7. Utility class
   ========================================================================= */


/* -------------------------------------------------------------------------
   1. CUSTOM PROPERTIES (PALETTE PLACEHOLDER NEUTRA)
   -------------------------------------------------------------------------
   Modifica QUI i colori del brand: tutto il resto del CSS si aggiorna in
   automatico. La palette attuale e' un blu navy / slate professionale,
   sostituibile con i colori ufficiali IVI quando disponibili.
   ------------------------------------------------------------------------- */
:root {
    /* Brand */
    --ivi-primary:        #1a2332;   /* Navy scuro (testi, header, bottoni primari) */
    --ivi-primary-hover:  #0f1722;
    --ivi-secondary:      #4a5568;   /* Slate / grigio caldo (testi secondari) */
    --ivi-accent:         #2b6cb0;   /* Blu accento (link, hover, CTA) */
    --ivi-accent-hover:   #1e4e8c;

    /* Sfondi e superfici */
    --ivi-bg:             #ffffff;
    --ivi-surface:        #f7fafc;
    --ivi-surface-alt:    #edf2f7;
    --ivi-border:         #e2e8f0;

    /* Testo */
    --ivi-text:           #1a2332;
    --ivi-text-muted:     #4a5568;
    --ivi-text-subtle:    #718096;
    --ivi-text-inverse:   #ffffff;

    /* Stati */
    --ivi-success:        #38a169;
    --ivi-warning:        #d69e2e;
    --ivi-danger:         #e53e3e;

    /* Tipografia */
    --ivi-font-sans:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    --ivi-font-display:   "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ivi-font-mono:      "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

    /* Scala spaziatura (4px base) */
    --ivi-space-1: 4px;
    --ivi-space-2: 8px;
    --ivi-space-3: 12px;
    --ivi-space-4: 16px;
    --ivi-space-5: 24px;
    --ivi-space-6: 32px;
    --ivi-space-8: 48px;
    --ivi-space-10: 64px;

    /* Radius */
    --ivi-radius-sm: 3px;
    --ivi-radius:    6px;
    --ivi-radius-lg: 12px;

    /* Shadow */
    --ivi-shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.05);
    --ivi-shadow:    0 4px 14px rgba(26, 35, 50, 0.06);
    --ivi-shadow-lg: 0 12px 32px rgba(26, 35, 50, 0.10);

    /* Transition */
    --ivi-transition: 200ms ease;
}


/* -------------------------------------------------------------------------
   2. TIPOGRAFIA BASE
   ------------------------------------------------------------------------- */
body,
body.material .container-wrap,
body .container-wrap,
body p {
    font-family: var(--ivi-font-sans);
    color: var(--ivi-text);
}

h1, h2, h3, h4, h5, h6,
.nectar-fancy-heading,
body h1, body h2, body h3, body h4, body h5, body h6 {
    font-family: var(--ivi-font-display);
    color: var(--ivi-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a,
body a:not(.button):not(.btn):not(.nectar-button) {
    color: var(--ivi-accent);
    transition: color var(--ivi-transition);
}

a:hover,
body a:not(.button):not(.btn):not(.nectar-button):hover {
    color: var(--ivi-accent-hover);
}


/* -------------------------------------------------------------------------
   3. BOTTONI (override stile Salient)
   ------------------------------------------------------------------------- */
body .nectar-button.regular,
body .nectar-button.see-through,
body input[type="submit"],
body button.button,
body .button,
body a.button {
    background-color: var(--ivi-primary) !important;
    border-color: var(--ivi-primary) !important;
    color: var(--ivi-text-inverse) !important;
    border-radius: var(--ivi-radius) !important;
    font-family: var(--ivi-font-sans) !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    transition: all var(--ivi-transition) !important;
    box-shadow: none !important;
}

body .nectar-button.regular:hover,
body .nectar-button.see-through:hover,
body input[type="submit"]:hover,
body button.button:hover,
body .button:hover,
body a.button:hover {
    background-color: var(--ivi-accent) !important;
    border-color: var(--ivi-accent) !important;
    color: var(--ivi-text-inverse) !important;
    transform: translateY(-1px);
    box-shadow: var(--ivi-shadow) !important;
}

/* Variante outline */
body .nectar-button.see-through {
    background-color: transparent !important;
    color: var(--ivi-primary) !important;
}
body .nectar-button.see-through:hover {
    background-color: var(--ivi-primary) !important;
    color: var(--ivi-text-inverse) !important;
}


/* -------------------------------------------------------------------------
   4. FORM
   ------------------------------------------------------------------------- */
body input[type="text"],
body input[type="email"],
body input[type="url"],
body input[type="password"],
body input[type="search"],
body input[type="number"],
body input[type="tel"],
body textarea,
body select {
    border: 1px solid var(--ivi-border) !important;
    border-radius: var(--ivi-radius) !important;
    background-color: var(--ivi-bg) !important;
    color: var(--ivi-text) !important;
    font-family: var(--ivi-font-sans) !important;
    transition: border-color var(--ivi-transition), box-shadow var(--ivi-transition) !important;
}

body input[type="text"]:focus,
body input[type="email"]:focus,
body input[type="url"]:focus,
body input[type="password"]:focus,
body input[type="search"]:focus,
body input[type="number"]:focus,
body input[type="tel"]:focus,
body textarea:focus,
body select:focus {
    outline: none !important;
    border-color: var(--ivi-accent) !important;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15) !important;
}


/* -------------------------------------------------------------------------
   5. HEADER / NAVIGAZIONE
   ------------------------------------------------------------------------- */
#header-outer {
    box-shadow: var(--ivi-shadow-sm);
}

#header-outer #top nav > ul > li > a {
    font-family: var(--ivi-font-sans);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ivi-text);
    transition: color var(--ivi-transition);
}

#header-outer #top nav > ul > li > a:hover,
#header-outer #top nav > ul > li.current-menu-item > a {
    color: var(--ivi-accent);
}

#header-outer #top nav ul .sf-sub-indicator {
    color: var(--ivi-text-subtle);
}


/* -------------------------------------------------------------------------
   6. FOOTER
   ------------------------------------------------------------------------- */
#footer-outer {
    background-color: var(--ivi-primary) !important;
    color: var(--ivi-text-inverse);
    font-family: var(--ivi-font-sans);
}

#footer-outer #copyright,
#footer-outer #copyright p,
#footer-outer #copyright a {
    color: rgba(255, 255, 255, 0.7);
}

#footer-outer #copyright a:hover {
    color: var(--ivi-text-inverse);
}

#footer-outer h1,
#footer-outer h2,
#footer-outer h3,
#footer-outer h4,
#footer-outer h5,
#footer-outer h6,
#footer-outer .widget-title {
    color: var(--ivi-text-inverse) !important;
}


/* -------------------------------------------------------------------------
   7. UTILITY CLASS BRAND
   -------------------------------------------------------------------------
   Classi pronte da applicare nel page builder per allinearsi al brand.
   ------------------------------------------------------------------------- */
.ivi-text-primary    { color: var(--ivi-primary)   !important; }
.ivi-text-accent     { color: var(--ivi-accent)    !important; }
.ivi-text-muted      { color: var(--ivi-text-muted)!important; }
.ivi-bg-primary      { background-color: var(--ivi-primary) !important; color: var(--ivi-text-inverse) !important; }
.ivi-bg-surface      { background-color: var(--ivi-surface) !important; }
.ivi-bg-accent       { background-color: var(--ivi-accent) !important; color: var(--ivi-text-inverse) !important; }
.ivi-rounded         { border-radius: var(--ivi-radius) !important; }
.ivi-rounded-lg      { border-radius: var(--ivi-radius-lg) !important; }
.ivi-shadow          { box-shadow: var(--ivi-shadow) !important; }
.ivi-shadow-lg       { box-shadow: var(--ivi-shadow-lg) !important; }


/* -------------------------------------------------------------------------
   8. SELECTION (testo selezionato)
   ------------------------------------------------------------------------- */
::selection {
    background-color: var(--ivi-accent);
    color: var(--ivi-text-inverse);
}
