/* ========================================
   World Turtle Trust - Modern Stylesheet
   Ocean/Nature Theme
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --ocean-deep: #0b3d5c;
  --ocean-mid: #1a6b8a;
  --ocean-light: #2a9dbc;
  --ocean-pale: #d0eef7;
  --ocean-wash: #eef8fc;
  --sea-foam: #7ecec1;
  --sand: #f5f0e8;
  --sand-dark: #d4c9b5;
  --coral: #e8735a;
  --coral-dark: #c4533a;
  --kelp: #2e7d56;
  --kelp-dark: #1e5c3c;
  --text-primary: #2c3e50;
  --text-secondary: #5a6d7e;
  --text-light: #ffffff;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --header-height: 72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--white);
  line-height: 1.7;
}

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

a {
  color: var(--ocean-mid);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--ocean-deep);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--ocean-deep);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1em;
}

ul, ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.3em;
}

hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--ocean-pale), transparent);
  margin: 2rem 0;
}

blockquote {
  border-left: 4px solid var(--ocean-light);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--ocean-wash);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding: 3rem 0;
}

/* --- Header & Navigation --- */
.site-header {
  background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-mid) 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.site-logo:hover {
  color: var(--ocean-pale);
  text-decoration: none;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.site-logo span {
  white-space: nowrap;
}

/* Desktop navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--ocean-pale);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  text-decoration: none;
}

.main-nav .nav-donate {
  background: var(--coral);
  color: var(--white);
  margin-left: 0.5rem;
  font-weight: 600;
}

.main-nav .nav-donate:hover {
  background: var(--coral-dark);
}

/* Hamburger menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-light);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-mid) 50%, var(--sea-foam) 100%);
  color: var(--text-light);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80'%3E%3Cpath d='M0,40 C300,80 600,0 900,40 C1050,60 1150,50 1200,40 L1200,80 L0,80 Z' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: cover;
}

.hero h1 {
  color: var(--text-light);
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
  opacity: 0.9;
}

/* Smaller hero for interior pages */
.hero-sm {
  padding: 3rem 0 3.5rem;
}

.hero-sm h1 {
  font-size: 2.2rem;
}

.hero-sm .subtitle {
  font-size: 1.1rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--coral-dark);
  color: var(--white);
}

.btn-secondary {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.3);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--ocean-mid);
  border: 2px solid var(--ocean-mid);
}

.btn-outline:hover {
  background: var(--ocean-mid);
  color: var(--white);
}

.btn-green {
  background: var(--kelp);
  color: var(--white);
}

.btn-green:hover {
  background: var(--kelp-dark);
  color: var(--white);
}

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

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.card-body {
  padding: 1.5rem;
}

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

.card-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* --- Section Styles --- */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--ocean-wash);
}

.section-sand {
  background: var(--sand);
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--ocean-light);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1rem auto 0;
}

/* --- Content Layout --- */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.content-main article {
  max-width: none;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.sidebar-card {
  background: var(--ocean-wash);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--ocean-deep);
}

.sidebar-nav a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sidebar-nav a:last-child {
  border-bottom: none;
}

/* --- Species Cards for Turtle Info --- */
.species-section {
  scroll-margin-top: calc(var(--header-height) + 1rem);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--ocean-pale);
}

.species-section:last-of-type {
  border-bottom: none;
}

.species-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.species-header img {
  width: 280px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.species-name {
  font-size: 1.6rem;
  color: var(--ocean-deep);
}

.species-latin {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.photo-credit {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* --- Project Cards --- */
.project-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-flag {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.project-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.project-card p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Notice / Alert --- */
.notice {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.notice-info {
  background: var(--ocean-wash);
  border-color: var(--ocean-light);
}

/* --- Donate CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-mid));
  color: var(--text-light);
  text-align: center;
  padding: 4rem 1.5rem;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.cta-banner h2 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.cta-banner p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* --- Content Image --- */
.content-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin: 1.5rem 0;
}

.content-img-right {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 300px;
}

.content-img-left {
  float: left;
  margin: 0 2rem 1.5rem 0;
  max-width: 300px;
}

.img-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Image Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.gallery img:hover {
  transform: scale(1.03);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px solid var(--sand-dark);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--ocean-light);
  box-shadow: 0 0 0 3px rgba(42, 157, 188, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Documentary / Book Feature --- */
.feature-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 2rem 0;
}

.feature-block img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
}

/* --- Links / Resources List --- */
.resource-list {
  list-style: none;
  padding-left: 0;
}

.resource-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.resource-list li:last-child {
  border-bottom: none;
}

.resource-list a {
  font-weight: 600;
}

.resource-list .resource-desc {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--ocean-deep);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.footer-col a {
  color: rgba(255,255,255,0.7);
  display: block;
  padding: 0.2rem 0;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-col p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

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

.footer-logo span {
  font-weight: 700;
  color: var(--text-light);
  font-size: 1.1rem;
}

/* --- Clearfix --- */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* === RESPONSIVE === */

/* Tablet */
@media screen and (max-width: 980px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-sm h1 {
    font-size: 1.8rem;
  }

  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .feature-block {
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
  }

  .species-header img {
    width: 200px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* Mobile */
@media screen and (max-width: 640px) {
  :root {
    --header-height: 60px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--ocean-deep);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    gap: 0;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    width: 100%;
  }

  .main-nav .nav-donate {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
    border-radius: var(--radius-sm);
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .subtitle {
    font-size: 1.05rem;
  }

  .hero-sm {
    padding: 2rem 0 3rem;
  }

  .hero-sm h1 {
    font-size: 1.5rem;
  }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  .section {
    padding: 2.5rem 0;
  }

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

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

  .feature-block {
    grid-template-columns: 1fr;
  }

  .feature-block img {
    max-width: 250px;
    margin: 0 auto;
  }

  .species-header {
    flex-direction: column;
  }

  .species-header img {
    width: 100%;
    max-width: 300px;
  }

  .content-img-right,
  .content-img-left {
    float: none;
    margin: 1.5rem auto;
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-md);
  }

  .project-card {
    flex-direction: column;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}
