/* ===== Base / Theme ===== */
* { box-sizing: border-box; }
html { background: #000; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background: #000;
  color: #FDFEFD;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: #FDFEFD; text-decoration: none; }

/* ===== Header & Top Nav ===== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #000;
  border-bottom: none;
}
.logo { max-height: 120px; width: auto; }
@media (max-width: 640px) {
  .logo { max-height: 80px; }
}

/* Keep top nav horizontal on desktop */
.site-header .nav-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  flex-direction: row !important;
}
.site-header .nav-menu > a,
.site-header .nav-menu > .dropdown {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Stack on small screens */
@media (max-width: 640px){
  .site-header .nav-menu{
    flex-direction: column !important;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Active link styling */
.nav-menu a.active,
.nav-menu .dropdown-toggle.active {
  background-color: #15233f;
  color: #FDFEFD;
  border-radius: 8px;
  padding: 6px 10px;
}

/* ===== Dropdown (Breeders) ===== */
.dropdown { position: relative; z-index: 2000; }
.dropdown-toggle {
  cursor: pointer;
  background: transparent; border: 0; padding: 0; font: inherit;
  color: #FDFEFD; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}

/* Menu panel */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  max-width: min(92vw, 320px);
  max-height: 70vh;
  overflow-y: auto;
  background: #0D1B2A;
  border: 1px solid #1a2740;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  display: none;
  z-index: 100;
}
.dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #FDFEFD;
  white-space: nowrap;
}
.dropdown-menu a:hover { background: #101f35; }

/* Desktop: hover/focus can open */
@media (min-width: 641px){
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu { display: block; }
}

/* Phones: center the menu under header and keep on-screen */
@media (max-width: 640px){
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu { display: none !important; }
  .dropdown-menu{
    left:50%; right:auto; transform:translateX(-50%);
    width:96vw; max-width:96vw; max-height:70vh; overflow-y:auto;
  }
}

/* JS-controlled open state must win */
.dropdown.open .dropdown-menu { display: block !important; }

/* Keep nav above other layers */
.site-header, .nav-menu { position: relative; z-index: 1500; }

/* ===== Sections ===== */
.hero { padding: 40px 20px; text-align: center; }
.about-section, .available-section, .contact-section { padding: 20px; }

/* ===== Gallery Grid (2 â†’ 3 â†’ 4 columns; never below 2) ===== */
.reptile-gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px){ .reptile-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px){ .reptile-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ===== Cards ===== */
.reptile-card {
  border: 1px solid #1a2740;
  background: #0D1B2A;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  padding: 10px;
}
.repid {
  margin: 0 0 10px;
  font-size: 20px;
  color: #E18726;
  text-align: left;
  font-weight: 700;
}
.reptile-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #c7d2e0;
  text-align: left;
}
.reptile-card p {
  margin: 4px 0;
  color: #c7d2e0;
  font-size: 14px;
}
.reptile-card .price { color: #FDFEFD; font-weight: 700; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.6);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #0D1B2A;
  color: #FDFEFD;
  border: 1px solid #1a2740;
  border-radius: 12px;
  width: 40px; height: 40px;
  font-size: 24px; line-height: 36px;
  cursor: pointer;
}

/* ===== Footer ===== */
.site-footer {
  background: #000;
  color: #FDFEFD;
  text-align: center;
  padding: 14px;
  margin-top: 20px;
  border-top: 1px solid #1a2740;
}

/* ===== Masthead (image + welcome) ===== */
.masthead { display: grid; gap: 24px; }

/* Mobile first: single column, image on top, text below */
.brand-panel { display: block; }
.brand-panel img {
  width: 100%;
  height: auto;           /* natural height on phones */
  display: block;
  object-fit: cover;
  border: none;
  box-shadow: none;
}

/* Desktop: two columns (image left, text right) */
@media (min-width: 1100px) {
  .masthead {
    grid-template-columns: minmax(560px, 40vw) 1fr;
    align-items: stretch;
    margin: 16px;
  }
  .brand-panel {
    /* constrain height on desktop so it doesn’t dominate */
    max-height: 460px;
    overflow: hidden;
    background: #000;
  }
  .brand-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* two-edge fade on desktop only */
    -webkit-mask-image:
      linear-gradient(to bottom, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%),
      linear-gradient(to right, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%);
    -webkit-mask-composite: destination-in;
            mask-composite: intersect;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
  }
}


/* Ensure sections below are full width */
main, .available-section, .breeder-section, .about-section, .hero { margin-left: 0; }

/* ===== Welcome Hero (styled) ===== */
.welcome-hero {
  text-align: left;
  background: transparent;
  padding: 24px 20px;
  border: none;              /* ðŸ”¹ remove outline around hero */
}

@media (min-width: 1100px) {
  .welcome-hero { padding: 28px 24px; }
}

.welcome-title {
  margin: 0 0 14px;
  line-height: 1.15;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #FDFEFD;
  position: relative;
}

.welcome-title .welcome-accent {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 84px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #E18726 0%, #D1761E 100%);
  display: inline-block;
}

.welcome-lead {
  margin: 16px 0;
  color: #e6eaef;
  font-size: clamp(16px, 1.7vw, 18px);   /* ðŸ”¹ both paragraphs same size */
}

.welcome-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
  font-weight: 600;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(90deg, #E18726, #D1761E);
  color: #060E1B;      /* dark text on orange */
  border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost {
  background: #0D1B2A;
  color: #FDFEFD;
}
.btn-ghost:hover { background: #101f35; }

/* Mobile adjustments */
@media (max-width: 1099px) {
  .welcome-hero { text-align: center; }
  .welcome-title .welcome-accent {
    left: 50%;
    transform: translateX(-50%);
  }
  .welcome-ctas { justify-content: center; }
}

/* ===== About (refined) ===== */
.about-section.about--refined {
  background: #000;                 /* pure black, matches site bg */
  padding: 48px 20px;
}

.about-container {
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 0 40px;
}

.about-title {
  position: relative;
  margin: 0 0 18px;
  text-align: left;                /* left-justified header */
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: #FDFEFD;
  line-height: 1.15;
}

/* orange accent bar tucked under the left edge of the title */
.about-title .about-accent {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 84px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #E18726 0%, #D1761E 100%);
  display: inline-block;
}

.about-section.about--refined p {
  font-size: 18px;
  line-height: 1.8;
  margin: 16px 0;
  color: #c7d2e0;
}

/* single CTA aligned with content; reuses your existing .btn styles */
.about-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-start;      /* keep button left for readability */
  gap: 12px;
}

/* if you want the button to align with the right-justified title instead, use: */
/* .about-actions { justify-content: flex-end; } */

/* ===== About: two-column split BELOW the Available grid ===== */
.about-section.about--split {
  background: #000;                  /* pure black */
  padding: 48px 20px;
}

/* About split grid: desktop = copy | media, mobile = media then copy */
.about-split {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 1fr;
  grid-template-areas: "copy media";
  align-items: start;
}
.about-copy  { grid-area: copy; }
.about-media { grid-area: media; }

@media (max-width: 979px) {
  .about-split {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "copy";
  }
}

.about-copy {
  max-width: none;                   /* full width column */
}

.about-title {
  position: relative;
  margin: 0 0 18px;
  text-align: left;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: #FDFEFD;
  line-height: 1.15;
}

.about-title .about-accent {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 84px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #E18726 0%, #D1761E 100%);
  display: inline-block;
}

.about-section.about--split p {
  font-size: 18px;
  line-height: 1.8;
  margin: 16px 0;
  color: #c7d2e0;
}

.about-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  justify-content: flex-start;       /* button left */
}

/* Right column image */
.about-media {
  overflow: hidden;                  /* clip any masks cleanly */
  align-self: stretch;
  max-height: 520px;                 /* keep it from getting too tall */
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  box-shadow: none;
  /* Fade both right and bottom edges (Safari + others) */
  -webkit-mask-image:
      linear-gradient(to right, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%),
      linear-gradient(to bottom, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 100%);
  -webkit-mask-composite: destination-in;   /* Safari syntax */
          mask-composite: intersect;        /* Spec syntax */
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

/* Optional: a little side padding on super-wide displays */
@media (min-width: 1400px) {
  .about-section.about--split { padding-left: 40px; padding-right: 40px; }
}


/* About Us mobile alignment */
@media (max-width: 979px) {
  .about-section.about--split .about-title { text-align: center; }
  .about-section.about--split .about-title .about-accent {
    left: 50%; transform: translateX(-50%);
  }
  .about-section.about--split p { text-align: center; }
  .about-section.about--split .about-actions { justify-content: center; }
}

/* Default images = no fade */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Fade option (add class="fade-img" in HTML) */
.fade-img {
  --fade: 12%; /* adjust this thickness (try 8%–18%) */
  display: block;
  width: 100%;
  height: auto;

  /* Two gradients — horizontal + vertical */
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  -webkit-mask-composite: destination-in; /* WebKit syntax */
          mask-composite: intersect;       /* Spec syntax */

  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-position: center;
          mask-position: center;
}

/* Wrapper that enables cross-browser 4-side fades */
.fade-frame { position: relative; display: block; }
.fade-frame img { display: block; width: 100%; height: auto; }

/* Prefer true transparency mask when supported */
@supports ((mask-composite: intersect) or (-webkit-mask-composite: destination-in)) {
  .fade-frame img {
    --fade: 12%;
    -webkit-mask-image:
      linear-gradient(to right,  transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
      linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
    -webkit-mask-composite: destination-in; /* WebKit/Chromium */
            mask-image:
      linear-gradient(to right,  transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
      linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
            mask-composite: intersect;      /* Spec */
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
    -webkit-mask-position: center;
            mask-position: center;
  }
}

/* Rock-solid fallback: visual fade to black (perfect for your black theme) */
@supports not ((mask-composite: intersect) or (-webkit-mask-composite: destination-in)) {
  .fade-frame::after{
    --fadepx: 72px;
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      /* top */    linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0)) top/100% var(--fadepx) no-repeat,
      /* bottom */ linear-gradient(to top,    rgba(0,0,0,1), rgba(0,0,0,0)) bottom/100% var(--fadepx) no-repeat,
      /* left */   linear-gradient(to right,  rgba(0,0,0,1), rgba(0,0,0,0)) left/var(--fadepx) 100% no-repeat,
      /* right */  linear-gradient(to left,   rgba(0,0,0,1), rgba(0,0,0,0)) right/var(--fadepx) 100% no-repeat;
  }
}

/* Page hero for /available.php */
.page-hero {
  padding: 24px 20px;
  background: #000;
}
.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
}

/* Homepage: available teaser scroller */
.available-teaser { background:#000; padding: 8px 0 6px; }
.teaser-head {
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding: 0 20px 8px;
}
.teaser-head h2 { margin:0; font-size: clamp(20px, 2.6vw, 24px); font-weight:800; }
.teaser-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 0 20px 6px;
  scroll-snap-type: x mandatory;
}
.teaser-rail::-webkit-scrollbar { height: 8px; }
.teaser-rail::-webkit-scrollbar-thumb { background:#1a2740; border-radius:6px; }
.teaser-card {
  border:1px solid #1a2740;
  background:#0D1B2A;
  border-radius:10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  padding:10px;
  min-width: 240px;
  scroll-snap-align: start;
}
.teaser-card .img-wrap { aspect-ratio:4/3; overflow:hidden; border-radius:8px; cursor:zoom-in; }
.teaser-card h3 { margin:10px 0 6px; font-size:16px; color:#c7d2e0; }
.teaser-card p { margin:2px 0; font-size:14px; color:#c7d2e0; }
.teaser-card .repid { margin:0 0 8px; font-size:16px; color:#E18726; font-weight:700; }

/* Keep your main grid as is (2→3→4 columns) */

/* Filters bar on /available.php */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 10px;
}
.filter { display: flex; flex-direction: column; gap: 6px; }
.filter span { font-size: 13px; opacity: .85; }
.filter select {
  background: #0D1B2A;
  color: #FDFEFD;
  border: 1px solid #1a2740;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 200px;
}
.filters-bar .btn { height: 38px; padding: 0 14px; border-radius: 8px; }
