/* =========================================
   1. ROOT VARIABLES & GLOBAL
========================================= */
:root {
    --primary-color: #2563eb; 
    --bg-color: #f8f9fc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }

/* =========================================
   2. HEADER & MENU
========================================= */
header {
    background-color: var(--card-bg); padding: 1rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 1.4rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }
.menu-btn { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--primary-color); }

/* =========================================
   3. SIDEBAR & OVERLAY (Fixed Layout)
========================================= */
.sidebar {
    position: fixed; top: 0; right: -300px; width: 300px; height: 100vh;
    background-color: var(--card-bg); box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s ease; z-index: 1000; padding: 2rem;
}
.sidebar.active { right: 0; }
.close-btn { align-self: flex-end; background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--text-muted); margin-bottom: 1rem; }
.sidebar a { display: flex; align-items: center; text-decoration: none; color: var(--text-main); padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.sidebar a i { margin-right: 10px; color: var(--primary-color); }

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(2px);
    z-index: 999; opacity: 0; visibility: hidden; transition: 0.3s;
}
.overlay.active { opacity: 1; visibility: visible; }

/* =========================================
   4. SEARCH & CATEGORY
========================================= */
.top-search-section {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    padding: 2rem 5%; border-bottom-left-radius: 25px; border-bottom-right-radius: 25px;
}
.search-box-container {
    background: white; border-radius: 50px; display: flex; align-items: center;
    padding: 0.8rem 1.2rem; max-width: 600px; margin: 0 auto 1.5rem auto;
}
#searchInput { border: none; outline: none; width: 100%; font-size: 1rem; }
.category-slider { display: flex; gap: 10px; overflow-x: auto; justify-content: center; padding-bottom: 5px; }
.filter-btn { background: rgba(255,255,255,0.2); color: white; border: none; padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; white-space: nowrap; font-size: 0.9rem; }
.filter-btn.active { background: white; color: var(--primary-color); }

/* =========================================
   5. TOOLS CARDS
========================================= */
.main-content { padding: 2rem 5%; max-width: 800px; margin: 0 auto; }
.tool-card {
    background: white; border-radius: 15px; padding: 1rem; display: flex;
    align-items: center; gap: 15px; margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #e2e8f0;
}
.tool-logo-box { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.fav-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #cbd5e1; }
.fav-btn.active { color: #e11d48; }

/* =========================================
   6. FOOTER
========================================= */
footer { text-align: center; padding: 2rem; margin-top: auto; }
.social-links { display: flex; gap: 15px; justify-content: center; margin-bottom: 10px; }
.social-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #e2e8f0; border-radius: 50%; color: var(--text-muted); text-decoration: none; }
