/*
Theme Name: Astra Child
Theme URI: https://skadoosh.it
Description: Child theme di Astra per skadoosh.it — ricostruito dopo l'incidente di sicurezza del 18/08/2026
Author: Amedeo Ioele
Template: astra
Version: 1.0.0
*/

/* ── Pulsanti verdi ── */
.wp-block-button__link {
  background-color: #2e7d32 !important;
  border-color: #2e7d32 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
}
.wp-block-button__link:hover {
  background-color: #1b5e20 !important;
  border-color: #1b5e20 !important;
}

/* ── Menu ── */
.main-header-menu .menu-item > a {
  color: #ffffff !important;
}
.main-header-menu .menu-item > a:hover {
  color: #2e7d32 !important;
}

/* ── Titoli ── */
h3, h4 { color: #c62828 !important; }
.wp-block-heading { color: #c62828; }

/* ── Citazione Oogway ── */
.oogway-quote {
  background: #1a1a1a;
  color: #ffffff;
  padding: 3rem 2rem;
  text-align: center;
  font-style: italic;
  font-size: 1.2rem;
  border-left: 4px solid #2e7d32;
}
.oogway-quote cite {
  display: block;
  margin-top: 1rem;
  color: #2e7d32;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ── Variabili Astra override ── */
:root {
  --ast-global-color-0: #2e7d32;
  --ast-global-color-1: #1b5e20;
  --ast-global-color-2: #1a1a1a;
  --ast-global-color-3: #2D3240;
  --ast-global-color-4: #f5f5f5;
  --ast-global-color-7: #1a1a1a;
}

/* ── Footer ──
   Astra 4.13 (Header/Footer Builder) usa .site-below-footer-wrap, non
   .ast-footer-below-section (classe di versioni precedenti di Astra —
   la vecchia regola non matchava più nulla sul markup attuale). */
#colophon, .site-footer {
  background: #1a1a1a !important;
  padding: 1.5rem 0 !important;
  margin-top: 32px !important;
}
.ast-footer-overlay {
  display: none !important;
}
.site-below-footer-wrap {
  background: #1a1a1a !important;
  padding: 1rem 0 !important;
  text-align: center !important;
}
.site-below-footer-wrap *,
.ast-footer-copyright,
.ast-footer-copyright * {
  color: #888888 !important;
  font-size: 0.85rem !important;
}

/* ── Hero sfondo nero ──
   Selettore per data-spectra-id: valido solo sul sito originale (ID
   generati automaticamente da Spectra, diversi ad ogni ricostruzione).
   .sk-hero-bg è il selettore stabile da usare nella ricostruzione
   post-incidente — assegnare questa classe CSS al blocco Group dell'hero
   dal pannello Avanzate di Spectra. */
[data-spectra-id="005ae473"],
.sk-hero-bg {
  --spectra-background-color: #1a1a1a !important;
  background-color: #1a1a1a !important;
}
[data-spectra-id="005ae473"] > .spectra-overlay-color,
.sk-hero-bg > .spectra-overlay-color {
  background-color: #1a1a1a !important;
  opacity: 1 !important;
}
[data-spectra-id="005ae473"]::before,
.sk-hero-bg::before {
  background-color: #1a1a1a !important;
}

/* ── homelab tech domotica font normale ──
   Stesso discorso: .sk-eyebrow è il selettore stabile da usare ora,
   da assegnare al blocco heading "homelab · tech · domotica". */
[data-spectra-id="spectra-b7e374d1-prefix"] *,
.sk-eyebrow * {
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
}

/* ── Logo colori originali ── */
.site-logo img,
.custom-logo,
.ast-site-identity img {
  filter: none !important;
  -webkit-filter: none !important;
}

/* ── Dimensione logo — come nel mockup di riferimento (40px) ──
   Il file caricato è 240x240 (retina); senza vincoli veniva mostrato
   al formato pieno, enorme rispetto al resto dell'header. */
.custom-logo {
  width: 40px !important;
  height: 40px !important;
}

/* ── Header layout orizzontale compatto ── */
.ast-site-identity {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
}
.ast-site-identity .custom-logo-link {
  display: flex !important;
  align-items: center !important;
}
.site-title {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #2e7d32 !important;
  margin: 0 !important;
}
.site-title a {
  color: #2e7d32 !important;
}
.site-title a:hover {
  color: #ffffff !important;
}
/* Cursore lampeggiante aggiunto via JS accanto al titolo (vedi functions.php) */
.sk-header-cursor {
  display: inline-block;
  animation: sk-header-blink 1s step-end infinite;
}
@keyframes sk-header-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Altezza header — come nel mockup di riferimento (~84px) ──
   Astra forza un min-height di 80px su .ast-primary-header-bar (e sul
   suo wrapper interno), a cui si sommava altro padding: risultato più
   alto del mockup. Si fissa qui l'altezza dell'intera riga, non solo
   il padding. */
.ast-primary-header-bar,
.ast-primary-header-bar .site-primary-header-wrap {
  min-height: 84px !important;
}
.main-header-bar {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ── Header a tutta larghezza ──
   .ast-container dentro l'header eredita il max-width del contenuto
   (1240px, centrato): per questo logo+menu apparivano al centro invece
   che agli estremi della pagina come nel mockup. Qui si allarga solo il
   contenitore dell'header, non quello dei contenuti. */
.site-header .ast-container {
  max-width: 100% !important;
  padding-left: 48px !important;
  padding-right: 48px !important;
}
.site-header .ast-builder-grid-row {
  align-items: center !important;
}
@media (max-width: 544px) {
  .site-header .ast-container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ── Sfondo header scuro ──
   Astra di base renderizza l'header con sfondo chiaro: il testo bianco del
   menu/site-title (impostato sopra) su quello sfondo era illeggibile. Invece
   di affidarsi alla feature "Transparent Header" di Astra (più fragile, va
   configurata da Personalizza), si forza qui uno sfondo scuro pieno — stesso
   risultato visivo, nessuna dipendenza dal Customizer. */
.site-header,
.ast-main-header-wrap,
#ast-desktop-header,
#ast-mobile-header,
.ast-primary-header-bar,
.main-header-bar,
.ast-primary-header {
  background-color: #1a1a1a !important;
}

/* ── Hero — ricostruzione post-incidente (25/08/2026) ──
   Layout centrato sul contenitore .sk-hero-bg, così non dipende dalle
   impostazioni di altezza/allineamento del blocco Spectra. */
.sk-hero-bg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 88px 24px 100px !important;
  gap: 8px;
}
.sk-hero-bg p.sk-eyebrow {
  color: #2e7d32 !important;
  font-size: 13px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
}
.sk-hero-bg h1 {
  color: #ffffff !important;
  font-size: 84px !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  margin: 0.3em 0 !important;
}
@media (max-width: 700px) {
  .sk-hero-bg h1 {
    font-size: 44px !important;
  }
}
.sk-hero-bg p {
  color: #b8b8b8 !important;
  font-size: 19px !important;
  max-width: 540px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ── Typewriter ~/skadoosh.it ── */
.sk-typewriter {
  font-family: 'JetBrains Mono', monospace;
  color: #2e7d32;
  font-size: 1rem;
  margin-top: 1.5rem;
}
.sk-tw-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: sk-tw-blink 1s step-end infinite;
}
@keyframes sk-tw-blink {
  50% { opacity: 0; }
}

/* ── sk-soon — sezione "Prossimamente" homepage (TASK-01) ── */
.sk-soon-wrap {
  background: #1a1a1a;
  padding: 80px 48px;
  font-family: 'Outfit', sans-serif;
  position: relative;
  overflow: hidden;
}
.sk-soon-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(46,125,50,0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.sk-soon-head {
  text-align: center;
  margin-bottom: 56px;
  position: relative;
}
.sk-soon-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: #2e7d32;
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}
.sk-soon-h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: #f5f5f5;
  margin: 0;
  line-height: 1.2;
}
.sk-soon-h2 em {
  font-style: normal;
  font-weight: 300;
  color: #555555;
}
.sk-soon-rule {
  width: 40px;
  height: 2px;
  background: #2e7d32;
  margin: 18px auto 0;
}
.sk-soon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}
.sk-soon-card {
  background: #111111;
  border: 1px solid #252525;
  border-radius: 3px;
  padding: 40px 36px 36px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.sk-soon-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 2px;
  background: #2e7d32;
  transition: width 0.4s ease;
}
.sk-soon-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 36px;
  background: #2e7d32;
  transition: height 0.4s ease;
}
.sk-soon-card:hover {
  border-color: rgba(46,125,50,0.35);
  box-shadow: 0 0 40px rgba(46,125,50,0.07);
}
.sk-soon-card:hover::before { width: 72px; }
.sk-soon-card:hover::after  { height: 72px; }
.sk-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: #555555;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 4px 10px 4px 8px;
  margin-bottom: 32px;
  text-transform: uppercase;
}
.sk-soon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c62828;
  display: inline-block;
  animation: sk-pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes sk-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.7); }
}
.sk-soon-icon {
  display: block;
  margin-bottom: 18px;
  line-height: 1;
}
.sk-soon-icon svg {
  width: 28px;
  height: 28px;
  stroke: #2e7d32;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sk-soon-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #f0f0f0;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.sk-soon-desc {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: #666666;
  line-height: 1.7;
  margin: 0 0 30px;
}
.sk-soon-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #2e7d32;
  opacity: 0.6;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}
.sk-soon-card:hover .sk-soon-url { opacity: 1; }
.sk-soon-url-arrow { color: #444444; }

@media (max-width: 620px) {
  .sk-soon-wrap { padding: 56px 20px; }
  .sk-soon-grid { grid-template-columns: 1fr; }
  .sk-soon-h2 { font-size: 1.4rem; }
  .sk-soon-card { padding: 32px 24px 28px; }
}

/* ── sk-note — callout "cosa non comprare" / promemoria negli articoli ── */
.sk-note {
  background: #fdf5f0;
  border-left: 4px solid #c62828;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.sk-note p { margin: 0; color: #3a3a3a; }
.sk-note-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c62828;
  margin-bottom: 0.4rem;
}

/* ── sk-post-intro — paragrafo di apertura enfatizzato ── */
.sk-post-intro {
  font-size: 1.15rem;
  color: #333333;
  line-height: 1.7;
}

/* ── sk-series-box — box indice della serie di articoli ── */
.sk-series-box {
  background: #f5f5f5;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}
.sk-series-box h3 { margin-top: 0; }
.sk-series-box ul { margin-bottom: 0; }
.sk-series-box li strong { color: #2e7d32; }

/* ── tabelle articolo ── */
.entry-content .wp-block-table table thead th {
  background: #1a1a1a;
  color: #ffffff;
}
.entry-content .wp-block-table table td,
.entry-content .wp-block-table table th {
  padding: 0.6rem 0.9rem;
}

/* ── sezione card categorie in home ── */
.sk-cards-wrap {
  background: #f5f5f5;
  padding: 64px 24px;
}
.sk-cards-head {
  text-align: center;
  margin-bottom: 40px;
}
.sk-cards-head h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: #1a1a1a;
}
.sk-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.sk-cat-card {
  background: #ffffff;
  border-radius: 6px;
  border-top: 3px solid #2e7d32;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sk-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.sk-cat-card h3 {
  font-family: 'Outfit', sans-serif;
  color: #1a1a1a !important;
  margin: 0 0 10px;
}
.sk-cat-card p {
  color: #555555;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.sk-cat-card a.sk-cat-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #2e7d32;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.sk-cat-card a.sk-cat-link:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .sk-cards-grid { grid-template-columns: 1fr; }
}
