/*
 * Seaprime Marine Management - Core Design System & Stylesheet (Brighter Theme)
 * Custom styles using pure CSS, modern grids, and clean visual structures.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ==========================================
   1. Design System & Variables
   ========================================== */
:root {
  --primary: hsl(228, 85%, 15%);       /* Logo Deep Royal Navy */
  --primary-light: hsl(228, 65%, 23%); /* Lighter Navy */
  --secondary: hsl(36, 100%, 46%);     /* Logo Orange */
  --secondary-hover: hsl(34, 100%, 40%);
  --secondary-rgb: 235, 140, 0;        /* Logo Orange RGB components */
  --accent: hsl(41, 100%, 58%);         /* Logo Light Gold Accent */
  
  --bg-main: hsl(210, 25%, 98%);       /* Crisp Ice White */
  --bg-card: hsl(0, 0%, 100%);         /* Solid White */
  --bg-alt: hsl(210, 30%, 96%);        /* Soft Ice Blue */
  --bg-navy: hsl(228, 85%, 12%);       /* Dark Royal Navy for footer & overlay */
  
  --text-dark: hsl(228, 40%, 14%);     /* Deep Charcoal Navy */
  --text-muted: hsl(228, 15%, 45%);    /* Soft Slate */
  --text-light: hsl(210, 20%, 98%);    /* Soft light text */
  
  /* Fonts */
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(12, 27, 51, 0.04);
  --shadow-md: 0 10px 30px rgba(12, 27, 51, 0.06);
  --shadow-lg: 0 20px 40px rgba(12, 27, 51, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  /* Transition states */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout constraints */
  --max-width: 1200px;
  --header-height: 80px;
}

/* ==========================================
   2. Reset & Global Styles (Reduced Font Sizes)
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px; /* Reduced from 16px to scale down all text */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 2.3rem; }  /* Reduced from 2.75rem */
h2 { font-size: 1.85rem; } /* Reduced from 2.25rem */
h3 { font-size: 1.4rem; }  /* Reduced from 1.75rem */
h4 { font-size: 1.15rem; } /* Reduced from 1.25rem */

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--secondary-hover);
}

ul, ol {
  list-style-position: inside;
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

/* ==========================================
   3. Common Layout Components
   ========================================== */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 70px 0; /* Reduced vertical padding */
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-navy {
  background-color: var(--bg-navy);
  color: var(--text-light);
}

.section-navy h2, 
.section-navy h3, 
.section-navy p {
  color: var(--text-light);
}

.text-center {
  text-align: center;
}

/* Corrected Centered Section Title */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  width: 100%;
  left: 0;
  transform: none;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Brighter Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 26px; /* Reduced from 30px */
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(12, 27, 51, 0.07);
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--secondary-rgb), 0.35);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 26px;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
  font-size: 0.92rem;
  gap: 8px;
}

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

.btn-primary:hover {
  background: var(--secondary-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(var(--secondary-rgb), 0.25);
}

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

.btn-outline:hover {
  background: var(--secondary);
  color: white;
  transform: translateY(-2px);
}

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

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

/* ==========================================
   4. Header & Navigation (Brightened Theme)
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(12, 27, 51, 0.08);
  transition: var(--transition-normal);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  height: 70px;
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 30px;
  width: auto;
}

/* Redesigned Corporate Logo Text */
.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
  letter-spacing: 0.5px;
  line-height: 1.1;
  text-transform: uppercase;
}

.logo-text span {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--secondary);
  display: block;
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  margin-top: 1px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-heading);
  position: relative;
  padding: 8px 0;
}

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

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

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

/* Navigation dropdown styling */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown .dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--bg-card);
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(12, 27, 51, 0.08);
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast) ease, transform var(--transition-fast) ease;
}

.nav-dropdown .dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  transition: background var(--transition-fast), color var(--transition-fast);
  text-align: left;
}

.nav-dropdown .dropdown-menu a:hover {
  background-color: rgba(var(--secondary-rgb), 0.05);
  color: var(--secondary);
}

.dropdown-caret {
  font-size: 0.75rem;
  margin-left: 2px;
  transition: transform var(--transition-fast);
  display: inline-block;
  vertical-align: middle;
}

/* Hover effects for desktop */
@media (min-width: 769px) {
  .nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  
  .nav-dropdown:hover .dropdown-caret {
    transform: rotate(180deg);
  }
}

/* Mobile dropdown styles */
@media (max-width: 768px) {
  .nav-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    width: 100%;
    text-align: center;
    transition: max-height var(--transition-normal) ease;
  }
  
  .nav-dropdown.active .dropdown-menu {
    max-height: 400px;
  }

  .nav-dropdown .dropdown-menu a {
    text-align: center;
    padding: 8px 20px;
    font-size: 1rem;
    color: var(--text-muted);
  }

  .nav-dropdown.active .dropdown-caret {
    transform: rotate(180deg);
  }
}


/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition-normal);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================
   5. Hero Image Slider (Reduced Height)
   ========================================== */
.hero-slider {
  position: relative;
  height: 90vh; /* Restored to full size height */
  width: 100%;
  overflow: hidden;
  background-color: var(--primary);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-slow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(6, 13, 70, 0.55) 0%, rgba(6, 13, 70, 0.2) 100%);
  z-index: 1;
}

.slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: left; /* Keep text left-aligned */
  max-width: 650px; /* Reduced for better text wrapping when left-aligned */
  padding: 0 20px;
  transform: translateY(30px);
  opacity: 0;
  transition: var(--transition-slow);
  transition-delay: 0.2s;
}

.slide.active .slide-content {
  transform: translateY(0);
  opacity: 1;
}

.slide-badge {
  display: inline-block;
  background: rgba(var(--secondary-rgb), 0.25);
  border: 1px solid var(--secondary);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.slide h2 {
  font-size: 2.8rem; /* Reduced from 3.5rem */
  color: white;
  margin-bottom: 16px;
  line-height: 1.15;
}

.slide p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
  font-weight: 300;
}

/* Slider Controls */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-normal);
}

.slider-arrow:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-50%) scale(1.05);
}

.arrow-prev { left: 20px; }
.arrow-next { right: 20px; }

.slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

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

.slider-dot.active {
  background: var(--secondary);
  width: 24px;
  border-radius: 6px;
}

/* ==========================================
   6. Custom Sub-hero / Banners (With Background Images)
   ========================================== */
.sub-hero {
  position: relative;
  padding: 225px 0 125px 0; /* Taller banners for main pages */
  text-align: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--primary);
}

.sub-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(6, 13, 70, 0.65) 0%, rgba(6, 13, 70, 0.35) 100%);
  z-index: 1;
}

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

.sub-hero h1 {
  color: white;
  font-size: 2.3rem; /* Reduced from 3rem */
  margin-bottom: 12px;
}

.breadcrumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--secondary);
}

/* ==========================================
   7. Home Elements: Intro, Services, Certs
   ========================================== */
/* Welcome / Intro Box (Constrained Image Sizes) */
.intro-image-container {
  position: relative;
  display: flex;
  justify-content: center;
}

.intro-image-container img {
  max-width: 440px; /* Reduced from expanding fully */
  max-height: 330px; /* Constrained height */
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.intro-image-container::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: -15px;
  bottom: -15px;
  border: 3px solid var(--secondary);
  border-radius: var(--radius-md);
  z-index: -1;
  transition: var(--transition-normal);
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.intro-image-container:hover::after {
  top: 8px;
  left: 8px;
  right: -8px;
  bottom: -8px;
}

.welcome-badge {
  background: rgba(var(--secondary-rgb), 0.1);
  color: var(--secondary);
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  display: inline-block;
  margin-bottom: 12px;
}

.welcome-quote {
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 500;
  border-left: 4px solid var(--secondary);
  padding-left: 16px;
  margin: 20px 0;
  font-style: italic;
}

/* Services Home list */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card-home {
  text-align: center;
  background: var(--bg-card);
  padding: 35px 20px; /* Reduced padding */
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(12, 27, 51, 0.07);
  transition: var(--transition-normal);
}

.service-card-home:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--secondary-rgb), 0.35);
}

.service-icon-wrapper {
  width: 64px;
  height: 64px;
  background: rgba(var(--secondary-rgb), 0.08);
  color: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  font-size: 1.8rem;
  transition: var(--transition-normal);
}

.service-card-home:hover .service-icon-wrapper {
  background: var(--secondary);
  color: white;
  transform: scale(1.1);
}

.service-card-home h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.service-card-home p {
  font-size: 0.88rem;
  margin-bottom: 0;
}

/* Certified Grid Home */
.certifications-section {
  padding: 50px 0;
  background-color: var(--bg-card);
  border-top: 1px solid rgba(12, 27, 51, 0.06);
}

.certs-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.cert-logo {
  max-height: 70px; /* Constrained from 80px */
  width: auto;
  filter: grayscale(1);
  opacity: 0.5;
  transition: var(--transition-normal);
}

.cert-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.06);
}

/* ==========================================
   8. About Us / Employer Integration
   ========================================== */
.about-mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.mission-card {
  border-top: 4px solid var(--secondary);
}

.vision-card {
  border-top: 4px solid var(--primary);
}

.commitment-card {
  border-top: 4px solid var(--accent);
}

/* Certificates light-box gallery (Constrained size) */
.certificates-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.cert-gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(12, 27, 51, 0.08);
  background: white;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
  max-width: 240px; /* Constrained certificate display width */
  margin: 0 auto;
  width: 100%;
}

.cert-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cert-gallery-item::after {
  content: '\d83d\udd0d  View';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 27, 51, 0.85);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-normal);
}

.cert-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.cert-gallery-item:hover::after {
  opacity: 1;
}

/* Form Styles */
.form-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 35px; /* Reduced from 40px */
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(12, 27, 51, 0.06);
}

.form-title {
  margin-bottom: 20px;
  font-size: 1.6rem;
  border-left: 4px solid var(--secondary);
  padding-left: 15px;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 18px;
}

.form-row .form-group {
  margin-bottom: 0;
}

label {
  display: block;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 12px 16px; /* Reduced padding */
  border: 1px solid hsl(210, 15%, 85%);
  background-color: var(--bg-main);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-dark);
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(var(--secondary-rgb), 0.12);
}

.form-control.invalid {
  border-color: var(--accent);
  background-color: #fff8f6;
}

.form-control.invalid:focus {
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.15);
}

.error-message {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 4px;
  display: block;
  animation: formErrorFadeIn 0.2s ease-in-out;
}

@keyframes formErrorFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

textarea.form-control {
  min-height: 120px; /* Reduced height */
  resize: vertical;
}

/* File Upload input custom styling */
.file-upload-wrapper {
  position: relative;
  display: block;
}

.file-upload-control {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed hsl(210, 15%, 80%);
  padding: 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-main);
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.file-upload-wrapper:hover .file-upload-label {
  border-color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.02);
}

.file-upload-wrapper.has-file .file-upload-label {
  border-color: #2ec4b6;
  background: rgba(46, 196, 182, 0.05);
  color: #2ec4b6;
}

/* Lightbox popup */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 27, 51, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  background: white;
  padding: 10px;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: transparent;
  border: none;
}

.lightbox-caption {
  color: rgba(255,255,255,0.8);
  font-family: var(--font-heading);
  text-align: center;
  margin-top: 15px;
  font-size: 1.1rem;
  font-weight: 500;
}

/* ==========================================
   9. Services Details & Policies
   ========================================== */
.service-details-row {
  margin-bottom: 60px;
}

.service-details-row:last-child {
  margin-bottom: 0;
}

.policies-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.policy-card {
  text-align: center;
  padding: 30px 18px;
}

.policy-icon {
  width: 54px;
  height: 54px;
  background: rgba(var(--secondary-rgb), 0.08);
  color: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  font-size: 1.6rem;
}

.policy-card h4 {
  margin-bottom: 10px;
}

.policy-card p {
  font-size: 0.88rem;
  margin-bottom: 0;
}

/* ==========================================
   10. Management Team (Merged into About page)
   ========================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.team-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.team-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(12, 27, 51, 0.08);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--secondary-rgb), 0.3);
}

.team-header {
  height: 140px; /* Reduced from 160px */
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 4px solid var(--bg-card);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  box-shadow: var(--shadow-md);
}

.team-info {
  padding: 20px;
  text-align: center;
  flex-grow: 1;
}

.team-name {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.team-position {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.team-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: left;
}

.team-bio ul {
  list-style: none;
  padding: 0;
  text-align: center;
}

.team-bio li {
  margin-bottom: 6px;
  position: relative;
  font-weight: 500;
  font-size: 0.85rem;
}

/* ==========================================
   11. Contact Page Elements & Transit Counters
   ========================================== */
.contact-details-box {
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  padding: 40px;
}

.contact-details-box h2, .contact-details-box h3 {
  color: white;
  margin-bottom: 20px;
}

.contact-info-list {
  list-style: none;
  margin-bottom: 30px;
}

.contact-info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.contact-info-icon {
  color: var(--secondary);
  font-size: 1.25rem;
  margin-top: 3px;
}

.contact-info-text {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}

.contact-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
}

/* Commute Progress Bars */
.commute-container {
  margin-top: 30px;
}

.commute-title {
  font-size: 1.05rem;
  color: white;
  margin-bottom: 18px;
}

.commute-item {
  margin-bottom: 16px;
}

.commute-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 6px;
  font-weight: 500;
}

.commute-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

.commute-bar-fill {
  height: 100%;
  background: var(--secondary);
  border-radius: 4px;
  width: 0; /* Animated in JS */
  transition: width var(--transition-slow);
}

/* ==========================================
   12. Footer
   ========================================== */
.footer {
  background: hsl(217, 60%, 8%);
  color: rgba(255, 255, 255, 0.65);
  padding: 60px 0 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer h3, .footer h4 {
  color: white;
  margin-bottom: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.6fr;
  gap: 35px;
  margin-bottom: 40px;
}

.footer-about p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links-list {
  list-style: none;
}

.footer-links-item {
  margin-bottom: 10px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: white;
  padding-left: 6px;
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.footer-contact-icon {
  color: var(--secondary);
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Form Toast Notification */
.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #2ec4b6;
  color: white;
  padding: 12px 26px;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(46, 196, 182, 0.3);
  font-family: var(--font-heading);
  font-weight: 600;
  z-index: 3000;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  bottom: 40px;
}

/* ==========================================
   13. Responsive Styles (Media Queries)
   ========================================== */
@media (max-width: 1024px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  
  .grid-4, .services-grid, .policies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
  
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-main);
    flex-direction: column;
    padding: 50px 0;
    gap: 30px;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 999;
    border-top: 1px solid rgba(12, 27, 51, 0.08);
  }
  
  .nav.active {
    transform: translateX(0);
  }
  
  .nav-link {
    font-size: 1.2rem;
    color: var(--primary);
  }
  
  .grid-2, .grid-3, .about-mission-grid, .certificates-gallery, .team-grid, .team-grid-4 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .slide h2 {
    font-size: 2.2rem;
  }
  
  .slide p {
    font-size: 1rem;
  }
  
  .slider-arrow {
    width: 40px;
    height: 40px;
  }
  .arrow-prev { left: 10px; }
  .arrow-next { right: 10px; }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-row .form-group {
    margin-bottom: 20px;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .sub-hero {
    padding: 145px 0 65px 0;
  }
}

@media (max-width: 480px) {
  .grid-4, .services-grid, .policies-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .form-wrapper {
    padding: 20px 14px;
  }
}

/* ==========================================
   11. FAQ Page Styles
   ========================================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.faq-category-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 40px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(var(--secondary-rgb), 0.15);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(12, 27, 51, 0.08);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
}

.faq-item:hover {
  border-color: rgba(var(--secondary-rgb), 0.25);
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: rgba(var(--secondary-rgb), 0.02);
}

.faq-icon {
  font-size: 0.8rem;
  color: var(--secondary);
  transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-in-out;
}

.faq-answer-inner {
  padding: 0 24px 20px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer-inner p {
  margin-bottom: 10px;
}

.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* High enough to contain the text */
}

@media (max-width: 768px) {
  .faq-question {
    padding: 16px 20px;
    font-size: 0.98rem;
  }
  
  .faq-answer-inner {
    padding: 0 20px 16px 20px;
    font-size: 0.9rem;
  }
}

/* Sidebar services navigation links */
.sidebar-link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.92rem;
  background: var(--bg-alt);
  color: var(--text-dark);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.sidebar-link:hover {
  background: var(--bg-main);
  border-color: rgba(var(--secondary-rgb), 0.2);
  color: var(--secondary);
  padding-left: 18px; /* Subtle indent micro-animation */
}

.sidebar-link.active {
  background: var(--primary);
  color: white !important;
  font-weight: 600;
}

.sidebar-link.active:hover {
  color: white !important;
  padding-left: 14px; /* No indent on active link */
}

/* Service Sub-Hero Banner overrides */
.sub-hero-service {
  padding: 165px 0 85px 0 !important;
}

@media (max-width: 768px) {
  .sub-hero-service {
    padding: 125px 0 55px 0 !important;
  }
}

/* Sidebar grid layout */
.grid-sidebar {
  display: grid;
  grid-template-columns: 2.7fr 1.3fr;
  gap: 40px;
  align-items: start;
}

  }
}

/* ==========================================
   16. Accessibility & WCAG Improvements
   ========================================== */

/* Skip Link style (hidden by default, positioned off-screen) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--secondary);
  color: white;
  padding: 10px 20px;
  z-index: 2000;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast) ease;
  font-family: var(--font-heading);
}

/* Show skip-link when keyboard focus is active */
.skip-link:focus {
  top: 15px;
  outline: none;
  box-shadow: var(--shadow-lg);
}

/* Custom visual focus states for active keyboard indicators */
:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Dropdown menu keyboard focus-within accessibility support */
@media (min-width: 769px) {
  .nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  
  .nav-dropdown:focus-within .dropdown-caret {
    transform: rotate(180deg);
  }
}



