/* ==============================
   SI-KASKUL — Premium Design System
   ============================== */

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --accent: #0ea5e9;
    --accent-light: #e0f2fe;
    --surface: #ffffff;
    --surface-elevated: rgba(255,255,255,0.85);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --gradient-primary: linear-gradient(135deg, #059669 0%, #0ea5e9 100%);
    --gradient-hero: linear-gradient(135deg, #064e3b 0%, #047857 40%, #0f766e 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 40px rgba(16,185,129,0.15);
    --radius-sm: 0.75rem;
    --radius-md: 1.25rem;
    --radius-lg: 2rem;
    --radius-xl: 2.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafb;
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.font-display {
    font-family: 'Playfair Display', serif;
}

/* ==============================
   PAGE LOADER — SIPBB BRANDED
   ============================== */
.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

/* Branded loader styles */
.ls-emblem {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    animation: lsPulse 2s ease-in-out infinite;
}

@keyframes lsPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.85; }
}

.ls-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.ls-title b {
    color: #fbbf24;
    font-weight: 800;
}

.ls-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 0.25rem;
    margin-bottom: 2rem;
}

.ls-track {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    margin: 0 auto;
    overflow: hidden;
}

.ls-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 999px;
    animation: lsProgress 1.8s ease-in-out forwards;
}

@keyframes lsProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Fallback spinner (for pages without branded loader) */
.loader-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(16,185,129,0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    animation: loaderSpin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 0 auto 24px;
    position: relative;
}

.loader-spinner::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    animation: loaderSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

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

.loader-text {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* ==============================
   KEYFRAME ANIMATIONS
   ============================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInSlow {
    from { opacity: 0; }
    to { opacity: 0.6; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 20px rgba(16,185,129,0); }
}

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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
    to { opacity: 1; transform: rotate(0deg) scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

@keyframes morphBlob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
    75% { border-radius: 60% 40% 60% 30% / 70% 40% 50% 60%; }
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(var(--tx, 100px), var(--ty, -100px)) rotate(720deg); opacity: 0; }
}

/* ==============================
   SCROLL REVEAL SYSTEM
   ============================== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.47s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.54s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.12s; }
.stagger-item:nth-child(3) { animation-delay: 0.19s; }
.stagger-item:nth-child(4) { animation-delay: 0.26s; }
.stagger-item:nth-child(5) { animation-delay: 0.33s; }
.stagger-item:nth-child(6) { animation-delay: 0.40s; }
.stagger-item:nth-child(7) { animation-delay: 0.47s; }
.stagger-item:nth-child(8) { animation-delay: 0.54s; }
.stagger-item:nth-child(9) { animation-delay: 0.61s; }

/* ==============================
   HERO & GRADIENT BACKGROUNDS
   ============================== */
.hero-grid-bg {
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 15%, rgba(14,165,233,0.15) 0%, transparent 22%),
        radial-gradient(circle at 70% 85%, rgba(255,255,255,0.08) 0%, transparent 18%),
        radial-gradient(circle at 30% 80%, rgba(16,185,129,0.12) 0%, transparent 20%),
        var(--gradient-hero);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    position: relative;
}

.hero-grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-grid-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, transparent 70%);
    animation: floatSlow 15s ease-in-out infinite;
    pointer-events: none;
}

.animate-slideUp { animation: slideUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-float { animation: float 8s ease-in-out infinite; }
.animate-pulse-soft { animation: fadeInSlow 3s ease-in-out infinite alternate; }

/* ==============================
   GLASSMORPHISM CARDS
   ============================== */
.hero-card {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.5);
    backdrop-filter: blur(20px);
}

.glass-card {
    background: var(--surface-elevated);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(16,185,129,0.2);
}

.glass-dark {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
}

/* ==============================
   NAVIGATION
   ============================== */
.nav-blur {
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255,255,255,0.88);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.nav-blur.scrolled {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
}

/* ==============================
   PRAYER & STATS CHIPS
   ============================== */
.prayer-chip {
    backdrop-filter: blur(16px);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.prayer-chip:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ==============================
   GALLERY
   ============================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ==============================
   NEWS CARDS
   ============================== */
.news-card-animated {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.news-card-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card-animated:hover::before {
    transform: scaleX(1);
}

.news-card-animated:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.news-card-animated img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card-animated:hover img {
    transform: scale(1.05);
}

/* ==============================
   PBB CARDS
   ============================== */
.pbb-card-animated {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 4px solid var(--primary);
    overflow: hidden;
}

.pbb-card-animated::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.pbb-card-animated:hover::after {
    opacity: 0.03;
}

.pbb-card-animated:hover {
    transform: translateY(-4px) translateX(4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent);
}

/* ==============================
   LIGHTBOX
   ============================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    cursor: pointer;
    color: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1) rotate(90deg);
}

/* ==============================
   BUTTONS
   ============================== */
.btn-hover-glow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-hover-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-hover-glow:hover::before {
    width: 400px;
    height: 400px;
}

.btn-hover-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(16,185,129,0.3);
}

.btn-hover-glow:active {
    transform: translateY(0) scale(0.98);
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* ==============================
   FEATURE CARDS
   ============================== */
.feature-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 0.03;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(16,185,129,0.12);
}

.feature-card .icon-wrap {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .icon-wrap {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(16,185,129,0.2);
}

/* ==============================
   STAT COUNTER CARDS
   ============================== */
.stat-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ==============================
   MARKET / LAPAK CARDS
   ============================== */
.market-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.market-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(15,23,42,0.12);
}

.market-card img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.market-card:hover img {
    transform: scale(1.06);
}

.market-badge {
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.9);
    box-shadow: var(--shadow-sm);
}

/* ==============================
   RT CHIPS
   ============================== */
.rt-chip {
    border: 1px solid var(--primary-light);
    background: var(--surface);
    color: #065f46;
    border-radius: 9999px;
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.rt-chip:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.15);
}

/* ==============================
   MAP CARD
   ============================== */
.map-card iframe {
    min-height: 340px;
    width: 100%;
    border: none;
    border-radius: var(--radius-md);
}

/* ==============================
   SECTION DIVIDER
   ============================== */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(16,185,129,0.2), transparent);
    margin: 0 auto;
    max-width: 80%;
}

/* ==============================
   GRADIENT TEXT
   ============================== */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==============================
   ANIMATED BACKGROUND BLOBS
   ============================== */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: morphBlob 15s ease-in-out infinite;
    pointer-events: none;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(16,185,129,0.15);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: rgba(14,165,233,0.1);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

/* ==============================
   SCROLL PROGRESS BAR
   ============================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ==============================
   MAGNETIC HOVER EFFECT
   ============================== */
.magnetic-wrap {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================
   TEXT SHIMMER
   ============================== */
.text-shimmer {
    background: linear-gradient(
        110deg,
        var(--primary-dark) 0%,
        var(--primary) 20%,
        var(--accent) 40%,
        var(--primary) 60%,
        var(--primary-dark) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .page-loader {
        background: rgba(255,255,255,0.98);
    }
    
    .loader-spinner {
        width: 44px;
        height: 44px;
    }

    .blob {
        display: none;
    }

    .fade-in, .fade-in-left, .fade-in-right, .scale-in {
        transition-duration: 0.5s;
    }
}

/* ═══ Hero Carousel ═══ */
.hero-carousel {
    position: absolute;
    inset: 0;
}
.carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 8s ease-out;
    transform: scale(1.05);
}
.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}
.carousel-dots .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-dots .carousel-dot.active {
    width: 28px;
    background: rgba(255,255,255,0.9);
}
.carousel-preview-img {
    transition: background-image 1s ease-in-out;
}

/* ═══ Quick Access Chips ═══ */
.quick-chip {
    position: relative;
    overflow: hidden;
}
.quick-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.quick-chip:hover::before {
    opacity: 1;
}

/* ══ 3D Animated Title ═══ */
.perspective-1000 {
    perspective: 1000px;
}

.text-3d-title {
    display: inline-block;
    font-weight: 800;
    color: #ffffff;
    text-shadow:
        0 1px 0 #ccc,
        0 2px 0 #c9c9c9,
        0 3px 0 #bbb,
        0 4px 0 #b9b9b9,
        0 5px 0 #aaa,
        0 6px 1px rgba(0,0,0,.1),
        0 0 5px rgba(0,0,0,.1),
        0 1px 3px rgba(0,0,0,.3),
        0 3px 5px rgba(0,0,0,.2),
        0 5px 10px rgba(0,0,0,.25),
        0 10px 10px rgba(0,0,0,.2),
        0 20px 20px rgba(0,0,0,.15);
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.text-3d-title:hover {
    transform: rotateX(10deg) rotateY(-5deg) scale(1.05);
}

@keyframes float-3d {
    0%, 100% {
        transform: translateY(0) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    }
    50% {
        transform: translateY(-5px) rotateX(0deg) rotateY(10deg);
    }
    75% {
        transform: translateY(-15px) rotateX(-5deg) rotateY(5deg);
    }
}

.animate-float-3d {
    animation: float-3d 6s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        text-shadow:
            0 1px 0 #ccc,
            0 2px 0 #c9c9c9,
            0 3px 0 #bbb,
            0 4px 0 #b9b9b9,
            0 5px 0 #aaa,
            0 6px 1px rgba(0,0,0,.1),
            0 0 5px rgba(0,0,0,.1),
            0 1px 3px rgba(0,0,0,.3),
            0 3px 5px rgba(0,0,0,.2),
            0 5px 10px rgba(0,0,0,.25),
            0 10px 10px rgba(0,0,0,.2),
            0 20px 20px rgba(0,0,0,.15);
    }
    50% {
        text-shadow:
            0 1px 0 #ccc,
            0 2px 0 #c9c9c9,
            0 3px 0 #bbb,
            0 4px 0 #b9b9b9,
            0 5px 0 #aaa,
            0 6px 1px rgba(0,0,0,.1),
            0 0 10px rgba(16,185,129,0.5),
            0 0 20px rgba(16,185,129,0.3),
            0 0 30px rgba(16,185,129,0.2),
            0 1px 3px rgba(0,0,0,.3),
            0 3px 5px rgba(0,0,0,.2),
            0 5px 10px rgba(0,0,0,.25),
            0 10px 10px rgba(0,0,0,.2),
            0 20px 20px rgba(0,0,0,.15);
    }
}

.text-3d-title {
    animation: float-3d 6s ease-in-out infinite, glow-pulse 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════ */
.dark body {
    background-color: #0f172a;
    color: #e2e8f0;
}

.dark .nav-blur {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark .nav-blur.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .hero-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .bg-white {
    background-color: #1e293b !important;
}

.dark .bg-gray-50,
.dark .bg-gray-100 {
    background-color: #0f172a !important;
}

.dark .text-gray-800,
.dark .text-gray-900 {
    color: #e2e8f0 !important;
}

.dark .text-gray-600,
.dark .text-gray-700 {
    color: #94a3b8 !important;
}

.dark .border-gray-200,
.dark .border-gray-300 {
    border-color: #334155 !important;
}

.dark .shadow-lg {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════ */
#toast-container {
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    max-width: 360px;
}

/* ═══════════════════════════════════════════════════════
   SKELETON LOADERS
   ═══════════════════════════════════════════════════════ */
.skeleton-card {
    background: #f1f5f9;
}

.dark .skeleton-card {
    background: #334155;
}

.skeleton-card .bg-gray-200 {
    background-color: #e2e8f0;
}

.dark .skeleton-card .bg-gray-200 {
    background-color: #475569;
}

/* ═══════════════════════════════════════════════════════
   MICRO-INTERACTIONS
   ═══════════════════════════════════════════════════════ */
.btn-micro {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-micro:hover {
    transform: translateY(-1px);
}

.btn-micro:active {
    transform: translateY(0) scale(0.98);
}

/* Page transition */
.page-transition {
    animation: pageEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ═══════════════════════════════════════════════════════
   MOBILE TABLE RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive table {
        min-width: 600px;
    }
    
    /* Card layout for mobile */
    .table-cards {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .table-card-item {
        background: white;
        border-radius: 1rem;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }
    
    .dark .table-card-item {
        background: #1e293b;
    }
}

/* ═══════════════════════════════════════════════════════
   SEARCH MODAL
   ═══════════════════════════════════════════════════════ */
#search-modal {
    animation: fadeIn 0.2s ease;
}

#search-results::-webkit-scrollbar {
    width: 6px;
}

#search-results::-webkit-scrollbar-track {
    background: transparent;
}

#search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dark #search-results::-webkit-scrollbar-thumb {
    background: #475569;
}

/* ═══════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════ */
#breadcrumbs nav a {
    transition: color 0.2s ease;
}

.dark #breadcrumbs nav {
    color: #94a3b8;
}

.dark #breadcrumbs nav a:hover {
    color: #34d399;
}

.dark #breadcrumbs nav span {
    color: #e2e8f0;
}

/* ═══════════════════════════════════════════════════════
   FORM VALIDATION
   ═══════════════════════════════════════════════════════ */
.field-error {
    animation: slideDown 0.2s ease;
}

input.border-red-500 {
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
