/* ==========================================
   GLOBAL STYLES - AHC Website
   ========================================== */

:root {
  /* Brand Colors */
  --ahc-blue: #003885;
  --ahc-green: #009900;
  --ahc-gold: #FFC000;
  --deep-blue: #002255;
  --light-blue: #E8EEF5;
  --light-green: #E6F5E6;
  --off-white: #F8F9FA;
  --white: #FFFFFF;
  --dark-gray: #666666;
  --light-gray: #999999;
  --border-gray: #E0E0E0;
  
  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  /* Spacing */
  --section-padding: 80px;
  --container-max: 1200px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-gray);
  background: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ahc-blue);
  line-height: 1.2;
}

h1 { font-size: 48px; font-weight: 700; }
h2 { font-size: 36px; font-weight: 600; margin-bottom: 24px; }
h3 { font-size: 24px; font-weight: 600; margin-bottom: 16px; }
h4 { font-size: 20px; font-weight: 500; }

p { margin-bottom: 16px; }

a {
  color: var(--ahc-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover { color: var(--ahc-green); }

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

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--deep-blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 56, 133, 0.3);
}

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

.btn-secondary:hover {
  background: var(--light-blue);
  color: var(--ahc-blue);
}

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

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

.btn-green {
  background: var(--ahc-green);
  color: var(--white);
}

.btn-green:hover {
  background: #007700;
  color: var(--white);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--white);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-desktop {
  height: 50px;
  width: auto;
}

.logo-mobile {
  display: none;
  height: 45px;
  width: auto;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: var(--ahc-blue);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--ahc-green);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ahc-green);
  transition: width 0.3s ease;
}

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

.nav-cta {
  background: var(--ahc-blue);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 5px;
}

.nav-cta:hover {
  background: var(--deep-blue);
}

.nav-cta::after {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ahc-blue);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--white);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-mobile.active {
  display: flex;
}

.nav-mobile .nav-link {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-gray);
}

/* Main Content Offset */
main {
  padding-top: var(--header-height);
}

/* Section Styles */
.section {
  padding: var(--section-padding) 0;
}

.section-white { background: var(--white); }
.section-offwhite { background: var(--off-white); }
.section-light-blue { background: var(--light-blue); }
.section-light-green { background: var(--light-green); }
.section-blue { background: var(--ahc-blue); color: var(--white); }
.section-deep-blue { background: var(--deep-blue); color: var(--white); }

.section-blue h2,
.section-blue h3,
.section-deep-blue h2,
.section-deep-blue h3 {
  color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto;
  color: var(--dark-gray);
}

.section-blue .section-header p,
.section-deep-blue .section-header p {
  color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.footer {
  background: var(--deep-blue);
  color: var(--white);
}

.footer-main {
  padding: 60px 0;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  height: 50px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  opacity: 0.8;
  font-size: 14px;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--ahc-gold);
}

.footer-col p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.certification-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 4px;
  display: inline-block;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  grid-template-columns: unset;
}

.footer-bottom p {
  font-size: 14px;
  opacity: 0.7;
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 14px;
  opacity: 0.7;
}

/* Card Styles */
.card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card-content {
  padding: 24px;
}

.card-content h3 {
  margin-bottom: 12px;
}

.card-content p {
  color: var(--dark-gray);
  font-size: 15px;
  margin-bottom: 16px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ahc-blue);
  font-weight: 600;
  font-size: 15px;
}

.card-link:hover {
  color: var(--ahc-green);
}

.card-link::after {
  content: '→';
  transition: transform 0.3s ease;
}

.card-link:hover::after {
  transform: translateX(4px);
}

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

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

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

/* Text Utilities */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-blue { color: var(--ahc-blue); }
.text-green { color: var(--ahc-green); }
.text-gold { color: var(--ahc-gold); }

/* Link Arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ahc-blue);
  font-weight: 600;
  transition: gap 0.3s ease;
}

.link-arrow:hover {
  gap: 12px;
  color: var(--ahc-green);
}

/* ==========================================
   SCROLL ANIMATIONS & MICROINTERACTIONS
   ========================================== */

/* Fade In Up Animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade In Animation */
.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
}

/* Slide In Left */
.slide-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide In Right */
.slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale In */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* Animated Counter */
.counter {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ahc-blue);
}

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: float 4s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.pulse {
  animation: pulse 3s ease-in-out infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Glow Effect on Hover */
.glow-hover {
  transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
  box-shadow: 0 0 30px rgba(0, 56, 133, 0.3);
}

/* Icon Bounce on Hover */
.icon-bounce:hover i,
.icon-bounce:hover svg {
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-8px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-4px); }
}

/* Draw Line Animation */
.draw-line {
  position: relative;
}

.draw-line::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--ahc-gold);
  transition: width 0.4s ease;
}

.draw-line:hover::after,
.draw-line.visible::after {
  width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
  
  :root {
    --section-padding: 60px;
  }
  
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  
  :root {
    --section-padding: 48px;
    --header-height: 70px;
  }
  
  .logo-desktop { display: none; }
  .logo-mobile { display: block; }
  
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-logo {
    margin: 0 auto 16px;
  }
  
  .footer-bottom .footer-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}
