/* ============================================
   Canstar Visa Services - Main Stylesheet
   Red, Blue, White Theme | Canada-inspired
   ============================================ */

:root {
  /* Brand Colors */
  --red-primary: #C41E3A;
  --red-dark: #9B172E;
  --red-light: #E63950;
  --blue-primary: #002868;
  --blue-dark: #001a42;
  --blue-light: #003d7a;
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-600: #6C757D;
  --gray-800: #343A40;
  --gray-900: #212529;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', var(--font-primary);
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-max: 1200px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--red-primary);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--blue-primary);
  outline-offset: 2px;
}

/* Stats / Trust Bar */
.stats-bar {
  background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
  padding: 2.5rem 1.5rem;
  color: var(--white);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--blue-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============ Header ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--blue-primary);
}

.logo-icon {
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-icon img {
  height: 100%;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
  color: var(--blue-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--gray-800);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red-primary);
  transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
  color: var(--red-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* CTA Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--red-primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.4);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.5);
}

.btn-secondary {
  background: var(--blue-primary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--red-primary);
}

.btn-nav {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

/* ============ Hero Section ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, rgba(0, 40, 104, 0.9) 0%, rgba(196, 30, 58, 0.7) 100%),
    url('https://images.unsplash.com/photo-1519832979-6fa011b87667?w=1920') center/cover no-repeat;
  padding: 8rem 1.5rem 5rem;
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

.hero-content {
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fadeInUp 0.6s ease 0.3s both;
}

/* ============ Section Styles ============ */
.section {
  padding: var(--section-padding);
}

.section-alt {
  background: var(--off-white);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--gray-600);
  font-size: 1.05rem;
}

/* ============ Services Grid ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--red-primary), var(--blue-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--red-primary), var(--red-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* ============ Countries Section ============ */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.country-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  text-align: center;
  border: 1px solid var(--gray-200);
}

.country-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--red-primary);
}

.country-flag {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--gray-200);
}

.country-item span {
  font-weight: 600;
  color: var(--blue-dark);
  font-size: 0.95rem;
}

/* ============ Testimonials ============ */
.testimonials-section {
  background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
  color: var(--white);
  padding: var(--section-padding);
}

.testimonials-section h2 {
  color: var(--white);
}

.testimonials-section .section-header p {
  color: rgba(255, 255, 255, 0.85);
}

.testimonials-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial-slide {
  display: none;
  padding: 2rem;
  text-align: center;
}

.testimonial-slide.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.testimonial-content {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  font-weight: 600;
  font-size: 1.1rem;
}

.testimonial-role {
  font-size: 0.9rem;
  opacity: 0.9;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition-fast);
}

.testimonial-dot.active {
  background: var(--white);
  width: 32px;
  border-radius: 6px;
}

/* ============ FAQ Section ============ */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--red-primary);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--red-primary);
  flex-shrink: 0;
  transition: transform var(--transition-smooth);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-600);
  line-height: 1.7;
  border-top: 1px solid var(--gray-200);
}

/* ============ Contact Section ============ */
.contact-section {
  background: var(--off-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-detail-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--red-primary), var(--red-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.contact-detail h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-detail p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ============ Footer ============ */
.footer {
  background: var(--blue-dark);
  color: var(--white);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  max-width: var(--container-max);
  margin: 0 auto;
}
.breadcrumb a {
  color: var(--blue-primary);
}
.breadcrumb a:hover {
  color: var(--red-primary);
}
.breadcrumb span {
  margin: 0 0.5rem;
  color: var(--gray-300);
}

/* ============ Page Headers ============ */
.page-hero {
  padding: 8rem 1.5rem 4rem;
  background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* ============ Country Cards (Countries Page) ============ */
.country-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.country-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.country-card-image {
  height: 200px;
  background: var(--gray-200);
  object-fit: cover;
}

.country-card-body {
  padding: 1.5rem;
  flex: 1;
}

.country-card h3 {
  margin-bottom: 0.75rem;
  color: var(--blue-primary);
}

.country-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ============ WhatsApp Button ============ */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  z-index: 999;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
  color: var(--white);
}

/* ============ Animations ============ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Map Container ============ */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 350px;
  background: var(--gray-200);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============ Mobile Responsive ============ */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .hero {
    padding: 6rem 1rem 4rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .countries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .countries-grid {
    grid-template-columns: 1fr;
  }
}
