/**
 * Page Component Enhancements
 * Improved visual hierarchy, spacing, and interactive elements
 * Based on TODO.txt recommendations
 */

/* ========================================
   HERO SECTION - Enhanced Visual Impact
   ======================================== */

.hero-section {
  position: relative;
  min-height: 600px;
  height: 100vh;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Fallback for when video doesn't load */
.hero-bg-video img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-white);
  padding: var(--space-8) var(--space-4);
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--text-6xl);
  font-weight: var(--font-bold);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  color: #ffffff !important;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-subtitle {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: var(--font-medium);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  padding: var(--space-4) var(--space-10);
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
  transition: all var(--transition-base);
  text-decoration: none;
  animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both;
}

.hero-btn:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.4);
  color: var(--primary-dark);
}

/* ========================================
   COURSE FINDER SECTION - Card-Based Design
   ======================================== */

.course-finder {
  background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-gray-50) 100%);
  padding: var(--space-8) 0;
}

.finder-header {
  text-align: center;
  margin-bottom: var(--space-6);
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.finder-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.finder-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Tab Navigation - Enhanced */
.tab-navigation {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  background-color: var(--bg-white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: var(--touch-target-min);
}

.tab-button:hover {
  border-color: var(--primary-light);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-white);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.tab-button i {
  font-size: var(--text-lg);
}

/* Tab Content - Enhanced Forms */
.tab-content {
  display: none;
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-glass);
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.tab-content.active {
  display: block;
  animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

.search-form .form-group.full-width {
  grid-column: 1 / -1;
}

.search-button {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  min-height: 54px;
}

/* Quick Suggestions */
.quick-suggestions {
  margin-top: var(--space-8);
  text-align: center;
}

.suggestions-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-tertiary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.suggestion-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.suggestion-tag {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background-color: var(--bg-gray-100);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.suggestion-tag:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Support Section - Enhanced CTA */
.support-section {
  margin-top: var(--space-12);
  text-align: center;
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-gray-50));
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  border: 2px solid var(--primary-lighter);
}

.support-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.support-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.support-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-white);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.support-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* ========================================
   SERVICES SECTION - Card Grid
   ======================================== */

.services {
  padding: var(--space-4) 0;
  background-color: var(--bg-white);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-6);
}

.section-title h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  position: relative;
  display: inline-block;
}

.title-underline {
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  margin: var(--space-4) auto 0;
  border-radius: var(--radius-full);
}

.section-title p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: var(--space-4) auto 0;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-6);
}

/* ── Service Card — personality variant ── */
.service-card {
  position: relative;
  border: none;
  border-radius: 24px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1), box-shadow 0.28s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
}

/* Long/flat drop shadow illusion (like in the reference image) */
.service-card::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 10%;
  width: 80%;
  height: 24px;
  background: inherit;
  filter: blur(16px);
  opacity: 0.45;
  border-radius: 50%;
  z-index: -1;
  transition: opacity 0.28s ease, bottom 0.28s ease;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

.service-card:hover::after {
  bottom: -28px;
  opacity: 0.6;
}

/* ── Color palette — site brand: deep slate + gold accents ── */
/* Card 1: Primary slate */
.service-card--color-1 { background: linear-gradient(145deg, #334155, #1e293b); }
/* Card 2: Gold/amber */
.service-card--color-2 { background: linear-gradient(145deg, #d4af37, #b8860b); }
/* Card 3: Deep indigo-slate */
.service-card--color-3 { background: linear-gradient(145deg, #4f46e5, #1e293b); }
/* Card 4: Slate-teal blend */
.service-card--color-4 { background: linear-gradient(145deg, #1e293b, #0f172a); }
/* Card 5: Gold-warm */
.service-card--color-5 { background: linear-gradient(145deg, #b8860b, #92650a); }
/* Card 6: Indigo accent */
.service-card--color-6 { background: linear-gradient(145deg, #6366f1, #4f46e5); }

/* Gold-card text override for legibility */
.service-card--color-2 .service-title,
.service-card--color-5 .service-title { color: #0f172a; text-shadow: none; }
.service-card--color-2 .service-description,
.service-card--color-5 .service-description { color: rgba(15,23,42,0.78); }

/* ── 3D Icon badge — layered box-shadow depth technique ── */
.service-icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.9rem;
  color: #fff;
  position: relative;
  /* Face of the 3D cube: lighter top-left highlight */
  background: rgba(255,255,255,0.22);
  /* 3D depth: stacked hard shadows simulate bottom/right faces of a cube */
  box-shadow:
    /* top-left inner highlight (light source) */
    inset 2px 2px 0 rgba(255,255,255,0.35),
    /* bottom-right inner shadow (depth) */
    inset -2px -2px 0 rgba(0,0,0,0.25),
    /* right face */
    4px 4px 0 rgba(0,0,0,0.20),
    /* bottom face */
    6px 6px 0 rgba(0,0,0,0.14),
    /* soft ambient glow */
    8px 8px 16px rgba(0,0,0,0.18);
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1), box-shadow 0.28s ease;
}

/* Gold cards get a dark icon so it reads well */
.service-card--color-2 .service-icon-wrap,
.service-card--color-5 .service-icon-wrap {
  color: #0f172a;
  background: rgba(0,0,0,0.12);
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,0.4),
    inset -2px -2px 0 rgba(0,0,0,0.2),
    4px 4px 0 rgba(0,0,0,0.18),
    6px 6px 0 rgba(0,0,0,0.10),
    8px 8px 16px rgba(0,0,0,0.14);
}

.service-card:hover .service-icon-wrap {
  transform: scale(1.1) rotate(6deg) translateY(-3px);
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,0.45),
    inset -2px -2px 0 rgba(0,0,0,0.3),
    6px 6px 0 rgba(0,0,0,0.22),
    9px 9px 0 rgba(0,0,0,0.13),
    12px 12px 20px rgba(0,0,0,0.2);
}

.service-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: #fff;
  margin-bottom: var(--space-3);
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.service-description {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.85);
  line-height: var(--leading-relaxed);
}

/* ========================================
   EVENTS SECTION - Modern Card Layout
   ======================================== */

.events-section {
  padding: var(--space-4) 0;
  background: linear-gradient(180deg, var(--bg-gray-50) 0%, var(--bg-white) 100%);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-6);
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-8);
}

.event-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

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

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.event-type-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-white);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.event-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.event-details {
  margin-bottom: var(--space-5);
}

.event-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.event-detail i {
  color: var(--primary-color);
  width: 16px;
}

.event-actions {
  display: flex;
  gap: var(--space-3);
}

.view-event-btn,
.contact-action-btn {
  flex: 1;
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--text-white);
  font-weight: var(--font-semibold);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  text-decoration: none;
  display: inline-block;
  min-height: var(--touch-target-min);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-event-btn:hover,
.contact-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--text-white);
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background-color: transparent;
  color: var(--primary-color);
  font-weight: var(--font-semibold);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-base);
}

.view-all-btn:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   CONTACT SECTION - Enhanced Grid
   ======================================== */

.contact {
  padding: var(--space-8) 0;
  background-color: var(--bg-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.contact-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.contact-type-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background-color: var(--primary-lightest);
  color: var(--primary-color);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.contact-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.contact-details {
  margin-bottom: var(--space-5);
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.contact-detail i {
  color: var(--primary-color);
  width: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Social Links in Contact Card */
.social-links-card {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social-links-card a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background-color: var(--bg-gray-100);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-links-card a:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
  transform: translateY(-2px) rotate(5deg);
  box-shadow: var(--shadow-md);
}

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

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-btn {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-6);
  }

  .finder-title {
    font-size: var(--text-3xl);
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .services-container,
  .events-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 500px;
  }

  .course-finder,
  .services,
  .events-section,
  .contact {
    padding: var(--space-12) 0;
  }

  .tab-navigation {
    flex-direction: column;
  }

  .tab-button {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   GLOBAL WHITESPACE REDUCTION
   ======================================== */

/* Destinations blue-bg */
.blue-bg {
  padding: var(--space-8) 0 !important;
}

/* How It Works comm-section wrapper */
.how-it-works .comm-section,
.comm-section {
  padding: var(--space-8) 0 !important;
}

/* Blog section — override Bootstrap py-5 (3rem) */
.blog-section.py-5 {
  padding-top: var(--space-6) !important;
  padding-bottom: var(--space-6) !important;
}

.blog-section .text-center.mb-5 {
  margin-bottom: var(--space-4) !important;
}

/* Events "View All" button row */
.events-section [style*="margin-top: 50px"] {
  margin-top: var(--space-6) !important;
}

/* ========================================
   STATS COUNTER SECTION - Premium Brand Gradient
   ======================================== */

.stats-counter-section {
  background: linear-gradient(90deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
  padding: var(--space-4) 0; /* Extremely compact vertical space */
  color: #ffffff;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}

.stat-item {
  text-align: center;
  padding: var(--space-1) var(--space-4);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item.border-none {
  border-right: none;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: var(--text-3xl); /* Further reduced for compactness */
  font-weight: var(--font-bold);
  line-height: 1;
  margin-bottom: 0;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs); /* Smaller label */
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4) 0;
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }
}

@media (max-width: 480px) {
  .stat-number {
    font-size: var(--text-2xl);
  }
}