/*
 * blog-festa-fine-anno-scuola-2026.css
 * Light theme, high-contrast, WCAG AAA readable.
 * Loaded BEFORE animazione-theme.css — uses higher specificity + !important
 * sui selettori critici per vincere sul master theme dove necessario.
 *
 * Tipografia best-practice:
 *   - body font 17-18px, line-height 1.7
 *   - max-width contenuto: 70ch (~ 720px) per leggibilità ottimale
 *   - colore testo body: #1f2937 su bg #ffffff/#F0F9FF → contrasto 13:1 (AAA)
 *   - colore brand verde scuola: #047857 (più scuro di #10b981 per AAA su white)
 */

:root {
    --brand-green: #047857;
    --brand-green-hover: #065f46;
    --brand-green-soft: #d1fae5;
    --brand-gold: #b45309;
    --text-body: #1f2937;
    --text-muted: #4b5563;
    --text-heading: #0f172a;
    --bg-page: #ffffff;
    --bg-soft: #f8fafc;
    --bg-card: #ffffff;
    --border-soft: #e5e7eb;
}

/* Reset minimale + base typography */
body {
    background: #ffffff !important;
    color: var(--text-body) !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Article container — narrow column = leggibilità */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

article {
    padding: 2rem 0 4rem;
}

/* H1: brand verde — alta specificità per battere animazione-theme.css */
body .container article h1,
.container article h1,
article h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.6rem) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem !important;
    color: var(--brand-green) !important;
    background: none !important;
    background-image: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: var(--brand-green) !important;
}

/* H2/H3: alta gerarchia, ampio spazio */
body .container article h2,
.container article h2,
article h2 {
    font-size: clamp(1.4rem, 3vw, 1.7rem) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: var(--text-heading) !important;
    margin: 3rem 0 1rem !important;
    padding-top: 1rem;
    border-top: 2px solid var(--brand-green-soft);
}

body .container article h3,
.container article h3,
article h3 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: var(--text-heading) !important;
    margin: 2rem 0 0.75rem !important;
    line-height: 1.35;
}

/* Body paragraphs: AAA contrast */
body .container article p,
body .container article li,
article p,
article li {
    color: var(--text-body) !important;
    font-size: 1.0625rem;
    line-height: 1.75;
    margin-bottom: 1.1rem;
}

body .container article strong,
article strong {
    color: var(--text-heading) !important;
    font-weight: 700;
}

article ul,
article ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

article li {
    margin-bottom: 0.6rem;
}

/* Links: brand green, visibile, underline su hover */
article a {
    color: var(--brand-green) !important;
    text-decoration: underline;
    text-decoration-color: rgba(4, 120, 87, 0.4);
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

article a:hover {
    color: var(--brand-green-hover) !important;
    text-decoration-color: var(--brand-green);
}

/* Highlight box — sfondo verde soft + bordo brand */
.highlight-box {
    background: var(--brand-green-soft) !important;
    border-left: 4px solid var(--brand-green) !important;
    padding: 1.25rem 1.5rem !important;
    border-radius: 0 12px 12px 0 !important;
    margin: 2rem 0 !important;
}

.highlight-box p {
    color: var(--text-heading) !important;
    margin-bottom: 0 !important;
    font-size: 1rem;
}

.highlight-box p a {
    color: var(--brand-green-hover) !important;
    font-weight: 700;
}

/* Package cards — grid responsive, card chiare */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.package-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 16px !important;
    padding: 1.5rem 1.25rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.package-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.12);
    border-color: var(--brand-green);
}

.package-card.featured {
    border: 2px solid var(--brand-green) !important;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 30%) !important;
}

.package-card.featured::before {
    content: "Il più richiesto";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-green);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 99px;
    white-space: nowrap;
}

.package-card h3 {
    font-size: 1.15rem !important;
    margin: 0 0 0.5rem !important;
    color: var(--text-heading) !important;
}

.package-card .price {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--brand-green) !important;
    margin: 0.25rem 0 1rem;
    line-height: 1;
}

.package-card ul {
    font-size: 0.95rem;
    margin: 0;
    padding-left: 1.2rem;
}

.package-card li {
    color: var(--text-muted) !important;
    margin-bottom: 0.4rem;
}

/* CTA button — verde brand, alto contrasto */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-hover) 100%) !important;
    color: #ffffff !important;
    padding: 0.95rem 1.75rem !important;
    border-radius: 999px;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin: 2rem 0 !important;
    box-shadow: 0 4px 14px rgba(4, 120, 87, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.4);
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Floating WhatsApp button */
.whatsapp-float {
    position: fixed;
    width: 56px;
    height: 56px;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #25d366, #128c7e) !important;
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: transform 0.2s;
}

.whatsapp-float:hover {
    transform: scale(1.08);
}

/* Footer: leggero, distinto */
footer {
    background: var(--bg-soft) !important;
    color: var(--text-muted) !important;
    border-top: 1px solid var(--border-soft) !important;
    padding: 2.5rem 1rem !important;
    margin-top: 4rem;
    text-align: center;
}

footer a {
    color: var(--brand-green) !important;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-green) !important;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    font-size: 14px;
    transition: top 0.2s;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Responsive */
@media (max-width: 640px) {
    body { font-size: 16px; }
    article h1 { font-size: 1.75rem !important; }
    article h2 { font-size: 1.3rem !important; margin-top: 2.25rem !important; }
    article h3 { font-size: 1.1rem !important; }
    .container { padding: 0 18px; }
    .packages-grid { grid-template-columns: 1fr; }
}

/* Print friendly */
@media print {
    body { color: #000 !important; background: #fff !important; font-size: 11pt; }
    .whatsapp-float, .skip-link, footer { display: none; }
    article a { color: #000 !important; text-decoration: underline; }
    article a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
