/*
Theme Name: Turtle Project
Theme URI: https://turtleproject.org
Author: Turtle Project
Author URI: https://turtleproject.org
Description: A custom theme for TurtleProject.org — a hub supporting sea turtle NGOs worldwide, spotlighting the Caribbean and Latin America, and hosting a directory of research and educational sources.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: turtleproject
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* =========================================================
   0. Design tokens
   ========================================================= */
:root{
  --tp-deep:      #073b4c;
  --tp-deep-2:    #0a4a5e;
  --tp-teal:      #0e7c86;
  --tp-teal-light:#12a1a8;
  --tp-seafoam:   #8fd6c4;
  --tp-seafoam-2: #e4f6f0;
  --tp-sand:      #f7f0dd;
  --tp-sand-dark: #ecdfba;
  --tp-coral:     #ff6b5b;
  --tp-coral-dark:#e5503f;
  --tp-ink:       #16262b;
  --tp-ink-soft:  #3d5459;
  --tp-white:     #ffffff;
  --tp-radius:    14px;
  --tp-radius-sm: 8px;
  --tp-shadow:    0 10px 30px rgba(7,59,76,0.12);
  --tp-shadow-sm: 0 4px 14px rgba(7,59,76,0.10);
  --tp-max:       1180px;
  --tp-font-head: "Poppins","Segoe UI",system-ui,sans-serif;
  --tp-font-body: "Source Sans Pro","Segoe UI",system-ui,sans-serif;
}

/* =========================================================
   1. Reset & base
   ========================================================= */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--tp-font-body);
  color:var(--tp-ink);
  background:var(--tp-white);
  line-height:1.65;
  font-size:17px;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--tp-teal); text-decoration:none; }
a:hover{ color:var(--tp-coral); }
h1,h2,h3,h4{
  font-family:var(--tp-font-head);
  color:var(--tp-deep);
  line-height:1.2;
  margin:0 0 .5em;
  font-weight:600;
}
h1{ font-size:clamp(2.1rem,4vw,3.2rem); }
h2{ font-size:clamp(1.6rem,3vw,2.3rem); }
h3{ font-size:1.35rem; }
p{ margin:0 0 1.1em; }
ul{ margin:0 0 1.1em; padding-left:1.3em; }
.tp-container{ max-width:var(--tp-max); margin:0 auto; padding:0 24px; }
.tp-section{ padding:72px 0; }
.tp-section--sand{ background:var(--tp-sand); }
.tp-section--deep{ background:var(--tp-deep); color:var(--tp-seafoam-2); }
.tp-section--deep h2, .tp-section--deep h3{ color:var(--tp-white); }
.tp-section--seafoam{ background:var(--tp-seafoam-2); }
.tp-eyebrow{
  display:inline-block; text-transform:uppercase; letter-spacing:.14em;
  font-size:.78rem; font-weight:700; color:var(--tp-coral); margin-bottom:.6em;
}
.tp-lede{ font-size:1.15rem; color:var(--tp-ink-soft); max-width:70ch; }
.tp-center{ text-align:center; margin-left:auto; margin-right:auto; }

/* Buttons */
.tp-btn{
  display:inline-flex; align-items:center; gap:.5em;
  padding:.85em 1.6em; border-radius:999px; font-weight:700;
  background:var(--tp-coral); color:var(--tp-white); border:2px solid var(--tp-coral);
  transition:all .18s ease; cursor:pointer; font-size:1rem;
}
.tp-btn:hover{ background:var(--tp-coral-dark); border-color:var(--tp-coral-dark); color:var(--tp-white); }
.tp-btn--outline{ background:transparent; color:var(--tp-white); border-color:var(--tp-white); }
.tp-btn--outline:hover{ background:var(--tp-white); color:var(--tp-deep); }
.tp-btn--teal{ background:var(--tp-teal); border-color:var(--tp-teal); }
.tp-btn--teal:hover{ background:var(--tp-deep); border-color:var(--tp-deep); }
.tp-btn--ghost{ background:transparent; color:var(--tp-teal); border-color:var(--tp-teal); }
.tp-btn--ghost:hover{ background:var(--tp-teal); color:var(--tp-white); }
.tp-btn-row{ display:flex; flex-wrap:wrap; gap:14px; margin-top:1.6em; }

/* =========================================================
   2. Header
   ========================================================= */
.tp-header{
  position:sticky; top:0; z-index:100; background:rgba(7,59,76,.97);
  backdrop-filter:blur(6px); box-shadow:0 2px 12px rgba(0,0,0,.12);
}
.tp-header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 24px; max-width:var(--tp-max); margin:0 auto;
}
.tp-logo{
  display:flex; align-items:center; font-family:var(--tp-font-head);
  font-weight:700; font-size:1.3rem; color:var(--tp-white);
}
.tp-logo span{ color:var(--tp-seafoam); }
.tp-logo svg{ flex-shrink:0; margin-right:.6em; }
.tp-nav{ display:flex; align-items:center; gap:6px; }
.tp-nav ul{ display:flex; list-style:none; margin:0; padding:0; gap:2px; }
.tp-nav a{
  color:var(--tp-seafoam-2); font-weight:600; padding:10px 14px; border-radius:8px;
  font-size:.97rem; display:block;
}
.tp-nav a:hover, .tp-nav .current-menu-item > a{ background:rgba(255,255,255,.1); color:var(--tp-white); }
.tp-nav-cta{
  margin-left:8px; background:var(--tp-coral); color:var(--tp-white)!important;
  padding:10px 18px; border-radius:999px; font-weight:700;
}
.tp-menu-toggle{ display:none; background:none; border:0; color:var(--tp-white); font-size:1.6rem; cursor:pointer; }

@media (max-width: 900px){
  .tp-menu-toggle{ display:block; }
  .tp-nav{
    position:absolute; top:100%; left:0; right:0; background:var(--tp-deep);
    flex-direction:column; align-items:stretch; padding:8px 20px 20px; display:none;
  }
  .tp-nav.is-open{ display:flex; }
  .tp-nav ul{ flex-direction:column; gap:0; }
  .tp-nav-cta{ margin:10px 0 0; text-align:center; }
}

/* =========================================================
   3. Hero
   ========================================================= */
.tp-hero{
  position:relative; color:var(--tp-white); overflow:hidden;
  background:linear-gradient(160deg,var(--tp-deep) 0%,var(--tp-deep-2) 55%,var(--tp-teal) 130%);
}
.tp-hero-grid{
  display:grid; grid-template-columns:1.1fr 1fr; gap:48px; align-items:center;
  padding:96px 24px 80px; max-width:var(--tp-max); margin:0 auto;
}
.tp-hero h1{ color:var(--tp-white); }
.tp-hero .tp-lede{ color:var(--tp-seafoam-2); }
.tp-hero-media{ position:relative; }
.tp-hero-media img{
  border-radius:var(--tp-radius); box-shadow:var(--tp-shadow);
  aspect-ratio:4/3; object-fit:cover; width:100%;
}
.tp-hero-badge{
  position:absolute; bottom:-20px; left:-20px; background:var(--tp-white); color:var(--tp-deep);
  padding:14px 20px; border-radius:var(--tp-radius-sm); box-shadow:var(--tp-shadow-sm);
  font-weight:700; font-size:.95rem; max-width:220px;
}
@media (max-width: 860px){
  .tp-hero-grid{ grid-template-columns:1fr; padding-top:56px; }
  .tp-hero-badge{ position:static; margin-top:16px; max-width:none; }
}

/* Stat strip */
.tp-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:24px; padding:40px 24px; max-width:var(--tp-max); margin:0 auto; }
.tp-stat{ text-align:center; }
.tp-stat .num{ font-family:var(--tp-font-head); font-size:2.2rem; font-weight:700; color:var(--tp-coral); }
.tp-stat .label{ font-size:.9rem; color:var(--tp-ink-soft); text-transform:uppercase; letter-spacing:.06em; }
@media (max-width:760px){ .tp-stats{ grid-template-columns:repeat(2,1fr); } }

/* =========================================================
   4. Cards / grids
   ========================================================= */
.tp-grid{ display:grid; gap:28px; margin-top:40px; }
.tp-grid--3{ grid-template-columns:repeat(3,1fr); }
.tp-grid--2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:920px){ .tp-grid--3{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){ .tp-grid--3, .tp-grid--2{ grid-template-columns:1fr; } }

.tp-card{
  background:var(--tp-white); border-radius:var(--tp-radius); overflow:hidden;
  box-shadow:var(--tp-shadow-sm); display:flex; flex-direction:column;
  transition:transform .18s ease, box-shadow .18s ease; border:1px solid rgba(7,59,76,.06);
}
.tp-card:hover{ transform:translateY(-4px); box-shadow:var(--tp-shadow); }
.tp-card-media{ aspect-ratio:16/10; overflow:hidden; background:var(--tp-sand-dark); }
.tp-card-media img{ width:100%; height:100%; object-fit:cover; }
.tp-card-body{ padding:22px 22px 26px; flex:1; display:flex; flex-direction:column; }
.tp-card-body h3{ margin-bottom:.35em; }
.tp-card-body h3 a{ color:inherit; }
.tp-card-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:.8em; }
.tp-tag{
  font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  background:var(--tp-seafoam-2); color:var(--tp-teal); padding:4px 10px; border-radius:999px;
}
.tp-tag--coral{ background:#ffe7e2; color:var(--tp-coral-dark); }
.tp-tag--deep{ background:var(--tp-deep); color:var(--tp-white); }
.tp-card-body p{ color:var(--tp-ink-soft); font-size:.97rem; flex:1; }
.tp-card-link{ font-weight:700; margin-top:auto; }

/* Featured org block (large, image + text) */
.tp-feature{
  display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center;
  background:var(--tp-white); border-radius:var(--tp-radius); box-shadow:var(--tp-shadow-sm);
  padding:36px; margin-top:40px;
}
.tp-feature img{ border-radius:var(--tp-radius-sm); aspect-ratio:4/3; object-fit:cover; }
.tp-feature:nth-of-type(even) .tp-feature-media{ order:2; }
@media (max-width:860px){ .tp-feature{ grid-template-columns:1fr; padding:24px; } .tp-feature-media{ order:0 !important; } }

/* Region filter tabs (Organizations directory) */
.tp-filters{ display:flex; flex-wrap:wrap; gap:10px; margin:34px 0 6px; }
.tp-filter-btn{
  border:2px solid var(--tp-teal); background:transparent; color:var(--tp-teal);
  padding:9px 18px; border-radius:999px; font-weight:700; cursor:pointer; font-size:.92rem;
}
.tp-filter-btn.is-active, .tp-filter-btn:hover{ background:var(--tp-teal); color:var(--tp-white); }

/* Info source rows */
.tp-source-group{ margin-top:46px; }
.tp-source-group h3{ border-bottom:3px solid var(--tp-seafoam); padding-bottom:10px; margin-bottom:22px; }
.tp-source-row{
  display:flex; gap:20px; padding:20px 0; border-bottom:1px solid #e7e0cc;
  align-items:flex-start;
}
.tp-source-row .icon{
  flex-shrink:0; width:46px; height:46px; border-radius:50%; background:var(--tp-seafoam-2);
  display:flex; align-items:center; justify-content:center; color:var(--tp-teal); font-weight:700;
}
.tp-source-row h4{ margin:0 0 .3em; color:var(--tp-deep); font-family:var(--tp-font-head); font-size:1.08rem; }
.tp-source-row p{ margin:0 0 .4em; color:var(--tp-ink-soft); font-size:.96rem; }
.tp-source-meta{ font-size:.82rem; color:var(--tp-teal); font-weight:700; text-transform:uppercase; letter-spacing:.04em; }

/* Map / region callouts */
.tp-region-cta{
  display:grid; grid-template-columns:repeat(2,1fr); gap:28px; margin-top:40px;
}
@media (max-width:760px){ .tp-region-cta{ grid-template-columns:1fr; } }
.tp-region-card{
  position:relative; border-radius:var(--tp-radius); overflow:hidden; min-height:280px;
  display:flex; align-items:flex-end; padding:32px; color:var(--tp-white); box-shadow:var(--tp-shadow-sm);
}
.tp-region-card img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.tp-region-card::after{
  content:""; position:absolute; inset:0; z-index:1;
  background:linear-gradient(0deg,rgba(7,59,76,.92) 0%,rgba(7,59,76,.25) 65%,rgba(7,59,76,.05) 100%);
}
.tp-region-card > *{ position:relative; z-index:2; }
.tp-region-card h3{ color:var(--tp-white); }

/* Single organization template */
.tp-org-hero{
  background:linear-gradient(160deg,var(--tp-deep) 0%,var(--tp-teal) 140%); color:var(--tp-white); padding:64px 0 48px;
}
.tp-org-hero-inner{ display:flex; flex-wrap:wrap; gap:34px; align-items:center; }
.tp-org-hero-media{ width:220px; height:220px; border-radius:50%; overflow:hidden; border:6px solid rgba(255,255,255,.25); flex-shrink:0; }
.tp-org-hero-media img{ width:100%; height:100%; object-fit:cover; }
.tp-org-hero h1{ color:var(--tp-white); margin-bottom:.2em; }
.tp-org-facts{ display:flex; flex-wrap:wrap; gap:22px; margin-top:44px; }
.tp-org-fact{ background:var(--tp-white); border-radius:var(--tp-radius-sm); box-shadow:var(--tp-shadow-sm); padding:16px 20px; min-width:150px; }
.tp-org-fact .k{ font-size:.74rem; text-transform:uppercase; letter-spacing:.06em; color:var(--tp-teal); font-weight:700; }
.tp-org-fact .v{ font-family:var(--tp-font-head); font-weight:600; color:var(--tp-deep); }
.tp-org-body{ display:grid; grid-template-columns:2fr 1fr; gap:48px; margin-top:48px; }
.tp-org-gallery{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:20px; }
.tp-org-gallery img{ border-radius:var(--tp-radius-sm); aspect-ratio:1; object-fit:cover; }
.tp-org-sidebar-box{ background:var(--tp-sand); border-radius:var(--tp-radius); padding:26px; }
.tp-org-sidebar-box + .tp-org-sidebar-box{ margin-top:20px; }
@media (max-width:860px){ .tp-org-body{ grid-template-columns:1fr; } }

/* Breadcrumb */
.tp-breadcrumb{ font-size:.88rem; color:var(--tp-ink-soft); margin-bottom:1.4em; }
.tp-breadcrumb a{ color:var(--tp-teal); }

/* Page header (interior pages) */
.tp-page-header{
  background:linear-gradient(160deg,var(--tp-deep) 0%,var(--tp-teal) 150%); color:var(--tp-white);
  padding:70px 0 60px;
}
.tp-page-header h1{ color:var(--tp-white); }
.tp-page-header .tp-lede{ color:var(--tp-seafoam-2); }

/* Content page (generic) */
.tp-content-wrap{ padding:64px 0; }
.tp-content-wrap .entry-content{ max-width:78ch; }
.tp-content-wrap img{ border-radius:var(--tp-radius-sm); margin:1.4em 0; }

/* CTA banner */
.tp-cta-banner{
  background:var(--tp-coral); color:var(--tp-white); border-radius:var(--tp-radius);
  padding:48px; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:24px;
  margin-top:60px;
}
.tp-cta-banner h2{ color:var(--tp-white); margin:0; }

/* Footer */
.tp-footer{ background:var(--tp-ink); color:#c9d6d8; padding:60px 0 24px; }
.tp-footer-grid{ display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:36px; }
@media (max-width:760px){ .tp-footer-grid{ grid-template-columns:1fr 1fr; } }
.tp-footer h4{ color:var(--tp-white); font-size:1rem; margin-bottom:1em; }
.tp-footer ul{ list-style:none; padding:0; margin:0; }
.tp-footer li{ margin-bottom:.6em; }
.tp-footer a{ color:#c9d6d8; }
.tp-footer a:hover{ color:var(--tp-seafoam); }
.tp-footer-bottom{
  border-top:1px solid rgba(255,255,255,.1); margin-top:40px; padding-top:22px;
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; font-size:.85rem; color:#8ba3a7;
}

/* Widgets / directory search-less notice */
.tp-note{ background:var(--tp-seafoam-2); border-left:4px solid var(--tp-teal); padding:16px 20px; border-radius:6px; font-size:.94rem; margin:24px 0; }

/* Utility */
.tp-mt-0{ margin-top:0; }
.screen-reader-text{ position:absolute!important; clip:rect(1px,1px,1px,1px); width:1px; height:1px; overflow:hidden; }
