/* For Neelu — Custom Overrides
   Tailwind CSS 3.4.17 handles most styling via CDN.
   This file is for things Tailwind can't do: fonts, keyframes, motion. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* Scroll fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Photo carousel — coverflow / deck style */
.carousel-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  transition: transform 0.5s ease, opacity 0.5s ease, z-index 0s;
  will-change: transform, opacity;
}

.carousel-img {
  width: 280px;
  height: 350px;
  object-fit: cover;
  border-radius: 16px;
  border: 4px solid transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.carousel-slide[data-active="true"] .carousel-img {
  border-color: #7BA7CB;
  box-shadow: 0 20px 50px rgba(75, 139, 181, 0.4);
}

@media (min-width: 768px) {
  .carousel-img {
    width: 360px;
    height: 440px;
  }
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #EDF2F7;
  border: 2px solid #7BA7CB;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
  background: #4A8BB5;
  transform: scale(1.25);
}

/* Folder tabs */
.folder-tab {
  position: relative;
  padding: 14px 28px;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #64748b;
  background: #EDF2F7;
  border: 1px solid #d1dce6;
  border-bottom: 1px solid #d1dce6;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  margin-right: -1px;
  transition: background 0.2s ease, color 0.2s ease;
}

.folder-tab:hover:not(.active) {
  background: #e2e8f0;
  color: #334155;
}

.folder-tab.active {
  background: #ffffff;
  color: #1e293b;
  border-bottom-color: #ffffff;
  z-index: 1;
}

.folder-panel {
  background: #ffffff;
  border: 1px solid #d1dce6;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 2.5rem 3rem;
  min-height: 400px;
}

@media (max-width: 639px) {
  .folder-tab {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .folder-panel {
    padding: 1.5rem;
  }
}

/* Pill sub-tabs (nested inside folder panels) */
.pill-tab {
  padding: 8px 20px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  background: #EDF2F7;
  border: 1px solid #d1dce6;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pill-tab:hover:not(.active) {
  background: #e2e8f0;
  color: #334155;
}

.pill-tab.active {
  background: #4A8BB5;
  color: #ffffff;
  border-color: #4A8BB5;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Dark Mode ─────────────────────────────────────────────────────
   System-triggered via prefers-color-scheme.
   Palette matched to index.html's CSS custom properties.
   Uses !important to override Tailwind CDN utility classes. ────── */

@media (prefers-color-scheme: dark) {

  /* ── Page backgrounds ── */
  .bg-neelu-50  { background-color: #0F1A2E !important; }
  .bg-neelu-100 { background-color: #0d1520 !important; }
  .bg-white     { background-color: #0F1A2E !important; }

  /* Cards with borders get slightly lighter bg for depth */
  .bg-white.border { background-color: #0d1520 !important; }

  /* Nav */
  .bg-white\/95 { background-color: rgba(15, 26, 46, 0.95) !important; }
  header.sticky { border-bottom-color: rgba(123, 167, 203, 0.1) !important; }

  /* ── Text colors ── */
  .text-slate-800 { color: #ffffff !important; }
  .text-slate-700 { color: #e2e8f0 !important; }
  .text-slate-600 { color: #cbd5e1 !important; }
  .text-slate-500 { color: #94a3b8 !important; }
  .text-neelu-600 { color: #7BA7CB !important; }
  .text-neelu-900 { color: #EDF2F7 !important; }
  .text-neelu-100 { color: #94a3b8 !important; }

  /* Body text default */
  body.text-slate-800 { color: #e2e8f0 !important; }

  /* ── Accent / brand colors (stay vibrant) ── */
  .bg-neelu-600 { background-color: #4A8BB5 !important; }
  .text-neelu-400 { color: #7BA7CB !important; }

  /* ── Borders ── */
  .border-neelu-100  { border-color: #1e3a5f !important; }
  .border-neelu-400  { border-color: #1e3a5f !important; }
  .divide-neelu-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #1e3a5f !important;
  }
  .border-neelu-400\/20 { border-color: rgba(123, 167, 203, 0.15) !important; }
  .border-warm\/30 { border-color: rgba(212, 184, 150, 0.2) !important; }

  /* ── Shadows ── */
  .shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }

  /* ── Hover states ── */
  .hover\:text-neelu-400:hover  { color: #93bbd9 !important; }
  .hover\:text-neelu-600:hover  { color: #7BA7CB !important; }
  .hover\:bg-neelu-100:hover    { background-color: #1a2332 !important; }
  .hover\:bg-neelu-600:hover    { background-color: #5a94bd !important; }
  .hover\:border-neelu-400:hover { border-color: #7BA7CB !important; }

  /* ── Warm accent ── */
  .bg-warm  { background-color: rgba(212, 184, 150, 0.1) !important; }
  .text-warm { color: #D4B896 !important; }

  /* ── Prose (for update body content) ── */
  .prose-slate { color: #e2e8f0 !important; }
  .prose a { color: #7BA7CB !important; }

  /* ── FAQ details/summary ── */
  details summary { color: #e2e8f0; }
  details[open] summary { color: #ffffff; }

  /* ── Folder tabs (dark variants) ── */
  .folder-tab {
    color: #94a3b8;
    background: #1a2332;
    border-color: #1e3a5f;
    border-bottom-color: #1e3a5f;
  }

  .folder-tab:hover:not(.active) {
    background: #1f2b3d;
    color: #cbd5e1;
  }

  .folder-tab.active {
    background: #0F1A2E;
    color: #ffffff;
    border-bottom-color: #0F1A2E;
  }

  .folder-panel {
    background: #0F1A2E;
    border-color: #1e3a5f;
  }

  /* ── Pill sub-tabs (dark variants) ── */
  .pill-tab {
    color: #94a3b8;
    background: #1a2332;
    border-color: #1e3a5f;
  }

  .pill-tab:hover:not(.active) {
    background: #1f2b3d;
    color: #cbd5e1;
  }

  .pill-tab.active {
    background: #4A8BB5;
    color: #ffffff;
    border-color: #4A8BB5;
  }

  /* ── Carousel dots (dark variants) ── */
  .carousel-dot {
    background: #1a2332;
    border-color: #4A8BB5;
  }

  .carousel-dot.active {
    background: #4A8BB5;
  }

  /* ── Mobile menu ── */
  #mobile-menu {
    background-color: rgba(15, 26, 46, 0.98) !important;
  }

  #mobile-menu a {
    color: #cbd5e1 !important;
  }

  #mobile-menu a:hover {
    color: #7BA7CB !important;
  }

  /* ── Gradient decorative lines (inline styles use #7BA7CB — fine in dark) ── */

  /* ── Focus ring ── */
  .focus\:ring-neelu-400:focus {
    --tw-ring-color: #7BA7CB !important;
  }

  /* ── Skip-to-content link ── */
  .sr-only.focus\:not-sr-only:focus {
    background-color: #0F1A2E !important;
    color: #7BA7CB !important;
  }
}
