/* --- General Reset --- */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #f0f2f5; color: #333; }
a { text-decoration: none; }

/* --- Google Ads Placeholder --- */
.ad-space {
    background-color: #e9ecef;
    border: 1px dashed #adb5bd;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ad-leaderboard { width: 100%; max-width: 728px; height: 90px; margin: 15px auto; }
.ad-sidebar { width: 100%; height: 250px; margin-top: 10px; }
.ad-content { width: 100%; height: 100px; margin: 30px 0; border-radius: 8px;}

/* --- Navigation Bar --- */
nav {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Keeps Logo Left */
    align-items: center;
    padding: 0 20px;
    height: 70px;
    position: relative; /* REQUIRED for centering the menu */
}

.logo { 
    color: #2c3e50; 
    font-size: 1.5rem; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    min-width: 150px;
    z-index: 2; /* Ensures logo stays on top */
}
.logo i { color: #3498db; }

/* --- CENTERED DESKTOP MENU --- */
.menu.desktop-menu { 
    list-style: none; 
    display: flex; 
    gap: 5px; 
    
    /* This centers the menu perfectly */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content; /* Ensures it fits contents */
}


/* Ensure mobile menu doesn't get these styles */
@media (max-width: 1024px) {
    .menu.desktop-menu { display: none; }
}

.menu-item { position: relative; }

.menu-link {
    display: block; padding: 24px 15px; color: #555;
    font-weight: 600; font-size: 0.95rem; transition: color 0.3s;
}
.menu-link i { font-size: 0.8rem; margin-left: 5px; opacity: 0.7; }
.menu-link:hover { color: #3498db; background-color: #f8f9fa; }

/* Alignment Helper */
.nav-placeholder { min-width: 150px; display: none; }
@media (min-width: 992px) { .nav-placeholder { display: block; } }

/* --- Menu & Dropdowns --- */
.menu { list-style: none; display: flex; gap: 5px; }
.menu-item { position: relative; }

.menu-link {
    display: block; padding: 24px 15px; color: #555;
    font-weight: 600; font-size: 0.95rem; transition: color 0.3s;
}
.menu-link i { font-size: 0.8rem; margin-left: 5px; opacity: 0.7; }
.menu-link:hover { color: #3498db; background-color: #f8f9fa; }

.dropdown {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: #fff; min-width: 240px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden; transition: all 0.2s ease;
    z-index: 100; border-radius: 8px; border: 1px solid #eee; padding: 10px 0;
}
.menu-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.dropdown li a {
    display: flex; align-items: center; padding: 12px 20px;
    color: #444; font-size: 0.9rem; transition: background 0.2s;
}
.dropdown li a i { width: 25px; color: #3498db; }
.dropdown li a:hover { background-color: #f1f8ff; color: #3498db; }

/* --- Badges --- */
.badge {
    font-size: 0.6rem; padding: 2px 6px; border-radius: 12px;
    color: white; font-weight: bold; text-transform: uppercase; margin-left: auto;
}
.badge-hot { background: linear-gradient(45deg, #ff416c, #ff4b2b); }
.badge-new { background: linear-gradient(45deg, #00b09b, #96c93d); }
.badge-trend { background: linear-gradient(45deg, #f857a6, #ff5858); }

/* --- Main Layout (3 Columns) --- */
.container {
    max-width: 1350px; margin: 30px auto;
    display: flex; gap: 25px; padding: 0 20px;
    align-items: flex-start;
}

/* Left Sidebar */
.sidebar-left { flex: 0 0 240px; position: sticky; top: 90px; }
.category-group { margin-bottom: 20px; }
.category-group h4 { font-size: 0.85rem; text-transform: uppercase; color: #999; margin-bottom: 10px; font-weight: 700; }
.category-group ul { list-style: none; }
.category-group ul li { margin-bottom: 5px; }
.category-group ul li a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 6px; color: #444; font-size: 0.95rem; transition: background 0.2s;
}
.category-group ul li a:hover { background-color: #e3f2fd; color: #3498db; }

/* Right Sidebar */
.sidebar-right { flex: 0 0 280px; }
.sidebar-widget { background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.sidebar-widget h3 { font-size: 1.1rem; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.sidebar-list { list-style: none; }
.sidebar-list li { padding: 10px 0; border-bottom: 1px solid #f1f1f1; cursor: pointer; color: #555; display: flex; align-items: center; gap: 8px; }
.sidebar-list li:hover { color: #3498db; }

/* Main Content */
.main-content { flex: 1; min-width: 0; }
.hero-text { margin-bottom: 30px; }
.hero-text h1 { font-size: 2rem; color: #2c3e50; margin-bottom: 10px; }

/* --- Tool Cards --- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }
.tool-card {
    background: white; padding: 25px 20px; border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center;
    transition: transform 0.3s; border: 1px solid #f0f0f0;
    position: relative; overflow: hidden; cursor: pointer;
}
.tool-card:hover { transform: translateY(-7px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.icon-box { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.tool-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: #333; }
.tool-card p { font-size: 0.85rem; color: #777; line-height: 1.4; margin-bottom: 15px; }
.tool-card .badge { position: absolute; top: 10px; right: 10px; margin: 0; }

/* --- Card Colors --- */
/* PDF (Red) */
.card-pdf { border-top: 4px solid #ff4b2b; }
.card-pdf .icon-box { background-color: #fff0f0; color: #ff4b2b; }
.card-pdf:hover .icon-box { background-color: #ff4b2b; color: white; }
/* Image (Purple) */
.card-img { border-top: 4px solid #8e44ad; }
.card-img .icon-box { background-color: #f4ecf7; color: #8e44ad; }
.card-img:hover .icon-box { background-color: #8e44ad; color: white; }
/* Calc (Green) */
.card-calc { border-top: 4px solid #2ecc71; }
.card-calc .icon-box { background-color: #eafaf1; color: #2ecc71; }
.card-calc:hover .icon-box { background-color: #2ecc71; color: white; }
/* Util (Blue) */
.card-util { border-top: 4px solid #3498db; }
.card-util .icon-box { background-color: #ebf5fb; color: #3498db; }
.card-util:hover .icon-box { background-color: #3498db; color: white; }
/* Social (Red-Alt) */
.card-social { border-top: 4px solid #c0392b; }
.card-social .icon-box { background-color: #fdedec; color: #c0392b; }
.card-social:hover .icon-box { background-color: #c0392b; color: white; }
/* Business/Invoice (Dark Blue) */
.card-biz { border-top: 4px solid #34495e; }
.card-biz .icon-box { background-color: #e8ecef; color: #34495e; }
.card-biz:hover .icon-box { background-color: #34495e; color: white; }
/* Education (Orange) */
.card-edu { border-top: 4px solid #f39c12; }
.card-edu .icon-box { background-color: #fef5e7; color: #f39c12; }
.card-edu:hover .icon-box { background-color: #f39c12; color: white; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .container { flex-direction: column; }
    .sidebar-left { display: none; } /* Hide left sidebar on small screens */
    .sidebar-right { width: 100%; margin-top: 20px; }
    .menu { display: none; } /* Hide menu, use JS toggle later */
    .nav-placeholder { display: none; }
}

/* --- Web/SEO Tools Theme (Teal) --- */
.card-web { border-top: 4px solid #009688; }
.card-web .icon-box { background-color: #e0f2f1; color: #009688; }
.card-web:hover .icon-box { background-color: #009688; color: white; }

/* --- MOBILE SPECIFIC STYLES --- */

/* 1. Hide Mobile Elements on Desktop */
.mobile-menu-btn, .mobile-menu-overlay, .bottom-nav {
    display: none;
}

/* 2. Responsive Tweaks */
@media (max-width: 1024px) {
    
    /* Show Hamburger, Hide Desktop Menu */
    .mobile-menu-btn { display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #333; }
    .desktop-menu { display: none; }
    
    /* Fix Container Padding for Bottom Bar */
    body { padding-bottom: 70px; } /* Space for bottom nav */
    .container { flex-direction: column; gap: 20px; margin-top: 15px; }
    .sidebar-left { display: none; }
    .sidebar-right { width: 100%; }

    /* 3. APP-LIKE GRID (2 Columns instead of 1) */
    .tools-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row */
        gap: 15px;
    }
    
    /* Make cards smaller/cleaner on mobile */
    .tool-card { padding: 15px; }
    .icon-box { width: 45px; height: 45px; font-size: 1.4rem; margin-bottom: 10px; }
    .tool-card h3 { font-size: 0.95rem; }
    .tool-card p { font-size: 0.75rem; display: none; } /* Hide description on mobile for cleaner look */
    .badge { font-size: 0.55rem; top: 5px; right: 5px; }

    /* 4. MOBILE MENU OVERLAY (Slide In) */
    .mobile-menu-overlay {
        display: block;
        position: fixed; top: 0; right: -100%; /* Hidden off-screen */
        width: 80%; height: 100%; background: white; z-index: 2000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: 0.3s ease;
        padding: 20px;
    }
    .mobile-menu-overlay.active { right: 0; } /* Slide in */
    
    .mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
    .close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
    
    .mobile-menu-links a {
        display: flex; align-items: center; gap: 15px;
        padding: 15px 0; border-bottom: 1px solid #f0f0f0;
        color: #444; font-weight: 600; font-size: 1rem;
    }
    .mobile-menu-links a i { width: 25px; color: #3498db; }

    /* 5. STICKY BOTTOM NAVIGATION BAR */
    .bottom-nav {
        display: flex; justify-content: space-around; align-items: center;
        position: fixed; bottom: 0; left: 0; width: 100%;
        background: white; height: 65px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 1000; border-top: 1px solid #eee;
    }
    
    .nav-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        color: #888; font-size: 0.75rem; gap: 4px;
    }
    .nav-item i { font-size: 1.2rem; margin-bottom: 2px; }
    .nav-item.active { color: #3498db; }
}

/* --- File Tools Theme (Indigo) --- */
.card-file { border-top: 4px solid #3f51b5; }
.card-file .icon-box { background-color: #e8eaf6; color: #3f51b5; }
.card-file:hover .icon-box { background-color: #3f51b5; color: white; } 

/* --- Link Wrapper Styling --- */
.tool-card-link {
    text-decoration: none; /* Removes underline */
    color: inherit;        /* Keeps your text black/gray, not blue */
    display: block;        /* Makes the whole area clickable */
}

/* Fix for hover effects when wrapped in a link */
.tool-card-link:hover .tool-card {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* --- FOOTER STYLES --- */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 50px;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding: 0 20px;
}

/* Footer Columns */
.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

/* Underline Effect for Headings */
.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #3498db;
}

.footer-logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}

.footer-desc {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Social Icons */
.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 35px; height: 35px;
    background-color: #34495e;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: 0.3s;
}
.social-links a:hover { background-color: #3498db; transform: translateY(-3px); }

/* Footer Links */
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 10px; }
.footer-menu a {
    color: #bdc3c7;
    text-decoration: none;
    transition: 0.2s;
    display: block;
}
.footer-menu a:hover { color: #3498db; padding-left: 5px; }

/* Copyright Bar */
.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Mobile Footer Fix */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin-bottom: 60px; /* Space for sticky bottom nav */
    }
}

/* ===============================
   Homepage SEO Content Section
   =============================== */

.home-content {
    max-width: 1100px;
    margin: 50px auto;
    padding: 30px 25px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.home-content h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #222;
}

.home-content h3 {
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #333;
}

.home-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .home-content {
        margin: 30px 15px;
        padding: 20px;
        border-radius: 15px;
    }

    .home-content h2 {
        font-size: 1.4rem;
    }

    .home-content h3 {
        font-size: 1.05rem;
    }
}

/* ===============================
   Tool Page SEO Content Section
   =============================== */

.tool-seo-content {
    margin-top: 40px;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    color: #334155;
    line-height: 1.7;
    width: 58vw;
    margin: auto;
}

.tool-seo-content h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #1e293b;
}

.tool-seo-content h3 {
    font-size: 1.1rem;
    margin-top: 25px;
    margin-bottom: 8px;
    color: #1e293b;
}

.tool-seo-content p {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #475569;
}

/* Fix list overflow on mobile */
.tool-seo-content ul {
    padding-left: 18px;
    margin: 10px 0;
}

.tool-seo-content li {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

/* ================= MOBILE ================= */
@media (max-width: 600px) {
    .tool-seo-content {
        padding: 20px 15px;
        margin-top: 30px;
        border-radius: 10px;
        width: 95vw;
    }

    .tool-seo-content h2 {
        font-size: 1.2rem;
    }

    .tool-seo-content h3 {
        font-size: 1rem;
    }

    .tool-seo-content p,
    .tool-seo-content li {
        font-size: 0.9rem;
    }
}
