/* AI4Students - Custom Styles */

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

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --deep-blue: #0a1628;
    --deep-blue-light: #0f2744;
    --deep-blue-mid: #1a3a5c;
    --gold: #d4a017;
    --gold-light: #f5c518;
    --gold-glow: #ffd700;
    --iran-green: #239f40;
    --iran-red: #da0000;
    --iran-white: #ffffff;
    --neural-line: rgba(212, 160, 23, 0.15);
    --circuit-glow: rgba(245, 197, 24, 0.4);
}

* {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--deep-blue);
    color: #e2e8f0;
    overflow-x: hidden;
}

/* ===== Loading Overlay ===== */
#loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--deep-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ai-loader {
    position: relative;
    width: 120px;
    height: 120px;
}

.ai-loader-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.ai-loader-ring:nth-child(2) {
    inset: 12px;
    border-top-color: var(--iran-green);
    animation-duration: 1.8s;
    animation-direction: reverse;
}

.ai-loader-ring:nth-child(3) {
    inset: 24px;
    border-top-color: var(--iran-red);
    animation-duration: 2.4s;
}

.ai-loader-core {
    position: absolute;
    inset: 36px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

.ai-loader-nodes {
    position: absolute;
    inset: 0;
}

.ai-loader-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--gold-light);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--circuit-glow);
    animation: node-pulse 1.5s ease-in-out infinite;
}

.ai-loader-node:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.ai-loader-node:nth-child(2) { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 0.5s; }
.ai-loader-node:nth-child(3) { left: 0; top: 50%; transform: translateY(-50%); animation-delay: 1s; }
.ai-loader-node:nth-child(4) { right: 0; top: 50%; transform: translateY(-50%); animation-delay: 1.5s; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes node-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ===== Typing Animation ===== */
.typing-text {
    display: inline;
    border-left: 3px solid var(--gold-light);
    animation: blink-cursor 0.8s step-end infinite;
    padding-left: 2px;
}

@keyframes blink-cursor {
    0%, 100% { border-color: var(--gold-light); }
    50% { border-color: transparent; }
}

/* ===== Countdown Glow ===== */
.countdown-box {
    background: linear-gradient(135deg, rgba(15, 39, 68, 0.9), rgba(26, 58, 92, 0.8));
    border: 1px solid rgba(212, 160, 23, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.countdown-box:hover {
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(212, 160, 23, 0.3);
    transform: translateY(-2px);
}

.countdown-number {
    background: linear-gradient(180deg, var(--gold-glow), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(245, 197, 24, 0.5);
    animation: countdown-pulse 2s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* ===== Circuit Board Background ===== */
.circuit-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.circuit-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, var(--neural-line) 1px, transparent 1px),
        linear-gradient(var(--neural-line) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: circuit-drift 20s linear infinite;
}

.circuit-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(35, 159, 64, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(218, 0, 0, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 0%, rgba(212, 160, 23, 0.1) 0%, transparent 60%);
}

.circuit-lines {
    position: absolute;
    inset: 0;
}

.circuit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    height: 1px;
    opacity: 0;
    animation: circuit-flow 4s ease-in-out infinite;
}

.circuit-line:nth-child(1) { top: 20%; width: 40%; right: 0; animation-delay: 0s; }
.circuit-line:nth-child(2) { top: 45%; width: 60%; left: 0; animation-delay: 1.5s; }
.circuit-line:nth-child(3) { top: 70%; width: 50%; right: 10%; animation-delay: 3s; }
.circuit-line:nth-child(4) { top: 85%; width: 35%; left: 20%; animation-delay: 0.8s; }

@keyframes circuit-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

@keyframes circuit-flow {
    0% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 0.6; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(0); }
}

/* ===== Neural Network Background ===== */
.neural-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.neural-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: neural-float 8s ease-in-out infinite;
}

.neural-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 160, 23, 0.2), transparent);
    transform-origin: left center;
    animation: neural-pulse-line 3s ease-in-out infinite;
}

@keyframes neural-float {
    0%, 100% { transform: translate(0, 0); opacity: 0.2; }
    25% { transform: translate(10px, -15px); opacity: 0.5; }
    50% { transform: translate(-5px, 10px); opacity: 0.3; }
    75% { transform: translate(15px, 5px); opacity: 0.4; }
}

@keyframes neural-pulse-line {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.4; }
}

/* ===== Instructor Cards ===== */
.instructor-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.instructor-card:hover {
    transform: translateY(-8px) scale(1.05);
}

.instructor-photo {
    border: 3px solid transparent;
    background: linear-gradient(var(--deep-blue), var(--deep-blue)) padding-box,
                linear-gradient(135deg, var(--iran-green), var(--gold), var(--iran-red)) border-box;
    transition: all 0.3s ease;
}

.instructor-card:hover .instructor-photo {
    box-shadow: 0 0 30px rgba(212, 160, 23, 0.4);
}

/* ===== News Carousel ===== */
.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-dot.active {
    background: var(--gold);
    box-shadow: 0 0 10px var(--circuit-glow);
    transform: scale(1.3);
}

/* ===== Buttons ===== */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--deep-blue);
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-gold:hover::before {
    transform: translateX(100%);
}

.btn-gold:hover {
    box-shadow: 0 0 25px rgba(212, 160, 23, 0.5);
    transform: translateY(-2px);
}

.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold);
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--deep-blue);
    box-shadow: 0 0 20px rgba(212, 160, 23, 0.4);
}

/* ===== Cards ===== */
.glass-card {
    background: rgba(15, 39, 68, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 160, 23, 0.15);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(212, 160, 23, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== Navbar ===== */
.navbar-glass {
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--iran-green), var(--gold), var(--iran-red));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== Iran Flag Accent ===== */
.iran-accent {
    background: linear-gradient(180deg, var(--iran-green) 33%, var(--iran-white) 33%, var(--iran-white) 66%, var(--iran-red) 66%);
    height: 3px;
}

/* ===== Live Badge ===== */
.live-badge {
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(218, 0, 0, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(218, 0, 0, 0); }
}

.live-dot {
    animation: live-blink 1.5s ease-in-out infinite;
}

@keyframes live-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== Progress Bars ===== */
.progress-bar {
    height: 8px;
    background: rgba(15, 39, 68, 0.8);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--iran-green), var(--gold));
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== Sidebar ===== */
.sidebar {
    background: linear-gradient(180deg, var(--deep-blue) 0%, var(--deep-blue-light) 100%);
    border-left: 1px solid rgba(212, 160, 23, 0.1);
}

.sidebar-link {
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(212, 160, 23, 0.1);
    border-right-color: var(--gold);
    color: var(--gold-light);
}

/* ===== Forms ===== */
.form-input {
    background: rgba(15, 39, 68, 0.8);
    border: 1px solid rgba(212, 160, 23, 0.2);
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15);
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* ===== Feature Icons ===== */
.feature-icon {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.2), rgba(35, 159, 64, 0.1));
    transition: all 0.3s ease;
}

.glass-card:hover .feature-icon {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.4), rgba(35, 159, 64, 0.2));
    transform: rotate(5deg) scale(1.1);
}

/* ===== Hero Poster ===== */
.hero-poster {
    filter: drop-shadow(0 0 40px rgba(212, 160, 23, 0.3));
    animation: hero-float 6s ease-in-out infinite;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-blue);
}

::-webkit-scrollbar-thumb {
    background: var(--deep-blue-mid);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ===== Table ===== */
.data-table th {
    background: rgba(15, 39, 68, 0.8);
    border-bottom: 2px solid rgba(212, 160, 23, 0.3);
}

.data-table tr:hover td {
    background: rgba(212, 160, 23, 0.05);
}

/* ===== Status Badges ===== */
.badge-open { background: rgba(35, 159, 64, 0.2); color: #4ade80; }
.badge-progress { background: rgba(212, 160, 23, 0.2); color: var(--gold-light); }
.badge-resolved { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-closed { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge-pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* ===== Lesson Tree ===== */
.lesson-tree-item {
    border-right: 2px solid rgba(212, 160, 23, 0.2);
    transition: all 0.3s ease;
}

.lesson-tree-item:hover {
    border-right-color: var(--gold);
    background: rgba(212, 160, 23, 0.05);
}

.lesson-tree-item.completed {
    border-right-color: var(--iran-green);
}

/* ===== Footer ===== */
.footer-wave {
    position: relative;
}

.footer-wave::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--iran-green), var(--gold), var(--iran-red));
}

/* ===== Animations Utility ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* ===== Chart Container ===== */
.chart-container {
    background: rgba(15, 39, 68, 0.6);
    border: 1px solid rgba(212, 160, 23, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
}

/* ===== Global Animated Background ===== */
.page-animated-bg {
    position: relative;
}

.page-animated-bg::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(35, 159, 64, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(245, 197, 24, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(218, 0, 0, 0.05) 0%, transparent 50%);
    animation: bgShift 12s ease-in-out infinite alternate;
}

.global-bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.global-bg-layer .circuit-bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
}

.global-bg-layer .neural-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
}

@keyframes bgShift {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* ===== Logo Animation ===== */
.logo-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.logo-icon-inner {
    position: relative;
    width: 100%;
    height: 100%;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(245, 197, 24, 0.4));
}

.logo-node {
    animation: nodePulse 2s ease-in-out infinite;
}

.logo-node:nth-child(2) { animation-delay: 0.3s; }
.logo-node:nth-child(3) { animation-delay: 0.6s; }

.logo-pulse-ring {
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(245, 197, 24, 0.3);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes nodePulse {
    0%, 100% { opacity: 1; r: 3; }
    50% { opacity: 0.6; }
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

.logo-title {
    background: linear-gradient(135deg, #fff 0%, var(--gold-light) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ===== Select Dropdown Fix ===== */
select.form-input {
    background-color: rgba(15, 39, 68, 0.95);
    color: #e2e8f0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f5c518'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-left: 36px;
}

select.form-input option {
    background-color: #0f2744;
    color: #e2e8f0;
    padding: 8px;
}

/* ===== Floating Nav (mobile: bottom bar, desktop: side rail) ===== */
.floating-nav {
    position: fixed;
    z-index: 45;
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(15, 39, 68, 0.94);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(212, 160, 23, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 20px rgba(245, 197, 24, 0.08);
    transition: all 0.3s ease;
    /* mobile: bottom center */
    bottom: 16px;
    left: 50%;
    right: auto;
    top: auto;
    transform: translateX(-50%);
    flex-direction: row;
    border-radius: 999px;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
}

.floating-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    transition: all 0.25s ease;
    text-align: center;
    border-bottom: 2px solid transparent;
}

.floating-nav a:hover,
.floating-nav a.active {
    background: rgba(212, 160, 23, 0.12);
    color: var(--gold-light);
    border-bottom-color: var(--gold);
}

@media (min-width: 1024px) {
    .floating-nav {
        right: 16px;
        left: auto;
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        border-radius: 16px;
        max-width: none;
        overflow-x: visible;
        padding: 10px 8px;
        gap: 6px;
    }
    .floating-nav a {
        padding: 10px 14px;
        font-size: 11px;
        border-radius: 10px;
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    .floating-nav a:hover,
    .floating-nav a.active {
        border-right-color: var(--gold);
        border-bottom-color: transparent;
        transform: translateX(-3px);
    }
}

/* ===== Logo Brand Cycle ===== */
.logo-orbit-ring {
    position: absolute;
    inset: -6px;
    border: 1px dashed rgba(245, 197, 24, 0.35);
    border-radius: 50%;
    animation: logoOrbit 8s linear infinite;
}

.logo-orbit-ring-2 {
    inset: -10px;
    border-color: rgba(35, 159, 64, 0.25);
    animation-direction: reverse;
    animation-duration: 12s;
}

@keyframes logoOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-brand-cycle {
    position: relative;
    height: 1.35em;
    overflow: hidden;
}

.logo-text-wrap .logo-brand-cycle.text-lg {
    height: 1.4em;
}

.logo-brand-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    background: linear-gradient(135deg, #fff 0%, var(--gold-light) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    line-height: 1.3;
    font-size: inherit;
}

.logo-brand-item.logo-brand-active {
    opacity: 1;
    transform: translateY(0);
    animation: shimmer 4s linear infinite;
}

.logo-pulse-ring-2 {
    animation-delay: 1s;
    border-color: rgba(35, 159, 64, 0.25);
}

.logo-wire {
    stroke-dasharray: 4 2;
    animation: wirePulse 2s ease-in-out infinite;
}

@keyframes wirePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.logo-ai-text {
    animation: aiTextGlow 2s ease-in-out infinite alternate;
}

@keyframes aiTextGlow {
    from { opacity: 0.85; }
    to { opacity: 1; }
}

/* ===== Slogan Dots ===== */
.slogan-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.4);
    transition: all 0.3s ease;
    cursor: default;
}

.slogan-dot.active {
    background: var(--gold-light);
    box-shadow: 0 0 8px rgba(245, 197, 24, 0.6);
    transform: scale(1.3);
}

.typing-cursor {
    color: var(--gold-light);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ===== Visual Captcha ===== */
.visual-captcha-box {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.visual-captcha-box:hover {
    transform: scale(1.01);
    box-shadow: 0 0 24px rgba(245, 197, 24, 0.15);
}

.visual-captcha-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
    animation: captchaShine 3s ease-in-out infinite;
    pointer-events: none;
}

#captcha-canvas.captcha-loading {
    opacity: 0.5;
    filter: blur(2px);
}

@keyframes captchaShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* ===== Floating Particles ===== */
.floating-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

.particle.gold { background: radial-gradient(circle, rgba(245,197,24,0.6), transparent); }
.particle.green { background: radial-gradient(circle, rgba(35,159,64,0.5), transparent); }
.particle.blue { background: radial-gradient(circle, rgba(100,180,255,0.4), transparent); }

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.global-bg-layer .circuit-line {
    animation-duration: 8s;
}

.aurora-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(35,159,64,0.07), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(245,197,24,0.06), transparent);
    animation: auroraMove 20s ease-in-out infinite alternate;
}

@keyframes auroraMove {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(2%, -2%) scale(1.05); }
}

/* ===== Course Timeline ===== */
.course-timeline {
    margin-top: 0.5rem;
}

.timeline-track {
    display: grid;
    gap: 0;
}

@media (min-width: 768px) {
    .timeline-track {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0;
    }
}

.timeline-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
}

@media (min-width: 768px) {
    .timeline-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 0.5rem;
    }
}

.timeline-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding-top: 0.35rem;
}

@media (min-width: 768px) {
    .timeline-dot-wrap {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        padding-top: 0;
    }
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--iran-green), var(--gold-light));
    box-shadow: 0 0 12px rgba(245, 197, 24, 0.5);
    flex-shrink: 0;
    z-index: 1;
}

.timeline-line {
    width: 2px;
    flex: 1;
    min-height: 2.5rem;
    background: linear-gradient(180deg, var(--gold), rgba(212, 160, 23, 0.2));
    margin: 4px 0;
}

@media (min-width: 768px) {
    .timeline-line {
        width: auto;
        height: 2px;
        min-height: 0;
        flex: 1;
        margin: 0 0;
        position: absolute;
        top: 7px;
        left: calc(50% + 10px);
        right: calc(-50% + 10px);
        background: linear-gradient(90deg, var(--gold), rgba(212, 160, 23, 0.2));
    }
    .timeline-step:last-child .timeline-line { display: none; }
}

.timeline-card {
    flex: 1;
    background: rgba(15, 39, 68, 0.7);
    border: 1px solid rgba(212, 160, 23, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 768px) {
    .timeline-card {
        margin-bottom: 0;
        margin-top: 0.75rem;
        width: 100%;
    }
}

.timeline-card:hover {
    border-color: rgba(245, 197, 24, 0.45);
    box-shadow: 0 4px 20px rgba(245, 197, 24, 0.08);
}

.timeline-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.timeline-period {
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.5;
}

/* ===== Dashboard Breadcrumb ===== */
.breadcrumb-nav {
    padding: 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-sep {
    color: #475569;
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--gold-light);
}

.breadcrumb-current {
    color: var(--gold-light);
    font-weight: 600;
}

.sidebar-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid rgba(212, 160, 23, 0.35);
}

/* ===== Iran Province Map ===== */
.iran-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

.iran-province-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid;
    min-height: 56px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.iran-province-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(245, 197, 24, 0.15);
    z-index: 1;
}

.iran-province-name {
    font-size: 9px;
    color: #e2e8f0;
    line-height: 1.2;
    text-align: center;
}

.iran-province-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold-light);
    margin-top: 2px;
}

.stat-card {
    transition: border-color 0.25s ease;
}

.stat-card:hover {
    border-color: rgba(212, 160, 23, 0.25);
}

.staff-quick-link:hover {
    transform: translateY(-2px);
}
