/* World Relief Australia - Local Static Site */
:root {
  --green: #2e9b21;
  --green-dark: #238018;
  --green-light: #3fb332;
  --text: #666;
  --text-dark: #333;
  --white: #ffffff;
  --bg-light: #f0f3f6;
  --accent: #82c0c7;
  --max-width: 1200px;
  --header-height: 80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo img { height: 50px; width: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  transition: 0.3s;
}

.main-nav .nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav .nav-list > li { position: relative; }

.main-nav .nav-list > li > a {
  display: block;
  padding: 10px 14px;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-nav .nav-list > li > a:hover { color: var(--green); }

.btn-give {
  background: var(--green) !important;
  color: var(--white) !important;
  border-radius: 4px;
  padding: 10px 20px !important;
}

.btn-give:hover {
  background: var(--green-dark) !important;
  color: var(--white) !important;
}

.dropdown {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 0 0 6px 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.25s;
  z-index: 100;
}

.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 10px 18px;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--bg-light); color: var(--green); }

/* ===== HERO (HOME) ===== */
.hero {
  background-size: cover;
  background-position: center;
  min-height: 480px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-overlay {
  width: 100%;
  background: linear-gradient(135deg, rgba(46,155,33,0.85) 0%, rgba(46,155,33,0.6) 100%);
  padding: 100px 24px;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.3;
}

.hero-sub {
  color: rgba(255,255,255,0.95);
  font-size: 18px;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== PAGE HERO ===== */
.page-hero {
  background-size: cover;
  background-position: center;
  min-height: 280px;
  display: flex;
  align-items: center;
}

.page-hero-overlay {
  width: 100%;
  background: rgba(46,155,33,0.82);
  padding: 70px 24px;
  text-align: center;
}

.page-hero-overlay h1 {
  color: var(--white);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
}

/* ===== CARDS (HOME) ===== */
.cards-section { padding: 50px 24px; background: var(--white); }

.cards-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  text-align: center;
  padding: 30px 20px;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
  color: var(--text-dark);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  color: var(--green);
}

.card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
}

/* ===== PROMO GRID (HOME) ===== */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.promo {
  background-size: cover;
  background-position: center;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.promo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 20%, rgba(0,0,0,0.7));
}

.promo-content {
  position: relative;
  z-index: 1;
  padding: 40px 36px;
  color: var(--white);
}

.promo-content h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.promo-content p {
  font-size: 15px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
}

.btn:hover { background: var(--green-dark); color: var(--white); }

/* ===== CONTENT ===== */
.content-area { padding: 50px 0 70px; }

.content-body {
  max-width: 900px;
}

.content-body h1, .content-body h2, .content-body h3,
.content-body h4, .content-body h5 {
  color: var(--text-dark);
  margin: 1.5em 0 0.6em;
  line-height: 1.3;
}

.content-body h2 { font-size: 28px; color: var(--green); }
.content-body h3 { font-size: 22px; }
.content-body h4 { font-size: 18px; }

.content-body p { margin-bottom: 1em; }

.content-body ul, .content-body ol {
  margin: 0 0 1.2em 1.5em;
}

.content-body li { margin-bottom: 0.4em; }

.content-body img {
  margin: 20px auto;
  border-radius: 6px;
}

.content-img {
  display: block;
  max-width: 100%;
  margin: 24px auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ===== CONTENT CARDS (About / Partnership / Giving) ===== */
.content-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin: 32px 0;
}

.content-card {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.3s, transform 0.3s;
}

.content-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.content-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

.content-card-body {
  padding: 20px;
}

.content-card-body h4 {
  color: var(--green);
  margin: 0 0 10px;
  font-size: 18px;
}

.content-card-body p {
  font-size: 14px;
  margin-bottom: 12px;
}

/* ===== BLOG GRID (Stories of Change) ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin: 32px 0;
}

.blog-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s;
}

.blog-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.12); }

.blog-card-image {
  display: block;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  transition: transform 0.4s;
}

.blog-card:hover .blog-card-image img { transform: scale(1.04); }

.blog-card-body { padding: 22px; }

.blog-card-body h2 {
  font-size: 20px;
  margin: 0 0 12px;
  line-height: 1.3;
}

.blog-card-body h2 a { color: var(--text-dark); }
.blog-card-body h2 a:hover { color: var(--green); }

.blog-card-body p {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 14px;
}

/* ===== INLINE IMAGE + TITLE BLOCKS (wrapped by fix_links.py) ===== */
.content-body > p,
.content-body > strong {
  max-width: 900px;
}

.content-body blockquote {
  border-left: 4px solid var(--green);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--bg-light);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.content-body th, .content-body td {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: left;
}

.content-body th {
  background: var(--green);
  color: var(--white);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

/* Project cards in content */
.content-body .row > div {
  flex: 1 1 280px;
}

/* ===== CONTACT FORM ===== */
.contact-form-wrap { max-width: 600px; margin: 30px 0; }

.contact-form .form-row { margin-bottom: 18px; }

.contact-form label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-size: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.contact-form button { margin-top: 8px; border: none; cursor: pointer; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text-dark);
  color: #ccc;
}

.footer-top {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 50px 24px 30px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-logo { width: 80px; margin-bottom: 12px; }
.abn { font-size: 13px; margin-bottom: 12px; }
.charity-badge { width: 120px; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #aaa; font-size: 14px; }
.footer-col a:hover { color: var(--green-light); }

.footer-bottom {
  border-top: 1px solid #444;
  text-align: center;
  padding: 20px 24px;
  font-size: 13px;
  color: #888;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s;
  }

  body.nav-open .main-nav { max-height: 90vh; overflow-y: auto; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

  .main-nav .nav-list { flex-direction: column; align-items: stretch; padding: 16px; }
  .main-nav .nav-list > li > a { padding: 12px 16px; }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    display: none;
    background: var(--bg-light);
    border-radius: 4px;
    margin: 0 0 8px 16px;
  }

  .has-dropdown.open .dropdown { display: block; }

  .cards-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .hero-overlay { padding: 60px 20px; }
}
