﻿/* ==========================================================================
   GEOGRAPHY MODULE STYLES (Morfologia, Continenti & Regioni d'Italia)
   ========================================================================== */
.geography-wrapper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 10px;
}

.geography-main-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.geo-tab-btn {
  background: white;
  border: 2.5px solid #e2e8f0;
  border-radius: 30px;
  padding: 10px 22px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.geo-tab-btn:hover {
  border-color: #059669;
  transform: translateY(-2px);
}

.geo-tab-btn.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  border-color: #047857;
  box-shadow: 0 8px 14px rgba(5, 150, 105, 0.3);
}

.geo-sub-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Isola della Geografia - Atlante & Layouts
   ========================================================================== */
.geo-nature-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin-bottom: 22px;
}

.geo-nature-grid-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.geo-section-subtitle {
  margin: 0 0 14px 0;
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 700;
}

.geo-nature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.geo-nature-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 100%;
}

.geo-nature-tile:hover {
  transform: translateY(-2px);
  border-color: var(--elem-color, #059669);
  background: white;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.geo-nature-tile.active {
  border-color: var(--elem-color, #059669);
  background: white;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2), 0 8px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.geo-tile-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.geo-tile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.geo-tile-name {
  font-size: 0.98rem;
  color: #1e293b;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geo-tile-tag {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geo-tile-check {
  font-size: 1.1rem;
}

/* Master Anatomy Inspector Card */
.geo-element-card, .geo-continent-focus {
  background: white;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.geo-card-header, .geo-focus-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.geo-card-icon-halo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  flex-shrink: 0;
}

.geo-card-title-group {
  flex: 1;
  min-width: 0;
}

.geo-card-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.geo-badge-category {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}

.geo-card-alt {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.geo-card-title {
  margin: 0;
  font-size: 1.4rem;
  color: #1e293b;
  font-weight: 800;
}

.geo-card-desc, .geo-focus-desc {
  font-size: 0.98rem;
  line-height: 1.55;
  color: #334155;
  margin: 0;
}

.geo-parts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.geo-hint-tag {
  font-size: 0.76rem;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.geo-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.geo-tag-btn {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.geo-tag-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: scale(1.05);
  color: #0f172a;
}

.geo-card-curiosity, .geo-curiosity-box {
  background: #fefce8;
  border-left: 4px solid #eab308;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #713f12;
  line-height: 1.45;
}

/* Riddles Mode */
.geo-riddle-container {
  max-width: 720px;
  margin: 0 auto 24px auto;
}

.geo-riddle-card {
  background: white;
  border-radius: 24px;
  border: 3px solid #e2e8f0;
  padding: 28px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  text-align: center;
}

.geo-riddle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.geo-riddle-badge {
  background: #f1f5f9;
  color: #475569;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 20px;
}

.geo-riddle-question {
  font-size: 1.35rem;
  color: #1e293b;
  line-height: 1.5;
  margin: 0 0 10px 0;
  font-weight: 800;
}

.geo-riddle-sub {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 20px 0;
}

.geo-riddle-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.geo-riddle-opt-btn {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.geo-riddle-opt-btn:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #059669;
  background: #f0fdf4;
}

.geo-opt-icon { font-size: 2.5rem; }
.geo-opt-name { font-size: 1.1rem; font-weight: 800; color: #1e293b; }

.geo-riddle-opt-btn.opt-correct {
  border-color: #16a34a;
  background: #dcfce7;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.25);
}

.geo-riddle-opt-btn.opt-wrong {
  border-color: #dc2626;
  background: #fee2e2;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25);
}

.opt-feedback {
  font-size: 0.85rem;
  font-weight: 800;
  margin-top: 4px;
}

/* Sorting & Matching Games */
.geo-sorting-header {
  text-align: center;
  margin-bottom: 12px;
}

.geo-sorting-header h3 {
  font-size: 1.15rem;
  color: #1e293b;
  margin: 0 0 4px 0;
}

/* ==========================================================================
   Compact Geography Matching & Sorting Games (Fits Single Screen Viewport)
   ========================================================================== */
.compact-mode {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-game-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.geo-bar-title {
  font-size: 0.95rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.geo-bar-hint {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}

/* Water Baskets Compact */
.geo-baskets-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.geo-basket-compact {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.geo-basket-compact.target-ready {
  border-color: #3b82f6;
  background: #f8fafc;
  animation: subtlePulse 1.2s infinite;
}

.geo-basket-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.geo-basket-compact-header {
  padding: 6px 12px;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

.geo-basket-compact-body {
  padding: 8px 10px;
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

/* Continents Targets Compact (4 columns on desktop, 2 on mobile) */
.geo-targets-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.geo-target-compact-box {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.geo-target-compact-box.target-ready {
  border-color: #ec4899;
  background: #fdf2f8;
  animation: subtlePulse 1.2s infinite;
}

.geo-target-compact-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.08);
}

.geo-target-compact-header {
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.geo-target-compact-body {
  padding: 6px;
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* Italy Areas Compact (3 columns) */
.geo-areas-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.geo-area-compact-box {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.geo-area-compact-box.target-ready {
  border-color: #10b981;
  background: #f0fdf4;
  animation: subtlePulse 1.2s infinite;
}

.geo-area-compact-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.08);
}

.geo-area-compact-header {
  padding: 5px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.geo-area-compact-body {
  padding: 6px 8px;
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
}

/* Badges & Chips inside Compact Containers */
.geo-compact-badge {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: popIn 0.2s ease;
}

.geo-compact-matched-badge {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: popIn 0.2s ease;
}

.geo-empty-compact-hint, .geo-target-empty-hint {
  font-size: 0.74rem;
  color: #94a3b8;
  font-style: italic;
  margin: auto;
}

/* Pool / Tray of Compact Cards */
.geo-pool-compact {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 8px 12px;
}

.geo-pool-compact-title {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.geo-tray-compact-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.geo-compact-card {
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.geo-compact-card:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.geo-compact-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  transform: scale(1.06);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  animation: selectedBob 0.8s infinite alternate ease-in-out;
}

.compact-icon { font-size: 1.1rem; }
.compact-name { font-size: 0.82rem; }
.compact-tag {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 6px;
  margin-left: 2px;
}

.geo-pool-completed-compact {
  color: #16a34a;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  padding: 6px;
}

@keyframes selectedBob {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.08) translateY(-2px); }
}

@keyframes subtlePulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* Continents Layout */
.geo-continents-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.geo-continents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.geo-continent-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.geo-continent-card:hover, .geo-continent-card.active {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px -4px rgba(0,0,0,0.1);
}

.geo-cont-badge {
  padding: 8px 12px;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.geo-cont-body {
  padding: 10px;
}

.geo-cont-desc {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
  margin: 0 0 8px 0;
}

.geo-wonders-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.geo-mini-badge {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 0.72rem;
  color: #334155;
  font-weight: 600;
}

.geo-focus-wonders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.geo-wonder-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e40af;
  text-align: center;
}

/* Italy Layout */
.geo-italy-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

.geo-area-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-area-btn {
  border: 2.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.geo-area-btn:hover {
  transform: translateX(4px);
}

.geo-reg-count {
  font-size: 0.78rem;
  opacity: 0.85;
}

.geo-area-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

.geo-area-header {
  padding-left: 12px;
  margin-bottom: 12px;
}

.geo-area-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
  color: #1e293b;
}

.geo-area-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.geo-regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.geo-region-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.geo-region-card:hover {
  background: #f0fdf4;
  border-color: #22c55e;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(34, 197, 94, 0.15);
}

.geo-reg-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.geo-reg-name {
  color: #1e293b;
  font-size: 0.95rem;
}

.geo-reg-cap {
  font-size: 0.8rem;
  color: #475569;
}

.geo-reg-sym {
  font-size: 0.8rem;
  color: #059669;
  font-weight: 600;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .geo-nature-layout, .geo-continents-layout, .geo-italy-layout {
    grid-template-columns: 1fr;
  }
  .geo-nature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .geo-nature-tile {
    padding: 10px 12px;
    gap: 8px;
  }
  .geo-tile-icon-wrap {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }
  .geo-tile-name {
    font-size: 0.88rem;
  }
  .geo-tile-tag {
    font-size: 0.7rem;
  }
  .geo-card-header {
    flex-wrap: wrap;
  }
  .geo-riddle-options-grid {
    grid-template-columns: 1fr;
  }
}






