/* ==========================================================================
   GLOBAL.CSS — Reset, tipografia, utility, componenti base
   Mobile-first. Le variabili sono in style.css (root del child theme).
   ========================================================================== */


/* ── Reset minimale ── */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--gf-font-primary);
    font-size: var(--gf-text-base);
    line-height: 1.6;
    color: var(--gf-dark);
    background-color: var(--gf-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--gf-orange);
    text-decoration: none;
    transition: color var(--gf-transition);
}

/* Override GeneratePress default underline */
a:hover {
    text-decoration: none;
}

.entry-content a,
.site-footer a,
.site-header a {
    text-decoration: none;
}

a:hover {
    color: var(--gf-orange-hover);
}

ul, ol {
    list-style: none;
}


/* ── Tipografia ── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--gf-font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gf-black);
}

h1 { font-size: var(--gf-text-3xl); }
h2 { font-size: var(--gf-text-2xl); }
h3 { font-size: var(--gf-text-xl);  }
h4 { font-size: var(--gf-text-lg);  }

@media (min-width: 768px) {
    h1 { font-size: var(--gf-text-4xl); }
    h2 { font-size: var(--gf-text-3xl); }
    h3 { font-size: var(--gf-text-2xl); }
}

@media (min-width: 1024px) {
    h1 { font-size: var(--gf-text-5xl); }
    h2 { font-size: var(--gf-text-4xl); }
}

p {
    margin-bottom: var(--gf-space-4);
    color: var(--gf-gray-700);
}

p:last-child {
    margin-bottom: 0;
}


/* ── Container ── */

.gf-container {
    width: 100%;
    max-width: var(--gf-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gf-container-pad);
    padding-right: var(--gf-container-pad);
}


/* ── Sezioni ── */

.gf-section {
    padding-top: var(--gf-space-9);
    padding-bottom: var(--gf-space-9);
}

@media (min-width: 768px) {
    .gf-section {
        padding-top: var(--gf-space-10);
        padding-bottom: var(--gf-space-10);
    }
}

.gf-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gf-black);
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    padding-bottom: 16px;
}

.gf-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--gf-orange);
    border-radius: 2px;
}


/* ── Pulsanti ── */

.gf-btn {
    display: inline-block;
    padding: var(--gf-space-3) var(--gf-space-6);
    font-family: var(--gf-font-primary);
    font-size: var(--gf-text-base);
    font-weight: 600;
    line-height: 1.4;
    border: 2px solid transparent;
    border-radius: var(--gf-border-radius);
    cursor: pointer;
    transition: all var(--gf-transition);
    text-align: center;
}

.gf-btn--primary {
    background-color: var(--gf-orange);
    color: var(--gf-white);
    border-color: var(--gf-orange);
}

.gf-btn--primary:hover {
    background-color: var(--gf-orange-hover);
    border-color: var(--gf-orange-hover);
    color: var(--gf-white);
    transform: translateY(-1px);
    box-shadow: var(--gf-shadow-md);
}

.gf-btn--outline {
    background-color: transparent;
    color: var(--gf-white);
    border-color: var(--gf-white);
}

.gf-btn--outline:hover {
    background-color: var(--gf-white);
    color: var(--gf-orange);
}


/* ── Link con freccia ── */

.gf-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--gf-space-1);
    font-weight: 600;
    color: var(--gf-orange);
    transition: gap var(--gf-transition), color var(--gf-transition);
}

.gf-link-arrow::after {
    content: '\2192';
    transition: transform var(--gf-transition);
}

.gf-link-arrow:hover {
    color: var(--gf-orange-hover);
    gap: var(--gf-space-2);
}

.gf-link-arrow:hover::after {
    transform: translateX(2px);
}


/* ── Griglia utility ── */

.gf-grid {
    display: grid;
    gap: var(--gf-space-5);
}

.gf-grid--2 {
    grid-template-columns: 1fr;
}

.gf-grid--3 {
    grid-template-columns: 1fr;
}

.gf-grid--4 {
    grid-template-columns: 1fr 1fr;
}

@media (min-width: 768px) {
    .gf-grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .gf-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .gf-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gf-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .gf-grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ── Card ── */

.gf-card {
    background-color: var(--gf-white);
    border: 1px solid var(--gf-gray-300);
    border-radius: var(--gf-border-radius-lg);
    padding: var(--gf-space-6);
    text-align: center;
    transition: transform var(--gf-transition), box-shadow var(--gf-transition);
}

.gf-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gf-shadow-hover);
}

.gf-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--gf-space-4);
}

.gf-card__title {
    font-size: var(--gf-text-lg);
    margin-bottom: var(--gf-space-3);
}


/* ── Checklist con icona ── */

.gf-checklist {
    list-style: none;
}

.gf-checklist li {
    position: relative;
    padding-left: var(--gf-space-6);
    margin-bottom: var(--gf-space-3);
    color: var(--gf-gray-700);
}

.gf-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 20px;
    height: 20px;
    background-color: var(--gf-orange);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}


/* ── Overlay per sezioni con sfondo immagine ── */

.gf-overlay {
    position: relative;
}

.gf-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--gf-overlay-dark);
    z-index: 1;
}

.gf-overlay > * {
    position: relative;
    z-index: 2;
}


/* ── Utility ── */

.gf-text-center { text-align: center; }
.gf-text-white  { color: var(--gf-white); }
.gf-mb-0        { margin-bottom: 0; }
.gf-mb-4        { margin-bottom: var(--gf-space-4); }
.gf-mb-6        { margin-bottom: var(--gf-space-6); }
.gf-mb-8        { margin-bottom: var(--gf-space-8); }

/* Visually hidden (accessibilità) */
.gf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
