/* Reset e base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f5ebe0 0%, #e8d5c4 40%, #ddc9b8 100%);
  color: #4a3f35;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Layout */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
}

.section {
  padding: clamp(2.5rem, 6vw, 3.75rem) 0;
}

/* ========== HERO ========== */
.hero {
  min-height: min(85vh, 560px);
  display: flex;
  align-items: center;
  text-align: center;
  padding: clamp(1rem, 4vw, 2.5rem) clamp(0.75rem, 3vw, 1rem);
}

.hero-content {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 250, 245, 0.95);
  border-radius: 28px;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
  box-shadow: 0 12px 32px rgba(139, 119, 101, 0.15), 0 0 0 1px rgba(139, 119, 101, 0.06);
}

/* ========== LANGUAGE SWITCH ========== */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.lang-switch .lang {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  color: #6b5b4f;
  background: rgba(255, 250, 245, 0.9);
  border: 1px solid rgba(139, 119, 101, 0.18);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.lang-switch .lang:hover,
.lang-switch .lang:focus-visible {
  transform: translateY(-1px);
}

.lang-switch .lang.active {
  background: #c4a77d;
  color: #fff;
  border-color: #c4a77d;
}

.hero-photo {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.hero-photo img {
  width: clamp(100px, 28vw, 140px);
  height: clamp(100px, 28vw, 140px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e8d5c4;
  box-shadow: 0 8px 20px rgba(139, 119, 101, 0.2);
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  font-weight: 700;
  color: #5c4a3a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-subtitle {
  margin-top: 0.5rem;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  color: #6b5b4f;
}

.hero-buttons {
  margin-top: clamp(1.25rem, 4vw, 1.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ========== BOTTONI ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 0.95rem);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn.primary {
  background: linear-gradient(180deg, #c4a77d 0%, #a88b5c 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 119, 101, 0.35);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139, 119, 101, 0.4);
}

.btn.outline {
  background: rgba(255, 250, 245, 0.9);
  color: #5c4a3a;
  border: 2px solid #c4a77d;
}

.btn.outline:hover,
.btn.outline:focus-visible {
  background: #fffaf5;
}

.btn.secondary {
  background: linear-gradient(180deg, #b8a088 0%, #9a8268 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 119, 101, 0.3);
}

.btn.secondary:hover,
.btn.secondary:focus-visible {
  transform: translateY(-2px);
}

/* ========== SEZIONE CHI SONO ========== */
.about .container {
  background: rgba(255, 250, 245, 0.98);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
  box-shadow: 0 10px 28px rgba(139, 119, 101, 0.12), 0 0 0 1px rgba(139, 119, 101, 0.06);
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  font-weight: 700;
  color: #5c4a3a;
  margin-bottom: 0.75rem;
}

.section-intro {
  margin-bottom: 1.25rem;
  color: #6b5b4f;
}

.about .container p,
.section-intro {
  font-size: clamp(0.95rem, 2vw, 1rem);
}

/* ========== GIOCHI ========== */
.games .container {
  background: rgba(255, 250, 245, 0.98);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
  box-shadow: 0 10px 28px rgba(139, 119, 101, 0.12), 0 0 0 1px rgba(139, 119, 101, 0.06);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(1rem, 3vw, 1.25rem);
  margin-top: 1rem;
}

.game-card {
  position: relative;
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 1.35rem);
  background: linear-gradient(180deg, #fffaf8 0%, #f5ebe0 100%);
  box-shadow: 0 6px 18px rgba(139, 119, 101, 0.1), 0 0 0 1px rgba(139, 119, 101, 0.05);
}

.game-card h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
  color: #5c4a3a;
  margin-bottom: 0.5rem;
  padding-right: 4.5rem;
}

.game-card p {
  margin-bottom: 1rem;
  font-size: clamp(0.9rem, 2vw, 0.95rem);
  color: #6b5b4f;
}

.game-card .btn {
  width: 100%;
  min-height: 44px;
}

/* mini‑giochi in secondo piano */
.mini-intro {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.mini-game-grid {
  margin-top: 0.35rem;
}

.game-card.mini-game {
  background: linear-gradient(180deg, #fdf8f2 0%, #f3e5d8 100%);
  box-shadow: 0 4px 12px rgba(139, 119, 101, 0.1);
  opacity: 0.9;
}

.game-card.mini-game h3 {
  font-size: clamp(0.98rem, 2.3vw, 1.05rem);
}

.game-card.mini-game p {
  font-size: clamp(0.86rem, 1.9vw, 0.9rem);
}

.btn.btn-mini {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  box-shadow: 0 3px 8px rgba(139, 119, 101, 0.25);
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #c4a77d;
  color: #fff;
}

.badge.soft {
  background: #a88b5c;
  color: #fff;
}

/* ========== LIVE ========== */
.lives .container {
  background: rgba(255, 250, 245, 0.98);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
  box-shadow: 0 10px 28px rgba(139, 119, 101, 0.12), 0 0 0 1px rgba(139, 119, 101, 0.06);
}

.live-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.live-text p {
  font-size: clamp(0.9rem, 2vw, 0.95rem);
  color: #6b5b4f;
}

.live-text strong {
  color: #5c4a3a;
}

/* ========== ORSETTO ICONA SEZIONI ========== */
.icon-bear {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  border-radius: 50%;
  background: #c4a77d;
  box-shadow: 0 2px 4px rgba(139, 119, 101, 0.28);
  flex-shrink: 0;
}

.icon-bear::before,
.icon-bear::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c4a77d;
}

.icon-bear::before {
  left: 2px;
}

.icon-bear::after {
  right: 2px;
}

.icon-bear::marker {
  content: none;
}

.icon-bear-about {
  background: #c4a77d;
}

.icon-bear-games {
  background: #b28a5f;
}

.icon-bear-live {
  background: #a0765c;
}

.icon-bear-social {
  background: #c1937a;
}

/* ========== GALLERIA ========== */
.gallery .container {
  background: rgba(255, 250, 245, 0.98);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
  box-shadow: 0 10px 28px rgba(139, 119, 101, 0.12), 0 0 0 1px rgba(139, 119, 101, 0.06);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: clamp(0.75rem, 2.5vw, 1rem);
  margin-top: 1rem;
}

.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(139, 119, 101, 0.15);
}

.gallery-item img {
  width: 100%;
  height: clamp(160px, 40vw, 200px);
  object-fit: cover;
  display: block;
}

/* ========== SOCIAL ========== */
.social .container {
  text-align: center;
  background: rgba(255, 250, 245, 0.98);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem) clamp(2rem, 5vw, 2.5rem);
  box-shadow: 0 10px 28px rgba(139, 119, 101, 0.12), 0 0 0 1px rgba(139, 119, 101, 0.06);
}

.social .container p {
  color: #6b5b4f;
  font-size: clamp(0.95rem, 2vw, 1rem);
}

.social-links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 2vw, 1rem);
  justify-content: center;
}

.social-card {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 240px;
  min-height: 44px;
  padding: clamp(0.85rem, 2vw, 1rem) clamp(1rem, 2.5vw, 1.25rem);
  border-radius: 16px;
  text-decoration: none;
  color: #5c4a3a;
  text-align: left;
  background: linear-gradient(180deg, #fffaf8 0%, #f5ebe0 100%);
  box-shadow: 0 4px 14px rgba(139, 119, 101, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(139, 119, 101, 0.12);
}

.social-card:hover,
.social-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 119, 101, 0.18);
}

.social-title {
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 0.95rem);
}

.social-handle {
  display: block;
  font-size: clamp(0.8rem, 1.8vw, 0.85rem);
  margin-top: 0.2rem;
  color: #6b5b4f;
  opacity: 0.9;
}

.instagram {
  border-left: 4px solid #c4a77d;
}

.tiktok {
  border-left: 4px solid #a88b5c;
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  font-size: clamp(0.75rem, 1.8vw, 0.8rem);
  padding: clamp(1rem, 3vw, 1.25rem) 0.75rem clamp(1.5rem, 4vw, 2rem);
  color: #6b5b4f;
}

/* ========== RESPONSIVE SMARTPHONE ========== */
@media (max-width: 480px) {
  .lang-switch {
    justify-content: center;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid .gallery-item:first-child {
    grid-column: 1 / -1;
    max-width: 280px;
    margin: 0 auto;
  }

  .social-links {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
