/* --- THEME VARIABLES --- */
:root {
    /* Light Mode */
    --bg-body: #F3F4F6;
    --bg-sidebar: #1E293B;  /* Slate 800 */
    --bg-card: #FFFFFF;
    --text-main: #1F2937;   /* Gray 800 */
    --text-muted: #6B7280;  /* Gray 500 */
    --text-sidebar: #CBD5E1;
    --primary: #4F46E5;     /* Indigo 600 */
    --primary-hover: #4338CA;
    --border-color: #E5E7EB;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hero-gradient: linear-gradient(135deg, #1E293B 0%, #4F46E5 100%);
}

body.dark-mode {
    /* Dark Mode */
    --bg-body: #0f172a;     /* Slate 950 */
    --bg-sidebar: #020617;
    --bg-card: #1e293b;     /* Slate 800 */
    --text-main: #f3f4f6;
    --text-muted: #94a3b8;
    --text-sidebar: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --border-color: #334155;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #312e81 100%);
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; }

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: 0.3s ease-in-out;
    border-right: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
}

.sidebar a {
    padding: 14px 16px;
    margin: 6px 0;
    border-radius: 8px;
    color: var(--text-sidebar);
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar a.active, .sidebar a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid var(--primary);
}

.close-btn {
    display: none;
    text-align: right;
    font-size: 1.4rem;
    cursor: pointer;
    margin-bottom: 20px;
    color: var(--text-sidebar);
}

/* --- LAYOUT STRUCTURE --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    padding: 0; /* Remove padding here so footer spans full width */
}

.content-wrapper {
    padding: 30px; /* Padding moves inside here */
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- HEADER --- */
.header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    position: relative;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    position: absolute;
    left: 0;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.3s;
    box-shadow: var(--shadow-soft);
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.05); }

/* --- HERO SECTION --- */
.hero-section {
    background: var(--hero-gradient);
    padding: 60px 20px;
    border-radius: 20px;
    color: white;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: var(--shadow-soft);
}

.hero-section h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.hero-section p {
    color: #e2e8f0;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.hero-search {
    width: 100%;
    max-width: 480px;
    padding: 16px 24px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: transform 0.2s;
}
.hero-search:focus { transform: scale(1.02); }

/* --- GRID & CARDS --- */
.context-title {
    margin: 25px 0 20px;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding-bottom: 50px;
}

.card {
    background: var(--bg-card);
    padding: 35px 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    top: 0;
}

.card:hover {
    top: -8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.card i { margin-bottom: 20px; transition: transform 0.3s; }
.card:hover i { transform: scale(1.1); }

.card h3 {
    margin: 10px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    color: var(--text-main);
}

.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

.no-results {
    display: none;
    text-align: center;
    width: 100%;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* --- FULL WIDTH FOOTER --- */
.footer {
    width: 100%;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    margin-top: auto;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 0 30px;
}

.footer-col h4 {
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-muted); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }

.social-links { display: flex; gap: 15px; }
.social-links a {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--bg-body);
    border-radius: 50%;
    color: var(--text-main);
    transition: 0.3s;
}
.social-links a:hover { background: var(--primary); color: white; transform: translateY(-3px); }

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.footer-col:first-child h4 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-col:first-child p {
    font-size: 1rem;
    max-width: 300px;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -280px; top: 0; height: 100%; box-shadow: 10px 0 20px rgba(0,0,0,0.2); }
    .sidebar.active { left: 0; }
    .menu-btn, .close-btn { display: block; }
    .hero-section h1 { font-size: 1.8rem; }
    .content-wrapper { padding: 20px; }
}

/* --- PROFESSIONAL COOKIE BANNER (FIXED) --- */
.cookie-banner {
    position: fixed;
    bottom: 0;           /* Stick to bottom */
    left: 0;
    width: 100%;
    z-index: 9999;
    
    /* This moves it completely off-screen regardless of height */
    transform: translateY(100%); 
    transition: transform 0.5s ease-in-out;
    
    padding: 20px;
    display: flex;
    justify-content: center;
    pointer-events: none; /* Let clicks pass through when hidden */
}

.cookie-banner.show {
    /* This slides it up into view */
    transform: translateY(0); 
}

.cookie-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 25px;
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    max-width: 900px;
    width: 100%;
    pointer-events: auto; /* Re-enable clicks */
}

.cookie-text {
    flex: 2;
    min-width: 300px;
}

.cookie-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.cookie-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    flex: 1;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

/* Accept Button (Primary) */
.btn-accept {
    background: var(--primary);
    color: white;
}
.btn-accept:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Reject Button (Subtle) */
.btn-reject {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-reject:hover {
    background: var(--bg-body);
    border-color: var(--text-muted);
}

/* Mobile Responsiveness for Banner */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        width: 100%;
        flex-direction: column-reverse;
    }
    .cookie-btn {
        width: 100%;
    }
}

/* --- MOBILE MENU OVERLAY --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999; /* Below sidebar (1000) but above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px); /* Optional: nice blur effect */
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}