/* File: assets/css/style.css */
:root {
    --primary: #6fb6ef;
    --primary-hover: #5aa1da;
    --primary-text: #3ca0f3;
    --bg-main: #f0f2f5;
    --card-bg: #ffffff;
    --text-dark: #222222;
    --text-light: #666666;
    --border: #e0e0e0;
    --fixed-white: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --footer-bg: #222222;
    --link-color: #0070e8;
    --link-color-visited: #444444;
    --bg-hover: #f9f9f9;
    --danger: #d32f2f;
    --warning: #ff9800;
    --success: #25D366;
    --info: #0088cc;
}

/* 🔥 DARK MODE COLORS EXACTLY AFTER ROOT 🔥 */
body.dark-mode {
    --primary: #1b3c72;
    --primary-hover: #2563eb;
    --primary-text: #1e90ff;
    --bg-main: #121212;
    --card-bg: #1e1e1e;
    --text-dark: #e0e0e0;
    --text-light: #a0a0a0;
    --border: #333333;
    --overlay-bg: rgba(0, 0, 0, 0.8);
    --footer-bg: #111111;
    --link-color: #6fb6ef;
    --link-color-visited: #cccccc;
    --bg-hover: #2a2a2a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.text-danger { color: var(--danger) !important; }
.mt-5 { margin-top: 50px; }
.p-2 { padding: 10px; }
.d-none { display: none !important; }

.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* --- Header Layout Fixes --- */
.main-header {
    background: var(--primary);
    color: var(--fixed-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 10px;
    flex-wrap: nowrap; /* Elements ko ek hi line mein force karega */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0; /* Space kam hone par ye dabega nahi */
}

.brand-logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--fixed-white);
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-grow: 1; /* Bachi hui width le lega */
}

.menu-btn, .theme-toggle-btn {
    background: none;
    border: none;
    color: var(--fixed-white);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0; /* Purana margin hataya jis se moon icon hawa me tha */
    padding: 5px;
}

.search-form {
    display: flex;
    background: var(--card-bg);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 250px;
    margin: 0;
    align-items: center;
}

.search-form input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-dark);
}

.search-form button {
    padding: 8px 12px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Drawer & Overlay */
#fv-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: 0.3s;
}

.drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--card-bg);
    z-index: 1000;
    box-shadow: 2px 0 10px var(--overlay-bg);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.drawer.open { left: 0; }
#fv-overlay.open { display: block; opacity: 1; }

.drawer-head {
    padding: 20px;
    background: var(--primary);
    color: var(--fixed-white);
    display: flex;
    justify-content: space-between;
}

.close-btn {
    background: none;
    border: none;
    color: var(--fixed-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-links a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.drawer-links a:hover {
    background: var(--bg-hover);
    color: var(--primary-text);
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 20px;
    background: var(--footer-bg);
    color: var(--fixed-white);
    margin-top: 40px;
}

/* --- UI/UX & Mobile Audit Fixes --- */

/* 2. Mobile Tap Targets (Interaction affordance) */
.menu-btn, .close-btn, .search-form button {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .main-header {
        padding: 10px;
        gap: 5px;
    }
    .header-right {
        gap: 8px;
    }
    .search-form {
        max-width: 140px; /* Search bar ko mobile screen ke size mein adjust kiya */
    }
    .search-form input {
        padding: 6px 8px;
    }
}