/*
Theme Name:   Astra Child — The Kwon Dark
Theme URI:    https://www.wingchunpadova.it
Description:  Child theme di Astra con dark theme per The Kwon - Scuola di Wing Chun Kung Fu
Author:       Sifu Fabio Nunziante
Template:     astra
Version:      1.5.5
*/

/* ===== THE KWON — DARK THEME ===== */

/* Base */
body, html {
  background: #000 !important;
  color: #fff !important;
  font-family: Tahoma, Arial, sans-serif !important;
  font-size: 16px;
  line-height: 1.75;
}

a { color: #00d7f7; }
a:hover { color: #fff; text-decoration: none; }

/* Header */
.site-header, #masthead,
.ast-primary-header-bar,
.main-header-bar,
.ast-desktop-header-content,
.ast-header-sections,
.ast-header-wrap {
  background: #000000 !important;
  border-bottom: 2px solid #C00000 !important;
}
.main-header-bar {
  min-height: 80px !important;
  padding: 0 20px !important;
}

/* Logo principale (The Kwon) — v1.2: più grande del logo maestro */
.custom-logo {
  max-height: 130px !important;
  width: auto !important;
  display: block !important;
  flex-shrink: 0 !important;
}

/* Logo Il Centro — dopo la scritta del titolo */
.ast-site-title-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.ast-site-title-wrap::after {
  content: "" !important;
  display: inline-block !important;
  width: 42px !important;
  height: 42px !important;
  background: url('https://www.wingchunpadova.it/wp-content/uploads/2026/06/Logo-Il-centro_tr.gif') center/contain no-repeat !important;
  opacity: 0.85 !important;
  flex-shrink: 0 !important;
}

/* Logo / Titolo sito */
.site-title a, .ast-site-name-wrap a {
  color: #fff !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
}
.site-description, .ast-site-description {
  color: rgba(255,255,255,0.75) !important;
  font-size: 12px !important;
}

/* Navigation desktop */
.ast-nav-menu > li > a,
.main-navigation a {
  color: #fff !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-size: 13px !important;
}
.ast-nav-menu > li > a:hover,
.main-navigation a:hover {
  color: #00d7f7 !important;
  background: rgba(0,0,0,0.2) !important;
}

/* Dropdown menu */
.ast-nav-menu .sub-menu,
.main-navigation .sub-menu {
  background: #800000 !important;
  border: 1px solid #C00000 !important;
  border-top: none !important;
}
.ast-nav-menu .sub-menu a { color: #fff !important; border-bottom: 1px solid rgba(255,255,255,0.1) !important; }
.ast-nav-menu .sub-menu a:hover { color: #00d7f7 !important; background: rgba(0,0,0,0.3) !important; }

/* Mobile menu */
.ast-mobile-popup-wrapper,
.ast-mobile-menu-buttons { background: #111 !important; }
.ast-mobile-popup-wrapper a { color: #fff !important; }
.ast-mobile-popup-wrapper a:hover { color: #00d7f7 !important; }

/* ===== CONTENT AREA — SPAZIATURE MIGLIORATE ===== */
.site-content, #content, #primary,
.ast-container { background: #000 !important; }
.entry-content, .page-content {
  color: #fff !important;
  font-size: 16px;
  line-height: 1.8;
}

/* Spaziatura paragrafi */
.entry-content p,
.page-content p {
  margin-bottom: 1.25em;
  margin-top: 0;
}

/* Spaziatura headings */
.entry-content h2,
.page-content h2 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a0000;
}
.entry-content h3,
.page-content h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: 1.2em;
  letter-spacing: 0.5px;
}

/* Headings */
h1, h2, h3 { color: #C00000 !important; }
h4, h5, h6 { color: #00d7f7 !important; }
.entry-title, .page-title { color: #C00000 !important; }
.entry-title a { color: #C00000 !important; }
.entry-title a:hover { color: #00d7f7 !important; }

/* ===== IMMAGINI — GESTIONE FLOAT MIGLIORATA ===== */

/* Immagini float-right: max 40% su desktop, piena larghezza su mobile */
.wp-block-image.alignright {
  float: right;
  max-width: 40% !important;
  margin: 0 0 20px 28px !important;
}
.wp-block-image.alignleft {
  float: left;
  max-width: 40% !important;
  margin: 0 28px 20px 0 !important;
}
.wp-block-image.aligncenter {
  text-align: center;
  clear: both;
  margin: 24px auto !important;
}

/* Clearfix dopo colonne con float */
.entry-content .wp-block-columns,
.entry-content .wp-block-group {
  clear: both;
}

/* Figcaption */
figcaption, .wp-element-caption {
  color: #888 !important;
  font-size: 0.82em !important;
  font-style: italic !important;
  text-align: center !important;
  margin-top: 6px !important;
  line-height: 1.4 !important;
}

/* Griglia foto istruttori — regola generica */
.wp-block-columns .wp-block-image img {
  max-height: 320px;
  width: auto;
  object-fit: cover;
}

/* Mobile: reset float */
@media (max-width: 600px) {
  .wp-block-image.alignright,
  .wp-block-image.alignleft {
    float: none !important;
    max-width: 100% !important;
    margin: 16px auto !important;
    text-align: center;
  }
}

/* ===== STAFF TECNICO — CARD GRID UNIFORME (v1.4.0) ===== */
.staff-tecnico-grid {
  gap: 24px !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;      /* v1.5.3: forza le 3 card su una sola riga */
}
.staff-tecnico-grid .wp-block-column {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  background: #0d0d0d;
  flex: 1 1 0% !important;           /* v1.5.3: colonne equi-larghe, non wrap */
  min-width: 0 !important;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  padding: 16px 12px 12px;
}
.staff-tecnico-grid .wp-block-image {
  width: 100% !important;
  margin: 0 0 12px 0 !important;
  text-align: center !important;
}
.staff-tecnico-grid .wp-block-image img {
  width: 100% !important;
  height: 300px !important;
  max-height: 300px !important;
  object-fit: cover !important;
  object-position: top center !important;
  border-radius: 2px;
}
.staff-tecnico-grid figcaption,
.staff-tecnico-grid .wp-element-caption {
  font-size: 0.88em !important;
  font-style: normal !important;
  color: #bbb !important;
  text-align: center !important;
  line-height: 1.5 !important;
  margin-top: 8px !important;
}
/* Mobile: colonne staff impilate a piena larghezza */
@media (max-width: 768px) {
  .staff-tecnico-grid {
    flex-direction: column !important;
  }
  .staff-tecnico-grid .wp-block-column {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto 24px !important;
  }
}

/* ===== SIDEBAR ===== */
.widget {
  background: #111 !important;
  border: 1px solid #C00000 !important;
  padding: 15px !important;
  margin-bottom: 20px !important;
}
.widget-title { color: #00d7f7 !important; }

/* ===== FOOTER ===== */
.site-footer, #colophon,
.ast-footer-area,
.footer-widget-area {
  background: #111 !important;
  color: #888 !important;
  border-top: 2px solid #C00000 !important;
  padding: 20px 0 !important;
}
.site-footer a { color: #00d7f7 !important; }
.ast-footer-copyright {
  color: #666 !important;
  font-size: 0.85em !important;
  line-height: 1.8 !important;
}

/* Footer "Powered by Studio-IT Srls" */
.thekwon-footer-studioit {
  display: block;
  text-align: center;
  font-size: 0.78em;
  color: #555 !important;
  margin-top: 6px;
  letter-spacing: 0.5px;
}
.thekwon-footer-studioit a {
  color: #666 !important;
  text-decoration: none;
}
.thekwon-footer-studioit a:hover {
  color: #888 !important;
}

/* ===== BUTTONS ===== */
.wp-block-button__link,
.ast-button, .button,
input[type="submit"],
.wpcf7-submit {
  background: #C00000 !important;
  color: #fff !important;
  border: none !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  padding: 10px 25px !important;
  cursor: pointer !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}
.wp-block-button__link:hover,
.button:hover,
input[type="submit"]:hover,
.wpcf7-submit:hover {
  background: #00d7f7 !important;
  color: #000 !important;
}

/* ===== FORMS ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea, select {
  background: #111 !important;
  border: 1px solid #333 !important;
  color: #fff !important;
  padding: 8px 12px !important;
}
input:focus, textarea:focus {
  border-color: #C00000 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(192,0,0,0.3) !important;
}

/* ===== BLOCKQUOTE ===== */
blockquote {
  border-left: 4px solid #C00000 !important;
  background: #111 !important;
  padding: 18px 24px !important;
  color: rgba(255,255,255,0.9) !important;
  font-style: italic !important;
  margin: 24px 0 !important;
  border-radius: 0 4px 4px 0;
}
blockquote p { margin: 0 !important; }

/* ===== SEPARATORI ===== */
hr { border-color: #C00000 !important; border-style: solid !important; margin: 2em 0 !important; }

/* ===== LISTE ===== */
ul li::marker { color: #C00000; }
ol li::marker { color: #C00000; }
.entry-content ul,
.entry-content ol {
  padding-left: 1.8em;
  margin-bottom: 1.2em;
}
.entry-content li { margin-bottom: 0.4em; }

/* ===== BREADCRUMBS ===== */
.ast-breadcrumbs, .breadcrumb,
.ast-breadcrumbs-wrapper { color: #666 !important; }
.ast-breadcrumbs a { color: #888 !important; }

/* ===== POST META ===== */
.ast-post-meta-wrap, .posted-on, .byline,
.cat-links, .entry-meta { color: #666 !important; }
.ast-post-meta-wrap a, .entry-meta a { color: #888 !important; }
.ast-post-meta-wrap a:hover { color: #00d7f7 !important; }

/* ===== ARTICLES / POST CARDS ===== */
article, .ast-article-post {
  background: #0a0a0a !important;
  border-bottom: 1px solid #1a1a1a !important;
}

/* ===== IMMAGINI GENERALI ===== */
img { max-width: 100%; height: auto; }

/* ===== SELEZIONE TESTO ===== */
::selection { background: #C00000; color: #fff; }

/* ===== SCROLLBAR (Chrome/Edge) ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #C00000; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a00000; }

/* ===== TABELLE ===== */
table { border-collapse: collapse; width: 100%; }
th { background: #C00000 !important; color: #fff !important; padding: 10px; }
td { background: #111 !important; color: #fff !important; border: 1px solid #333 !important; padding: 8px; }
tr:nth-child(even) td { background: #1a1a1a !important; }

/* ===== CODICE ===== */
code, pre { background: #111 !important; color: #00d7f7 !important; border: 1px solid #333 !important; }

/* ===== PAGINATION ===== */
.ast-pagination .page-numbers {
  background: #111 !important;
  color: #fff !important;
  border: 1px solid #333 !important;
}
.ast-pagination .page-numbers.current,
.ast-pagination .page-numbers:hover {
  background: #C00000 !important;
  color: #fff !important;
}

/* ===== INFO BOX (riutilizzabile) ===== */
.thekwon-infobox {
  background: #111;
  border: 1px solid #C00000;
  border-left: 4px solid #C00000;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}
.thekwon-infobox p { margin: 0 !important; }

/* ===== HEADER A DUE RIGHE — DESKTOP (v1.5.0) ===== */
/* Solo desktop >= 921px (sotto questa soglia Astra usa hamburger/mobile) */
/* NB: la riga header di Astra Header Builder e' display:GRID (non flex): il fix
   v1.3.0 con flex-direction:column era inefficace. Qui forziamo la griglia a
   COLONNA SINGOLA cosi' le due sezioni (loghi/titolo sopra, menu sotto) si impilano. */
@media (min-width: 921px) {

  /* Rimuovi min-height fisso: con due righe l'header cresce in base al contenuto */
  .main-header-bar {
    min-height: unset !important;
    padding: 0 !important;
  }

  /* Il builder grid da 2 colonne (loghi | menu) diventa 1 colonna su 2 righe */
  .ast-primary-header-bar .ast-builder-grid-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    justify-items: center !important;
    row-gap: 0 !important;
  }

  /* RIGA 1: loghi + titolo — larghezza piena, contenuto centrato */
  .ast-primary-header-bar .site-header-primary-section-left {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    padding: 10px 24px !important;
    border-bottom: 1px solid rgba(192,0,0,0.4) !important;
  }

  /* RIGA 2: navigazione — larghezza piena, contenuto centrato */
  .ast-primary-header-bar .site-header-primary-section-right {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  /* Allineamento interno menu: centra gli item nella riga 2 */
  .ast-primary-header-bar .ast-builder-menu-1 {
    width: 100% !important;
    justify-content: center !important;
    flex-grow: 0 !important;
  }
  .ast-primary-header-bar .ast-main-header-bar-alignment,
  .ast-primary-header-bar .main-header-bar-navigation {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .ast-primary-header-bar .main-navigation.ast-inline-flex {
    justify-content: center !important;
    width: 100% !important;
  }
  .ast-primary-header-bar .ast-nav-menu {
    justify-content: center !important;
  }

  /* I dropdown restano posizionati in assoluto rispetto al loro genitore */
  .ast-primary-header-bar .ast-nav-menu .sub-menu {
    position: absolute !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-title a { font-size: 20px !important; }
  h1 { font-size: 1.8em !important; }
  h2 { font-size: 1.4em !important; }
  .entry-content, .page-content { font-size: 15px; }
}

/* ===== HOME — nascondi titolo pagina h1 (v1.5.1) ===== */
/* Il titolo .entry-title "The Kwon — Scuola di Wing Chun Kung Fu" compare
   solo nella home come heading della pagina; nelle altre pagine resta visibile.
   La classe .home sulla <body> e' presente solo sull'archivio/home WP. */
.home .entry-title {
  display: none !important;
}

/* ===== TABLET TOUCH — submenu al tap (v1.5.2) ===== */
/* Su ast-desktop (>= 921px) con touch: la classe .thekwon-sub-open
   aggiunta da touch-submenu.js rende visibile il submenu.
   Astra lo nasconde con visibility:hidden + left:-15984px — entrambi resettati.
   Il desktop con mouse reale non viene toccato (JS non si attiva su hover:hover). */
.ast-desktop .main-header-menu .menu-item-has-children.thekwon-sub-open > .sub-menu {
  visibility: visible !important;
  left: 0 !important;
  pointer-events: auto !important;
}

/* v1.5.3 — Foto Sifu Fabio (ID 207): object-position bottom perché il soggetto
   è in basso nell'inquadratura (object-position:top mostrava il soffitto) */
.staff-tecnico-grid .wp-image-207 {
  object-position: center bottom !important;
}

/* ===== CONTATTI — layout info + mappa Google (v1.5.4) ===== */
.thekwon-contatti-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: stretch;
  margin-top: 10px;
}
.thekwon-contatti-info { flex: 1 1 320px; min-width: 0; }
.thekwon-contatti-map  { flex: 1 1 360px; min-width: 0; }
.thekwon-contatti-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 8px;
  display: block;
}
@media (max-width: 768px) {
  .thekwon-contatti-wrap { flex-direction: column; gap: 20px; }
  .thekwon-contatti-map iframe { min-height: 260px; }
}

/* ===== CALENDARIO — embed Google Calendar responsive (v1.5.4) ===== */
.thekwon-calendar {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 20px auto 0;
}
.thekwon-calendar iframe {
  width: 100%;
  height: 600px;
  border: 0;
  border-radius: 8px;
  display: block;
}
@media (max-width: 768px) {
  .thekwon-calendar iframe { height: 480px; }
}


/* ===== AREA RISERVATA — login tematizzato + hub (v1.5.5) ===== */
.thekwon-login {
  max-width: 440px;
  margin: 2rem auto;
  padding: 2rem 1.8rem;
  background: #111;
  border: 1px solid rgba(192,0,0,0.4);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.thekwon-login-title {
  color: #00d7f7;
  text-align: center;
  margin: 0 0 .4rem;
  letter-spacing: .04em;
}
.thekwon-login-intro {
  color: #cfcfcf;
  text-align: center;
  font-size: .92rem;
  margin: 0 0 1.4rem;
}
.thekwon-login-error {
  background: rgba(192,0,0,0.15);
  border: 1px solid #C00000;
  color: #ff8a8a;
  padding: .6rem .8rem;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 1rem;
}
.thekwon-login .login-username,
.thekwon-login .login-password { margin-bottom: 1rem; }
.thekwon-login label {
  display: block;
  color: #eaeaea;
  font-size: .85rem;
  margin-bottom: .35rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.thekwon-login input[type=text],
.thekwon-login input[type=password] {
  width: 100%;
  padding: .7rem .8rem;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
}
.thekwon-login input[type=text]:focus,
.thekwon-login input[type=password]:focus {
  outline: none;
  border-color: #00d7f7;
  box-shadow: 0 0 0 2px rgba(0,215,247,0.25);
}
.thekwon-login .login-remember { color: #bbb; font-size: .85rem; margin-bottom: 1rem; }
.thekwon-login .login-remember input { margin-right: .4rem; }
.thekwon-login .login-submit input[type=submit],
.thekwon-login #wp-submit {
  width: 100%;
  padding: .8rem;
  background: #C00000;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.thekwon-login .login-submit input[type=submit]:hover,
.thekwon-login #wp-submit:hover { background: #ff1a1a; }
.thekwon-login .login-lost-password,
.thekwon-login #nav { text-align: center; margin-top: 1rem; font-size: .85rem; }
.thekwon-login a { color: #00d7f7; }

/* Hub area riservata (utente loggato) */
.thekwon-area-hub { max-width: 900px; margin: 1.5rem auto; }
.thekwon-area-welcome {
  text-align: center;
  color: #eaeaea;
  font-size: 1.05rem;
  margin-bottom: 1.6rem;
}
.thekwon-area-welcome strong { color: #00d7f7; }
.thekwon-logout {
  display: inline-block;
  margin-left: .6rem;
  padding: .25rem .7rem;
  background: #C00000;
  color: #fff !important;
  border-radius: 5px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
}
.thekwon-logout:hover { background: #ff1a1a; }
.thekwon-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.thekwon-area-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 1rem;
  text-align: center;
  background: #141414;
  border: 1px solid rgba(192,0,0,0.4);
  border-radius: 10px;
  color: #fff !important;
  text-decoration: none;
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.thekwon-area-card:hover {
  transform: translateY(-3px);
  border-color: #00d7f7;
  box-shadow: 0 6px 20px rgba(0,215,247,0.15);
}
.thekwon-area-card-title { font-weight: 700; letter-spacing: .03em; }

/* Pagine per forma — slot video */
.thekwon-form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(192,0,0,0.3);
}
.thekwon-form-nav a {
  color: #00d7f7;
  text-decoration: none;
  font-size: .9rem;
}
.thekwon-form-nav .thekwon-logout { color: #fff !important; }
.thekwon-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
  margin: 1.5rem 0;
}
.thekwon-video-slot {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
}
.thekwon-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 24 24" fill="none" stroke="%23444" stroke-width="1.5"><circle cx="12" cy="12" r="10"/><polygon points="10,8 16,12 10,16" fill="%23444" stroke="none"/></svg>') center/64px no-repeat;
  display: flex;
  align-items: flex-end;
}
.thekwon-video-frame iframe,
.thekwon-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.thekwon-video-soon {
  width: 100%;
  text-align: center;
  color: #777;
  font-size: .8rem;
  padding: .4rem;
  background: rgba(0,0,0,0.55);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.thekwon-video-caption {
  padding: .8rem 1rem;
  color: #eaeaea;
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.35;
  border-top: 2px solid #C00000;
}
