/**
 * India Festival Calendar Platform
 * Premium Public Frontend Design System & Mobile Responsive Engine
 */

:root, [data-bs-theme="dark"] {
    --primary-orange: #ff6b00;
    --primary-hover: #e05d00;
    --primary-gradient: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    --accent-gold: #f59e0b;
    --secondary-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --bg-main: #0b0f19;
    --card-bg: #151c2c;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #242e42;
    --header-bg: rgba(15, 23, 42, 0.95);
    --topbar-bg: #030712;
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.4);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 30px -10px rgba(0, 0, 0, 0.6);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --touch-min: 44px;
}

html, body {
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Fluid Typography */
h1, .h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.2; }
h2, .h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.25; }
h3, .h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); line-height: 1.3; }

/* Top Bar */
.top-info-bar {
    background-color: var(--topbar-bg) !important;
    font-size: 0.85rem;
}

/* Glassmorphism Header */
.public-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.brand-logo-public {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.brand-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

/* Navbar Links */
.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 2px;
}

.nav-link-frontend {
    color: var(--text-main) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 12px !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap !important;
    min-height: var(--touch-min);
    display: inline-flex;
    align-items: center;
}

.nav-link-frontend:hover, .nav-link-frontend.active {
    color: var(--primary-orange) !important;
    background-color: rgba(255, 107, 0, 0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #31103f 100%);
    color: #fff;
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
}

.hero-search-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 4px 6px 4px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.hero-search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    min-height: var(--touch-min);
}

.hero-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.hero-search-input:focus {
    box-shadow: none;
    outline: none;
    color: #fff;
}

/* Landscape Festival Cards (2 per row Desktop, 1 per row Mobile) */
.landscape-festival-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.landscape-festival-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 107, 0, 0.5);
}

.festival-rank-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: monospace;
    padding: 2px 8px;
    border-radius: 6px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.min-h-150 {
    min-height: 150px;
}

/* Category Pill Card */
.category-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    display: block;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.category-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 107, 0, 0.12);
    color: var(--primary-orange);
    transition: all 0.3s ease;
}

/* Touch Targets Optimization */
.btn {
    min-height: var(--touch-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    min-height: 36px;
}

/* Mobile Specific Optimizations */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 40px 0 50px;
    }

    .hero-search-box {
        border-radius: 30px;
        padding: 4px 6px 4px 14px;
    }

    .festival-poster-wrapper {
        width: 100% !important;
        height: 180px !important;
        min-height: 180px !important;
    }

    .landscape-festival-card {
        padding: 16px !important;
    }

    .pe-sm-5 {
        padding-right: 0 !important;
    }
}

/* Hide scrollbars for month jumpers */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* AJAX Skeleton Loaders & Micro-Interactions */
.ajax-loading-overlay {
    position: relative;
    pointer-events: none;
    opacity: 0.55;
    transition: opacity 0.2s ease-in-out;
}

.ajax-spinner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.skeleton-box {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: rgba(226, 232, 240, 0.6);
    border-radius: 6px;
}

[data-bs-theme="dark"] .skeleton-box {
    background-color: rgba(36, 46, 66, 0.6);
}

.skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.8s infinite;
    content: '';
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.festival-card-skeleton {
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    height: 180px;
}

