/*
Theme Name: Blocksy Child
Theme URI: https://robertogai.it/
Description: Child theme for Blocksy (RobertoGai.it)
Author: Creative Themes
Author URI: https://creativethemes.com/
Template: blocksy
Text Domain: blocksy
Version: 1.0.3
*/

/* ==========================================================================
   Blocksy Child – Custom CSS
   ========================================================================== */

/* (opzionale) Piccolo reset per coerenza */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==========================================================================
   TUO CSS (puoi incollare qui sotto)
   ========================================================================== */

/* Riga colonne: tutte alla stessa altezza */
.rg-media-cards-grid .wp-block-columns {
  display: flex;
  align-items: stretch;
  margin-bottom: 22px;
}

/* Ogni colonna si estende */
.rg-media-cards-grid .wp-block-column {
  display: flex;
  flex-direction: column;
}

/* Card: struttura base */
.rg-media-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  padding: 18px 18px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Nome */
.rg-media-card__name {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

/* Avatar */
.rg-media-card__avatar img {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

/* Ruolo */
.rg-media-card__role {
  margin: 14px 0 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.35;
}

/* Testo (riempie lo spazio e uniforma altezza) */
.rg-media-card__text {
  margin: 0;
  line-height: 1.55;
  opacity: 0.92;
  flex: 1;
  width: 100%;
}

/* Mobile */
@media (max-width: 781px) {
  .rg-media-cards-grid .wp-block-columns {
    flex-direction: column;
    margin-bottom: 18px;
  }

  .rg-media-card {
    padding: 16px 16px 14px;
  }

  .rg-media-card__avatar img {
    width: 112px;
    height: 112px;
  }
}

/* =========================================================
   FORM CF7 (con UACF7) — STILE PREMIUM DEFINITIVO
   ========================================================= */

/* --- Layout base: evita stranezze inline/float --- */
.rg-form .wpcf7,
.rg-form .wpcf7 form {
  display: block !important;
  width: 100% !important;
  clear: both !important;
}

/* --- Label pulite --- */
.rg-form .wpcf7 form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  margin: 0 0 6px 0;
  color: #0f2233;
}

/* --- Campi: bordo + sfondo sempre visibili --- */
.rg-form .wpcf7 form input[type="text"],
.rg-form .wpcf7 form input[type="email"],
.rg-form .wpcf7 form input[type="tel"],
.rg-form .wpcf7 form select,
.rg-form .wpcf7 form textarea {
  width: 100% !important;
  background: #ffffff !important;
  border: 1.5px solid #cfd8e3 !important;
  border-radius: 10px !important;
  color: #0b1f2e !important;
  font-size: 15px !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Altezza campi singola riga (risolve select “schiacciati”) */
.rg-form .wpcf7 form input[type="text"],
.rg-form .wpcf7 form input[type="email"],
.rg-form .wpcf7 form input[type="tel"],
.rg-form .wpcf7 form select {
  height: 48px !important;
  line-height: 48px !important;
  padding: 0 14px !important;
}

/* Textarea */
.rg-form .wpcf7 form textarea {
  min-height: 150px !important;
  padding: 12px 14px !important;
  line-height: 1.45 !important;
  resize: vertical;
}

/* Placeholder */
.rg-form .wpcf7 form ::placeholder {
  color: #8a94a3 !important;
  opacity: 1 !important;
}

/* Focus */
.rg-form .wpcf7 form input:focus,
.rg-form .wpcf7 form select:focus,
.rg-form .wpcf7 form textarea:focus {
  border-color: #0b4d6e !important;
  box-shadow: 0 0 0 3px rgba(11,77,110,.15) !important;
}

/* --- Select: freccia visibile + padding per la freccia --- */
.rg-form .wpcf7 form select {
  appearance: auto !important;
  -webkit-appearance: menulist !important;
  -moz-appearance: menulist !important;
  background-image: none !important;
  padding-right: 38px !important;
  cursor: pointer;
}

/* --- Spazi tra righe UACF7 --- */
.rg-form .wpcf7 form .uacf7-row {
  margin-bottom: 16px;
}
.rg-form .wpcf7 form .uacf7-col {
  margin-bottom: 10px;
}

/* =========================================================
   FILE UPLOAD — look pulito + bottone coerente (Chrome/Edge)
   ========================================================= */
.rg-form .wpcf7 form input[type="file"] {
  width: 100%;
  background: #f7fafc !important;
  border: 1.5px dashed #cfd8e3 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  color: #0b1f2e !important;
  cursor: pointer;
}

/* Bottone “Scegli file” (Chromium/WebKit) */
.rg-form .wpcf7 form input[type="file"]::-webkit-file-upload-button {
  border: 0 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  margin-right: 10px !important;
  background: #0b4d6e !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}
.rg-form .wpcf7 form input[type="file"]::-webkit-file-upload-button:hover {
  filter: brightness(1.06);
}

/* =========================================================
   PRIVACY CHECKBOX — allineamento decente
   ========================================================= */
.rg-form .wpcf7 form .wpcf7-acceptance {
  margin-top: 12px;
}

.rg-form .wpcf7 form .wpcf7-acceptance label {
  font-weight: 500;
  font-size: 13px;
  color: #2b3a49;
}

.rg-form .wpcf7 form input[type="checkbox"] {
  transform: translateY(1px);
  margin-right: 8px;
}

/* =========================================================
   SUBMIT CTA — premium + non “affianca” testi
   ========================================================= */
.rg-form .wpcf7 form input[type="submit"] {
  display: block !important;
  width: 100% !important;
  max-width: 520px !important;
  margin: 14px 0 0 0 !important;
  padding: 15px 22px !important;
  border-radius: 12px !important;
  border: none !important;
  background: linear-gradient(180deg, #0b4d6e 0%, #083a54 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  cursor: pointer !important;
  box-shadow: 0 12px 26px rgba(11,77,110,.22) !important;
}
.rg-form .wpcf7 form input[type="submit"]:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 34px rgba(11,77,110,.26) !important;
}

/* =========================================================
   Testo WhatsApp: sempre sotto al form (a capo)
   ========================================================= */
.rg-form .wpcf7 + p {
  display: block !important;
  clear: both !important;
  width: 100% !important;
  margin-top: 16px !important;
}
.rg-form p {
  clear: both !important;
}

/* =========================
   FIX MESSAGGIO CF7 + CTA
   ========================= */

/* Spazio sotto il bottone */
.wpcf7 form .wpcf7-submit {
  margin-bottom: 28px !important;
}

/* Messaggio di conferma */
.wpcf7-response-output {
  margin-top: 20px !important;
  padding: 14px 18px !important;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.4;
  clear: both;
  display: block;
  position: relative;
  z-index: 1;
}

/* Successo */
.wpcf7-mail-sent-ok {
  border: 2px solid #46b450 !important;
  background: #f0fff5 !important;
  color: #1e7e34 !important;
}

/* Errore */
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
  border: 2px solid #dc3232 !important;
  background: #fff4f4 !important;
  color: #7a1c1c !important;
}

/* Evita sovrapposizioni strane */
.wpcf7 form {
  position: relative;
  overflow: visible;
}

/* Acceptance in flex (più leggibile) */
.wpcf7-form .wpcf7-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 15px;
  font-size: 14px;
}

.wpcf7-form .wpcf7-submit {
  margin-top: 12px;
}

/* Mobile */
@media (max-width: 781px) {
  .rg-form .wpcf7 form input[type="submit"] {
    max-width: 100% !important;
  }
}
