/* 1. CSS Reset / Normalize */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  font-size: 1rem;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* 2. CSS Custom Properties */
:root {
  --color-primary: #2C3E6B;
  --color-accent: #C9A84C;
  --color-bg: #F8F5F0;
  --color-text: #1A1A2E;
  --color-footer: #1C1C2E;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
  --radius: 12px;
  --transition: 0.3s ease;
}

/* 3. Base typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

h1 { font-size: min(3rem, 10vw); }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }

/* 4. Layout utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-light {
  background-color: #fff;
}

.section-dark {
  background-color: var(--color-primary);
  color: #fff;
}

.section-dark h2, .section-dark h3 {
  color: #fff;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: center;
}

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

/* 5. Header styles */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  transition: padding var(--transition);
}

.site-header.scrolled {
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
  height: 80px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  height: 60px;
  width: auto;
  vertical-align: middle;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-accent);
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* 6. Footer styles */
.site-footer {
  background-color: var(--color-footer);
  color: #fff;
  border-top: 4px solid var(--color-accent);
  padding: 4rem 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 0 5%;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

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

.footer-org-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-accent);
}

.footer-col h4 {
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

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

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  color: #ccc;
  transition: color var(--transition);
}

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

.footer-col address {
  font-style: normal;
  color: #ccc;
  line-height: 1.8;
}

.footer-col address a {
  color: #ccc;
}

.registry-id {
  font-size: 0.85rem;
  color: #888;
  margin-top: 1rem;
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  background-color: #0F0F1A;
  font-size: 0.9rem;
  color: #888;
}

/* 7. Hero section styles */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 4rem 2rem;
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(28, 28, 46, 0.8), rgba(44, 62, 107, 0.6));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

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

/* 8. Button styles */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: #B8960C;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover {
  background-color: #fff;
  color: var(--color-primary);
}

/* 9. Card styles */
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  height: 100%;
}

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

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

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin-bottom: 0.5rem;
}

/* 10. Form styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* 11. Animations & transitions */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 12. Page-specific styles */
/* Accordion */
.accordion-item {
  border-bottom: 1px solid #eee;
  margin-bottom: 1rem;
}

.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header::after {
  content: '+';
  font-size: 1.5rem;
}

.accordion-item.active .accordion-header::after {
  content: '-';
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-content-inner {
  padding-bottom: 1rem;
}

/* Stat Counters */
.stat-item {
  text-align: center;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

/* 13. Media queries */
@media (max-width: 1200px) {
  .header-inner {
    padding: 0 1rem;
  }
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--color-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.3s ease;
    gap: 1.5rem;
  }

  .main-nav.active {
    left: 0;
  }

  .main-nav a {
    font-size: 1.2rem;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

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

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .brand-name {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .brand-name {
    display: none; /* Hide text on very small screens to fit logo */
  }
}
