/*
Theme Name: Empoli.TV Impact
Theme URI: https://example.com/empolitv-impact
Author: OpenAI for Sandro Schiariti
Author URI: https://openai.com
Description: Tema WordPress moderno e d'impatto per Empoli.TV, ottimizzato per il plugin Empoli.TV Site Manager.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: empolitv-impact
*/

/* Base reset */
html { box-sizing: border-box; scroll-behavior: smooth; }
*, *:before, *:after { box-sizing: inherit; }
body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #101828;
    background: #f5f7fb;
    line-height: 1.6;
}
a { color: #0b57d0; text-decoration: none; }
a:hover { color: #003ea8; }
img { max-width: 100%; height: auto; display: block; }

:root {
    --etv-bg: #f5f7fb;
    --etv-surface: #ffffff;
    --etv-surface-2: #eef3ff;
    --etv-text: #0f172a;
    --etv-muted: #475467;
    --etv-border: rgba(15, 23, 42, 0.08);
    --etv-primary: #3923d6;
    --etv-primary-2: #6f4bff;
    --etv-accent: #00d4ff;
    --etv-dark: #09111f;
    --etv-radius: 24px;
    --etv-shadow: 0 20px 60px rgba(31, 41, 55, 0.12);
    --etv-container: 1240px;
}

.etv-container,
.site-main,
.entry-content > *:not(.alignwide):not(.alignfull),
.entry-summary > * {
    width: min(calc(100% - 32px), var(--etv-container));
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    width: min(calc(100% - 32px), 1320px);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 999;
    background: #fff;
    padding: 8px 12px;
    border-radius: 10px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(245, 247, 251, 0.86);
    border-bottom: 1px solid var(--etv-border);
}

.etv-topbar {
    background: linear-gradient(90deg, var(--etv-dark), #11203a 48%, #1e1b4b);
    color: #fff;
    font-size: 14px;
}
.etv-topbar-inner {
    width: min(calc(100% - 32px), var(--etv-container));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
}
.etv-topbar-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.etv-topbar a { color: rgba(255,255,255,0.88); }
.etv-topbar a:hover { color: #fff; }

.site-branding-row {
    width: min(calc(100% - 32px), var(--etv-container));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.custom-logo-link img {
    max-height: 64px;
    width: auto;
}
.site-title {
    margin: 0;
    font-weight: 800;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    letter-spacing: -0.03em;
}
.site-title a { color: var(--etv-text); }
.site-description {
    margin: 2px 0 0;
    color: var(--etv-muted);
    font-size: 0.95rem;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 18px;
}
.main-navigation button {
    display: none;
}
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.main-navigation li { position: relative; }
.main-navigation a {
    color: var(--etv-text);
    padding: 12px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    transition: 0.25s ease;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    background: var(--etv-surface);
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.etv-header-cta {
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--etv-primary), var(--etv-primary-2));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(57,35,214,.22);
}
.etv-header-cta:hover { color: #fff; filter: brightness(1.05); }

.hero-shell {
    width: min(calc(100% - 32px), var(--etv-container));
    margin: 40px auto 30px;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at top left, rgba(0,212,255,.20), transparent 30%), linear-gradient(135deg, #0a1020 0%, #121d36 50%, #2b1d84 100%);
    color: #fff;
    box-shadow: var(--etv-shadow);
}
.hero-shell::before,
.hero-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
}
.hero-shell::before {
    width: 320px; height: 320px; right: -80px; top: -40px;
    background: rgba(0,212,255,0.24);
}
.hero-shell::after {
    width: 240px; height: 240px; left: -60px; bottom: -80px;
    background: rgba(111,75,255,0.22);
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    padding: 72px 56px;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}
.hero-title {
    margin: 0 0 16px;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}
.hero-copy {
    margin: 0 0 28px;
    color: rgba(255,255,255,0.86);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    max-width: 58ch;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.hero-button,
.etv-button,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.25s ease;
}
.hero-button--primary,
.etv-button,
.wp-block-button__link {
    background: linear-gradient(135deg, var(--etv-accent), #7de7ff);
    color: #06111f;
    box-shadow: 0 18px 45px rgba(0,212,255,.24);
}
.hero-button--secondary {
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
}
.hero-button:hover,
.etv-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-1px);
}
.hero-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-content: end;
}
.hero-stat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 22px;
}
.hero-stat strong {
    display: block;
    font-size: clamp(1.6rem, 2vw, 2.3rem);
    margin-bottom: 6px;
}
.hero-stat span { color: rgba(255,255,255,.80); }
.hero-highlight {
    grid-column: 1 / -1;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,.12);
}
.hero-highlight h3 { margin: 0 0 8px; font-size: 1.15rem; }
.hero-highlight p { margin: 0; color: rgba(255,255,255,.8); }

.site-main {
    flex: 1;
    padding: 20px 0 60px;
}

.entry-header {
    padding: 10px 0 6px;
}
.entry-title {
    margin: 12px 0 0;
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}
.entry-content,
.page-content {
    color: var(--etv-text);
}
.entry-content > p,
.page-content > p {
    color: var(--etv-muted);
}

.etv-section,
.etsm-section {
    width: min(calc(100% - 32px), var(--etv-container));
    margin: 0 auto 30px;
}
.etsm-site-wrap > .etsm-section,
.etsm-site-wrap > .etsm-hero {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.etsm-hero {
    width: min(calc(100% - 32px), var(--etv-container));
    margin: 34px auto 28px;
    border-radius: 32px;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(0,212,255,.20), transparent 28%), linear-gradient(135deg, #06111f 0%, #16203f 46%, #301b84 100%);
    box-shadow: var(--etv-shadow);
    position: relative;
}
.etsm-hero::before {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(0,212,255,0.18);
    filter: blur(10px);
}
.etsm-hero-badge {
    display: inline-flex;
    margin: 30px 0 0 36px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.etsm-hero-content {
    padding: 22px 36px 44px;
    position: relative;
    z-index: 1;
}
.etsm-brand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    color: #fff;
}
.etsm-logo-image {
    max-width: 180px;
}
.etsm-brand-row h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 4.5vw, 4.3rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}
.etsm-brand-row p {
    margin: 0 0 18px;
    color: rgba(255,255,255,.82);
    max-width: 54ch;
    font-size: clamp(1rem, 1.3vw, 1.12rem);
}
.etsm-button,
.etsm-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--etv-accent), #8cecff);
    color: #06111f;
    font-weight: 800;
    box-shadow: 0 18px 45px rgba(0,212,255,.24);
}
.etsm-button:hover,
.etsm-card-link:hover {
    color: #06111f;
    transform: translateY(-1px);
}

.etsm-section-head {
    margin-bottom: 24px;
}
.etsm-section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1;
    letter-spacing: -0.04em;
}
.etsm-section-head p {
    margin: 0;
    color: var(--etv-muted);
    max-width: 70ch;
    font-size: 1.05rem;
}

.etsm-grid {
    display: grid;
    gap: 22px;
}
.etsm-services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.etsm-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.etsm-card,
.etsm-gallery-card,
.etsm-contact-card,
.hero-stat,
.etv-feature-card,
.wp-block-group.is-style-etv-card {
    background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,255,1));
    border: 1px solid var(--etv-border);
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(15,23,42,.08);
}
.etsm-card {
    padding: 28px;
    transition: .25s ease;
}
.etsm-card:hover,
.etsm-gallery-card:hover,
.etv-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 55px rgba(15,23,42,.12);
}
.etsm-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(57,35,214,.12), rgba(0,212,255,.14));
    color: var(--etv-primary);
    font-size: 28px;
}
.etsm-card h3,
.etsm-gallery-card h3 {
    margin: 0 0 8px;
    font-size: 1.55rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.etsm-card-text,
.etsm-card-text p,
.etsm-gallery-body p,
.etsm-faq-answer,
.etv-muted {
    color: var(--etv-muted);
}
.etsm-card-link {
    margin-top: 12px;
}

.etsm-gallery-card {
    overflow: hidden;
}
.etsm-gallery-image {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(57,35,214,.10), rgba(0,212,255,.12));
}
.etsm-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.etsm-gallery-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--etv-muted);
    font-weight: 700;
}
.etsm-gallery-body {
    padding: 24px;
}
.etsm-subtitle {
    font-weight: 700;
    color: var(--etv-primary);
    margin-bottom: 8px;
}

.etsm-faq-list {
    display: grid;
    gap: 14px;
}
.etsm-faq-item {
    background: #fff;
    border-radius: 22px;
    border: 1px solid var(--etv-border);
    box-shadow: 0 14px 34px rgba(15,23,42,.06);
    padding: 0 22px;
}
.etsm-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 22px 8px;
    font-weight: 800;
    font-size: 1.08rem;
}
.etsm-faq-item summary::-webkit-details-marker { display: none; }
.etsm-faq-answer {
    padding: 0 8px 20px;
}

.etsm-contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.etsm-contact-card {
    padding: 24px;
}
.etsm-contact-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--etv-muted);
}
.etsm-social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.etsm-social-row a {
    display: inline-flex;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--etv-border);
    color: var(--etv-text);
}

.etv-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.etv-feature-card { padding: 28px; }
.etv-feature-card h3 { margin: 0 0 10px; }
.etv-feature-card p { margin: 0; color: var(--etv-muted); }
.etv-eyebrow {
    display: inline-flex;
    padding: 8px 14px;
    margin-bottom: 16px;
    background: var(--etv-surface-2);
    color: var(--etv-primary);
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
}

.site-footer {
    margin-top: auto;
    background: linear-gradient(180deg, #0c1324 0%, #08101d 100%);
    color: rgba(255,255,255,.78);
    padding: 44px 0 28px;
}
.site-footer a { color: rgba(255,255,255,.86); }
.footer-inner {
    width: min(calc(100% - 32px), var(--etv-container));
    margin: 0 auto;
    display: grid;
    gap: 22px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 24px;
}
.footer-title {
    color: #fff;
    margin: 0 0 10px;
    font-size: 1.2rem;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 1080px) {
    .hero-inner,
    .site-branding-row {
        grid-template-columns: 1fr;
        flex-wrap: wrap;
    }
    .main-navigation {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .etsm-services-grid,
    .etsm-gallery-grid,
    .etv-feature-grid,
    .etsm-contact-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .main-navigation button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: 0 16px;
        border: 1px solid var(--etv-border);
        border-radius: 999px;
        background: #fff;
        font-weight: 700;
    }
    .main-navigation ul {
        width: 100%;
        display: none;
        padding-top: 10px;
        flex-direction: column;
        align-items: stretch;
    }
    .main-navigation.toggled ul { display: flex; }
    .main-navigation a { width: 100%; justify-content: center; }
    .etv-header-cta { width: 100%; justify-content: center; }
    .hero-inner { padding: 48px 24px; }
    .hero-shell,
    .etsm-hero { border-radius: 24px; }
    .etsm-hero-badge { margin-left: 24px; }
    .etsm-hero-content { padding: 22px 24px 32px; }
    .etsm-services-grid,
    .etsm-gallery-grid,
    .etv-feature-grid,
    .etsm-contact-grid,
    .footer-grid,
    .hero-side {
        grid-template-columns: 1fr;
    }
    .hero-title,
    .etsm-brand-row h1,
    .entry-title {
        word-break: break-word;
    }
}
