/* assets/css/country-details.css */

/* --- ROOT VARIABLES ARE SET IN HTML (for dynamic color) --- */

/* --- HERO SECTION --- */
.country-hero {
  position: relative;
  height: 80vh; /* Full impactful height */
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-top: 0;
  padding-top: 80px; /* Clear navbar */
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.hero-bg-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(10, 25, 47, 0.9), var(--country-primary), rgba(10, 25, 47, 0.8));
  opacity: 0.9;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-title {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -1px;
}

.country-title span {
  color: var(--country-accent); /* White usually, or Gold if styled */
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.country-tagline {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 50px;
}

/* Hero Stats Floating Bar */
.hero-stats-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  padding: 0 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-box:last-child { border-right: none; }

.stat-box i {
  font-size: 2rem;
  color: #FFD700; /* Gold Icon always looks good on dark */
}

.stat-box div {
  display: flex;
  flex-direction: column;
}

.stat-box strong { font-size: 0.85rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; }
.stat-box span { font-size: 1.1rem; font-weight: 700; }

/* --- MAIN CONTENT LAYOUT --- */
.country-details-section {
  background-color: #F8FAFF;
  padding-bottom: 60px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* Main Content : Sidebar */
  gap: 40px;
  margin-top: -60px; /* Overlap Hero */
  position: relative;
  z-index: 10;
}

/* CARDS COMMON STYLE */
.info-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.03);
  transition: transform 0.3s ease;
}

.info-card:hover { transform: translateY(-5px); }

.card-header {
  background: linear-gradient(to right, rgba(0,0,0,0.02), transparent);
  padding: 25px 30px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 15px;
}

.card-header i {
  font-size: 1.5rem;
  color: var(--country-primary);
  background: rgba(0,0,0,0.05);
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}

.card-header h2 { font-size: 1.5rem; margin: 0; color: #333; }


/* Timeline List */
.timeline-list { list-style: none; padding: 0; }
/* UPDATED: Timeline List Styling */
.timeline-list li {
  display: flex;
  align-items: flex-start; /* Aligns badge to top of text */
  gap: 20px;
  margin-bottom: 25px; /* More space between items */
  padding-bottom: 25px;
  border-bottom: 1px solid #f0f0f0;
}
.timeline-list li:last-child { border: none; margin: 0; padding: 0; }

.time-marker {
  background: var(--country-primary);
  color: white;
  padding: 8px 0; /* Vertical padding */
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  
  /* Fix Size & Alignment */
  min-width: 110px; /* Forces both badges to be same width */
  text-align: center; 
  display: inline-block;
  flex-shrink: 0; /* Prevents shrinking on small screens */
}

.note-box {
  background: #FFF9E6;
  border-left: 4px solid #FFD700;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.95rem;
  color: #555;
}
.note-box i { color: #FFD700; margin-top: 3px; }

/* Requirements Grid */
.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.req-item {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #eee;
}

.req-icon {
  width: 50px; height: 50px; margin: 0 auto 10px;
  background: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--country-primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.req-item h3 { font-size: 1.1rem; margin-bottom: 5px; }
.req-item p { font-weight: 700; color: var(--country-primary); margin-bottom: 5px; }
.req-item small { color: #888; font-size: 0.85rem; line-height: 1.2; display: block; }

.check-list, .bullet-list { list-style: none; padding: 0; }
/* UPDATED: Service Charges Spacing */
.check-list li {
  position: relative; 
  padding-left: 30px; 
  margin-bottom: 18px; /* INCREASED spacing between list items */
  color: #555;
  line-height: 1.6; /* Better readability */
}

.pricing-card {
  background: #f8faff; /* Optional: subtle bg to separate */
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px; /* Space between box and list below */
  border: 1px solid #eef2f6;
}

.card-body { 
  padding: 40px 35px; /* INCREASED from 35px 30px */
}

/* Mobile Padding adjustment */
@media (max-width: 576px) {
  .card-body { padding: 30px 25px; }
  .f-row { padding: 20px 15px; } /* Slightly smaller on mobile but still spacious */
}
.check-list li::before {
  content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: 2px; color: #10B981; /* Green */
}

/* Tags */
.tags-container { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tag {
  background: rgba(0, 53, 128, 0.1); /* Based on Blue */
  color: var(--country-primary);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Benefits Grid */
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 30px; }
.benefit-box {
  text-align: center; padding: 15px; border: 1px dashed var(--country-primary);
  border-radius: 12px; background: rgba(0, 53, 128, 0.03);
}
.benefit-box i { font-size: 1.5rem; color: var(--country-primary); display: block; margin-bottom: 8px; }
.benefit-box span { font-size: 0.9rem; font-weight: 600; }

/* Finance Table */
.finance-table { 
  border: 1px solid #eee; 
  border-radius: 12px; 
  overflow: hidden; 
}
.f-row {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 25px 20px; /* INCREASED from 18px to 25px */
  border-bottom: 1px solid #eee;
}

.f-row:last-child { border: none; }
.f-row.highlight { background: #FFF9E6; color: #b45309; }
.f-row strong { color: var(--country-primary); }

@media (max-width: 576px) {
  .f-row {
    padding: 15px;
    font-size: 0.95rem;
  }
  .f-row span {
    text-align: left;
  }
  .f-row strong {
    text-align: right;
    min-width: 40%; /* Ensures value column aligns nicely */
  }
}

/* --- SIDEBAR --- */
.sidebar-col { position: relative; }
.sticky-wrapper { position: sticky; top: 100px; }

.summary-card {
  background: white; padding: 30px; border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1); text-align: center;
  margin-bottom: 20px; border-top: 5px solid var(--country-primary);
}

.flag-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background-size: cover; background-position: center;
  margin: -60px auto 15px; border: 4px solid white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.summary-card h3 { font-size: 1.8rem; margin-bottom: 5px; }
.summary-card p { color: #777; margin-bottom: 20px; font-size: 0.9rem; }

/* --- UPDATED BUTTON STYLES --- */

/* 1. Base Button Styling (Ensures shape and animation on all devices) */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 30px; /* Taller, more clickable area */
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px; /* Modern Pill Shape */
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth 'Spring' Animation */
  letter-spacing: 0.5px;
  position: relative;
  border: none;
}

/* 2. Specific Full Width Class (Fixed Typo: changed 'btn.full-width' to '.btn.full-width') */
.btn.full-width { 
  width: 100%; 
  margin-bottom: 15px; 
  box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Subtle depth */
}

/* 3. Primary Button (Apply Now) */
.btn-primary { 
  background: var(--country-primary); 
  color: white; 
}

.btn-primary:hover { 
  background: var(--country-dark); /* Darken on hover */
  transform: translateY(-3px); /* Modern Lift Effect */
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3); /* Glowing shadow effect */
}

.btn-primary:active {
  transform: translateY(-1px); /* Press effect */
}

/* 4. Outline Button (Chat with Expert) */
.btn-outline { 
  border: 2px solid var(--country-primary); 
  color: var(--country-primary); 
  background: transparent;
}

.btn-outline:hover { 
  background: var(--country-primary); 
  color: white; 
  transform: translateY(-3px); /* Modern Lift Effect */
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
}

.btn-outline i {
  margin-right: 8px; /* Spacing if you have an icon inside */
}

/* Mobile Optimization */
@media (max-width: 576px) {
  .btn {
    padding: 16px 30px; /* Even easier to tap on phone */
    font-size: 1.05rem;
  }
}

.pros-cons-card {
  background: white; padding: 25px; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.pros-cons-card h4 { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }

.pc-group ul { list-style: none; padding-left: 0; font-size: 0.9rem; color: #555; }
.pc-group li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.pc-label { font-size: 0.75rem; text-transform: uppercase; font-weight: 800; padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; display: inline-block; }
.pc-label.good { background: #dcfce7; color: #166534; }
.pc-label.bad { background: #fee2e2; color: #991b1b; }

.pc-group .good + ul li::before { content: '+'; color: green; position: absolute; left: 0; font-weight: bold; }
.pc-group .bad + ul li::before { content: '-'; color: red; position: absolute; left: 0; font-weight: bold; }

.pc-divider { height: 1px; background: #eee; margin: 15px 0; }


/* --- BOTTOM NAV (SCROLLER) --- */
.bottom-nav-section { background: white; border-top: 1px solid #eee; padding: 60px 0; }
.nav-title { text-align: center; margin-bottom: 40px; font-size: 2rem; }
.nav-title span { color: var(--country-primary); }

.country-scroller-wrapper { display: flex; align-items: center; gap: 20px; max-width: 1000px; margin: 0 auto; }
/* UPDATED: Infinite Scroller Container */
.country-scroller {
  flex: 1; 
  display: flex; 
  gap: 20px; 
  /* CHANGE: Hidden overflow for custom JS animation */
  overflow: hidden; 
  padding: 15px 0; /* Remove side padding to prevent jumpy edges */
  align-items: center;
  /* IMPORTANT: Ensure it starts at 0 for transforms */
  transform: translateX(0);
  will-change: transform;
}


.country-scroller::-webkit-scrollbar { display: none; }

.mini-flag-card {
  min-width: 120px; text-align: center; cursor: pointer; transition: transform 0.2s;
}
.mini-flag-card:hover { transform: translateY(-5px); }
.mini-flag-img {
  width: 70px; height: 70px; border-radius: 50%; background-size: cover; background-position: center;
  margin: 0 auto 10px; border: 3px solid #eee; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.mini-flag-name { font-weight: 600; font-size: 0.9rem; color: #333; }

.nav-btn {
  background: white; border: 1px solid #eee; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); color: #555; flex-shrink: 0;
}
.nav-btn:hover { background: var(--country-primary); color: white; border-color: var(--country-primary); }

/* Fix for Mobile Scroller Alignment */
@media (max-width: 576px) {
  .country-scroller {
    justify-content: flex-start; /* Scroll naturally on mobile */
  }
  

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .layout-grid { grid-template-columns: 1fr; margin-top: 0; }
  .country-hero { height: auto; padding: 120px 0 60px; }
  .hero-stats-row { flex-wrap: wrap; justify-content: center; }
  .stat-box:last-child { border: none; margin: 0; padding: 0; }
  .sidebar-col { order: -1; margin-bottom: 30px; }
  .summary-card { margin-top: 0; border-top: none; }
}

@media (max-width: 576px) {
  .country-title { font-size: 3rem; }
  .benefits-grid { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .stat-box { 
    border-right: none; 
    width: 100%; 
    border-bottom: 1px solid rgba(255,255,255,0.2); 
    padding: 15px 0; /* Adjusted padding */
    margin-bottom: 0;
    
    /* Flex alignment fixes */
    display: flex;
    align-items: center; /* Vertically align icon and text */
    gap: 20px; /* Fixed space between icon and text */
  }
  
  .stat-box i {
    min-width: 50px; /* Fixed width for icon area so text lines up */
    text-align: center;
  }
  
  .stat-box div {
    text-align: left; /* Ensure text stays left-aligned */
  }
}

/* Animation Class */
.fade-in {
  opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
