@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --primary: #013356;
  --primary-light: #064a78;
  --primary-dark: #00223b;
  --accent: #C5A059;
  --accent-light: #d6b77a;
  --accent-dark: #aa843d;
  --text-dark: #1E2229;
  --text-muted: #5A6270;
  --bg-light: #F8F9FA;
  --bg-white: #FFFFFF;
  --bg-dark: #0f161e;
  --border-color: #E2E8F0;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --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);
  --radius: 12px;         /* Standardized input/small radius */
  --radius-lg: 24px;      /* Standardized card/container radius */
  --radius-pill: 100px;   /* Standardized button/island radius */
  --font-heading: 'Century Gothic', 'CenturyGothic', 'AppleGothic', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;

  /* Theme-specific variables mapping (Light Mode defaults) */
  --bg-body: var(--bg-light);
  --text-body: var(--text-dark);
  --text-heading: var(--primary);
  
  /* Apple Liquid Glass spec variables */
  --bg-card: linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 100%);
  --border-card: rgba(255, 255, 255, 0.45);
  --glass-highlight: inset 0 1px 2px rgba(255, 255, 255, 0.75), inset 0 -1px 1px rgba(255, 255, 255, 0.25);
  --shadow-card: 0 15px 35px -15px rgba(1, 51, 86, 0.08);
}

/* --- Dark Mode theme overrides --- */
body.dark-mode {
  --bg-body: #01223a; /* Deep blue background becomes dominant */
  --text-dark: #F8F9FA;
  --text-muted: #A0AEC0;
  --text-body: #F8F9FA;
  --text-heading: #FFFFFF;
  --border-color: rgba(255, 255, 255, 0.15);
  --bg-white: #001C30; /* Deep navy for dropdowns and inputs background */

  /* Apple Liquid Glass dark theme spec */
  --bg-card: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.04) 100%);
  --border-card: rgba(255, 255, 255, 0.25);
  --glass-highlight: inset 0 1px 2px rgba(255, 255, 255, 0.45), inset 0 -1px 1px rgba(255, 255, 255, 0.1);
  --shadow-card: 0 15px 35px -15px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, button, input, select, textarea, nav a, .btn {
  font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', 'Plus Jakarta Sans', 'Inter', sans-serif;
}

body {
  color: var(--text-body);
  background-color: var(--bg-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  letter-spacing: normal; /* Restored normal spacing to prevent touching characters */
}

h1, h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.25;
  letter-spacing: normal; /* Restored normal spacing to prevent touching characters */
}

h3, h4, h5, h6, .serif-font {
  font-family: var(--font-heading);
  font-weight: 600; /* Cleaner semi-bold weight for subheadings */
  color: var(--text-heading);
  line-height: 1.25;
  letter-spacing: normal;
}

.accent-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
  margin-bottom: 8px;
  display: block;
}

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

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

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

/* Header & Nav */
header {
  position: fixed;
  top: 40px; /* Sits below the 40px top bar */
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: transparent;
  transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-container {
  max-width: 100%; /* Stretches to the full viewport width unscrolled */
  margin: 0 auto;
  padding: 0 40px; /* Wider padding for flat full-width layout */
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-white); /* White background holds here */
  border-bottom: 1px solid var(--border-color); /* Bottom border holds here */
  border-radius: 0; /* flat corners unscrolled */
  transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.4s ease,
              border-color 0.4s ease,
              padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-width 0.4s ease;
}

body.dark-mode .nav-container {
  background-color: #01223a;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Floating pill menu when scrolled down (Dynamic Island Transformation) */
.scrolled header {
  top: 0; /* Slides up to overlay at top */
  padding: 15px 24px 0 24px;
  background-color: transparent !important;
}

.scrolled .nav-container {
  height: 64px;
  max-width: 1100px; /* Shrinks to centered pill */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.45) 100%) !important;
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: var(--radius-pill); /* Rounds corners to pill shape */
  box-shadow: var(--shadow-card), var(--glass-highlight);
  padding: 0 24px;
}

body.dark-mode .scrolled .nav-container {
  background: linear-gradient(135deg, rgba(1, 34, 58, 0.78) 0%, rgba(1, 34, 58, 0.58) 100%) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

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

.logo img {
  height: 50px;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.scrolled .logo img {
  height: 40px;
}

.logo-text h1 {
  font-size: 20px;
  margin: 0;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.logo-text p {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin: 0;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-body);
  position: relative;
  padding: 8px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
  transform: translateX(-50%);
}

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

nav a:hover,
nav a.active {
  color: var(--accent);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
  position: relative;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--primary);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  height: calc(100vh - 40px); /* Account for 40px static top-bar */
  min-height: 500px;
  color: var(--bg-white);
  overflow: hidden;
  display: flex;
  align-items: center; /* Vertically centered (middle aligned) */
  justify-content: flex-end; /* Right aligned horizontally */
  padding-bottom: 0;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

@keyframes kenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  animation: kenBurns 10s ease-in-out forwards;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(1, 51, 86, 0.85) 0%, rgba(15, 22, 30, 0.6) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 650px;
  margin: 0;
  margin-right: 8%; /* Shift slightly from the right edge */
  margin-left: auto;
  padding: 0 20px;
  text-align: right; /* Right align the text and buttons */
}

/* Selector override to right-align the inline center buttons container */
.hero-content div[style*="justify-content: center"] {
  justify-content: flex-end !important;
}

.hero h2 {
  color: var(--bg-white);
  font-size: 56px;
  margin-bottom: 24px;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 40px;
  font-weight: 300;
  max-width: 600px;
  margin-left: auto; /* Push margin left to keep block right-aligned */
  margin-right: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 15px;
  gap: 8px;
}

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

.btn-primary:hover {
  background-color: var(--accent-light);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

/* Sections */
section {
  padding: 80px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-header h2 {
  font-size: 36px;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent);
}

.section-header p {
  color: var(--text-muted);
  font-size: 16px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--glass-highlight);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-card);
}

.feature-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px -15px rgba(1, 51, 86, 0.15), inset 0 1px 1px var(--glass-highlight);
  border-color: rgba(197, 160, 89, 0.4);
  background: rgba(255, 255, 255, 0.7);
}

body.dark-mode .feature-card:hover {
  background: rgba(1, 51, 86, 0.65);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(197, 160, 89, 0.1);
  color: var(--accent-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.12) translateY(-4px);
  background-color: var(--primary);
  color: var(--accent);
  box-shadow: 0 8px 20px -5px rgba(1, 51, 86, 0.3);
}

.feature-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Service Category & Cards */
.services-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Balanced 2x2 grid by default (for services.html) */
  gap: 40px;
  margin-top: 40px;
}

.services-showcase.grid-3 {
  grid-template-columns: repeat(3, 1fr); /* Display all three service cards on one row on desktop (for index.html) */
  gap: 30px;
}

@media (max-width: 1024px) {
  .services-showcase.grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--glass-highlight);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-card);
}

.service-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 25px 50px -20px rgba(1, 51, 86, 0.15), inset 0 1px 1px var(--glass-highlight);
  border-color: rgba(197, 160, 89, 0.3);
  background: rgba(255, 255, 255, 0.7);
}

body.dark-mode .service-card:hover {
  background: rgba(1, 51, 86, 0.65);
}

.service-img {
  height: 240px;
  overflow: hidden;
  position: relative;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-img img {
  transform: scale(1.06);
}

.service-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-content h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.service-content p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.service-list {
  list-style: none;
  margin-bottom: 25px;
  margin-top: auto;
}

.service-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-dark);
}

.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Package Table Layout */
.pricing-section {
  background-color: var(--bg-white);
  padding: 80px 0;
}

.package-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.package-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  background-color: var(--bg-white);
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.package-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}

.package-card.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--accent);
  color: var(--bg-white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 1px;
}

.package-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.package-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 25px;
}

.package-price {
  margin-bottom: 30px;
}

.package-price .amount {
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Playfair Display', serif;
}

.package-price .period {
  font-size: 14px;
  color: var(--text-muted);
}

.package-features {
  list-style: none;
  margin-bottom: 30px;
  text-align: left;
}

.package-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-light);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.package-features li::before {
  content: '✦';
  color: var(--accent);
}

/* Contact Branches */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.branches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.branch-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 25px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.branch-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 15px 30px -10px rgba(1, 51, 86, 0.1);
  border-color: rgba(197, 160, 89, 0.2);
}

body.dark-mode .branch-card:hover {
  background: rgba(1, 51, 86, 0.65);
}

.branch-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.branch-card a {
  font-weight: 500;
}

/* Forms */
.form-container {
  background: var(--bg-card);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--glass-highlight);
  border: 1px solid var(--border-card);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

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

.form-feedback {
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: none;
  font-size: 14px;
}

.form-feedback.success {
  background-color: #DEF7EC;
  color: #03543F;
  border: 1px solid #BCF0DA;
  display: block;
}

.form-feedback.error {
  background-color: #FDE8E8;
  color: #9B1C1C;
  border: 1px solid #FBD5D5;
  display: block;
}

/* Dynamic Blog styles */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  background: var(--bg-card);
  backdrop-filter: saturate(200%) blur(24px);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--glass-highlight);
  border: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 25px 50px -20px rgba(1, 51, 86, 0.12), inset 0 1px 1px var(--glass-highlight);
  border-color: rgba(197, 160, 89, 0.3);
  background: rgba(255, 255, 255, 0.7);
}

body.dark-mode .blog-card:hover {
  background: rgba(1, 51, 86, 0.65);
}

.blog-card-img {
  height: 200px;
  background-color: var(--primary);
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-card-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.blog-card-content p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.blog-card-content a {
  margin-top: auto;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-dark);
}

/* Admin Dashboard */
.admin-container {
  max-width: 800px;
  margin: 40px auto;
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.post-actions {
  display: flex;
  gap: 10px;
}

/* Footer */
footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
  font-size: 14px;
}

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

.footer-col h3 {
  color: var(--bg-white);
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-col ul a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-link {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: color 0.4s ease, transform 0.4s ease;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  z-index: -1;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.social-link:hover {
  color: #01223a;
  transform: translateY(-3px) scale(1.05);
}

.social-link:hover::before {
  transform: scale(1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 15px;
}

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

/* WhatsApp Widget floating */
.whatsapp-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}

.whatsapp-btn {
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: var(--transition);
  position: relative;
}

.whatsapp-btn::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
  opacity: 0;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  80%, 100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  background-color: #128C7E;
}

.whatsapp-tooltip {
  background-color: var(--bg-white);
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
  pointer-events: none;
}

.whatsapp-widget:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile Menu style overlays */
@media (max-width: 768px) {
  header {
    top: 0; /* Align to very top since there is no top-bar on mobile */
  }

  .nav-container {
    height: 70px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .scrolled header {
    padding: 10px 16px 0 16px;
  }

  .scrolled .nav-container {
    height: 56px;
    border-radius: var(--radius-pill);
    padding: 0 16px;
    border-bottom: none;
  }

  .scrolled .logo img {
    height: 36px;
  }

  .services-showcase {
    grid-template-columns: 1fr; /* Single column layout on mobile */
    gap: 30px;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 90px 24px 40px 24px;
    box-shadow: -10px 0 30px rgba(1, 51, 86, 0.1);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
    display: flex;
    flex-direction: column;
    border-top-left-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
  }
  
  nav.open {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
  }

  nav ul li {
    width: 100%;
  }

  nav a {
    font-size: 16px;
    display: block;
    width: 100%;
    padding: 8px 0;
  }
  
  .mobile-menu-toggle {
    display: block;
    z-index: 101;
    position: relative;
  }
  
  .mobile-menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  /* Mobile Form inputs size correction (prevent iOS auto zoom) */
  .form-control,
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important;
  }
  
  .hero {
    height: 100vh;
    min-height: 400px;
    padding-bottom: 40px;
  }
  
  .hero h2 {
    font-size: 32px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: 60px 0;
  }
}

/* Social Share panel */
.share-container {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 15px;
}
.share-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.share-buttons {
  display: flex;
  gap: 10px;
}
.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 16px;
  transition: var(--transition);
}
.share-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.share-fb { background-color: #1877F2; }
.share-tw { background-color: #1DA1F2; }
.share-ln { background-color: #0A66C2; }
.share-wa { background-color: #25D366; }

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.stat-card {
  padding: 10px;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Partners Section */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
  margin-top: 40px;
}

.partner-card {
  background: var(--bg-white);
  padding: 10px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 150px;
  height: 80px;
  transition: var(--transition);
}

.partner-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.partner-card img {
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
}

.partner-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .stat-number {
    font-size: 36px;
  }
  .stat-label {
    font-size: 12px;
  }
  .partners-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
  }
  .partner-card {
    height: 70px;
    max-width: 120px;
  }
  .partner-card img {
    max-height: 40px;
  }
}

/* Document Page Styling */
.document-view {
  background-color: var(--bg-light);
  padding: 60px 0;
}

.document-card {
  background-color: var(--bg-white);
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 60px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.document-header {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 2px dashed var(--border-color);
  padding-bottom: 30px;
}

.document-header img {
  height: 80px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.document-header h2 {
  font-size: 22px;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 10px;
}

.document-body {
  color: var(--text-dark);
  line-height: 1.8;
}

.document-section {
  margin-bottom: 35px;
}

.document-section h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 15px;
  text-transform: uppercase;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.document-section p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.document-section ul {
  list-style: none;
  padding-left: 15px;
}

.document-section ul li {
  position: relative;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.document-section ul li::before {
  content: "•";
  color: var(--accent);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.document-section ul li ul {
  list-style: none;
  padding-left: 20px;
  margin-top: 10px;
}

.document-section ul li ul li::before {
  content: "-";
  color: var(--primary-light);
}

.document-section ol {
  padding-left: 20px;
}

.document-section ol li {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.document-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

@media (max-width: 768px) {
  .document-card {
    padding: 35px 25px;
  }
  .document-header h2 {
    font-size: 18px;
  }
  .partner-card {
    height: 70px;
    max-width: 120px;
  }
  .partner-card img {
    max-height: 40px;
  }
}

/* Application Form Page Styling */
.apply-view {
  background-color: var(--bg-light);
  padding: 60px 0;
}

.apply-card {
  background-color: var(--bg-white);
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 60px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.apply-card h2 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 30px;
  text-align: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 15px;
}

.form-section-title {
  font-size: 16px;
  color: var(--primary);
  margin: 30px 0 20px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: block;
  width: fit-content;
  clear: both;
  text-transform: uppercase;
}

.plan-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.plan-option-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.plan-option-card:hover {
  border-color: var(--primary-light);
  background-color: rgba(1, 51, 86, 0.02);
}

.plan-option-card.selected {
  border-color: var(--primary);
  background-color: rgba(1, 51, 86, 0.04);
}

.plan-option-card input[type="radio"] {
  position: absolute;
  top: 20px;
  right: 20px;
}

.plan-option-card h4 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 8px;
}

.plan-option-card p {
  font-size: 13px;
  color: var(--text-muted);
}

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

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

.beneficiaries-form-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.beneficiaries-form-table th {
  background-color: var(--primary);
  color: var(--bg-white);
  font-weight: 600;
  font-size: 14px;
  padding: 12px;
  text-align: left;
}

.beneficiaries-form-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

.btn-remove-row {
  background: none;
  border: none;
  color: #e53e3e;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  transition: var(--transition);
}

.btn-remove-row:hover {
  transform: scale(1.1);
}

.apply-feedback {
  padding: 15px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: none;
  font-weight: 500;
  text-align: center;
}

.apply-feedback.success {
  background-color: #c6f6d5;
  color: #22543d;
  border: 1px solid #c6f6d5;
}

.apply-feedback.error {
  background-color: #fed7d7;
  color: #742a2a;
  border: 1px solid #fed7d7;
}

@media (max-width: 768px) {
  .apply-card {
    padding: 30px 20px;
  }
  .plan-selection-grid,
  .form-grid-3,
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .beneficiaries-form-table th {
    font-size: 12px;
    padding: 8px;
  }
  .beneficiaries-form-table td {
    padding: 8px 4px;
  }
}

/* Gallery Page Styling */
.gallery-section {
  padding: 60px 0;
  background-color: var(--bg-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.gallery-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

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

.gallery-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: var(--transition);
  display: block;
}

.gallery-card:hover img {
  transform: scale(1.03);
}

.gallery-card-content {
  padding: 20px;
  text-align: center;
}

.gallery-card-content h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 0;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 22, 30, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: zoomIn 0.3s ease;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: var(--bg-white);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1011;
}

.lightbox-close:hover {
  color: var(--accent);
}

/* Lightbox Prev & Next Slideshow Controls */
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1010;
  user-select: none;
}

.lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  scale: 1.06;
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

@media (max-width: 768px) {
  .lightbox-prev, .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  .lightbox-prev { left: 15px; }
  .lightbox-next { right: 15px; }
}

@keyframes zoomIn {
  from {transform: scale(0.9); opacity: 0;}
  to {transform: scale(1); opacity: 1;}
}

/* Blog & Sidebar Grid */
.blog-layout-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 50px;
  align-items: start;
}

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

.sidebar-galleries-stack {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-gallery-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.sidebar-gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.sidebar-gallery-card .gallery-card-img {
  height: 160px;
  overflow: hidden;
  position: relative;
}

.sidebar-gallery-card .gallery-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  display: block;
}

.sidebar-gallery-card:hover .gallery-card-img img {
  transform: scale(1.03);
}

.sidebar-gallery-card .gallery-card-content {
  padding: 15px 20px;
  text-align: left;
}

.sidebar-gallery-card .gallery-meta {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.sidebar-gallery-card .gallery-card-content h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.sidebar-gallery-card .gallery-card-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 15px;
}

@media (max-width: 992px) {
  .blog-layout-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .blog-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Top Bar */
.top-bar {
  background-color: #01223a;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  height: 40px;
  transition: all 0.3s ease;
  overflow: hidden;
  z-index: 101;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.scrolled .top-bar {
  height: 0;
  opacity: 0;
  border-bottom: none;
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  gap: 20px;
}

.top-bar-left a {
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: var(--transition);
}

.top-bar-left a:hover {
  color: var(--accent);
}

.top-bar-right {
  display: flex;
  align-items: center;
}

.social-links-top {
  display: flex;
  gap: 15px;
}

.social-links-top a {
  width: 30px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  font-size: 12px;
  transition: color 0.4s ease, transform 0.4s ease;
}

.social-links-top a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  z-index: -1;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.social-links-top a:hover {
  color: #01223a;
  transform: translateY(-2px) scale(1.05);
}

.social-links-top a:hover::before {
  transform: scale(1);
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
}

.page-header {
  position: relative;
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
  color: var(--bg-white);
  padding: 380px 0 60px 0; /* Increased top padding by 140px on desktop only for a cinematic view */
  text-align: center;
  z-index: 1;
}

@media (max-width: 768px) {
  .page-header {
    background-attachment: scroll;
    padding: 140px 0 40px 0; /* Preserve original height on mobile */
  }
  .page-header h1 {
    font-size: 32px !important;
    margin-bottom: 8px;
  }
  .page-header p {
    font-size: 15px !important;
    padding: 0 15px;
  }
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(1, 34, 58, 0.95) 0%, rgba(1, 34, 58, 0.5) 60%, rgba(1, 34, 58, 0.1) 100%);
  z-index: -1;
}

.page-header h1 {
  color: var(--bg-white) !important;
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: var(--font-heading);
  letter-spacing: normal;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.page-header p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  font-weight: 400;
  max-width: 650px;
  margin: 0 auto;
  letter-spacing: normal;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Callback Button & Modal Overlay Styles */
.btn-callback {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  padding: 0 20px !important;
  border-radius: var(--radius-pill) !important; /* Matches dynamic island pill curves */
  font-weight: 600 !important;
  border: 1px solid var(--accent);
  transition: var(--transition) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important; /* Fixed height for exact vertical centering */
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.btn-callback:hover {
  background-color: transparent !important;
  color: var(--accent) !important;
}

.btn-callback::after {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(1, 34, 58, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.callback-modal {
  background: var(--bg-card);
  backdrop-filter: saturate(200%) blur(30px);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  border: 1px solid var(--border-card);
  max-width: 400px;
  width: 90%;
  padding: 35px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--glass-highlight);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.callback-modal h3 {
  color: #FFFFFF !important;
}

.callback-modal p {
  color: rgba(255, 255, 255, 0.75) !important;
}

.callback-modal label {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
}

.modal-overlay.open .callback-modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6) !important;
  transition: var(--transition);
}

.modal-close:hover {
  color: #FFFFFF !important;
}

/* Responsive 2-Column Grid */
.responsive-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

@media (max-width: 768px) {
  .responsive-grid-2 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* --- Scroll-driven animations & Reveals --- */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes reveal-left {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes reveal-right {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Stagger transition delay logic for elements */
.reveal-up {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Add stagger delay dynamically based on reveal.js variables */
.reveal-up[style*="--stagger-index"],
.reveal-left[style*="--stagger-index"],
.reveal-right[style*="--stagger-index"] {
  transition-delay: calc(var(--stagger-index) * 0.08s);
}

/* IntersectionObserver class triggers */
.reveal-up.in-view,
.reveal-left.in-view,
.reveal-right.in-view {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Native CSS Scroll-driven animations (when supported) */
@supports (animation-timeline: view()) {
  /* Prevent observer override by disabling it */
  .supports-scroll-timeline .reveal-up,
  .supports-scroll-timeline .reveal-left,
  .supports-scroll-timeline .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .supports-scroll-timeline .reveal-up {
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }

  .supports-scroll-timeline .reveal-left {
    animation: reveal-left linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }

  .supports-scroll-timeline .reveal-right {
    animation: reveal-right linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  body, header {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- Progressive Page Load Entrance animations --- */
@keyframes pageLoadFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

body {
  animation: pageLoadFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

header {
  animation: headerSlideDown 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Theme Toggle Button styles */
.theme-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-body);
  font-size: 16px;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  background-color: rgba(197, 160, 89, 0.15);
  color: var(--accent);
  transform: rotate(15deg) scale(1.1);
}

body.dark-mode .theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.bg-light {
  background-color: var(--bg-body) !important;
}

body.dark-mode .bg-light {
  background-color: #001C30 !important; /* Alternating section backgrounds on dark mode */
}

/* --- Scroll Helper Button Styles --- */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.scroll-down-btn {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  animation: bounce 2s infinite;
  background: transparent;
}

.scroll-down-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  scale: 1.05;
}

.scroll-up-btn {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 998;
  background: rgba(1, 51, 86, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.scroll-up-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-up-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 8px 25px rgba(197, 160, 89, 0.4);
  scale: 1.05;
}

body.dark-mode .scroll-up-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .scroll-up-btn:hover {
  background: var(--accent);
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .hero-content {
    margin-right: 0;
    text-align: center;
  }
  .hero-content div[style*="justify-content: center"] {
    justify-content: center !important;
  }
  .hero p {
    margin-left: auto;
    margin-right: auto;
  }
  .scroll-up-btn {
    bottom: 90px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}

/* Custom spacing for homepage intro section to cushion content under the floating header */
.intro-section {
  padding-top: 140px !important;
}

@media (max-width: 768px) {
  .intro-section {
    padding-top: 110px !important;
  }
}



