/* =========================================================
   Global Warming Control Organization Trust — Site Stylesheet
   Palette: Water teal, Leaf green, Sunrise gold, Warm neutrals
   ========================================================= */

:root {
  --teal-dark: #0b4f4a;
  --teal: #14776e;
  --teal-light: #e4f3f1;
  --green: #3f8f4f;
  --green-light: #eaf6ec;
  --gold: #e8a33d;
  --gold-dark: #c97f1f;
  --ink: #223330;
  --ink-soft: #4d5f5a;
  --paper: #faf8f3;
  --white: #ffffff;
  --border: #e3ddd0;
  --shadow: 0 10px 30px rgba(11, 79, 74, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --font-head: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

h1, h2, h3, h4, .brand {
  font-family: var(--font-head);
  color: var(--teal-dark);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--gold-dark); }

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-alt { background: var(--teal-light); }
.section-tight { padding: 60px 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: #fdf1de;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-weight: 600;
}

.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section-head p { color: var(--ink-soft); font-size: 17px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--gold); color: var(--teal-dark); }
.btn-primary:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.15); color: var(--white); transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1160px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  max-width: 260px;
}
.brand-mark {
  width: 40px; height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--green));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a { color: var(--ink); }
.nav-links a:hover { color: var(--teal); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--teal-dark), var(--teal) 55%, var(--green) 130%);
  color: var(--white);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 90px 24px 70px;
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero h1 { color: var(--white); font-size: clamp(32px, 4.6vw, 52px); }
.hero p.lead { color: rgba(255,255,255,0.9); font-size: 18px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 32px; margin-top: 46px; flex-wrap: wrap; }
.hero-stat { }
.hero-stat .num { font-family: var(--font-head); font-size: 30px; font-weight: 700; color: var(--gold); }
.hero-stat .label { font-size: 13px; color: rgba(255,255,255,0.85); letter-spacing: 0.5px; }
.hero-art { position: relative; }
.hero-blob {
  width: 100%; aspect-ratio: 1/1; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
}

/* Icon circles */
.icon-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-light);
  color: var(--green);
  margin-bottom: 18px;
}
.icon-circle.teal { background: var(--teal-light); color: var(--teal); }
.icon-circle.gold { background: #fdf1de; color: var(--gold-dark); }

/* Services */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  height: 100%;
}
.card h3 { font-size: 19px; }
.card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 0; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--green-light), var(--teal-light));
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.about-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-top: 28px; }
.stat-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
}
.stat-box .num { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--teal); }
.stat-box .label { font-size: 13px; color: var(--ink-soft); }

/* Testimonials */
.testi-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testi-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.testi-quote { color: var(--ink-soft); font-style: italic; font-size: 15.5px; flex-grow: 1; }
.testi-person { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--green));
  flex-shrink: 0;
}
.testi-person .name { font-family: var(--font-head); font-weight: 600; font-size: 14.5px; color: var(--ink); }
.testi-person .role { font-size: 12.5px; color: var(--ink-soft); }
.stars { color: var(--gold); font-size: 14px; letter-spacing: 2px; }

/* Interns */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.intern-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  padding: 30px 22px;
}
.intern-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 26px; color: var(--white);
  background: linear-gradient(135deg, var(--gold), var(--green));
}
.intern-card h4 { margin-bottom: 2px; font-size: 17px; }
.intern-card .focus { color: var(--teal); font-size: 13px; font-weight: 600; margin-bottom: 16px; }

.view-all-wrap { text-align: center; margin-top: 40px; }

/* Contact / Footer */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.contact-grid-single {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
}
.contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon-circle { margin-bottom: 0; flex-shrink: 0; width: 44px; height: 44px; }

.map-box {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--teal-light);
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  font-family: var(--font-head);
  text-align: center;
  padding: 20px;
}

footer.site-footer {
  background: var(--teal-dark);
  color: rgba(255,255,255,0.85);
  padding: 50px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
footer.site-footer h4 { color: var(--white); font-size: 15px; margin-bottom: 16px; }
footer.site-footer a { color: rgba(255,255,255,0.75); }
footer.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-bottom {
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,0.6);
}

/* Certificates page */
.cert-shell {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}
.cert-search {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px;
}
.cert-search select, .cert-search input {
  flex: 1;
  min-width: 220px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--paper);
}
.cert-frame-wrap {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f2f0e9;
  min-height: 520px;
  display: flex; align-items: center; justify-content: center;
}
.cert-frame-wrap iframe {
  width: 100%; height: 620px; border: none; background: white;
}
.cert-placeholder { color: var(--ink-soft); text-align: center; padding: 40px; font-family: var(--font-head); }
.cert-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.note-box {
  background: #fdf1de;
  border: 1px solid #f0d9a8;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--gold-dark);
  margin-top: 26px;
}

.qr-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--teal-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-top: 18px;
}
.qr-box img {
  flex-shrink: 0;
  background: #fff;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.qr-box strong {
  font-family: var(--font-head);
  color: var(--teal-dark);
  font-size: 14.5px;
}
.qr-box p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
@media (max-width: 520px) {
  .qr-box { flex-direction: column; text-align: center; }
}

/* Utility */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }

/* Certificate image display (uploaded jpg/png certs) */
.cert-frame-wrap img {
  max-width: 100%;
  max-height: 620px;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}
.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge-yes { background: var(--green-light); color: var(--green); }
.badge-no { background: #fdeceb; color: #b3413a; }
.alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14.5px;
  margin-bottom: 22px;
  border: 1px solid transparent;
}
.alert-success { background: var(--green-light); color: #2c6b3a; border-color: #c9e6cf; }
.alert-error { background: #fdeceb; color: #a3352c; border-color: #f5cac5; }

/* =========================================
   Admin panel
   ========================================= */
.admin-body { background: var(--paper); }

.admin-topbar {
  background: var(--teal-dark);
  padding: 16px 0;
  margin-bottom: 8px;
}
.admin-topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.admin-topbar span { color: var(--white); }
.admin-topbar a { color: rgba(255,255,255,0.8); font-size: 14.5px; }
.admin-topbar a:hover { color: var(--gold); }

.admin-shell { padding: 40px 24px 70px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.admin-head h2 { margin: 0; }

.empty-state {
  color: var(--ink-soft);
  text-align: center;
  padding: 50px 20px;
  font-family: var(--font-head);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Intern / institution list */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 14.5px;
}
.data-table thead th {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: #faf8f3; }
.data-table tbody tr:hover { background: var(--teal-light); }

.row-actions { display: flex; gap: 12px; flex-wrap: wrap; white-space: nowrap; }
.link-edit { color: var(--teal); font-weight: 600; font-size: 13.5px; }
.link-edit:hover { color: var(--gold-dark); }
.link-delete { background: none; border: none; padding: 0; cursor: pointer; font: inherit; color: #b3413a; font-weight: 600; font-size: 13.5px; }
.link-delete:hover { color: #8a2a23; }

@media (max-width: 900px) {
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Admin forms (intern-form.php, institutions.php, settings.php) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--teal-dark); }
.form-field input, .form-field select, .form-field textarea {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--paper);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}
.form-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hint-sm { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Login page */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}
.login-box h2 { text-align: center; }
.login-box .hint { text-align: center; color: var(--ink-soft); font-size: 13.5px; margin-bottom: 24px; }
.login-box form { display: flex; flex-direction: column; gap: 16px; }