/* ==========================================================================
   FEST MANAGER PRO — DESIGN SYSTEM v2
   Professional · Minimal · Animated
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&family=Noto+Sans+Kannada:wght@400;500;600;700;800;900&family=Noto+Sans+Malayalam:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800;900&display=swap');

/* ─── CSS Reset & Root Variables ─────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Brand Colors (FIDAK 2026 Festival Theme: Burgundy Maroon & Terracotta) */
    --ink:        #1e1014;
    --ink-light:  #341b22;
    --ink-muted:  #5c3742;
    --blue:       #701a2b;        /* Festival Deep Maroon / Wine Primary */
    --blue-dim:   #55121f;        /* Rich wine hover */
    --blue-glow:  rgba(112, 26, 43, 0.18);
    --blue-soft:  rgba(112, 26, 43, 0.08);
    --amber:      #c2410c;        /* Festival Terracotta / Warm Amber */
    --amber-soft: rgba(194, 65, 12, 0.09);
    --green:      #16a34a;
    --green-soft: rgba(22, 163, 74, 0.1);
    --red:        #dc2626;
    --red-soft:   rgba(220, 38, 38, 0.1);
    --teal:       #0d9488;
    --teal-soft:  rgba(13, 148, 136, 0.1);
    --violet:     #701a2b;
    --violet-soft:rgba(112, 26, 43, 0.1);

    /* Surface System (Warm Human-Crafted Light Palette) */
    --surface-0:  #faf8f5;        /* Warm Ivory / Pearl App Background */
    --surface-1:  #ffffff;        /* Pure White Card Surface */
    --surface-2:  #f4f0e8;        /* Warm Inset / Secondary Surface */
    --surface-3:  #ede6d8;        /* Warm Hover State Surface */
    --border:     rgba(112, 26, 43, 0.10); /* Soft Warm Border */
    --border-hover: rgba(112, 26, 43, 0.35);

    /* Text Hierarchy */
    --text-0:     #240e14;        /* Deep maroon-black headings */
    --text-1:     #3d232a;        /* Warm readable body */
    --text-2:     #73545d;        /* Secondary */
    --text-3:     #a08790;        /* Placeholder / disabled */

    /* Typography — Native Multilingual Stack: English, Malayalam, Kannada, Urdu, Arabic */
    --font-display: 'Plus Jakarta Sans', 'Inter', 'Noto Sans Malayalam', 'Noto Sans Kannada', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font:       'Inter', 'Noto Sans Malayalam', 'Noto Sans Kannada', 'Noto Naskh Arabic', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Segoe UI Historic', sans-serif;
    --font-mono:  'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* Spacing Scale */
    --s-1:  4px;
    --s-2:  8px;
    --s-3:  12px;
    --s-4:  16px;
    --s-5:  20px;
    --s-6:  24px;
    --s-8:  32px;
    --s-10: 40px;
    --s-12: 48px;

    /* Radius */
    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  16px;
    --r-xl:  22px;
    --r-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(112,26,43,0.03);
    --shadow-sm: 0 2px 8px rgba(112,26,43,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 16px rgba(112,26,43,0.07), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 12px 32px rgba(112,26,43,0.09), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl: 0 24px 48px rgba(112,26,43,0.11), 0 8px 16px rgba(0,0,0,0.05);
    --shadow-blue: 0 4px 20px rgba(112,26,43,0.22);

    /* Transitions */
    --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 280ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-spring: 320ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --max-w: 1320px;
    --header-h: 62px;
}

/* ─── Dark Theme Tokens (Nocturnal Wine Atmospheric) ────────────────────── */
[data-theme="dark"] {
    /* Brand Colors Dark Overrides (Festival Nocturnal Crimson) */
    --ink:        #fdf8f9;
    --ink-light:  #f5e6ea;
    --ink-muted:  #b3929b;
    --blue:       #d94e6c;        /* Luminous Festival Crimson for dark readability */
    --blue-dim:   #b83350;
    --blue-glow:  rgba(217, 78, 108, 0.25);
    --blue-soft:  rgba(217, 78, 108, 0.15);
    --amber:      #ea580c;
    --amber-soft: rgba(234, 88, 12, 0.15);
    --green-soft: rgba(22, 163, 74, 0.16);
    --red-soft:   rgba(220, 38, 38, 0.16);
    --teal-soft:  rgba(13, 148, 136, 0.16);
    --violet-soft:rgba(217, 78, 108, 0.16);

    /* Surface System (Warm Obsidian & Wine Dark Mode) */
    --surface-0:  #130a0e;        /* Deep Nocturnal Wine-Obsidian Background */
    --surface-1:  #1d1016;        /* Deep Warm Card Surface */
    --surface-2:  #281720;        /* Inset / Secondary Surface */
    --surface-3:  #38212d;        /* Hover State Surface */
    --border:     rgba(255, 255, 255, 0.09);
    --border-hover: rgba(217, 78, 108, 0.45);

    /* Text Hierarchy (Dark Mode) */
    --text-0:     #fdf8f9;        /* Headings */
    --text-1:     #f0dce2;        /* Body */
    --text-2:     #b899a2;        /* Secondary */
    --text-3:     #785f67;        /* Placeholder / disabled */

    /* Shadows (Dark Mode) */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.6), 0 4px 8px rgba(0,0,0,0.4);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.7), 0 8px 16px rgba(0,0,0,0.5);
    --shadow-blue: 0 4px 20px rgba(217, 78, 108, 0.25);
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font);
    background: var(--surface-0);
    color: var(--text-1);
    line-height: 1.55;
    font-size: 14px;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "cv02" 1, "cv03" 1, "cv04" 1, "cv11" 1, "tnum" 1;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-x: clip;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 110, 248, 0.2);
    border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 110, 248, 0.4);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 110, 248, 0.2) transparent;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-0);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

p { color: var(--text-1); }
small { font-size: 12px; }

a { color: var(--blue); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--blue-dim); }

code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--blue-soft);
    color: var(--blue);
    padding: 2px 6px;
    border-radius: var(--r-sm);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--s-5);
    width: 100%;
}

.main-content {
    flex: 1;
    padding: var(--s-6) 0;
}

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.between     { display: flex; justify-content: space-between; align-items: center; }
.center      { display: flex; justify-content: center; align-items: center; }
.items-c     { align-items: center; }
.items-center{ align-items: center; }
.items-s     { align-items: flex-start; }
.wrap        { flex-wrap: wrap; }
.gap-0-5, .gap-0\.5 { gap: 2px; }
.gap-1       { gap: var(--s-1); }
.gap-1-5, .gap-1\.5 { gap: 6px; }
.gap-2       { gap: var(--s-2); }
.gap-2-5, .gap-2\.5 { gap: 10px; }
.gap-3       { gap: var(--s-3); }
.gap-4       { gap: var(--s-4); }
.g-1         { gap: var(--s-1); }
.g-2         { gap: var(--s-2); }
.g-3         { gap: var(--s-3); }
.g-4         { gap: var(--s-4); }
.g-5         { gap: var(--s-5); }
.g-6         { gap: var(--s-6); }
.grid-2      { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-4); }
.grid-3      { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.grid-4      { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3); }

.hidden      { display: none !important; }
.invisible   { visibility: hidden; }
.full-w      { width: 100%; }
.text-c      { text-align: center; }
.text-r      { text-align: right; }
.text-muted  { color: var(--text-2); }
.text-dim    { color: var(--text-3); }
.text-blue   { color: var(--blue); }
.text-violet { color: var(--violet); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-amber  { color: var(--amber); }
.font-mono   { font-family: var(--font-mono); }
.font-500    { font-weight: 500; }
.font-600    { font-weight: 600; }
.font-700    { font-weight: 700; }
.font-800    { font-weight: 800; }
.fs-11       { font-size: 11px; }
.fs-12       { font-size: 12px; }
.fs-13       { font-size: 13px; }
.fs-16       { font-size: 16px; }
.fs-18       { font-size: 18px; }
.fs-20       { font-size: 20px; }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rounded     { border-radius: var(--r-md); }
.rounded-lg  { border-radius: var(--r-lg); }
.rounded-full{ border-radius: var(--r-full); }
.overflow-h  { overflow: hidden; }
.relative    { position: relative; }
.block       { display: block; }
.mb-1        { margin-bottom: var(--s-1); }
.mb-2        { margin-bottom: var(--s-2); }
.mb-3        { margin-bottom: var(--s-3); }
.mb-4        { margin-bottom: var(--s-4); }
.mb-6        { margin-bottom: var(--s-6); }
.mt-3        { margin-top: var(--s-3); }
.mt-4        { margin-top: var(--s-4); }
.mt-6        { margin-top: var(--s-6); }
.ml-auto     { margin-left: auto; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    .container { padding: 0 var(--s-4); }
    .main-content { padding: var(--s-4) 0; }
    .hide-mobile { display: none !important; }
}

/* ─── Multilingual & Bidirectional Script Support (Arabic, Urdu, Malayalam, Kannada, English) ─── */
[dir="auto"], bdi, .bdi-content {
    unicode-bidi: isolate;
    text-align: start;
}

.multilingual-text {
    font-family: var(--font);
    line-height: 1.7;
    word-break: break-word;
    unicode-bidi: isolate;
}

.bdi-item {
    unicode-bidi: isolate;
    display: inline;
}

.bdi-sep {
    color: var(--text-3);
    margin: 0 4px;
    font-weight: 600;
}

/* Method Tag in programme items */
.method-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(6, 182, 212, 0.08);
    color: #0891b2;
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 4px;
    margin-bottom: 3px;
    white-space: normal;
    word-break: break-word;
    unicode-bidi: isolate;
    text-align: start;
}

/* Script-specific styling */
.font-arabic, [dir="rtl"] {
    font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Amiri', 'Traditional Arabic', serif;
    direction: rtl;
    text-align: right;
    line-height: 1.75;
}

.font-urdu {
    font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Urdu Typesetting', serif;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
}

.font-malayalam {
    font-family: 'Noto Sans Malayalam', 'Manjari', 'Gayathri', sans-serif;
    line-height: 1.65;
}

.font-kannada {
    font-family: 'Noto Sans Kannada', 'Anek Kannada', 'Tunga', sans-serif;
    line-height: 1.65;
}

