/* ==========================================================================
   Base Styles & Premium Variables
   ========================================================================== */
:root {
    --primary-color: #3b82f6; /* Lighter blue for better visibility on dark backgrounds */
    --primary-dark: #1e40af;
    --accent-color: #fbbf24;
    --bg-color: #0f172a; /* Deep dark slate for fallback */
    --white: #ffffff;
    --text-main: #0f172a; /* Dark text for inside the white cards */
    --text-muted: #475569;
    --border-radius: 12px;
    --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4); /* Stronger shadow for depth */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(15, 23, 42, 0.85); /* Dark Glassmorphism for Navbar */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; }
html { scroll-behavior: smooth; }

/* ==========================================================================
   FULL PAGE BACKGROUND FIX
   ========================================================================== */
body { 
    /* The image now covers the entire body, with a fixed attachment so it looks like a premium app */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)),
                url('hero_bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--white); /* Global text is now white to contrast the dark background */
    line-height: 1.6; 
    overflow-x: hidden; 
}

a { text-decoration: none; color: var(--primary-color); transition: var(--transition); }

/* Layout Utilities */
.container { max-width: 1240px; margin: 0 auto; padding: 80px 24px; text-align: center; }
.bg-light { background-color: transparent; } /* Removed the ugly white block */
.section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 40px; color: var(--white); } /* Titles are white now */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; text-align: left; }

/* ==========================================================================
   Glassmorphism Navbar & Mobile Menu (Updated for Dark Theme)
   ========================================================================== */
.navbar {
    background-color: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 18px 5%; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: sticky; top: 0; z-index: 1000;
}
.navbar .logo { font-size: 1.6rem; font-weight: 900; color: var(--white); }
.nav-links-wrapper { display: flex; align-items: center; gap: 32px; }
.nav-links { list-style: none; display: flex; gap: 32px; }
.nav-links a { color: var(--white); font-weight: 600; opacity: 0.8; }
.nav-links a:hover { color: var(--accent-color); opacity: 1; }
.theme-toggle { background: none; border: none; font-size: 1.4rem; cursor: pointer; transition: transform 0.3s; }
.theme-toggle:hover { transform: scale(1.1); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.8rem; color: var(--white); cursor: pointer; }

/* ==========================================================================
   Hero Section (Cleaned up since background is on body)
   ========================================================================== */
.hero {
    padding: 100px 24px 40px; /* Adjusted padding since it flows into the page */
    text-align: center;
    position: relative; 
    z-index: 1; 
}
.hero-content h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 24px; line-height: 1.2; color: var(--white); }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.9; color: var(--white); }
.cta-btn {
    display: inline-block; background-color: var(--accent-color); color: #1e293b;
    padding: 16px 40px; border-radius: 50px; font-weight: 800; text-transform: uppercase;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
}
.cta-btn:hover { background-color: #f59e0b; transform: translateY(-3px); }

/* ==========================================================================
   Cards & Interactions
   ========================================================================== */
.card {
    background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent white cards */
    padding: 40px 32px; border-radius: var(--border-radius);
    box-shadow: var(--box-shadow); transition: var(--transition);
    display: flex; flex-direction: column; text-align: left; border: 1px solid rgba(255, 255, 255, 0.2);
}
.card:hover { transform: translateY(-8px); border-color: var(--primary-color); box-shadow: 0 20px 30px -5px rgba(0,0,0,0.6); }
.card h3 { font-size: 1.5rem; margin-bottom: 12px; color: var(--text-main); }
.card p { color: var(--text-muted); margin-bottom: 24px; flex-grow: 1; }
.tag { display: inline-block; background: #e2e8f0; color: #475569; padding: 6px 14px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; align-self: flex-start; margin-bottom: 16px; }

.card-btn { display: block; width: 100%; padding: 12px 0; background-color: #eff6ff; border: 2px solid var(--primary-color); color: var(--primary-color); border-radius: var(--border-radius); text-align: center; font-weight: 700; }
.card-btn:hover { background-color: var(--primary-color); color: var(--white); }
.card-link { font-weight: 700; color: var(--primary-color); display: inline-flex; align-items: center; margin-top: auto; }
.card-link:hover { color: var(--primary-dark); gap: 5px; }

/* ==========================================================================
   Grid/List View Controls
   ========================================================================== */
.view-controls { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 20px; }
.view-btn { padding: 8px 16px; border: 2px solid var(--white); background: transparent; color: var(--white); border-radius: 8px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.view-btn.active { background: var(--white); color: var(--text-main); }

.list-view { display: flex !important; flex-direction: column !important; gap: 20px !important; }
.list-view .card { flex-direction: row; align-items: center; padding: 24px 32px; }
.list-view .card h3 { width: 30%; margin-bottom: 0; }
.list-view .card p { width: 50%; margin-bottom: 0; padding: 0 20px; }
.list-view .card-btn, .list-view .card-link { width: 20%; margin-top: 0; }
.list-view .tag { margin-bottom: 0; margin-right: 15px; align-self: center; }

/* Animations */
.hide-element { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.show-element { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Dark Mode Overrides (For inside the cards)
   ========================================================================== */
[data-theme="dark"] .card { background-color: rgba(30, 41, 59, 0.95); border-color: rgba(255,255,255,0.05); }
[data-theme="dark"] .card h3 { color: #f8fafc; }
[data-theme="dark"] .card p { color: #94a3b8; }
[data-theme="dark"] .tag { background: #334155; color: #cbd5e1; }
[data-theme="dark"] .card-btn { background: transparent; color: #60a5fa; border-color: #60a5fa;}
[data-theme="dark"] .card-btn:hover { background: #60a5fa; color: #0f172a; }
[data-theme="dark"] .card-link { color: #60a5fa; }

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .mobile-menu-btn { display: block; }
    
    .nav-links-wrapper {
        position: absolute; top: 100%; left: 0; width: 100%; background: var(--glass-bg);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        flex-direction: column; gap: 0; max-height: 0; overflow: hidden;
        transition: max-height 0.3s ease; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
    }
    .nav-links-wrapper.active { max-height: 400px; padding: 15px 0; }
    .nav-links { flex-direction: column; width: 100%; gap: 0; }
    .nav-links li { text-align: center; width: 100%; }
    .nav-links a { display: block; padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .theme-toggle { padding: 15px; margin: 0 auto; }
    
    .list-view .card { flex-direction: column; text-align: center; }
    .list-view .card h3, .list-view .card p, .list-view .card-btn, .list-view .card-link { width: 100%; padding: 10px 0; }
    .list-view .tag { align-self: center; margin-right: 0; margin-bottom: 10px; }
}
