/*
Theme Name: GTP Blocksy Child
Template: blocksy
Version: 1.0
*/

/* === Variabili colori === */
:root {
    --gtp-primary: #1a4f7a;
    --gtp-light:      oklch(from var(--gtp-primary) 95% 0.03 h);
    --gtp-muted:      oklch(from var(--gtp-primary) 75% 0.08 h);
    --gtp-dark:       oklch(from var(--gtp-primary) 20% 0.05 h);
    --gtp-darker:     oklch(from var(--gtp-primary) 12% 0.03 h);
    --gtp-accent:     oklch(from var(--gtp-primary) 55% 0.15 h);
    --gtp-on-primary: #ffffff;
    --gtp-text:       oklch(from var(--gtp-primary) 15% 0.02 h);
    --gtp-text-muted: oklch(from var(--gtp-primary) 45% 0.04 h);
    --gtp-bg:         #ffffff;
    --gtp-bg-alt:     #f8f8f8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --gtp-bg:         oklch(from var(--gtp-primary) 8%  0.04 h);
        --gtp-bg-alt:     oklch(from var(--gtp-primary) 12% 0.04 h);
        --gtp-light:      oklch(from var(--gtp-primary) 18% 0.05 h);
        --gtp-text:       oklch(from var(--gtp-primary) 92% 0.03 h);
        --gtp-text-muted: oklch(from var(--gtp-primary) 65% 0.05 h);
        --gtp-accent:     oklch(from var(--gtp-primary) 70% 0.15 h);
    }
}

/* === Font === */
body, h1, h2, h3, h4, p, a {
    font-family: 'Fira Sans', sans-serif !important;
}

/* === Tipografia === */
:root {
    --gtp-font-size-base: 20px;
    --gtp-font-size-h1:   3.5rem;
    --gtp-font-size-h2:   2rem;
    --gtp-font-size-h3:   1.4rem;
    --gtp-font-size-h4:   1.1rem;
    --gtp-line-height:    1.8;
}

html, body { font-size: 20px !important; background-color: var(--gtp-bg) !important; color: var(--gtp-text) !important; }

p, li    { font-size: var(--gtp-font-size-base) !important; line-height: var(--gtp-line-height) !important; color: var(--gtp-text); }
h1       { font-size: var(--gtp-font-size-h1) !important; font-weight: 700 !important; }
h2       { font-size: var(--gtp-font-size-h2) !important; font-weight: 700 !important; color: var(--gtp-primary) !important; }
h3       { font-size: var(--gtp-font-size-h3) !important; font-weight: 600 !important; color: var(--gtp-primary) !important; }
h4       { font-size: var(--gtp-font-size-h4) !important; font-weight: 600 !important; color: var(--gtp-primary) !important; }

@media (max-width: 768px) {
    html, body { font-size: 18px !important; }
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 1.6rem !important; }
}

/* === Header Blocksy === */
.ct-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(0,0,0,0) !important;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
}

.ct-header.scrolled {
    background: var(--gtp-bg) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12) !important;
}

/* Link header su hero: bianchi */
.ct-header:not(.scrolled) a,
.ct-header:not(.scrolled) .ct-menu a {
    color: #ffffff !important;
}

/* Link header dopo scroll */
.ct-header.scrolled a,
.ct-header.scrolled .ct-menu a {
    color: var(--gtp-primary) !important;
}

/* Nasconde title bar Blocksy */
.ct-header .site-title,
.ct-header .site-description {
    display: none !important;
}

/* === Footer Blocksy === */
.ct-footer {
    background-color: var(--gtp-darker) !important;
}
.ct-footer p, .ct-footer a {
    color: var(--gtp-muted) !important;
}

/* === Hero === */
.gtp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.gtp-hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--gtp-primary);
    opacity: 0.75;
    mix-blend-mode: multiply;
}
.gtp-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    z-index: 0;
}
.gtp-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
}
.gtp-hero__content h1 {
    font-size: var(--gtp-font-size-h1) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 16px;
}
.gtp-hero__subtitle {
    font-size: var(--gtp-font-size-base) !important;
    color: #ffffff !important;
    margin-bottom: 8px;
}
.gtp-hero__text {
    font-size: var(--gtp-font-size-base) !important;
    color: var(--gtp-muted) !important;
    margin-bottom: 32px;
}
.gtp-btn {
    display: inline-block;
    background: #ffffff;
    color: var(--gtp-primary) !important;
    padding: 14px 32px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none !important;
    font-size: var(--gtp-font-size-base) !important;
    transition: opacity 0.2s;
}
.gtp-btn:hover { opacity: 0.9; }

/* === Sezioni === */
.gtp-section { padding: 80px 40px; }
.gtp-section--white   { background: var(--gtp-bg); }
.gtp-section--alt     { background: var(--gtp-bg-alt); }
.gtp-section--primary { background: var(--gtp-primary); }
.gtp-section--light   { background: var(--gtp-light); }

.gtp-section--primary h2,
.gtp-section--primary p { color: #ffffff !important; }
.gtp-terminal-list { font-weight: 600; margin-top: 32px; }

.gtp-container        { max-width: 1200px; margin: 0 auto; }
.gtp-container--narrow { max-width: 900px; margin: 0 auto; }
.gtp-text-center      { text-align: center; }
.gtp-text-muted       { color: var(--gtp-text-muted) !important; }

.gtp-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
@media (max-width: 768px) {
    .gtp-columns { grid-template-columns: 1fr; }
    .gtp-section { padding: 60px 20px; }
}

.gtp-box { background: var(--gtp-light); border-radius: 8px; padding: 32px; }
.gtp-box h3 { color: var(--gtp-primary); margin-bottom: 16px; }
.gtp-box ul { padding-left: 20px; }
.gtp-box li { margin-bottom: 8px; }

.gtp-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}
@media (max-width: 900px) { .gtp-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gtp-cards { grid-template-columns: 1fr; } }

.gtp-card { background: var(--gtp-bg); border-radius: 8px; padding: 24px; }
.gtp-card h4 { color: var(--gtp-primary); margin-bottom: 8px; }

.gtp-faq { margin-top: 32px; }
.gtp-faq__item { padding: 16px 0; border-bottom: 1px solid #e8e8e8; }
.gtp-faq__item:last-child { border-bottom: none; }
.gtp-faq__item h4 { color: var(--gtp-primary); margin-bottom: 8px; }

.gtp-email { color: var(--gtp-primary) !important; font-weight: 600; text-decoration: none !important; }
.gtp-email:hover { text-decoration: underline !important; }

/* === Icone sezioni === */
.gtp-section-icon { text-align: center; margin-bottom: 16px; }
.gtp-section-icon i   { font-size: 64px; color: var(--gtp-primary); }
.gtp-section-icon--light i { color: #ffffff; }

/* Header Blocksy override */
.ct-header,
.ct-header[class] {
    background-color: rgba(0,0,0,0) !important;
    background: rgba(0,0,0,0) !important;
}
.ct-header.scrolled,
.ct-header.scrolled[class] {
    background-color: var(--gtp-bg) !important;
    background: var(--gtp-bg) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12) !important;
}

/* Hamburger menu bianco */
.ct-header-trigger .ct-icon,
.ct-header-trigger svg,
.ct-header-trigger rect {
    fill: #ffffff !important;
    color: #ffffff !important;
}

@media (prefers-color-scheme: dark) {
    h2, h3, h4 {
        color: #ffffff !important;
    }
}
