/* =============================================
   BILETINI ALMADAN - Country Detail Page v2
   Premium, Modern, Visually Stunning Design
   ============================================= */

/* --- Custom Variables for Country Page --- */
:root {
  --score-green: #4CAF50;
  --score-yellow: #FFB300;
  --score-red: #FF5252;
  --score-green-dim: rgba(76, 175, 80, 0.15);
  --score-yellow-dim: rgba(255, 179, 0, 0.15);
  --score-red-dim: rgba(255, 82, 82, 0.15);
}

/* =============================================
   1. HERO SECTION
   ============================================= */
.country-hero-v2 {
  position: relative;
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.country-hero-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.0) 40%,
    var(--bg-primary) 100%
  );
  z-index: 1;
}

.hero-back-btn {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-3px);
}

.hero-ba-score {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 25;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 76px;
  height: 76px;
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(142, 168, 157, 0.5);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  pointer-events: auto;
}

.hero-ba-score:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border-color: var(--accent-primary);
}

.hero-ba-score .score-star {
  font-size: 0.85rem;
  line-height: 1;
  color: #c89e66;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.hero-ba-score .score-num {
  font-size: 1.45rem;
  font-weight: 800;
  color: #2c302e;
  line-height: 1;
  letter-spacing: -0.02em;
  font-family: var(--font-family);
}

.hero-content-v2 {
  position: relative;
  z-index: 2;
}

.hero-content-v2 h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-shadow: 0 2px 10px rgba(255,255,255,0.8);
}

.hero-content-v2 .subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* =============================================
   11. SECTION HEADERS
   ============================================= */
.section-header-v2 {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin: var(--space-2xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent-primary-dim);
}

.section-header-v2 .icon {
  font-size: 1.4rem;
}

.section-header-v2 h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.section-header-v2 .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* =============================================
   2. QUICK INFO GRID
   ============================================= */
.quick-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: 0 var(--space-md);
}

.quick-info-card {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.quick-info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-glass-hover);
}

.quick-info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  background: var(--bg-secondary);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.quick-info-text {
  display: flex;
  flex-direction: column;
}

.quick-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.quick-info-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* =============================================
   3. SCORE BREAKDOWN
   ============================================= */
.score-breakdown {
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: 0 var(--space-md) var(--space-xl);
}

.score-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.score-row:last-child { margin-bottom: 0; }

.score-label {
  width: 70px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.score-bar-bg {
  flex-grow: 1;
  height: 12px;
  background: var(--border-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0;
  animation: fillBar 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.score-bar-fill.green { background: var(--score-green); }
.score-bar-fill.yellow { background: var(--score-yellow); }
.score-bar-fill.red { background: var(--score-red); }

.score-value {
  width: 30px;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

@keyframes fillBar {
  from { width: 0; }
}

/* =============================================
   4. BUDGET SECTION
   ============================================= */
.budget-section {
  padding: 0 var(--space-md);
}

.budget-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-glass);
}
.budget-row:last-child { border-bottom: none; }

.budget-row.total {
  background: var(--accent-primary-dim);
  border-top: 2px solid var(--accent-primary);
  font-weight: 700;
}

.budget-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.budget-price {
  font-weight: 600;
  color: var(--text-primary);
}

.budget-row.total .budget-item,
.budget-row.total .budget-price {
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.budget-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}

.budget-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-xs);
  font-style: italic;
  opacity: 0.8;
}

.budget-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.budget-lvl-eco {
  background: rgba(107, 143, 113, 0.12);
  color: var(--visa-free);
}

.budget-lvl-mid {
  background: rgba(220, 160, 108, 0.12);
  color: var(--visa-on-arrival);
}

.budget-lvl-comfort {
  background: rgba(100, 140, 200, 0.12);
  color: #648cc8;
}

/* =============================================
   4b. SUITABILITY CARD (Sana Uygun Mu?)
   ============================================= */
.suitability-card {
  background: var(--bg-card);
}

.suitability-verdict {
  white-space: nowrap;
}

.verdict-great {
  background: rgba(107, 143, 113, 0.12);
  color: var(--visa-free);
}

.verdict-good {
  background: rgba(220, 160, 108, 0.12);
  color: var(--visa-on-arrival);
}

.verdict-neutral {
  background: rgba(200, 122, 122, 0.1);
  color: var(--visa-required);
}

/* Map popup category tag */
.popup-cat {
  font-weight: 600;
  opacity: 0.85;
}

/* =============================================
   5. CITY CARDS (Horizontal Scroll)
   ============================================= */
.city-cards {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.city-cards::-webkit-scrollbar { display: none; }

.city-card {
  flex: 0 0 170px;
  scroll-snap-align: start;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.city-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.city-img-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #f7f6f0 0%, #ebe8df 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.city-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.city-img-wrapper.has-fallback .city-img {
  display: none !important;
}

.city-img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f7f6f0 0%, #ebe8df 100%);
  z-index: 1;
}

.city-img-placeholder .placeholder-icon {
  font-size: 2.2rem;
  opacity: 0.55;
}

.city-info {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.city-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
  line-height: 1.25;
  color: var(--text-primary);
}

.city-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  min-height: 2.1em;
}

.city-tags {
  margin-top: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.city-tag {
  font-size: 0.65rem;
  background: var(--accent-secondary-dim);
  color: var(--accent-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* =============================================
   6. TRAVEL TIPS
   ============================================= */
.travel-tips {
  padding: 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tip-card {
  display: flex;
  gap: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.tip-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.tip-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.tip-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* =============================================
   7. WEATHER GRID
   ============================================= */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  padding: 0 var(--space-md);
}

.weather-cell {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  text-align: center;
  position: relative;
  transition: all var(--transition-fast);
}

.weather-cell:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
}

.weather-month {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.weather-temp {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.weather-indicator {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.weather-indicator.ideal { background: var(--score-green); box-shadow: 0 0 6px var(--score-green); }
.weather-indicator.okay { background: var(--score-yellow); }
.weather-indicator.bad { background: var(--score-red); }

/* =============================================
   8. ATTRACTIONS SECTION
   ============================================= */
.attractions-v2 {
  padding: 0;
}

.attr-filters {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: 0 var(--space-md) var(--space-sm);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.attr-filters::-webkit-scrollbar { display: none; }

.attr-tab {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.attr-tab.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.attr-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: 0 var(--space-md);
}

.attr-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
}
.attr-card:hover { border-color: var(--accent-primary-dim); box-shadow: var(--shadow-sm); }

.attr-icon {
  font-size: 2rem;
  background: var(--bg-secondary);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.attr-info { flex: 1; }
.attr-info h4 { margin: 0 0 2px; font-size: 1rem; }
.attr-info .city { font-size: 0.8rem; color: var(--accent-primary); font-weight: 600; }
.attr-info .hours { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: 2px; }

.attr-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Reusing check-btn and gmaps-link from components.css where possible, 
   or slightly adjusting for this context */

/* =============================================
   9. VIDEO CARDS
   ============================================= */
.video-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding: 0 var(--space-md);
}

.video-card {
  cursor: pointer;
  transition: transform var(--transition-base);
}
.video-card:hover { transform: scale(1.02); }

.video-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.video-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}
.video-card:hover .play-overlay { background: rgba(0,0,0,0.1); }

.play-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.2rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.video-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   10. SIMILAR DESTINATIONS
   ============================================= */
.similar-destinations {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding: var(--space-sm) var(--space-md) var(--space-lg);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.similar-destinations::-webkit-scrollbar { display: none; }

.similar-card {
  flex: 0 0 140px;
  scroll-snap-align: start;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  transition: all var(--transition-base);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.similar-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary-dim);
  box-shadow: var(--shadow-md);
}

.similar-flag {
  font-size: 2.5rem;
  line-height: 1;
}

.similar-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.similar-visa {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.similar-visa.free { background: var(--visa-free-bg); color: var(--visa-free); }

/* =============================================
   12. TRIP PLANNER TOGGLE
   ============================================= */
.planner-toggle {
  margin: var(--space-lg) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.planner-toggle-header {
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(255,255,255,0.3);
}

.planner-toggle-header h3 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.planner-icon {
  font-size: 1.2rem;
  color: var(--accent-primary);
  transition: transform var(--transition-base);
}

.planner-toggle.expanded .planner-icon {
  transform: rotate(180deg);
}

.planner-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.planner-toggle.expanded .planner-content {
  max-height: 2000px; /* arbitrary large value for smooth transition */
  transition: max-height 0.5s ease-in-out;
}

.planner-inner {
  padding: var(--space-md);
  border-top: 1px solid var(--border-glass);
}

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */

/* Mobile (< 480px) */
@media (max-width: 480px) {
  .hero-ba-score {
    top: var(--space-md);
    right: var(--space-md);
    width: 70px;
    height: 70px;
    gap: 3px;
  }
  .hero-ba-score .score-star {
    font-size: 0.8rem;
  }
  .hero-ba-score .score-num {
    font-size: 1.35rem;
  }
}

/* Tablets (481px+) */
@media (min-width: 481px) {
  .hero-content-v2 h1 { font-size: 2.8rem; }
  .quick-info-grid { grid-template-columns: repeat(3, 1fr); }
  .weather-grid { grid-template-columns: repeat(4, 1fr); }
  .video-cards { grid-template-columns: repeat(3, 1fr); }
  .city-card { flex: 0 0 200px; }
  .city-img { height: 140px; }
}

/* Desktop (769px+) */
@media (min-width: 769px) {
  .country-hero-v2 {
    height: 360px;
    border-radius: var(--radius-xl);
    margin-top: var(--space-md);
  }
  
  .country-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
  }

  .quick-info-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 0;
  }
  
  .score-breakdown,
  .budget-section,
  .city-cards,
  .travel-tips,
  .weather-grid,
  .attr-filters,
  .attr-list,
  .video-cards,
  .similar-destinations,
  .planner-toggle {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  
  .weather-grid { grid-template-columns: repeat(6, 1fr); }
  .video-cards { grid-template-columns: repeat(4, 1fr); }
  
  .budget-section { max-width: 600px; }
  .score-breakdown { max-width: 800px; }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
  .country-page-container {
    max-width: 1200px;
  }
  .quick-info-grid { grid-template-columns: repeat(6, 1fr); }
}
