/* ============================================================
   Jinnah Law Association — Global stylesheet
   ============================================================ */

:root {
  --jla-navy: #1D4423;
  --jla-gold: #66A80F;
  --jla-gold-soft: #3A6E1D;
  --jla-panel: #ffffff;
  --jla-nav-border: #c3ccb7;
  --jla-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  overflow-x: hidden;
}

.font-display-lg,
.font-headline-xl,
.font-headline-lg,
.font-headline-md {
  font-family: 'Playfair Display', Georgia, serif;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
}

.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---- Glass navigation --------------------------------------------------- */
.glass-nav {
  background: rgba(254, 254, 253, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---- Scroll reveal ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--jla-ease),
    transform 0.9s var(--jla-ease);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Count-up stats ----------------------------------------------------- */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* ---- News ticker -------------------------------------------------------- */
.ticker-wrap {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  padding: 0.1rem 2.2rem;
}
.ticker-date {
  font-weight: 700;
  color: var(--color-tertiary-fixed, #d5f0af);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Utility helpers ---------------------------------------------------- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ---- Image fallback ------------------------------------------------------ */
.img-error {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(102, 168, 15, 0.28), transparent 70%),
    linear-gradient(135deg, #2e5a2e, #4e7a24);
}
.avatar-fallback {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #4C8A22;
  letter-spacing: 0.04em;
}

/* ---- Scrollbar ----------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--jla-navy);
  border-radius: 999px;
  border: 2px solid #f1f1f1;
}

/* ---- Form focus ----------------------------------------------------------- */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* ---- Gold gradient -------------------------------------------------------- */
.gold-gradient {
  background: linear-gradient(135deg, #66A80F 0%, #B5D18C 100%);
}

/* ---- Article prose -------------------------------------------------------- */
.prose-article {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.125rem;
}
.prose-article p {
  color: #3d4638;
  margin-bottom: 1.5rem;
}
.prose-article p:last-child {
  margin-bottom: 0;
}

/* ---- Card hover ----------------------------------------------------------- */
.card-lift {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(29, 68, 35, 0.22);
}

/* ---- Dark mode overrides -------------------------------------------------- */
html.dark {
  color-scheme: dark;
  --jla-panel: #10160d;
  --jla-nav-border: #2a3323;
}
html.dark body {
  background: #0c1109;
  color: #e6ead9;
}
html.dark .glass-nav {
  background: rgba(12, 17, 9, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}
html.dark .bg-surface {
  background-color: #0c1109 !important;
}
html.dark .bg-surface-container-lowest {
  background-color: #10160d !important;
}
html.dark .bg-surface-container-low {
  background-color: #131a10 !important;
}
html.dark .bg-surface-container {
  background-color: #151c12 !important;
}
html.dark .bg-surface-container-high {
  background-color: #1a2215 !important;
}
html.dark .bg-surface-container-highest {
  background-color: #1f2819 !important;
}
html.dark .bg-white {
  background-color: #151c12 !important;
}
html.dark .text-on-surface-variant {
  color: #a9b39a !important;
}
html.dark .text-on-surface {
  color: #e6ead9 !important;
}
html.dark .text-primary {
  color: #cfe8c0 !important;
}
html.dark .border-outline-variant {
  border-color: #2a3323 !important;
}
html.dark ::-webkit-scrollbar-track {
  background: #0c1109;
}
html.dark ::-webkit-scrollbar-thumb {
  border-color: #0c1109;
}

/* ============================================================
   Admin panel
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #1D4423;
  color: #fff;
  padding: 24px 16px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
body.admin-nav-open .admin-sidebar {
  transform: translateX(0);
}
body.admin-nav-open .admin-overlay {
  opacity: 1;
  pointer-events: auto;
}
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  transition: all 0.2s;
}
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.admin-nav a.active {
  background: #66A80F;
  color: #0B2410;
}
.admin-nav a .material-symbols-outlined {
  font-size: 22px;
}
.admin-nav-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 14px 8px;
  margin-top: 6px;
}
.admin-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.2s;
}
.admin-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(254, 254, 253, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--jla-nav-border, #c3ccb7);
}
.admin-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--jla-nav-border, #c3ccb7);
  background: var(--jla-panel, #ffffff);
  color: #1D4423;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-menu-btn:hover {
  border-color: #66A80F;
}
.admin-content {
  padding: 28px 24px 48px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
.admin-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: admin-flash-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.admin-flash.success {
  background: #EDF2E2;
  color: #2C4F1B;
  border: 1px solid #4C8A22;
}
.admin-flash.error {
  background: #ffdad6;
  color: #93000a;
  border: 1px solid #ba1a1a;
}
@keyframes admin-flash-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Admin stat cards ---- */
.admin-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--jla-nav-border, #c4c6cf);
  background: var(--jla-panel, #ffffff);
  transition: all 0.25s;
}
.admin-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -12px rgba(29, 68, 35, 0.18);
}
.admin-stat > .material-symbols-outlined {
  font-size: 34px;
}
.admin-stat.primary > .material-symbols-outlined {
  color: #2E5A2E;
}
.admin-stat.gold > .material-symbols-outlined {
  color: #3A6E1D;
}
.admin-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: #1D4423;
}
.admin-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4A5548;
  margin-top: 2px;
}

/* ---- Admin panels ---- */
.admin-panel {
  background: var(--jla-panel, #ffffff);
  border: 1px solid var(--jla-nav-border, #c4c6cf);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--jla-nav-border, #c4c6cf);
  margin-bottom: 8px;
}

/* ---- Admin table ---- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4A5548;
  padding: 12px 14px;
  border-bottom: 2px solid var(--jla-nav-border, #c3ccb7);
}
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--jla-nav-border, #c3ccb7);
  vertical-align: top;
}
.admin-table tbody tr:hover {
  background: rgba(29, 68, 35, 0.04);
}

/* ---- Admin icon buttons ---- */
.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--jla-nav-border, #c3ccb7);
  background: var(--jla-panel, #ffffff);
  color: #4A5548;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-icon-btn:hover {
  border-color: #1D4423;
  color: #1D4423;
}
.admin-icon-btn.success:hover {
  border-color: #2e7d32;
  color: #2e7d32;
}
.admin-icon-btn.danger:hover {
  border-color: #ba1a1a;
  color: #ba1a1a;
  background: #ffdad6;
}

/* ---- Admin dark mode ---- */
html.dark .admin-topbar {
  background: rgba(12, 17, 9, 0.92);
}
html.dark .admin-menu-btn,
html.dark .admin-panel,
html.dark .admin-stat,
html.dark .admin-icon-btn {
  background: #10160d;
}
html.dark .admin-stat-value,
html.dark .admin-menu-btn {
  color: #cfe8c0;
}
html.dark .admin-stat-label,
html.dark .admin-table th,
html.dark .admin-icon-btn {
  color: #a9b39a;
}
html.dark .admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
html.dark .admin-flash.success {
  background: #1c2a12;
  color: #d5f0af;
  border-color: #3a6e1d;
}
html.dark .admin-flash.error {
  background: #45110c;
  color: #ffdad6;
  border-color: #93000a;
}

@media (min-width: 1024px) {
  .admin-sidebar {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 264px;
  }
  .admin-menu-btn {
    display: none;
  }
}
@media (max-width: 1023px) {
  .admin-content {
    padding: 20px 16px 40px;
  }
  .admin-stat-value {
    font-size: 24px;
  }
}

/* ---- Motion: entrance ---------------------------------------------------- */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes zoom-fade {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
.animate-fade-in-up { animation: fade-in-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-fade-in    { animation: fade-in 1s ease-out both; }
.animate-zoom-fade  { animation: zoom-fade 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---- Motion: hero headline line-reveal ------------------------------------ */
.hero-line {
  display: block;
  overflow: hidden;
}
.hero-line > span {
  display: block;
  transform: translateY(110%);
  animation: line-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes line-up {
  to { transform: translateY(0); }
}

/* ---- Motion: hero ambient glow --------------------------------------------- */
@keyframes hero-glow {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  50%      { transform: scale(1.25) translate(-3%, 2%); opacity: 1; }
}
.animate-hero-glow {
  animation: hero-glow 10s ease-in-out infinite;
  will-change: transform, opacity;
}

/* ---- Gold gradient text ----------------------------------------------------- */
.text-gold-gradient {
  color: #B5D18C;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-gold-gradient {
    background: linear-gradient(135deg, #D5F0AF 0%, #B5D18C 40%, #8BC34A 75%, #D5F0AF 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradient-shift 6s ease-in-out infinite;
  }
}

/* ---- Hero text readability --------------------------------------------------- */
.hero-shadow {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

/* ---- Decorative dot pattern ------------------------------------------------- */
.bg-pattern-dots {
  background-image: radial-gradient(rgba(58, 110, 29, 0.18) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
html.dark .bg-pattern-dots {
  background-image: radial-gradient(rgba(213, 240, 175, 0.08) 1.5px, transparent 1.5px);
}

/* ---- Pulsing live dot ------------------------------------------------------- */
@keyframes live-dot {
  0% { box-shadow: 0 0 0 0 rgba(102, 168, 15, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(102, 168, 15, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 168, 15, 0); }
}
.animate-live-dot { animation: live-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ---- Trending: keyword marquee ----------------------------------------------- */
.marquee-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: marquee-scroll 30s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- Trending: grain texture ------------------------------------------------ */
.bg-grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

/* ---- Trending: bento + photo tilt -------------------------------------------- */
.bento {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.bento:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(29, 68, 35, 0.3);
}
.photo-tilt {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.photo-tilt:hover {
  transform: rotate(-1.5deg) scale(1.02);
}

/* ---- Motion: hero background ken-burns ----------------------------------- */
@keyframes hero-kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.12) translate(-1.5%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}
.hero-bg {
  animation: hero-kenburns 24s ease-in-out infinite;
  will-change: transform;
}

/* ---- Motion: floating decor ---------------------------------------------- */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-24px) rotate(4deg); }
}
.animate-float     { animation: float-y 5s ease-in-out infinite; }
.animate-float-slow{ animation: float-slow 9s ease-in-out infinite; }

/* ---- Motion: gradient shift (gold hero CTA) ------------------------------- */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Motion: soft pulse ring ---------------------------------------------- */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(102, 168, 15, 0.35); }
  70%  { box-shadow: 0 0 0 16px rgba(102, 168, 15, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 168, 15, 0); }
}
.animate-pulse-ring { animation: pulse-ring 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ---- Motion: image hover zoom --------------------------------------------- */
.img-zoom { overflow: hidden; }
.img-zoom img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
}
.img-zoom:hover img { transform: scale(1.08); }

/* ---- Motion: scroll hint --------------------------------------------------- */
@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50%      { transform: translateY(10px); opacity: 0.4; }
}
.animate-scroll-hint { animation: scroll-hint 2s ease-in-out infinite; }

/* ---- Staggered reveal helpers ---------------------------------------------- */
.reveal-stagger > * { opacity: 0; }
.reveal-stagger.revealed > * { animation: fade-in-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal-stagger.revealed > *:nth-child(1) { animation-delay: 0.05s; }
.reveal-stagger.revealed > *:nth-child(2) { animation-delay: 0.15s; }
.reveal-stagger.revealed > *:nth-child(3) { animation-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(4) { animation-delay: 0.35s; }
.reveal-stagger.revealed > *:nth-child(5) { animation-delay: 0.45s; }
.reveal-stagger.revealed > *:nth-child(6) { animation-delay: 0.55s; }

/* ---- Respect reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .hero-line > span,
  .animate-hero-glow,
  .text-gold-gradient,
  .animate-live-dot,
  .marquee-track,
  .animate-float,
  .animate-float-slow,
  .gold-gradient,
  .animate-pulse-ring,
  .animate-scroll-hint,
  .ticker-track {
    animation: none !important;
  }
  .hero-line > span {
    transform: none !important;
  }
  .reveal,
  .animate-fade-in-up,
  .animate-fade-in,
  .animate-zoom-fade {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Site-wide smoothness
   ============================================================ */

/* Every interactive element glides on the same soft curve */
a,
button,
[role='button'],
select,
.transition-all,
.transition,
.transition-colors,
.transition-opacity,
.transition-transform,
.transition-shadow {
  transition-timing-function: var(--jla-ease);
  transition-duration: 0.32s;
}

/* Gentle zoom + fade for images as they load on the page */
.fade-img {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.9s var(--jla-ease);
}
.fade-img.is-loaded {
  opacity: 1;
}

/* Softer, more premium hover lift for cards */
.bento {
  transition: transform 0.55s var(--jla-ease), box-shadow 0.55s var(--jla-ease);
}
.bento:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 56px -22px rgba(29, 68, 35, 0.32);
}

/* Grain + glass panels settle in smoothly */
.glass-nav {
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

/* Counters settle slightly longer for a calmer feel */
.count-up {
  letter-spacing: 0.01em;
}

/* Back-to-top button glides instead of snapping */
#back-to-top {
  transition:
    opacity 0.4s ease,
    transform 0.4s var(--jla-ease),
    background 0.4s ease,
    box-shadow 0.4s ease !important;
}

/* Image zoom inside cards is extra silky */
.img-zoom img,
.group:hover > .aspect-\[3\/2\] img {
  transition: transform 0.8s var(--jla-ease), filter 0.8s ease;
}

/* Staggered reveal: longer, softer cascade */
.reveal-stagger.revealed > * {
  animation-duration: 0.9s;
}

/* Subtle entrance for the sticky header content */
header img {
  transition: transform 0.5s var(--jla-ease);
}

/* ============================================================
   Menu hover animations
   ============================================================ */

/* Desktop nav: sliding gold underline + gentle letter-spacing */
.nav-link {
  position: relative;
  transition: color 0.3s var(--jla-ease), letter-spacing 0.35s var(--jla-ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #66A80F, #B5D18C);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--jla-ease);
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}
.nav-link:hover {
  letter-spacing: 0.06em;
}

/* Mobile menu: soft drop-in */
@keyframes menu-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-menu-panel {
  animation: menu-drop 0.4s var(--jla-ease);
}

/* Mobile menu links: sweeping gradient + chevron slide */
.mobile-link {
  position: relative;
  overflow: hidden;
}
.mobile-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(102, 168, 15, 0.12), rgba(181, 209, 140, 0.14));
  transform: translateX(-101%);
  transition: transform 0.45s var(--jla-ease);
}
.mobile-link:hover::before {
  transform: translateX(0);
}
.mobile-link .material-symbols-outlined {
  transition: transform 0.4s var(--jla-ease), color 0.3s ease;
}
.mobile-link:hover .material-symbols-outlined {
  transform: translateX(5px);
  color: #3A6E1D;
}
.mobile-link > * {
  position: relative;
}

/* ---- Admin login: role switcher ------------------------------------------- */
.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--color-surface-container-high, #E4EAD8);
  border-radius: 14px;
  margin-bottom: 24px;
}
.role-switch button {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-on-surface-variant, #4A5548);
  transition: color 0.25s var(--jla-ease), background 0.25s var(--jla-ease), box-shadow 0.25s var(--jla-ease);
}
.role-switch button.active {
  background: var(--color-tertiary, #3A6E1D);
  color: var(--color-on-tertiary, #ffffff);
  box-shadow: 0 8px 20px -8px rgba(102, 168, 15, 0.5);
}

/* ---- Admin forms: image browse button ------------------------------------- */
.img-drop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  border: 2px dashed var(--color-outline-variant, #C9CFC2);
  background: var(--color-surface-container-lowest, #EEF1E7);
  color: var(--color-on-surface-variant, #4A5548);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.3s var(--jla-ease), background 0.3s var(--jla-ease), transform 0.3s var(--jla-ease);
}
.img-drop-btn:hover {
  border-color: #66A80F;
  background: #E4EAD8;
}
.img-drop-btn:active {
  transform: scale(0.99);
}
