/* ==========================================================================
   0) IMPORT & VARIABILI
   ========================================================================== */

:root {
  --gi-deep: #1a1a40;
  --gi-berry: #5b0a2f;
  --gi-pink: #ff1493;

  --font-sans: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-brand: 'Yeseva One', serif;
}

/* Base testo */
html,
body {
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* Claim principale (hero) */
.hero-content h1,
.hero-title-yeseva,
.profile-name {
  font-family: var(--font-brand);
}


/* ==========================================================================
   1) NAVBAR + HERO
   ========================================================================== */
.navbar-logo {
  max-height: 70px;
  width: auto;
}

.hero {
  height: 600px;
  position: relative;
}

.hero-img {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background: rgba(0, 0, 0, .35);
  z-index: 1;
}

.hero-content {
  z-index: 2;
}

/* Hero: paragrafo più spesso e leggibile */
.hero-content .lead {
  font-family: 'Lato', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.6;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .28);
}


/* ==========================================================================
   2) SFONDI PAGINE
   ========================================================================== */
/* Home sotto l’hero */
.after-hero-bg {
  background: linear-gradient(135deg, #ff1a8c 0%, #00e6ff 50%, #1a00ff 100%);
  min-height: 100vh;
  margin: 0;
  padding: 2rem 0 3rem;
}

/* Wrapper annunci */
.posts-wrapper {
  background: linear-gradient(135deg, #ff1a8c 0%, #00e6ff 50%, #1a00ff 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0 0 3rem;
}


/* ==========================================================================
   3) TIPOGRAFIA PROFILI + BADGE
   ========================================================================== */
.profile-name {
  font-family: "Yeseva One", serif;
  color: #ff1493;
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: .35rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .7rem;
  border-radius: 20px;
  font-size: .9rem;
  line-height: 1.1;
  white-space: nowrap;
  width: auto;
  flex: 0 0 auto;
  align-self: flex-start;
}

.status-badge.online {
  background: #e6ffe6;
  color: #155724;
}

.status-badge.offline {
  background: #f0f0f0;
  color: #555;
}

.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #90ee90;
  position: relative;
}

.online-dot::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(144, 238, 144, .6);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(.8);
    opacity: .7;
  }

  70% {
    transform: scale(1.4);
    opacity: 0;
  }

  100% {
    transform: scale(.8);
    opacity: .7;
  }
}


/* ==========================================================================
   4) DETTAGLI PROFILO
   ========================================================================== */
.profile-details {
  font-size: 1rem !important;
  line-height: 1.45;
}

.profile-details ul {
  margin: 0;
}

.profile-details li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin: .25rem 0;
}

.profile-details i {
  font-size: 1.05rem;
  flex: 0 0 auto;
}


/* ==========================================================================
   5) LISTA ANNUNCI (cards, header, meta)
   ========================================================================== */
.annunci .profile-name {
  flex: 1 1 100%;
  min-width: 0;
  word-break: break-word;
}

.profile-meta {
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: .25rem;
  /* meno spazio sotto i meta → come in home */
}

.profile-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  line-height: 1.5;
}


/* === BIO (clamp + a capo) === */
.bio-block {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.bio-textbox {
  margin: 0;
  --lines: 5;
  --lh: 1.55;
  line-height: var(--lh);
  font-size: .975rem !important;
}

.bio-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines, 5);
  overflow: hidden;
  white-space: pre-line;
  min-height: calc(var(--lines) * 1lh);
}

.bio-textbox.expanded .bio-text {
  -webkit-line-clamp: unset;
}

.bio-block .bio-text {
  font-style: italic;
}

.read-more-line {
  font-style: normal;
}

@supports not (height: 1lh) {
  .bio-text {
    min-height: calc(var(--lines) * 1em * var(--lh));
  }
}

.read-more-line {
  font-size: .95rem !important;
  color: #6c757d;
}

.read-more {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: #0d6efd;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* Uniforma la spaziatura bio in annunci con la home */
.posts-wrapper .profile-meta {
  margin-bottom: .25rem !important;
}

.posts-wrapper .bio-block {
  margin-top: 0 !important;
  gap: .15rem !important;
}


/* ==========================================================================
   7) MODALI
   ========================================================================== */
.modal-profile .modal-header {
  border-bottom: 0;
}

.modal-profile .modal-footer {
  border-top: 0;
}

/* Cookie banner bottom */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, .85);
  z-index: 1080;
  /* sopra al resto, sotto ai modal (1050->modal; 1080 ok) */
  backdrop-filter: saturate(1.2) blur(2px);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.cookie-banner .btn {
  border-radius: .5rem;
}

/* ==========================================================================
   8) PAGINA CHI SIAMO
   ========================================================================== */
.about-hero {
  background: linear-gradient(135deg, var(--gi-deep) 0%, var(--gi-berry) 100%);
}

.about-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .25));
}

.text-white-75 {
  color: rgba(255, 255, 255, .85);
}

.tracking-wide {
  letter-spacing: .08em;
}

.gi-card {
  background: #f4f5f7;
  border: 0;
  border-radius: 14px;
}

.gi-badge {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--gi-pink) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  box-shadow: 0 10px 30px rgba(255, 20, 147, .25);
}

.gi-icon {
  font-size: 64px;
  color: var(--gi-deep);
  line-height: 1;
}

.gi-badge-caption {
  color: #fff;
  font-weight: 600;
  margin-top: .35rem;
}

.gi-step {
  display: flex;
  gap: 1rem;
  align-items: center;
  /* centra verticalmente per evitare stretch */
}

/* DOT: dimensioni fissate (niente deformazioni) + secondo cerchio pulsante */
.gi-step .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  min-width: 12px;
  /* blocca lo stretch in flex */
  min-height: 12px;
  flex: 0 0 12px;
  /* base fissa nel container flex */
  border-radius: 50%;
  background: var(--gi-pink);
  box-shadow: 0 0 0 0 rgba(255, 20, 147, .35);
  /* <-- secondo cerchio */
  animation: gi-pulse-ring 1.8s ease-out infinite;
  will-change: box-shadow;
}

@keyframes gi-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 20, 147, .35);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(255, 20, 147, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 20, 147, 0);
  }
}

.gi-cta {
  background: linear-gradient(135deg, var(--gi-deep) 0%, var(--gi-berry) 100%);
  border-radius: 16px;
}


/* ==========================================================================
   9) RESPONSIVE
   ========================================================================== */
@media (max-width: 576px) {
  .hero {
    height: auto;
    position: relative;
  }

  .hero::before {
    content: "";
    display: block;
    padding-top: 100%;
  }

  .hero-img,
  .hero-overlay {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .hero-content {
    position: absolute !important;
    left: 50% !important;
    bottom: 0 !important;
    transform: translateX(-50%);
    width: 100%;
  }

  .hero-content .display-5 {
    font-size: 1.8rem;
  }

  .hero-content .lead {
    font-size: 1rem;
  }

  .gi-badge {
    width: 120px;
    height: 120px;
  }

  .gi-icon {
    font-size: 48px;
  }

  /* mantieni il cerchio perfetto anche su mobile */
  .gi-step .dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    flex: 0 0 12px;
    border-radius: 50%;
    animation: gi-pulse-ring 1.8s ease-out infinite;
  }

  .gi-cta .btn {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto .75rem;
  }
}


/* ==========================================================================
   10) UTILITY SPECIFICHE
   ========================================================================== */
.card .btn {
  font-size: .95rem;
  padding: .5rem .9rem;
}

.btn.btn-sm {
  font-size: .9rem;
  padding: .35rem .6rem;
}

.card .card-body>.btn {
  width: auto;
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  white-space: nowrap;
  gap: .5rem;
}

.location-card {
  overflow: hidden;
}

.city-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: #ffffff;
  color: var(--gi-deep);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  z-index: 3;
  border: 2px solid rgba(0, 0, 0, .06);
}

.office-city {
  font-family: 'Yeseva One', serif;
  font-size: 1.6rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gi-deep);
}

.office-address {
  font-size: 1rem;
  color: #6c757d;
}

@media (max-width: 576px) {
  .office-city {
    font-size: 1.35rem;
  }

  .city-pill {
    top: 8px;
    left: 8px;
    padding: .25rem .6rem;
    font-size: .85rem;
  }
}


/* ==========================================================================
   Cookie Policy – Accordion stile Iubenda-like
   ========================================================================== */
.policy-accordion {
  --policy-border: #dfe3e7;
  --policy-bg: #fff;
  --policy-hover: #f7f9fb;
  --policy-radius: .5rem;
  margin-bottom: .5rem;
}

.policy-accordion-item {
  border: 1px solid var(--policy-border);
  border-radius: var(--policy-radius);
  background: var(--policy-bg);
}

.policy-accordion-header {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr 24px;
  align-items: center;
  gap: .75rem;
  padding: .75rem .75rem .75rem .5rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.policy-accordion-header:hover {
  background: var(--policy-hover);
}

.policy-accordion-header:focus {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.policy-accordion-icon {
  display: grid;
  place-items: center;
}

.policy-accordion-icon .bi {
  font-size: 1rem;
  color: #adb5bd;
}

.policy-accordion-title {
  font-weight: 600;
  line-height: 1.25;
}

.policy-accordion-caret .bi {
  transition: transform .2s ease;
  font-size: 1rem;
}

.policy-accordion-body {
  padding: .75rem 1rem 1rem 1rem;
  border-top: 1px solid var(--policy-border);
  font-size: .875rem;
  /* testo accordion piccolo (14px) */
  color: #2b2f33;
}

/* Titolo modale: resta più grande */
#cookiePolicyModal .modal-title {
  font-weight: 800;
  font-size: 1.25rem;
  /* ~20px */
}

#cookiePolicyModal .modal-header .btn-close {
  margin-left: auto;
}

/* Corpo modale: TUTTO PIÙ PICCOLO */
#cookiePolicyModal .modal-body {
  font-size: .875rem;
  /* 14px */
  line-height: 1.6;
}

/* Subtitle: leggermente > body, ma comunque piccolo */
.policy-subtitle {
  font-weight: 700;
  font-size: .95rem;
  /* ~15.2px */
  line-height: 1.35;
  margin: 1rem 0 .35rem;
}

/* Subsubtitle: stessa dimensione del body */
.policy-subsubtitle {
  font-weight: 600;
  font-size: .875rem;
  /* 14px */
  line-height: 1.35;
  margin: .75rem 0 .35rem;
  color: grey;
}

/* Durata cookie (box) */
.policy-duration {
  border: 1px dashed var(--policy-border);
  border-radius: .5rem;
  padding: .5rem .75rem;
  background: #fafbfc;
  font-size: .875rem;
}

.policy-duration-title {
  font-weight: 600;
  margin-bottom: .25rem;
}

.policy-duration-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.policy-duration-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: .25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.policy-duration-list li:last-child {
  border-bottom: 0;
}

/* Dettagli stile */
.policy-sep {
  border: 0;
  border-top: 1px solid #dfe3e7;
  margin: .75rem 0 .5rem;
}

.rotate-180 {
  transform: rotate(180deg);
}

.policy-dashed {
  border-top: 1px dashed #dfe3e7;
  border-bottom: 1px dashed #dfe3e7;
  padding: .75rem 0;
  margin: 1rem 0;
}

/* Spazio rispetto al banner */
:root {
  --cookie-banner-h: 84px;
}

.cookie-banner-visible .modal-dialog {
  margin-bottom: calc(var(--cookie-banner-h) + 8px);
}

.cookie-banner-visible .modal-dialog.modal-dialog-scrollable .modal-content {
  max-height: calc(100vh - var(--cookie-banner-h) - 16px);
}

body.modal-open .cookie-banner {
  z-index: 1039;
}

/* modal = 1050 */

/* Mobile: resta piccolo e leggibile */
@media (max-width: 575.98px) {
  :root {
    --cookie-banner-h: 92px;
  }

  #cookiePolicyModal .modal-title {
    font-size: 1.2rem;
  }

  .policy-subtitle {
    font-size: .9375rem;
  }

  /* 15px */
  .policy-subsubtitle {
    font-size: .875rem;
  }

  /* 14px */
}

/* ==========================================================================
   Privacy Policy 
   ========================================================================== */
table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

table td,
table th {
  vertical-align: top;
}

.policy-sep {
  border-top: 1px dashed rgba(0, 0, 0, .2);
}

.policy-dashed {
  border: 1px dashed rgba(0, 0, 0, .2);
}