/* ═══════════════════════════════════════════════════════════
   LINEDANCE COMMUNITY MODERN THEME SYSTEM
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    --accent-blue: #0284c7;
    --accent-purple: #7c3aed;
    --accent-pink: #db2777;
    --accent-green: #059669;
    --accent-orange: #ea580c;
    --accent-red: #dc2626;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(255, 255, 255, 0.45);
    --text-dark: #0f172a;
    --text-muted: #475569;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* ── Global Layout Adjustments ── */
body {
    background-color: #f6f8fc;
    color: var(--text-muted);
}

.main-content {
    background-color: #f6f8fc !important;
}

/* ── Border Spacing Alignment (Matched to Home) ── */
.linedance-page-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.linedance-page-wrapper .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── DTSA Pages Spacing (Aligned to Home) ── */
.dtsa-page-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.dtsa-page-wrapper .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Modern Hero Section ── */
.hero-wrapper {
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.08;
}

.hero-bg-shapes .shape-1 {
    width: 320px;
    height: 320px;
    background: #4f46e5;
    top: -80px;
    left: -60px;
}

.hero-bg-shapes .shape-2 {
    width: 380px;
    height: 380px;
    background: #db2777;
    bottom: -120px;
    right: -60px;
}

.badge-new-design {
    display: inline-flex;
    align-items: center;
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(79, 70, 229, 0.15);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5.5vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    margin-bottom: 18px;
}

.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.18rem);
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Modern Buttons ── */
.btn-primary-gradient {
    background: var(--primary-gradient);
    color: #ffffff !important;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 30px;
    border: none;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-dark) !important;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-glass:hover {
    background: #ffffff;
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

/* ── Community Stats Grid (Desktop) ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.stat-icon-bg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-card:nth-child(1) .stat-icon-bg { background: rgba(2, 132, 199, 0.08); color: var(--accent-blue); }
.stat-card:nth-child(2) .stat-icon-bg { background: rgba(124, 58, 237, 0.08); color: var(--accent-purple); }
.stat-card:nth-child(3) .stat-icon-bg { background: rgba(5, 150, 105, 0.08); color: var(--accent-green); }
.stat-card:nth-child(4) .stat-icon-bg { background: rgba(219, 39, 119, 0.08); color: var(--accent-pink); }

.stat-val {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-lbl {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ── Modern Bento Grid Layout ── */
.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 24px;
    margin-bottom: 50px;
}

/* Bento Card Base Styles */
.bento-card {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-decoration: none !important;
    color: var(--text-dark) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, var(--card-accent) 0%, transparent 70%);
    opacity: 0.06;
    top: -40px;
    right: -40px;
    border-radius: 50%;
    z-index: 0;
    transition: all 0.5s ease;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06), 
                0 0 0 1px var(--card-accent);
    background: rgba(255, 255, 255, 0.9);
}

.bento-card:hover::after {
    opacity: 0.12;
    transform: scale(1.3);
}

/* Bento Grid Spans */
.bento-card.span-2-2 { grid-column: span 2; grid-row: span 2; }
.bento-card.span-2-1 { grid-column: span 2; grid-row: span 1; }
.bento-card.span-1-1 { grid-column: span 1; grid-row: span 1; }

.card-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--card-accent);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.bento-card:hover .card-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: var(--card-accent);
    color: #ffffff;
    border-color: transparent;
}

.card-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.card-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.card-arrow {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--card-accent);
    gap: 8px;
    transition: gap 0.2s ease;
    position: relative;
    z-index: 1;
}

.bento-card:hover .card-arrow {
    gap: 12px;
}

/* ── Modern Search Elements ── */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 30px;
    padding: 4px 4px 4px 16px;
    transition: var(--transition-fast);
}

.search-wrapper:focus-within {
    background: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.search-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    font-size: 0.88rem;
    color: var(--text-dark);
    padding: 6px 0;
}

.search-submit {
    border: none;
    background: var(--accent-blue);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-submit:hover {
    background: #026ca2;
    transform: scale(1.05);
}

/* ── Level Badges & Tags ── */
.level-tags .badge-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: var(--transition-fast);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: inline-block;
}

.tag-bronze { background: #fdf6ec; color: #b25e00; border-color: #f5dab1 !important; }
.tag-silber { background: #f4f4f5; color: #909399; border-color: #e9e9eb !important; }
.tag-gold { background: #fdfcf0; color: #b59800; border-color: #f5ebb1 !important; }
.tag-brillant { background: #ecf5ff; color: #409eff; border-color: #d9ecff !important; }

.level-tags .badge-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.tag-bronze:hover { background: #b25e00; color: #ffffff; }
.tag-silber:hover { background: #909399; color: #ffffff; }
.tag-gold:hover { background: #b59800; color: #ffffff; }
.tag-brillant:hover { background: #409eff; color: #ffffff; }

/* ── Card Sub-link styles ── */
.btn-sub-link {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: var(--transition-fast);
    display: inline-block;
}

.btn-sub-link-purple { background: rgba(124, 58, 237, 0.05); color: var(--accent-purple); border: 1px solid rgba(124, 58, 237, 0.15); }
.btn-sub-link-purple:hover { background: var(--accent-purple); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(124, 58, 237, 0.15); }

.btn-sub-link-orange { background: rgba(234, 88, 12, 0.05); color: var(--accent-orange); border: 1px solid rgba(234, 88, 12, 0.15); }
.btn-sub-link-orange:hover { background: var(--accent-orange); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(234, 88, 12, 0.15); }

.btn-sub-link-pink { background: rgba(219, 39, 119, 0.05); color: var(--accent-pink); border: 1px solid rgba(219, 39, 119, 0.15); }
.btn-sub-link-pink:hover { background: var(--accent-pink); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(219, 39, 119, 0.15); }

.btn-sub-link-red { background: rgba(220, 38, 38, 0.05); color: var(--accent-red); border: 1px solid rgba(220, 38, 38, 0.15); }
.btn-sub-link-red:hover { background: var(--accent-red); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(220, 38, 38, 0.15); }

.btn-sub-link-blue { background: rgba(2, 132, 199, 0.05); color: var(--accent-blue); border: 1px solid rgba(2, 132, 199, 0.15); }
.btn-sub-link-blue:hover { background: var(--accent-blue); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15); }

.btn-sub-link-green { background: rgba(5, 150, 105, 0.05); color: var(--accent-green); border: 1px solid rgba(5, 150, 105, 0.15); }
.btn-sub-link-green:hover { background: var(--accent-green); color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(5, 150, 105, 0.15); }

/* ── Modern Page Header ── */
.page-header-wrapper {
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.page-header-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-weight: 800;
    font-size: 2.25rem;
    letter-spacing: -0.025em;
    color: var(--text-dark);
    margin-bottom: 8px;
    z-index: 1;
    position: relative;
}

.page-header-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 0;
    z-index: 1;
    position: relative;
}

/* ── Glassmorphic Page Content Card ── */
.glass-container-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin-bottom: 30px;
}

/* ── Hover-effect List Items (Steps / Choreos / Music) ── */
.modern-list-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    border-color: rgba(79, 70, 229, 0.15);
}

.item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.item-main-title {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.item-sub-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Micro Animations & AOS Enhancements ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delay classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ── Responsive Styling Breakpoints ── */
@media (max-width: 991px) and (min-width: 768px) {
    .launchpad-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .bento-card.span-2-2,
    .bento-card.span-2-1 {
        grid-column: span 2;
        grid-row: span 1;
    }
    .bento-card.span-1-1 {
        grid-column: span 1;
        grid-row: span 1;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .launchpad-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 16px;
    }
    .bento-card {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        padding: 24px !important;
    }
    .hero-wrapper {
        padding: 40px 24px;
    }
    .page-header-wrapper {
        padding: 30px 20px;
    }
    .glass-container-card {
        padding: 20px;
    }
    .modern-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .modern-list-item .item-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/* Force 4 columns on smartphone for stats, hiding icons to fit one row */
@media (max-width: 575px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 24px !important;
    }
    .stat-card {
        padding: 10px 2px !important;
        border-radius: 12px !important;
        background: rgba(255, 255, 255, 0.85) !important;
    }
    .stat-icon-bg {
        display: none !important;
    }
    .stat-val {
        font-size: 0.95rem !important;
        margin-bottom: 1px !important;
    }
    .stat-lbl {
        font-size: 0.6rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn-primary-gradient,
    .hero-actions .btn-glass {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════
   UNIFIED HEADING & DIVIDER STYLING SYSTEM
   ═══════════════════════════════════════════════════════════ */

/* 1. All headings in black */
h1, h2, h3, h4, h5, h6,
.page-header-title,
.card-title,
.about-welcome-title,
.about-features-title {
    color: #000000 !important;
}

/* 2. Divider lines directly after headings in red */
h1 + div[style*="background"],
h2 + div[style*="background"],
h3 + div[style*="background"],
h4 + div[style*="background"],
h5 + div[style*="background"],
h6 + div[style*="background"],
h1 + div[style*="background-color"],
h2 + div[style*="background-color"],
h3 + div[style*="background-color"],
h4 + div[style*="background-color"],
h5 + div[style*="background-color"],
h6 + div[style*="background-color"] {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    background-image: none !important;
}

/* 3. Headings with numbering H2-H5 in red */
h2.numbered-heading,
h3.numbered-heading,
h4.numbered-heading,
h5.numbered-heading {
    color: #dc2626 !important;
}

/* 4. Side Menu Active Items & Hovers in Red */
.site-sidebar .nav-link.active,
.site-sidebar .nav-link.parent-active,
.site-sidebar .sub-link.active,
.site-sidebar .sub-link-deep.active {
    color: #dc2626 !important;
}

.linedance-sidemenu .active-menu-item {
    background-color: #fff5f5 !important;
    color: #dc2626 !important;
    border-left: 4px solid #dc2626 !important;
}

.linedance-sidemenu .hover-menu-item:hover,
.linedance-sidemenu .hover-underline:hover,
.sidemenu-subitem:hover {
    color: #dc2626 !important;
}

/* 5. Header text "Linedance Community" in plain red (no gradient) */
.hero-title span {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #dc2626 !important;
    background-clip: initial !important;
    color: #dc2626 !important;
}
