/* =========================================================
   HEADER: logo allineato al frame centrale + linea centrata
   (usiamo la linea del tema, non la nostra)
   ========================================================= */

#masthead.site-header{
  /* centra l'header sullo stesso "frame" del contenuto */
  width: 100% !important;
  max-width: var(--responsive--alignwide-width, 1200px) !important;
  margin-left: auto !important;
  margin-right: auto !important;

  /* spaziature come prima */
  padding: 10px 16px !important;
  min-height: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;

  text-align: left !important;

  /* niente linea nostra: resta quella del tema */
  border-bottom: 0 !important;
}

#masthead.site-header > *{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#masthead .site-logo{
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

#masthead .site-logo a,
#masthead .custom-logo-link{
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}

#masthead .site-logo img,
#masthead .custom-logo{
  height: 48px;
  width: auto;
  display: block;
  margin: 0 !important;
}

/* nascondi titolo/descrizione (evita "FLAVIO CAMERLINO" sopra il corpo) */
.site-title,
.site-title a,
.site-description{
  display: none !important;
}

#masthead .site-branding{
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

/* =========================================================
   TAGLINE: attività / competenze sotto l'header
   ========================================================= */
.hero-tagline {
    text-align: center;
    padding: 6px 16px 10px;
    font-size: 12px;
    letter-spacing: 0.3px;
    opacity: 0.65;
    max-width: var(--responsive--alignwide-width, 1200px);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.hero-tagline-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 8px;
}

.hero-tagline-item {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
    font-weight: 300;
    font-size: 12px;
    cursor: pointer;
}

.hero-tagline-item:hover {
    opacity: 0.7;
}

.hero-tagline-sep {
    opacity: 0.25;
    color: #fff;
    font-size: 12px;
}

@media (max-width: 600px) {
    .hero-tagline {
        font-size: 10px;
        padding: 4px 12px 8px;
    }
    .hero-tagline-item {
        font-size: 10px;
    }
    .hero-tagline-sep {
        font-size: 10px;
    }
    .hero-tagline-inner {
        gap: 2px 5px;
    }
}

/* =========================================================
   CARD: popup per i 3 pilastri
   ========================================================= */
.hero-card {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-card.is-visible {
    display: flex;
}

.hero-card-inner {
    max-width: 560px;
    width: 100%;
    max-height: 70vh;
    background: rgba(10, 10, 10, 0.92);
    border-radius: 16px;
    padding: 32px 28px 28px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.hero-card-inner::-webkit-scrollbar {
    width: 4px;
}

.hero-card-inner::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.hero-card-inner h3 {
    font-size: 18px;
    font-weight: 600;
    color: #9bb8db;
    margin: 0 0 14px;
    letter-spacing: 0.3px;
    padding-right: 28px;
}

.hero-card-body {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.92;
    margin: 0;
}

.hero-card-body p {
    margin: 0 0 12px;
}

.hero-card-body p:last-child {
    margin-bottom: 0;
}

.hero-card-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.hero-card-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.05);
}

@media (max-width: 600px) {
    .hero-card-inner {
        padding: 24px 18px 20px;
        max-height: 80vh;
        border-radius: 12px;
    }
    .hero-card-inner h3 {
        font-size: 16px;
    }
    .hero-card-body {
        font-size: 13px;
    }
    .hero-card-close {
        font-size: 20px;
        top: 10px;
        right: 12px;
    }
}
