/* ─── Theme Colors ─────────────────────────────────────────── */
:root, .light {
  --color-primary: #1d2529;
  --color-on-primary: #ffffff;
  --color-primary-container: #d4e0ed;
  --color-secondary: #475569;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #e2e8f0;
  --color-surface: #ffffff;
  --color-on-surface: #1d2529;
  --color-surface-container: #f1f5f9;
  --color-surface-container-low: #f8fafc;
  --color-on-tertiary-container: #ffffff;
  --color-background: #f8fafc;
  --color-on-background: #1e293b;
  --color-heading: #0f172a;
  --color-muted: #64748b;
  --color-dim: #94a3b8;
  --color-header-bg: #ffffff;
  --color-header-text: #1d2529;
  --color-header-border: #e2e8f0;
  --color-nav-hover: #64748b;
  --color-footer-bg: #1d2529;
  --color-footer-text: #ffffff;
  --color-footer-border: #374151;
  --color-card-bg: #ffffff;
  --color-card-border: #e2e8f0;
}

.dark {
  --color-primary: #1d2529;
  --color-on-primary: #ffffff;
  --color-primary-container: #1d2529;
  --color-secondary: #29343a;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #29343a;
  --color-surface: #29343a;
  --color-on-surface: #ffffff;
  --color-surface-container: #1d2529;
  --color-surface-container-low: #1a2226;
  --color-on-tertiary-container: #ffffff;
  --color-background: #29343a;
  --color-on-background: #ffffff;
  --color-heading: #ffffff;
  --color-muted: #cbd5e1;
  --color-dim: #64748b;
  --color-header-bg: #29343a;
  --color-header-text: #ffffff;
  --color-header-border: #374151;
  --color-nav-hover: #9ca3af;
  --color-footer-bg: #1d2529;
  --color-footer-text: #ffffff;
  --color-footer-border: #374151;
  --color-card-bg: #1e293b;
  --color-card-border: #334155;
}

/* ─── Dark mode card text overrides ──────────────────────────── */
.dark .bg-card-bg,
.dark .bg-card-bg .text-primary,
.dark .bg-card-bg .text-slate-800 {
  color: #f1f5f9;
}
.dark .bg-card-bg .text-slate-700,
.dark .bg-card-bg .text-slate-600 {
  color: #cbd5e1;
}
.dark .bg-card-bg .text-slate-500 {
  color: #94a3b8;
}
.dark .bg-card-bg .text-slate-400 {
  color: #64748b;
}
.dark .bg-card-bg .text-slate-200 {
  color: #334155;
}
.dark .bg-card-bg input:not([type="submit"]):not([type="button"]),
.dark .bg-card-bg textarea,
.dark .bg-card-bg select {
  background-color: #1a202c;
  border-color: #334155;
  color: #e2e8f0;
}
.dark .bg-card-bg .bg-slate-100,
.dark .bg-card-bg .bg-slate-50 {
  background-color: #1a202c;
}

/* ─── Fonts ────────────────────────────────────────────────── */
@font-face {
    font-family: 'NeusaMt2';
    src: url('../../fonts/NeusaMt2-Bold.woff2') format('woff2'),
         url('../../fonts/NeusaMt2-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NeusaNus2';
    src: url('../../fonts/NeusaNus2-Regular.woff2') format('woff2'),
         url('../../fonts/NeusaNus2-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-heading: 'NeusaMt2', sans-serif;
    --font-body: 'NeusaNus2', sans-serif;
}

html, body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6, 
.font-headline-xl, .font-headline-lg, .font-headline-md,
.font-serif, .georgian-style, .Georgian-style, .font-bold, .font-black,
nav a, .nav-item, footer h4, footer ul a {
    font-family: var(--font-heading) !important;
}

/* ─── Smooth transition on theme switch ────────────────────── */
html.theme-transitioning * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* ─── Premium Custom Scrollbar ─────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9; 
}

::-webkit-scrollbar-thumb {
    background: #94a3b8; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b; 
}

/* ─── Page Transitions ─────────────────────────────────────── */
.page-transition {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Base resets from template ────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Content Area for dynamic WYSIWYG text ────────────────── */
.quill-content h1, .quill-content h2, .quill-content h3 {
    font-family: var(--font-heading);
    color: #002045;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.quill-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.quill-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* ─── Card & Interactive Element Animations ────────────────── */

/* Card hover lift */
.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}
.dark .card-hover:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Image zoom on hover */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.4s ease;
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* Link underline animation */
.link-underline {
    position: relative;
    display: inline-block;
}
.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}
.link-underline:hover::after {
    width: 100%;
}

/* Button pulse glow */
.btn-glow {
    position: relative;
    overflow: hidden;
}
.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}
.btn-glow:active::before {
    width: 300%;
    height: 300%;
}

/* Stagger grid animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerFadeIn 0.5s ease forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.7s; }

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Scroll Reveal ────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ─── Nav link active indicator ────────────────────────────── */
.nav-link-active {
    position: relative;
}
.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-nav-hover);
    transition: width 0.3s ease;
}
.nav-link-active:hover::after,
.nav-link-active.active::after {
    width: 100%;
}

/* ─── Smooth all interactive elements ──────────────────────── */
a, button, input, textarea, select {
    transition: all 0.2s ease;
}

/* ─── Loading shimmer ──────────────────────────────────────── */
.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
