
/* =========================
   FOUNDATION
========================= */

:root {
  --text: #1f2933;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-muted: #f5f7fa;
  --accent: #4a6fa5;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 20px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.foundation-image {
  width: 100%;
  height: 150px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  margin-bottom: 2rem;
}

/* =========================
   LAYOUT
========================= */

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

.container.narrow {
  max-width: 800px;
}

.section {
  padding: 2rem 0;
  margin-bottom: 40px;
}

.section-muted {
  background: var(--bg-muted);
}

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

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

/* =========================
   HEADER
========================= */

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 1rem 0;
}

/* =========================
   HEADER IMPROVEMENTS
========================= */

.header-right {
  display: flex;
  flex-direction: column;   /* ?? key change */
  align-items: flex-end;
  gap: 0.5rem;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

/* Subtle buttons */
.btn-subtle {
  border: 1px solid #333;
  padding: 6px 12px;
  font-size: 0.8rem;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s ease;
}

.btn-subtle:hover {
  background: #333;
  color: #fff;
}

/* Disabled state */
.disabled {
  opacity: 0.5;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* prevents breaking issues */
}

.main-nav a {
  margin-left: 1.5rem;
}

/* Comfort Mode styles */
body.comfort-mode {
  font-size: 19px;
  line-height: 1.85;
  background-color: #ffffff;
  color: #000000;
}

/* Increase spacing in comfort mode */
body.comfort-mode p,
body.comfort-mode li {
  margin-bottom: 1.2em;
}

/* Stronger contrast for links */
body.comfort-mode a {
  color: #0033cc;
  text-decoration: underline;
}

/* Button styling (keep simple and accessible) */
#comfortToggle {
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid #333;
  background: #f5f5f5;
   margin-top: 0.5rem;
  font-size: 0.85rem;
  
}

#comfortToggle:focus {
  outline: 3px solid #000;
}

/* =========================
   BUTTONS
========================= */

.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
}

.btn-primary {
  background: #1d4ed8;
  color: #fff;
}

.btn-secondary {
  border: 2px solid #1d4ed8;
  color: #000;
}



/* =========================
   CARD GRID SYSTEM
========================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

/* =========================
   CARDS
========================= */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.card.alt {
  background: #f0f4f8;
}

.card.soft {
  background: #f7f3ef;
}

.card.foundation {
  border-left: 4px solid var(--accent);
}

/* =========================
   HERO
========================= */

.hero {
  padding: 4rem 2rem;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
}

.hero-light {
  background-image: url('../images/great-barrier-reef.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: lighten;
}

.hero h1 {
  font-size: 2.5rem;
  color: #000;
}

/* =========================
   POPUP FIX
========================= */

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

.popup-content {
  background: #fff;
  padding: 20px;
  max-width: 320px;
  margin: 15% auto;
  text-align: center;
  border-radius: 8px;
}

/* =========================
   DROPDOWN / LOGIN
========================= */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.login-wrapper {
  position: relative;
}

.login-dropdown {
  display: none;
  position: absolute;
  right: 0;
  background: #fff;
  padding: 12px;
  width: 200px;
}

.login-wrapper:hover .login-dropdown {
  display: block;
}

/* GUIDE CARDS FOR HUB PAGES (distinct from foundation) */

.guide-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 10px;
}

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

.guide-card a {
  font-weight: 600;
  font-size: 0.9rem;
}

/* =========================
   COMMUNITY
========================= */

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.community-section {
  background: #f7f3ef;
}

.community-card {
  background: #fff;
  border: 1px solid #ddd;
  text-align: center;
  padding: 2rem 1.5rem;
}

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

/* =========================
   FOOTER
========================= */

.site-footer {
  border-top: 3px solid var(--border);
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* =========================
   UTILITIES
========================= */

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

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

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* =========================
   RESPONSIVE
========================= */

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

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .header-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.content-block {
  margin-bottom: 3rem;
}

.content-block:nth-child(even) {
  background: #fafafa;
  padding: 1.5rem;
  border-radius: 8px;
}
.trust-block {
  background: #f9fafb;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-note {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Base styles */
body {
  font-size: 17px;
  line-height: 1.6;
  background-color: #ffffff;
  color: #222222;
  transition: all 0.2s ease-in-out;
  
}

/* Comfort Mode styles */
body.comfort-mode {
  font-size: 19px;
  line-height: 1.85;
  background-color: #ffffff;
  color: #000000;
}

/* Increase spacing in comfort mode */
body.comfort-mode p,
body.comfort-mode li {
  margin-bottom: 1.2em;
}

/* Stronger contrast for links */
body.comfort-mode a {
  color: #0033cc;
  text-decoration: underline;
}

/* Button styling (keep simple and accessible) */
#comfortToggle {
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid #333;
  background: #f5f5f5;
   margin-top: 0.5rem;
  font-size: 0.85rem;
  
}

#comfortToggle:focus {
  outline: 3px solid #000;
}