/* ===== CSS RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary-blue: #355eb9;
  --primary-blue-dark: #1d4ed8;
  --primary-blue-light: #3b82f6;
  --secondary-blue: #1e40af;
  --accent-blue: #60a5fa;
  --success-green: #10b981;
  --error-red: #ef4444;
  --warning-yellow: #f59e0b;

  --white: #ffffff;
  --black: #000000;
  --grey-50: #f9fafb;
  --grey-100: #f3f4f6;
  --grey-200: #e5e7eb;
  --grey-300: #d1d5db;
  --grey-400: #9ca3af;
  --grey-500: #6b7280;
  --grey-600: #4b5563;
  --grey-700: #374151;
  --grey-800: #1f2937;
  --grey-900: #111827;

  /* Typography - Responsive Font Sizes */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-primary: var(--font-family);
  --font-heading: var(--font-family);
  
  /* Responsive font sizes using clamp() */
  --font-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --font-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --font-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --font-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3rem);
  --font-5xl: clamp(3rem, 2.4rem + 3vw, 4rem);

  /* Responsive Spacing */
  --spacing-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --spacing-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --spacing-md: clamp(0.75rem, 0.6rem + 0.75vw, 1rem);
  --spacing-lg: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --spacing-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --spacing-2xl: clamp(2rem, 1.6rem + 2vw, 3rem);
  --spacing-3xl: clamp(3rem, 2.4rem + 3vw, 4rem);

  /* Container Sizes */
  --container-xs: 100%;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-max-width: min(1200px, 95vw);

  /* Responsive Padding */
  --container-padding: clamp(1rem, 2vw, 2rem);
  --section-padding: clamp(2rem, 5vw, 5rem) 0;

  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
  --transition-slow: all 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border Radius */
  --border-radius: clamp(4px, 0.5vw, 8px);
  --border-radius-lg: clamp(8px, 1vw, 12px);
  --border-radius-xl: clamp(12px, 1.5vw, 16px);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  line-height: 1.6;
  color: var(--grey-800);
  background: linear-gradient(135deg, var(--grey-50) 0%, var(--grey-100) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  cursor: pointer;
}

/* ===== RESPONSIVE CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ===== UTILITY CLASSES ===== */
.laps {
  color: rgb(8, 8, 124);
  font-weight: bold;
}

.international {
  color: black;
}

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

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

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

/* Responsive text alignment */
@media (max-width: 768px) {
  .text-center-mobile {
    text-align: center;
  }
  
  .text-left-mobile {
    text-align: left;
  }
}

/* Animation classes with reduced motion support */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ===== RESPONSIVE BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  min-height: 44px; /* Touch target size */
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(53, 94, 185, 0.3);
}

.btn-secondary {
  background: var(--white);
  color: var(--grey-700);
  border: 2px solid var(--grey-300);
}

.btn-secondary:hover {
  background: var(--grey-50);
  border-color: var(--grey-400);
}

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

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

/* Responsive button sizes */
@media (max-width: 768px) {
  .btn {
    width: 100%;
    padding: var(--spacing-lg);
    font-size: var(--font-base);
  }
  
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .btn-group .btn {
    width: 100%;
  }
}

@media (min-width: 769px) {
  .btn-group {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
  }
  
  .btn-group .btn {
    flex: 1;
    min-width: 120px;
  }
}

/* ===== RESPONSIVE TOP HEADER ===== */
.top-header {
  background: var(--grey-800);
  color: var(--white);
  padding: var(--spacing-sm) 0;
  font-size: var(--font-xs);
}

.top-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.top-header-left,
.top-header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.social-links {
  display: flex;
  gap: var(--spacing-xs);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(28px, 4vw, 32px);
  height: clamp(28px, 4vw, 32px);
  background: var(--grey-700);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  font-size: var(--font-xs);
}

.social-links a:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
}

/* Hide top header on small screens */
@media (max-width: 640px) {
  .top-header {
    display: none;
  }
}

/* ===== RESPONSIVE NAVIGATION ===== */
.main-nav {
  background: var(--white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--container-padding);
}

.nav-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
}

.nav-brand .logo {
  height: clamp(60px, 8vw, 90px);
  width: auto;
}

.site-name h3,
.site-name h4 {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  line-height: 1.2;
  margin: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--grey-700);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-xs);
  padding: var(--spacing-sm) 0;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}

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

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

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

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--grey-700);
  text-decoration: none;
  transition: var(--transition);
  font-size: var(--font-sm);
}

.dropdown-menu a:hover {
  background: var(--grey-50);
  color: var(--primary-blue);
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(36px, 5vw, 40px);
  height: clamp(36px, 5vw, 40px);
  background: var(--grey-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: scale(1.1);
}

.enquiry-btn {
  background: var(--primary-blue);
  color: var(--white);
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: var(--font-xs);
  white-space: nowrap;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--spacing-sm);
  position: relative;
  z-index: 10001;
  background: none;
  border: none;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: var(--grey-700);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* ===== RESPONSIVE HERO SECTION ===== */
.hero {
  position: relative;
  min-height: clamp(60vh, 80vh, 85vh);
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://www.hseblog.com/wp-content/uploads/2023/10/What-Is-The-Duties-And-Responsibilities-Of-Safety-Officer.webp")
    center / cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--spacing-xl);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-text {
  flex: 1;
  color: var(--black);
}

.hero-title {
  font-size: var(--font-4xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
}

.hero-title .highlight {
  color: var(--accent-blue);
  position: relative;
}

.hero-description {
  font-size: var(--font-lg);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

/* ===== RESPONSIVE FORM STYLES ===== */
.form-header {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.logo {
  width: clamp(60px, 10vw, 80px);
  height: clamp(60px, 10vw, 80px);
  border-radius: 50%;
  object-fit: cover;
}

.header-text h1 {
  font-size: var(--font-2xl);
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

.header-text h2 {
  font-size: var(--font-xl);
  font-weight: 600;
  color: var(--grey-800);
  margin-bottom: var(--spacing-xs);
  line-height: 1.2;
}

.header-text p {
  color: var(--grey-600);
  font-size: var(--font-base);
}

.form-title {
  font-size: var(--font-xl);
  font-weight: 600;
  color: var(--grey-900);
  padding: var(--spacing-lg) 0;
  border-top: 2px solid var(--grey-200);
  margin-top: var(--spacing-lg);
}

/* ===== RESPONSIVE FORM SECTIONS ===== */
.admission-form {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.form-section {
  padding: var(--spacing-xl);
  border-bottom: 1px solid var(--grey-200);
}

.form-section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: var(--font-xl);
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-blue);
}

/* Responsive form grid */
.form-row {
  display: grid;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* Grid breakpoints */
@media (min-width: 1200px) {
  .form-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

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

.form-group label {
  font-weight: 500;
  color: var(--grey-700);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-sm);
}

.required {
  color: var(--error-red);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--spacing-md);
  border: 2px solid var(--grey-200);
  border-radius: var(--border-radius);
  font-size: var(--font-base);
  transition: var(--transition);
  background: var(--white);
  min-height: 44px; /* Touch target size */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(53, 94, 185, 0.1);
}

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

/* ===== RESPONSIVE PHOTO UPLOAD ===== */
.photo-upload {
  max-width: 100%;
}

.photo-container {
  position: relative;
  width: 100%;
  max-width: 200px;
}

.photo-container input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.photo-preview {
  width: 100%;
  aspect-ratio: 3/4;
  max-width: 150px;
  border: 2px dashed var(--grey-300);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--grey-50);
  position: relative;
  overflow: hidden;
}

.photo-preview:hover {
  border-color: var(--primary-blue);
  background: rgba(53, 94, 185, 0.05);
}

.photo-preview i {
  font-size: var(--font-2xl);
  color: var(--grey-400);
  margin-bottom: var(--spacing-sm);
}

.photo-preview span {
  color: var(--grey-600);
  font-size: var(--font-sm);
  text-align: center;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.photo-preview:hover .photo-overlay {
  opacity: 1;
}

.btn-remove-photo {
  background: var(--error-red);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-photo:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* ===== RESPONSIVE CHECKBOX & RADIO ===== */
.checkbox-group,
.radio-group {
  display: grid;
  gap: var(--spacing-md);
}

@media (min-width: 1024px) {
  .checkbox-group {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .checkbox-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

.radio-group {
  display: flex;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}

.radio-group.inline {
  gap: var(--spacing-lg);
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  transition: var(--transition);
  min-height: 44px; /* Touch target size */
}

.checkbox-item:hover,
.radio-item:hover {
  background: var(--grey-50);
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
  display: none;
}

.checkmark,
.radio-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--grey-300);
  margin-right: var(--spacing-md);
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}

.checkmark {
  border-radius: 4px;
}

.radio-mark {
  border-radius: 50%;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark,
.radio-item input[type="radio"]:checked + .radio-mark {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.radio-item input[type="radio"]:checked + .radio-mark::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}

/* ===== RESPONSIVE PROGRAM GROUPS ===== */
.program-group {
  margin-bottom: var(--spacing-xl);
}

.program-group h5 {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--grey-800);
  margin-bottom: var(--spacing-lg);
  padding-left: var(--spacing-md);
  border-left: 4px solid var(--primary-blue);
}

/* ===== RESPONSIVE OFFICE SECTION ===== */
.office-section {
  background: var(--grey-50);
}

/* ===== RESPONSIVE FORM ACTIONS ===== */
.form-actions {
  padding: var(--spacing-xl);
  background: var(--grey-50);
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

/* ===== RESPONSIVE SUCCESS MESSAGE ===== */
.success-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--spacing-lg);
}

.success-content {
  background: var(--white);
  padding: var(--spacing-3xl);
  border-radius: var(--border-radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 100%;
}

.success-content i {
  font-size: var(--font-5xl);
  color: var(--success-green);
  margin-bottom: var(--spacing-lg);
}

.success-content h3 {
  font-size: var(--font-2xl);
  color: var(--grey-900);
  margin-bottom: var(--spacing-lg);
}

.success-content p {
  color: var(--grey-600);
  font-size: var(--font-base);
}

/* ===== RESPONSIVE VALIDATION STYLES ===== */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: var(--error-red);
}

.error-message {
  color: var(--error-red);
  font-size: var(--font-sm);
  margin-top: var(--spacing-xs);
}

/* ===== RESPONSIVE PROGRESS BAR ===== */
.form-progress {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.progress-bar {
  width: 100%;
  height: clamp(6px, 1vw, 8px);
  background: var(--grey-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: var(--font-sm);
  color: var(--grey-600);
  font-weight: 500;
}

/* ===== RESPONSIVE ALERTS ===== */
.alert {
  position: fixed;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: var(--border-radius);
  z-index: 1000;
  max-width: min(350px, calc(100vw - 2rem));
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.auto-save-indicator {
  position: fixed;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  background: var(--success-green);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius);
  z-index: 1000;
  font-size: var(--font-sm);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ===== RESPONSIVE WHATSAPP BUTTON ===== */
.whatsapp-float {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.whatsapp-text {
  background: var(--white);
  color: var(--grey-800);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  font-weight: 500;
  opacity: 0;
  transform: translateX(20px);
  transition: var(--transition);
  font-size: var(--font-sm);
  white-space: nowrap;
}

.whatsapp-float:hover .whatsapp-text {
  opacity: 1;
  transform: translateX(0);
}

.whatsapp-btn {
  width: clamp(50px, 8vw, 60px);
  height: clamp(50px, 8vw, 60px);
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

/* ===== RESPONSIVE SEARCH MODAL ===== */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: var(--spacing-lg);
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-modal-content {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 500px;
  position: relative;
}

.search-close {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  background: none;
  border: none;
  font-size: var(--font-xl);
  cursor: pointer;
  color: var(--grey-500);
  transition: var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-close:hover {
  color: var(--grey-800);
}

.search-form {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: var(--spacing-lg);
  border: 2px solid var(--grey-200);
  border-radius: var(--border-radius);
  font-size: var(--font-base);
  transition: var(--transition);
  background: var(--white);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(53, 94, 185, 0.1);
}

.search-submit {
  padding: var(--spacing-lg) var(--spacing-xl);
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.search-submit:hover {
  background: var(--primary-blue-dark);
}

/* ===== RESPONSIVE FOOTER ===== */
.footer {
  background: var(--grey-900);
  color: var(--white);
  padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

.footer-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.footer-main {
  display: grid;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 1024px) {
  .footer-main {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .footer-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-brand h3 {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: var(--spacing-lg);
}

.footer-brand p {
  color: var(--grey-300);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-base);
}

.footer-social {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-social {
    justify-content: flex-start;
  }
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--grey-800);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
}

.footer-section h4 {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--white);
}

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

.footer-links li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: var(--grey-300);
  text-decoration: none;
  transition: var(--transition);
  font-size: var(--font-base);
}

.footer-links a:hover {
  color: var(--primary-blue);
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--grey-300);
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-base);
}

.footer-contact i {
  color: var(--primary-blue);
  width: 16px;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--grey-800);
  padding-top: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--grey-400);
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

@media (max-width: 767px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

.footer-bottom-links {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--grey-400);
  text-decoration: none;
  transition: var(--transition);
  font-size: var(--font-sm);
}

.footer-bottom-links a:hover {
  color: var(--primary-blue);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Extra Large Screens (1536px and up) */
@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: 5rem;
  }
  
  .form-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large Screens (1024px to 1535px) */
@media (min-width: 1024px) and (max-width: 1535px) {
  .hero-content {
    padding: var(--spacing-2xl);
  }
  
  .form-section {
    padding: var(--spacing-2xl);
  }
}

/* Medium Screens (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .top-header-left,
  .top-header-right {
    gap: var(--spacing-sm);
  }
  
  .contact-info {
    font-size: var(--font-xs);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .checkbox-group {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .radio-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Small Screens (640px to 767px) */
@media (min-width: 640px) and (max-width: 767px) {
  .nav-brand .logo {
    height: 70px;
  }
  
  .site-name h3,
  .site-name h4 {
    font-size: 1.25rem;
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-xl);
  }
  
  .logo-section {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .whatsapp-text {
    display: none;
  }
}

/* Mobile Navigation */
@media (max-width: 1023px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--spacing-xl);
    transform: translateX(-100%);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-lg);
  }
  
  .nav-link {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--grey-100);
    width: 100%;
    justify-content: space-between;
    font-size: var(--font-base);
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--grey-50);
    margin-top: var(--spacing-sm);
    border-radius: var(--border-radius);
  }
  
  .nav-actions {
    margin-top: var(--spacing-xl);
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-lg);
  }
  
  .enquiry-btn,
  .search-btn {
    width: 100%;
    justify-content: center;
    padding: var(--spacing-lg);
    font-size: var(--font-base);
  }
  
  .search-btn {
    border-radius: var(--border-radius);
    height: auto;
  }
}

/* Extra Small Screens (below 640px) */
@media (max-width: 639px) {
  :root {
    --container-padding: 1rem;
  }
  
  .hero {
    min-height: 70vh;
  }
  
  .hero-content {
    padding: var(--spacing-lg);
  }
  
  .hero-title {
    font-size: var(--font-3xl);
    line-height: 1.1;
  }
  
  .hero-description {
    font-size: var(--font-base);
  }
  
  .logo-section {
    flex-direction: column;
    text-align: center;
  }
  
  .header-text h1 {
    font-size: var(--font-xl);
  }
  
  .header-text h2 {
    font-size: var(--font-lg);
  }
  
  .form-section {
    padding: var(--spacing-lg);
  }
  
  .section-title {
    font-size: var(--font-lg);
  }
  
  .checkbox-group,
  .radio-group {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    padding: var(--spacing-lg);
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: var(--spacing-lg);
  }
  
  .success-content {
    padding: var(--spacing-xl);
    margin: var(--spacing-lg);
  }
  
  .search-form {
    flex-direction: column;
  }
  
  .search-input,
  .search-submit {
    width: 100%;
  }
  
  .alert,
  .auto-save-indicator {
    left: var(--spacing-sm);
    right: var(--spacing-sm);
    max-width: calc(100vw - 2rem);
  }
  
  .whatsapp-float {
    bottom: var(--spacing-lg);
    right: var(--spacing-sm);
  }
}

/* Ultra Small Screens (below 480px) */
@media (max-width: 479px) {
  .hero-title {
    font-size: var(--font-2xl);
  }
  
  .section-title {
    font-size: var(--font-base);
  }
  
  .form-section {
    padding: var(--spacing-md);
  }
  
  .form-actions {
    padding: var(--spacing-md);
  }
  
  .success-content {
    padding: var(--spacing-lg);
  }
  
  .success-content i {
    font-size: var(--font-3xl);
  }
  
  .success-content h3 {
    font-size: var(--font-xl);
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  body {
    background: white;
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .top-header,
  .main-nav,
  .hero,
  .form-actions,
  .success-message,
  .whatsapp-float,
  .search-modal,
  .footer {
    display: none !important;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
  
  .form-header,
  .admission-form {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .form-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .section-title {
    color: black;
    border-bottom-color: black;
  }
  
  .form-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .checkbox-group {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .photo-preview {
    border: 1px solid #ccc;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-title .highlight:after {
    animation: none;
  }
  
  .whatsapp-btn {
    animation: none;
  }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus,
.checkbox-item:focus-within,
.radio-item:focus-within {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --grey-600: #000000;
    --grey-700: #000000;
    --grey-800: #000000;
    --grey-900: #000000;
    --primary-blue: #0000ff;
    --error-red: #ff0000;
    --success-green: #008000;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1f2937;
    --grey-50: #374151;
    --grey-100: #4b5563;
    --grey-200: #6b7280;
    --grey-800: #f9fafb;
    --grey-900: #ffffff;
  }
  
  body {
    background: linear-gradient(135deg, var(--grey-800) 0%, var(--grey-700) 100%);
    color: var(--grey-100);
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideIn {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(10px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ===== SKIP LINKS FOR ACCESSIBILITY ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-blue);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  font-size: var(--font-sm);
}

.skip-link:focus {
  top: 6px;
}

/* ===== RESPONSIVE UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

@media (max-width: 767px) {
  .hidden-mobile {
    display: none !important;
  }
  
  .visible-mobile {
    display: block !important;
  }
}

@media (min-width: 768px) {
  .hidden-desktop {
    display: none !important;
  }
  
  .visible-desktop {
    display: block !important;
  }
}

/* ===== RESPONSIVE IMAGES ===== */
img {
  max-width: 100%;
  height: auto;
}

/* ===== RESPONSIVE TABLES ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 600px;
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE GRID SYSTEM ===== */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 { 
    grid-template-columns: 1fr; 
  }
}

/* ===== RESPONSIVE FLEXBOX UTILITIES ===== */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

@media (max-width: 767px) {
  .flex-col-mobile {
    flex-direction: column;
  }
  
  .items-start-mobile {
    align-items: flex-start;
  }
  
  .justify-start-mobile {
    justify-content: flex-start;
  }
}