/* ================================
   General page styling
   ================================ */
html {
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 2rem;
  text-align: center;
  background: #f5f5f5; /* fallback background */
}

/* Centered main container */
main {
  margin: 0 auto;
  width: 100%;
}

/* ================================
   Landing page backgrounds
   ================================ */
/* body.home-page {
  background: url('/assets/images/raych-background.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
} */

/* body.turtles-page {
  background: url('/assets/images/turtle-background.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
} */

body.turtles-page {
  position: relative;
  min-height: 100vh;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  overflow-x: hidden;
}

/* ================================
   Water background (turtles page)
   ================================ */
#water-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #0d2e1e 0%, #1a4a2e 35%, #1e5c38 65%, #163320 100%);
}

.caustic {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(ellipse, rgba(120,210,160,0.18) 0%, rgba(80,180,130,0.08) 50%, transparent 70%);
  animation: caustic-drift var(--dur) ease-in-out infinite var(--delay);
}

@keyframes caustic-drift {
  0%   { opacity: 0;   transform: scale(0.7) translate(0, 0) rotate(0deg); }
  20%  { opacity: 1; }
  50%  { opacity: 0.7; transform: scale(1.15) translate(var(--tx), var(--ty)) rotate(var(--rot)); }
  80%  { opacity: 0.9; }
  100% { opacity: 0;   transform: scale(0.8) translate(var(--tx2), var(--ty2)) rotate(var(--rot2)); }
}

.ray {
  position: absolute;
  top: -10%;
  border-radius: 50%;
  transform-origin: top center;
  animation: ray-breathe var(--rdur) ease-in-out infinite var(--rdelay);
}

@keyframes ray-breathe {
  0%   { opacity: 0; }
  30%  { opacity: var(--rop); }
  70%  { opacity: var(--rop); }
  100% { opacity: 0; }
}

.bubble {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(140,220,170,0.25);
  background: rgba(140,220,170,0.06);
  animation: bubble-rise var(--bdur) ease-in infinite var(--bdelay);
}

@keyframes bubble-rise {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-120px) translateX(var(--bx)) scale(0.6); opacity: 0; }
}

/* ================================
   Landing page container
   ================================ */
.landing-container {
  position: relative;
  z-index: 1;
  background: rgba(17, 17, 17, 0.85);
  color: #eee;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: calc(100% - 2rem);
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
}

/* Turtle Cove subtle green accent */
body.turtles-page .landing-container {
  border: 1px solid rgba(120, 180, 120, 0.35);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(120, 180, 120, 0.15);
}

/* Improve text readability over photos */
.landing-container h2,
.landing-container a,
.landing-container p {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ================================
   Logo
   ================================ */
.logo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid #fff;
  padding: 3px;
}

/* ================================
   Inline social icons
   ================================ */
.social-icons-inline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 1rem auto 1.5rem;
  width: max-content;
}

.social-icons-inline a {
  color: #eee;
  font-size: 32px;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icons-inline a:hover {
  transform: scale(1.1);
  opacity: 0.75;
}

/* Simple Icons SVG */
.social-svg {
  width: 32px;
  height: 32px;
  display: block;
  filter: invert(1);
}

/* ================================
   Buttons / Links (landing page)
   ================================ */
.landing-container a:not(.social-icons-inline a) {
  display: block;
  margin: 0.8rem auto;
  padding: 1rem 2rem;
  max-width: 260px;
  text-align: center;
  text-decoration: none;
  color: #eee;
  background: #000;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: 500;
  font-size: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.landing-container a:not(.social-icons-inline a):hover {
  background: #333;
  border-color: rgba(255, 255, 255, 0.85);
  transform: scale(1.02);
}

/* ================================
   Media card
   ================================ */
.media-card {
  padding: .1rem .9rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.post-caption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #ccc;
  text-align: center;
}

/* ================================
   Twitch stream card
   ================================ */
.twitch-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  max-width: 260px;
  margin: 1rem auto 2rem;
  color: #eee;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: normal;
  transition: all 0.25s ease;
}

.twitch-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(255,255,255,0.35);
}

.twitch-card a {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.twitch-card .status-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.twitch-card .status-text strong {
  font-size: 1rem;
}

.twitch-card .status-text .duration {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Twitch live pulse animation */
.twitch-card.live {
  animation: twitchPulse 1.8s infinite ease-in-out;
  border-color: rgba(78,228,78,0.6);
}

@keyframes twitchPulse {
  0%,100% { box-shadow: 0 0 6px rgba(78,228,78,0.4); }
  50% { box-shadow: 0 0 12px rgba(78,228,78,0.6); }
}

@media screen and (max-width: 480px) {
  .twitch-card {
    max-width: 100%;
    padding: 0.8rem 1rem;
  }
}

/* ================================
   General headings
   ================================ */
h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

h2 {
  margin-top: 2rem;
  font-size: 1.3rem;
  color: #ccc;
}

/* ================================
   Article / page content
   ================================ */
article h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

article p em {
  color: #aaa;
  font-size: 0.9rem;
}

/* ================================
   Default page layout (non-landing)
   ================================ */
body.default-page {
  background-color: #f9f9f9;
  color: #222;
  padding: 2rem;
}

.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 2rem;
  text-align: left;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.25rem;
  color: #2b2b2b;
  border-bottom: 2px solid rgba(0,0,0,0.1);
  padding-bottom: 0.4rem;
}

.page-subtitle {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1rem;
  color: #222;
}

.page-content p {
  margin-bottom: 1.25rem;
}

.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #333;
}

.page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: #333;
}

.page-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

/* ================================
   Tank cards
   ================================ */
.tank-card {
  background: #fff;
  border-radius: 15px;
  padding: 1.5rem;
  margin: .5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  text-align: left;
  line-height: 1.5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tank-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.tank-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.tank-card p,
.tank-card ul,
.tank-card li {
  margin: 0.3rem 0;
}

.tank-card a {
  display: inline-block;
  margin-top: 0.8rem;
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tank-card a:hover {
  color: #005fa3;
}

/* ================================
   Animal cards
   ================================ */
.animal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.animal-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.animal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  background: #fff;
}

.animal-card img {
  width: 100%;
  max-width: 250px;
  border-radius: 10px;
  margin-bottom: 0.7rem;
}

.animal-card h2 {
  margin-top: 0.3rem;
}

.tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.animal-card a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: none;
}

.animal-card a:hover {
  background: none;
}

.animals-page-img {
  max-width: 100% !important;
  width: 250px !important;
  height: auto;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.animal-card-img {
  width: 100% !important;
  max-width: 220px !important;
  border-radius: 10px;
  margin-bottom: 0.7rem;
}

.turtle-img {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  margin: 1rem auto;
  display: block;
}

/* ================================
   Buttons
   ================================ */
.btn.btn--primary {
  display: inline-block;
  background: #000;
  color: #eee;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.5);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn.btn--primary:hover {
  background: #333;
  transform: scale(1.02);
}

/* ================================
   Images inside content
   ================================ */
.page-content img {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  margin: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  object-fit: cover;
}

.page-content img + p {
  font-size: 0.9rem;
  color: #666;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* ================================
   Responsive tweaks
   ================================ */
@media screen and (min-width: 1024px) {
  .page-container {
    padding: 2rem 3rem;
  }

  .page-content section,
  .tank-card {
    padding: 2rem;
  }
}

/* Tank thumbnails */
.tank-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tank-card:hover .tank-thumb {
  transform: scale(1.01);
  transition: transform 0.2s ease;
}

/* ================================
   Site Navigation
   ================================ */
.site-nav {
  background: #111;
  padding: 0.75rem 2rem;
  margin: -2rem -2rem 2rem -2rem;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: #ddd;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  text-align: left;
}

.nav-links a:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

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

  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ================================
   Footer styling
   ================================ */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: #000;
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: transparent;
}

footer a {
  color: #000;
  text-decoration: underline;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #222;
}