/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Variables */
  --primary-color: #1a4d80;
  --secondary-color: #2563eb;
  --secondary-hover: #1e40af; /* Darker blue for better contrast on hover */
  --accent-color: #dc2626;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --focus-color: #3b82f6;
  --hero-overlay: rgba(0, 0, 0, 0.6); /* 60% opacity for good text contrast */
  --text-white: #ffffff;
  
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Quicksand', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-md);
}

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

a:hover,
a:focus {
  color: var(--primary-color);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--text-white);
  color: white;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Header */
header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-block;
  text-decoration: none;
  height: 50px;
  line-height: 50px;
}

.logo img {
  height: 50px;
  width: auto;
  display: block;
  transition: opacity var(--transition-fast);
}

.logo:hover img {
  opacity: 0.8;
}

.logo:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
  border-radius: 2px;
}
.body-text{
  font-family: var(--font-body);
  font-size: 3rem;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--text-white);
}
/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: var(--spacing-xs) 0;
  position: relative;
}

nav a:hover,
nav a:focus,
nav a[aria-current="page"] {
  color: var(--secondary-color);
  text-decoration: none;
}

nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  padding: var(--spacing-xs);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
}

section {
  margin-bottom: var(--spacing-2xl);
}

/* Hero Section */
.hero {
  background-image: url('../images/kaf81-hero-image.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: white;
  padding: var(--spacing-2xl) var(--spacing-md);
  text-align: center;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark overlay for text readability */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-overlay);
  z-index: 1;
}

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

.hero h1, .hero h2 {
  color: var(--text-white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
.hero h1{
  font-family: var(--font-body) !important;
}
.hero p {
  color: var(--text-white);
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.hero a {
  color: var(--text-white);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--primary-color);
  color: var(--text-white);
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  background-color: var(--secondary-hover);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  color: var(--text-white);
}

.btn:focus-visible {
  outline: 3px solid var(--text-white);
  outline-offset: 3px;
  background-color: var(--secondary-color);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--text-white);
  color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.btn-secondary:focus-visible {
  outline: 3px solid var(--text-white);
  outline-offset: 3px;
}

/* Call-to-Action Button - More Prominent */
.btn-cta {
  font-size: 1.25rem;
  padding: var(--spacing-md) var(--spacing-xl);
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(37, 99, 235, 0.3);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: pulse-glow 2s ease-in-out infinite;
}

.btn-cta:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1a4d80 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 99, 235, 0.5);
  color: var(--text-white);
}

.btn-cta:active {
  transform: translateY(-1px) scale(1);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(37, 99, 235, 0.3);
  }
  50% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 30px rgba(37, 99, 235, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-cta {
    animation: none;
  }
}

/* Cards */
.card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin-top: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-lg) 0;
}

th,
td {
  padding: var(--spacing-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--primary-color);
}

/* Forms */
form {
  max-width: 600px;
  margin: var(--spacing-lg) 0;
}

.scholarship-form {
  max-width: 800px;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--focus-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.error-message {
  color: var(--accent-color);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  display: block;
}

input.error,
select.error,
textarea.error {
  border-color: var(--accent-color);
}

input.error:focus,
select.error:focus,
textarea.error:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.success-message {
  background-color: #10b981;
  color: white;
  padding: var(--spacing-sm);
  border-radius: 4px;
  margin: var(--spacing-md) 0;
}

/* Scholarship Form Specific Styles */
fieldset {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  background-color: var(--bg-light);
}

legend {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  padding: 0 var(--spacing-sm);
}

.required {
  color: var(--accent-color);
  font-weight: 700;
}

.form-note {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: var(--spacing-xs);
  font-style: italic;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xs);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.form-notes {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.form-notes ul {
  margin-left: var(--spacing-lg);
  margin-top: var(--spacing-sm);
}

.form-notes li {
  margin-bottom: var(--spacing-xs);
}

#form-messages {
  margin-bottom: var(--spacing-md);
}

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

img[loading="lazy"] {
  opacity: 0;
  transition: opacity var(--transition-normal);
}

img[loading="lazy"].loaded {
  opacity: 1;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.image-gallery img {
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) var(--spacing-md);
  margin-top: var(--spacing-2xl);
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content p {
  margin-bottom: var(--spacing-xs);
  color: var(--text-light);
}

/* Breadcrumbs */
.breadcrumbs {
  margin: var(--spacing-md) 0;
  font-size: 0.875rem;
}

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

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

.breadcrumbs span {
  margin: 0 var(--spacing-xs);
  color: var(--text-light);
}

/* FAQ */
.faq-item {
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-md);
}

.faq-question {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.faq-answer {
  color: var(--text-light);
  line-height: 1.8;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

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

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero {
    min-height: 400px;
  }

  .hero h1 {
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  }

  .hero p {
    font-size: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
  }

  .btn-cta {
    font-size: 1rem;
    padding: var(--spacing-sm) var(--spacing-lg);
  }

  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  nav.open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .header-container {
    position: relative;
  }

  .logo {
    height: 40px;
  }

  .logo img {
    height: 40px;
  }

  .image-gallery {
    grid-template-columns: 1fr;
  }

  .container {
    padding: var(--spacing-md) var(--spacing-sm);
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  nav,
  .btn {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

