/* ═══════════════════════════════════════════════
   cerca.css — Stili ricerca globale EITango
   ═══════════════════════════════════════════════ */

/* ═══ BARRA DI RICERCA NELL'HEADER (desktop) ═══ */
/* La fascia header-top ha sfondo bianco → colori scuri */
.header-cerca {
  display: flex;
  align-items: center;
  flex: 0 1 260px;
  max-width: 280px;
  margin: 0 1rem;
  background: #f5f5f5;
  border-radius: 6px;
  border: 1px solid var(--gray3);
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.header-cerca:focus-within {
  border-color: var(--red);
  background: #fff;
}
.header-cerca-input {
  flex: 1;
  padding: .4rem .7rem;
  font-size: .85rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: inherit;
  min-width: 0;
}
.header-cerca-input::placeholder {
  color: var(--gray);
}
.header-cerca-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .4rem .6rem;
  background: transparent;
  border: none;
  color: var(--gray);
  cursor: pointer;
  transition: color .2s;
}
.header-cerca-btn:hover {
  color: var(--red);
}

/* ═══ ICONA CERCA MOBILE (nella fascia bianca del logo) ═══ */
/* Visibile solo su mobile, nascosta su desktop */
.header-cerca-mobile {
  display: none !important;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  padding: .3rem;
  margin-left: auto;
  transition: color .15s;
  text-decoration: none;
}
.header-cerca-mobile:hover {
  color: var(--red);
  text-decoration: none;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .header-cerca {
    display: none !important;
  }
  .header-cerca-mobile {
    display: flex !important;
  }
}

/* ═══ PAGINA RISULTATI RICERCA ═══ */

/* Form nella pagina /cerca */
.cerca-form {
  margin-bottom: 1.5rem;
}
.cerca-input-wrap {
  display: flex;
  gap: .5rem;
}
.cerca-input {
  flex: 1;
  padding: .7rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray3);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.cerca-input:focus {
  border-color: var(--red);
}
.cerca-btn {
  padding: .7rem 1.5rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
  font-family: inherit;
}
.cerca-btn:hover {
  background: #900014;
}

.cerca-riepilogo {
  font-size: .9rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
}

/* Sezioni raggruppate */
.cerca-sezione {
  margin-bottom: 2rem;
}
.cerca-sezione-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  margin-bottom: .5rem;
}
.cerca-sezione-titolo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: .05em;
  margin: 0;
}
.cerca-sezione-count {
  font-size: .6rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ═══ CARD PROFILI (organizzatori) ═══ */
.cerca-profili {
  display: flex;
  flex-direction: column;
}
.cerca-profilo-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray3);
  text-decoration: none;
  color: var(--ink);
  transition: background .15s;
}
.cerca-profilo-card:hover {
  background: #fafafa;
  text-decoration: none;
}
.cerca-profilo-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gray3);
}
.cerca-profilo-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cerca-profilo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}
.cerca-profilo-info {
  min-width: 0;
}
.cerca-profilo-nome {
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink);
}
.cerca-profilo-card:hover .cerca-profilo-nome {
  color: var(--red);
}
.cerca-profilo-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--gray);
  flex-wrap: wrap;
}
.cerca-profilo-cat {
  color: var(--red);
}

/* ═══ CARD BLOG (articoli) ═══ */
.cerca-blog {
  display: flex;
  flex-direction: column;
}
.cerca-blog-card {
  display: flex;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray3);
  text-decoration: none;
  color: var(--ink);
  transition: background .15s;
}
.cerca-blog-card:hover {
  background: #fafafa;
  text-decoration: none;
}
.cerca-blog-img {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--gray3);
}
.cerca-blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cerca-blog-info {
  min-width: 0;
}
.cerca-blog-cat {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.cerca-blog-titolo {
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.3;
}
.cerca-blog-card:hover .cerca-blog-titolo {
  color: var(--red);
}
.cerca-blog-estratto {
  font-size: .8rem;
  color: var(--gray);
  margin: .2rem 0 0;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .cerca-blog-img {
    width: 60px;
    height: 45px;
  }
}
