:root {
  --primary-color: #3B739F;
  --secondary-color: #0f1c51;
  --accent-color: #D99EA8;
  --text-color: #122;
  --text-secondary-color: #666;
  --background-color: #F5F7FA;
  --heading-color: #194862;
  
  /* Background Animation Colors */
  --rosy-brown: rgba(255, 240, 248, .5);
  --cinereous: rgba(255, 250, 235, .5);
  --puce: rgba(255, 235, 245, .5);
  --ucla-blue: rgba(167, 195, 239, .5);
  --indigo-dye: rgba(165, 192, 218, .5);
  --sage-green: rgba(222, 245, 191, .5);
}

/* Base Styles */
html {
  background: var(--background-color);
  color: var(--text-color);
  font-family: 'Glory', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 400;
  position: relative;
  scroll-behavior: smooth;
  width: 100%;
}

body {
  font-family: 'Glory', system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  padding: 0;
  width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-weight: 500;
  line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 {
  font-size: 1.85rem;
  text-align: center;
  text-transform: uppercase;
}
h3 { font-size: 1.5rem; }

p, li {
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Font Loading States */
.font-loading {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.fonts-loaded .font-loading {
  opacity: 1;
}

/* Language Transition Animation */
.language-transitioning {
  pointer-events: none;
}

.language-transitioning * {
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

/* Logo Container */
.logo-container {
  width: 100%;
  max-width: 800px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(40px) scale(0.95);
}

.logo-container img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fonts-loaded .logo-container {
  animation: logo-entrance 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Navigation Animation */
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  position: relative;
}

.fonts-loaded .nav-menu {
  animation: fade-in 0.5s ease forwards;
  animation-delay: 0.3s;
}

/* Content Section Animations */
section {
  opacity: 0;
  transform: translateY(20px);
  position: relative;
  z-index: 1;
}

section + section {
  margin: 5rem 0;
}

#intro {
  padding-top: 40px;
}

.fonts-loaded section {
  animation: section-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.fonts-loaded #about { animation-delay: 0.8s; }
.fonts-loaded #services { animation-delay: 1.2s; }
.fonts-loaded #counselling { animation-delay: 1.6s; }

/* Background Shapes */
.bg-shape {
  position: fixed;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.8;
  mix-blend-mode: normal;
  will-change: transform;
}

.float1 {
  animation: floatX 15s ease-in-out infinite alternate;
  width: 1200px;
  height: 1200px;
  top: -30%;
  left: -20%;
}

.float2 {
  animation: floatY 18s ease-in-out infinite alternate;
  width: 1000px;
  height: 1000px;
  top: 30%;
  right: -25%;
}

.float3 {
  animation: floatZ 20s ease-in-out infinite alternate;
  width: 1100px;
  height: 1100px;
  bottom: -20%;
  left: 20%;
}

/* Navigation */
nav {
  background: var(--background-color);
  border-radius: 50px;
  border: 1px solid rgba(59, 115, 159, 0.35);
  bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .1), 0 17px 27px -17px rgba(25, 72, 98, .3);
  left: 50%;
  opacity: 1;
  padding: 0.75rem 2rem;
  position: fixed;
  transform: translateX(-50%) translateY(150px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
}

nav.sections-loaded {
  transform: translateX(-50%) translateY(0);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  position: relative;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 6px;
  width: 0;
  height: 2px;
  background-color: #FFBC73;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-link.active::after {
  width: 80%;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  nav {
    bottom: .9rem;
    padding: .7rem 1.1rem;
  }
  
  .nav-menu {
    gap: .5rem;
  }
  
  .nav-link {
    padding: .6rem .8rem;
  }
  .nav-link:focus {
    outline: none;
    box-shadow: none;
    color: var(--primary-color);
  }
  .nav-link:focus::after {
    width: 80%;
    background-color: var(--secondary-color);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .nav-menu {
    display: flex !important;
    gap: 2rem;
    position: static;
    padding: 0;
    flex-direction: row;
    justify-content: center;
    width: auto;
  }

  .nav-menu .nav-link {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin: 0;
    font-weight: 500;
  }
}

/* Animations */
@keyframes logo-entrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  40% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  60% {
    transform: translateY(0) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes section-entrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatX {
  0% { 
    transform: translate(0, 0) scale(1);
    background-color: var(--rosy-brown);
  }
  25% { 
    background-color: var(--puce);
    transform: translate(30px, -20px) scale(1.1);
  }
  50% { 
    transform: translate(-20px, 40px) scale(0.9); 
    background-color: var(--cinereous);
  }
  75% {
    transform: translate(20px, -30px) scale(1.05);
    background-color: var(--sage-green);
  }
  100% { 
    transform: translate(0, 0) scale(1);
    background-color: var(--rosy-brown);
  }
}

@keyframes floatY {
  0% { 
    transform: translate(0, 0) scale(1);
    background-color: var(--puce);
  }
  25% { 
    background-color: var(--cinereous);
    transform: translate(-40px, 30px) scale(0.95);
  }
  50% { 
    transform: translate(20px, -30px) scale(1.05); 
    background-color: var(--rosy-brown);
  }
  75% {
    transform: translate(-30px, 20px) scale(0.98);
    background-color: var(--sage-green);
  }
  100% { 
    transform: translate(0, 0) scale(1);
    background-color: var(--puce);
  }
}

@keyframes floatZ {
  0% { 
    transform: translate(0, 0) scale(1);
    background-color: var(--cinereous);
  }
  25% { 
    background-color: var(--rosy-brown);
    transform: translate(25px, 25px) scale(1.1);
  }
  50% { 
    transform: translate(-30px, -20px) scale(0.9); 
    background-color: var(--puce);
  }
  75% {
    transform: translate(15px, 15px) scale(1.02);
    background-color: var(--sage-green);
  }
  100% { 
    transform: translate(0, 0) scale(1);
    background-color: var(--cinereous);
  }
}

/* Layout */
.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

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

/* Footer */
footer {
  background: rgba(255, 255, 255, .45);
  border-radius: 9% 9% 0 0;
  padding: 0 1rem 6rem;
  margin-top: 4rem;
  position: relative;
  box-shadow: 0 -5px 75px -35px rgba(59, 115, 159, 0.2);
  z-index: 1;
  opacity: 0;
  transform: translateY(20px);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  padding: 0.5rem 0;
}

.acknowledgment {
  color: var(--text-color);
  flex: 1;
  padding: 2rem 0;
  position: relative;
  text-align: center;
}

.acknowledgment p {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 700px) {
  .footer-flex {
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
    text-align: left;
  }
  .footer-logo {
    justify-content: flex-start;
  }
}

/* Copyright */
.copyright {
  padding: 1.5rem 0;
  position: relative;
  text-align: center;
  color: var(--heading-color);
}

.copyright p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.acknowledgment:after, .copyright:after {
  bottom: 0;
  content: "";
  display: inline-block;
  left: 0px;
  opacity: 0.5;
  position: absolute;
  width: 100%;
  border-bottom: 2px dotted rgb(234, 197, 198);
}

/* Footnotes */
.footnotes {
  padding-top: 2rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary-color);
}

.footnotes h2 {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.footnotes ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}

.footnotes li {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.footnotes a {
  font-size: 0.8em;
  color: #3B739F;
  text-decoration: none;
  margin-left: 0.5em;
}

/* Remove duplicate footnotes section */
#footnotes {
  display: none;
}

/* Header */
header {
  padding: 2rem 0 1rem;
  position: relative;
  z-index: 1000;
}

header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Language Switcher */
.language-switcher {
  backdrop-filter: blur(10px);
  display: flex;
  gap: 0.3rem;
  padding: 0.5rem;
  position: absolute;
  right: 0;
  top: -1rem;
}

.lang-btn {
  align-items: center;
  background: transparent;
  border-radius: 20px;
  border: 2px dotted white;
  cursor: pointer;
  display: flex;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  gap: 0.5rem;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: rgba(59, 115, 159, 0.1);
}

.lang-btn.active {
  border: 2px dotted #EAC5C6;
  color: var(--secondary-color);
}

@media (max-width: 768px) {
  .language-switcher {
    gap: .3rem;
    padding: .4rem;
    right: .5rem;
    top: -1.5rem;
  }
  
  .lang-btn {
    padding: .4rem;
    font-size: .8rem;
  }
}

@media (min-width: 769px) {
  header {
    padding-bottom: 3.5rem;
  }
}

/* Menu List */
.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 2.5rem 0 0 0;
}

@media (min-width: 769px) {
  .service-list {
    gap: 4rem;
  }
  
  .service-section:hover {
    transform: translateY(-8px) scale(1.02);
    background: #fff;
    box-shadow: 0 8px 32px 0 rgba(59,115,159,0.12), 0px 12px 8px -6px rgba(25, 72, 98, 0.2);
  }
}

.service-section {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  box-shadow: 0 2px 8px 0 rgba(59,115,159,0.04);
  padding: 2rem 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 1;
  transform: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-section-header {
  background: repeating-linear-gradient(0deg, transparent, #fcbd7a0d, transparent);
}

.service-section h3, .key-aspects-heading {
  color: var(--text-secondary-color);
  font-size: 1.1rem;
  margin-top: 0;
  text-transform: uppercase;
}

.service-section h4 {
  display: flex;
  font-size: 1.1rem;
  font-weight: 600;
  justify-content: space-between;
  margin-bottom: .5rem;
  position: relative;
}

.service-section h4::after {
    border-bottom: 2px dotted #EAC5C6;
    bottom: -5px;
    content: "";
    display: inline-block;
    left: 0;
    opacity: 0.5;
    position: absolute;
    width: 100%;
}

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

/* About Section Columns */
.about-content-grid {
  display: flex;
  flex-direction: column;
}

@media (min-width: 769px) {
  .about-content-grid {
    flex-direction: row;
    gap: 4rem;
  }
  .about-content-grid > div {
    flex: 1;
  }
}

/* Counselling Section Columns */
.counselling-grid {
  display: flex;
  flex-direction: column;
}

@media (min-width: 769px) {
  .counselling-grid {
    flex-direction: row;
    gap: 4rem;
  }
  .counselling-grid > div {
    flex: 1;
  }
}

/* Key Aspects Section */
.key-aspects-section {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  box-shadow: 0 2px 8px 0 rgba(59,115,159,0.04);
  padding: 2rem 0;
  margin: 2.5rem 0 0 0;
  opacity: 1;
  transform: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.key-aspects-heading {
  margin: 0 0 2rem 0;
  position: relative;
  text-align: center;
}

h3.key-aspects-heading:after {
  border-bottom: 2px dotted #EAC5C6;
  bottom: -7px;
  content: "";
  display: inline-block;
  left: 50%;
  opacity: 0.5;
  position: absolute;
  width: 40%;
  transform: translateX(-50%);
}

.key-aspects-row {
  display: flex;
  justify-content: center;
  margin: 0;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.key-aspect {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 220px;
  text-align: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  opacity: 1;
  transform: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.key-aspect img {
  height: 48px;
  margin-bottom: 0.5rem;
}

.key-aspect-title {
  font-size: 1.125rem;
  color: var(--heading-color);
  margin: 0;
  line-height: 1.3;
  font-weight: 600;
}

.key-aspect-text {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  color: var(--text-color);
}

@media (min-width: 769px) {
  .key-aspects-section:hover {
    background: #fff;
    box-shadow: 0 8px 32px 0 rgba(59,115,159,0.12), 0px 12px 8px -6px rgba(25, 72, 98, 0.2);
  }
  .key-aspect:hover {
    transform: translateY(-8px) scale(1.02);
  }
}

@media (max-width: 768px) {
  .key-aspects-section {
    padding: 1.5rem 1rem;
  }
  
  .key-aspects-row {
    gap: 1.5rem;
  }
  
  .key-aspect {
    max-width: 100%;
    min-width: auto;
    padding: 0.5rem 1rem 0;
  }
}

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

/* Section Content Links */
a:not(.nav-link):not(.button) {
  color: #25A;
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:not(.nav-link):not(.button)::after {
  background-color: #FFBC73;
  bottom: -1px;
  content: '';
  height: 2px;
  left: 0;
  position: absolute;
  transition: background-color 0.3s ease;
  width: 100%;
}

a:not(.nav-link):not(.button):hover,
a:not(.nav-link):not(.button):focus {
  color: var(--heading-color);
}

a:not(.nav-link):not(.button):hover::after,
a:not(.nav-link):not(.button):focus::after {
  background-color: var(--heading-color);
}

.fonts-loaded footer {
  animation: section-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 2.0s;
}

/* Button Container */
.button-container {
  text-align: center;
  margin-top: -1.25rem;
  border: 2px dotted rgba(234, 197, 198, .7);
  padding: 2rem 0 1rem;
  border-radius: 0 0 1rem 1rem;
  border-top: 0;
}

/* Security Message */
.security-message {
  margin: 1.75rem 0 0 0;
  opacity: 0;
  transform: translateY(20px);
  margin-left: auto;
  margin-right: auto;
}

.fonts-loaded .security-message {
  animation: section-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 1.6s;
}

.security-message-line1, .security-message-line2 {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
}

.security-message-line2 {
  font-weight: 600;
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.security-message-line2 li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.security-icon {
  height: 20px;
  width: auto;
  display: block;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(40%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.4) contrast(1);
}

@media (max-width: 768px) {
  .security-message {
    margin: 1.5rem 1rem 0 1rem;
  }
  
  .security-message-line1,
  .security-message-line2 {
    font-size: 0.8125rem;
  }
}

/* Section Divider */
.section-divider {
  text-align: center;
}

.section-divider img {
  height: 20px;
  width: auto;
  opacity: .6;
}

.random-heading {
  transition: opacity 0.5s;
  opacity: 1;
}
.random-heading.fade {
  opacity: 0;
}

/* Service Description Styles */
.service-desc {
  margin-top: 0.5rem;
  color: var(--text-color);
  line-height: 1.6;
}

.service-desc-intro {
  margin: 0 0 0.5rem 0;
  font-weight: 400;
}

.service-desc-details {
  margin: 0;
  transition: all 0.3s ease-in-out;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.5rem;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.read-more-btn:hover,
.read-more-btn:focus {
  color: var(--secondary-color);
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.read-more-btn:focus:not(:focus-visible) {
  outline: none;
}

/* Desktop styles - show all content, increase font weight for intro */
@media (min-width: 769px) {
  .service-desc-intro {
    color: var(--heading-color);
    line-height: normal;
  }
  
  .service-desc-details {
    display: block !important;
    opacity: 1 !important;
    max-height: none !important;
  }
  
  .read-more-btn {
    display: none !important;
  }
}

/* Mobile styles - hide details initially, show with button */
@media (max-width: 768px) {
  .service-desc-details {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  
  .service-desc-details.expanded {
    display: block;
    opacity: 1;
    max-height: 200px;
  }
  
  .read-more-btn {
    display: inline-block;
  }
  
  .read-more-btn[aria-expanded="true"] {
    display: none;
  }
}