/* =========================
   GLOBAL STYLES & DARK MODE
========================= */
:root {
  --primary: #102C57;
  --secondary: #DAC0A3;
  --tertiary: #EADBC8;
  --background: #FEFAF6;
  --text: #333333;
  --text-light: #666666;
  --white: #FFFFFF;
  --shadow: rgba(16, 44, 87, 0.1);
  --card-bg: #FFFFFF;
  --border: #EADBC8;
}

[data-theme="dark"] {
  --primary: #DAC0A3;
  --secondary: #102C57;
  --tertiary: #1A365D;
  --background: #121212;
  --text: #E0E0E0;
  --text-light: #A0A0A0;
  --white: #1E1E1E;
  --shadow: rgba(0, 0, 0, 0.3);
  --card-bg: #1E1E1E;
  --border: #2D3748;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ============
   TYPOGRAPHY
===============*/
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary);
}

/* ============
   BUTTONS
===============*/
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

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

/* ============
   NAVBAR
===============*/
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background);
  box-shadow: 0 2px 10px var(--shadow);
  transition: background-color 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.5rem;
}

.logo {
  height: 40px;
  width: 40px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

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

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

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

.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--tertiary);
  border-radius: 34px;
  transition: .4s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: var(--white);
  border-radius: 50%;
  transition: .4s;
  z-index: 1;
}

.sun-icon, .moon-icon {
  font-size: 12px;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.sun-icon {
  opacity: 1;
}

.moon-icon {
  opacity: 0.5;
}

[data-theme="dark"] .sun-icon {
  opacity: 0.5;
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.theme-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text);
  transition: all 0.3s ease;
}

/* ============
   HERO SECTION
===============*/
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  overflow: hidden;
  justify-content: center;
  text-align: center;
}

.hero-content {
  max-width: 600px;
  z-index: 2;
  color: var(--white);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 2.5rem;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;
  max-width: 500px;
  z-index: 1;
}

.floating-card {
  position: absolute;
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: var(--primary);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.card-1 {
  top: 10%;
  right: 10%;
  animation: float 6s ease-in-out infinite;
}

.card-2 {
  top: 50%;
  right: 30%;
  animation: float 6s ease-in-out infinite 2s;
}

.card-3 {
  bottom: 10%;
  right: 15%;
  animation: float 6s ease-in-out infinite 4s;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.floating-card p {
  font-weight: 500;
  font-size: 0.9rem;
}

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

#snow-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ============
   MISSION SECTION
===============*/
.mission {
  padding: 5rem 0;
  background-color: var(--background);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.mission-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 5px 20px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow);
}

.mission-icon {
  margin-bottom: 1.5rem;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mission-icon img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.mission-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.mission-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ============
   FEATURES SECTION
===============*/
.features {
  padding: 5rem 0;
  background-color: var(--tertiary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.feature-item h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.feature-item p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ============
   FOOTER
===============*/
.footer {
  margin-top: auto;
  background-color: var(--primary);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  width: 50px;
  height: 50px;
}

.footer-tagline {
  opacity: 0.8;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
}

.footer-link-group h4 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-link-group a {
  display: block;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-link-group a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
}

.copyright {
  opacity: 0.7;
  font-size: 0.875rem;
}

/* ============
   RESPONSIVE DESIGN
===============*/
@media (max-width: 1024px) {
  .hero-visual {
    width: 45%;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background-color: var(--card-bg);
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    padding: 2rem;
    box-shadow: -5px 0 15px var(--shadow);
    transition: right 0.3s ease;
    gap: 1.5rem;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 4rem;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .hero-visual {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-top: 2rem;
    right: auto;
    top: auto;
    transform: none;
    height: 200px;
  }
  
  .floating-card {
    position: relative;
    display: inline-block;
    margin: 0 1rem 1rem 0;
    animation: none;
  }
  
  .card-1, .card-2, .card-3 {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 250px;
  }
  
  .mission-grid, .features-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    
  }
}

/* ============================================
   DOCUMENTS PAGE (Accordion / Lists)
============================================ */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Each item container */
.doc-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Button (accordion header) */
.doc-toggle {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.doc-toggle:hover {
    background-color: var(--tertiary);
}

/* Small NEW tag badge */
.new-tag {
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 6px;
    margin-right: 6px;
}

/* Sublist container */
.doc-sublist {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

/* Expanded state */
.doc-sublist.active {
    max-height: 400px; /* Enough space for items */
    padding: 1rem 1.5rem 1.5rem;
}

/* Sublist links */
.doc-sublist a {
    padding: 0.5rem 0;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease, padding-left 0.25s ease;
}

.doc-sublist a:last-child {
    border-bottom: none;
}

.doc-sublist a:hover {
    color: var(--primary);
    padding-left: 8px;
}

/* Ads on the side */
.fixed-ad {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 20;
}

.ad-image {
    width: 180px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.ad-image:hover {
    transform: scale(1.03);
}

/* Page Layout Wrapper */
.content-wrapper {
    display: flex;
    gap: 2rem;
    position: relative;
}

.documents {
    width: 100%;
}

/* Section headings inside page */
.documents h2,
.documents h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

/* ============ RESPONSIVE FOR DOCUMENTS PAGE ================= */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    .fixed-ad {
        position: relative;
        margin-top: 2rem;
        align-self: center;
    }
}



/* ============================================
   RESOURCES PAGE (Accordions + Grid)
============================================ */

/* Page container */
.resources {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.resources h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: var(--primary);
}

.resources h3 {
    margin: 2rem 0 1rem;
    font-size: 1.4rem;
    color: var(--primary);
}

/* GRID */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 2rem;
}

/* CARD */
.res-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 5px 16px var(--shadow);
    overflow: visible;
    transition: all 0.3s ease;
    padding: 0;
    align-self: flex-start;
}

.res-card.open {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px var(--shadow);
}

/* TOGGLE BUTTON */
.res-toggle {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    text-align: left;

    transition: background 0.3s ease;
}

.res-toggle:hover {
    background: var(--tertiary);
    border-radius: 14px;
}

.res-toggle .arrow {
    font-weight: bold;
    transition: transform 0.35s ease;
}

/* BADGE */
.new-tag {
    background: var(--primary);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-left: 6px;
}

/* SUBLIST */
.res-sublist {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.res-sublist.active {
    padding: 1rem 1.5rem 1.5rem;
    opacity: 1;
}

/* TEXT & LINKS INSIDE */
.res-sublist p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.res-sublist ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.res-sublist ul li a {
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;

    transition: color 0.25s ease, padding-left 0.25s ease;
}

.res-sublist ul li a:hover {
    color: var(--primary);
    padding-left: 8px;
}

/* LAST ITEM WITHOUT BORDER */
.res-sublist ul li:last-child a {
    border-bottom: none;
}

/* ========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   SPECIAL PAGE
============================================ */

.special-section {
    padding: 5rem 0;
}

.special-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--primary);
    margin-bottom: 2rem;
}

.special-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: 0 5px 20px var(--shadow);
    font-size: 1.12rem;
    line-height: 1.75;
    color: var(--text);
}

.special-card a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.special-card a:hover {
    text-decoration: underline;
}

.special-hero {
    margin-top: 4rem;
}
