/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    /* Colorful Icon Gradients */
    --icon-gradient-1: linear-gradient(135deg, #ff6b6b, #ee5a24);
    --icon-gradient-2: linear-gradient(135deg, #4ecdc4, #44a08d);
    --icon-gradient-3: linear-gradient(135deg, #45b7d1, #96c93d);
    --icon-gradient-4: linear-gradient(135deg, #f093fb, #f5576c);
    --icon-gradient-5: linear-gradient(135deg, #4facfe, #00f2fe);
    --icon-gradient-6: linear-gradient(135deg, #43e97b, #38f9d7);
    --icon-gradient-7: linear-gradient(135deg, #fa709a, #fee140);
    --icon-gradient-8: linear-gradient(135deg, #a8edea, #fed6e3);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --secondary-color: #fbbf24;
    --accent-color: #34d399;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --border-color: #374151;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles - Modern iLovePDF Style */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    width: 99%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .header {
    background: rgba(17, 24, 39, 0.95);
}

.navbar {
    padding: 0.75rem 50px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.nav-menu {
    display: flex;
    gap: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.nav-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Dropdown Styles - iLovePDF Style */
.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
    padding: 1rem;
}

.dropdown-section h4 {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-section a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-section a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-section a i {
    width: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}


/* Hero Section */
.hero {
    padding: 6rem 0 4rem 4rem;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 400px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 120px;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.floating-card span {
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.card-1 {
    top: 32%;
    left: 2%;
    animation-delay: 0s;
}

.card-2 {
    top: 32%;
    right: 13%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 2%;
    left: 27%;
    animation-delay: 4s;
}
.card-4 {
    bottom: 70%;
    left: 31%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Search Section */
.search-section {
    padding: 2rem 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box i {
    color: var(--text-light);
    margin-left: 1rem;
    font-size: 1.1rem;
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.search-tags {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Tools Section - Smaller Cards for More Tools */
.tools-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.tool-category {
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.category-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.category-info p {
    color: var(--text-secondary);
}

/* Smaller Tool Cards Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

/* Colorful Icons with Gradients */
.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Assign different gradients to icons */
.tool-card:nth-child(8n+1) .tool-icon { background: var(--icon-gradient-1); }
.tool-card:nth-child(8n+2) .tool-icon { background: var(--icon-gradient-2); }
.tool-card:nth-child(8n+3) .tool-icon { background: var(--icon-gradient-3); }
.tool-card:nth-child(8n+4) .tool-icon { background: var(--icon-gradient-4); }
.tool-card:nth-child(8n+5) .tool-icon { background: var(--icon-gradient-5); }
.tool-card:nth-child(8n+6) .tool-icon { background: var(--icon-gradient-6); }
.tool-card:nth-child(8n+7) .tool-icon { background: var(--icon-gradient-7); }
.tool-card:nth-child(8n+8) .tool-icon { background: var(--icon-gradient-8); }

.tool-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.tool-card p {
    color: var(--text-secondary);
    line-height: 1.4;
    font-size: 0.85rem;
    flex-grow: 1;
}

.badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.new {
    background: var(--gradient-secondary);
    color: white;
}

.badge.premium {
    background: var(--gradient-primary);
    color: white;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background: var(--gradient-primary);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-cards {
        display: none;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card,
.feature-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.tool-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}






/* Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}

/* Modal Box */
.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.9);
    background: var(--bg-primary);
    width: 420px;
    max-width: 90%;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 1000;
}

/* Show Modal */
.auth-modal.active,
.auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal.active {
    transform: translate(-50%, -50%) scale(1);
}

/* Inside Box */
.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.social-btn {
    width: 100%;
    padding: 0.7rem;
    border-radius: 10px;
    font-weight: 600;
    color: white;
    border: none;
    cursor: pointer;
}

.social-btn.fb { background: #1877f2; }
.social-btn.google { background: #db4437; }

/* Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider span {
    background: var(--bg-primary);
    padding: 0 10px;
    color: var(--text-secondary);
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    height: 1px;
    width: 100%;
    background: var(--border-color);
}

/* Form Styles */
.form-group-auth {
    margin-bottom: 1rem;
}

.form-group-auth label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.form-group-auth input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Auth buttons */
.auth-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem !important;
    font-size: 1rem;
    border-radius: 12px;
}

/* Switch Links */
.auth-switch {
    text-align: center;
    margin-top: 1rem;
}

.auth-switch a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width:480px){
    .auth-modal {
        padding: 1.5rem;
    }
    .hero{
        padding: 30px 10px 10px 10px !important;
    }
    .hero-visual{
        height:0px;
    }
    .search-btn{
        position: relative;
        right: 7px;
    }
    .search-box{
        padding: 0px;
    }
    .category-header{
        flex-direction: column;
        align-items: flex-start;
    }
}



/* =========================
   NAVBAR BASE
========================= */
.navbar {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tool-column a i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
  color: #666;
}
/* =========================
   NAV LINKS
========================= */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-link {
  font-size: 14px;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* =========================
   ALL TOOLS (MEGA MENU)
========================= */
.all-tools {
  position: static; /* IMPORTANT for full width */
}

/* MEGA DROPDOWN */
.all-tools-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);

  width: 100vw;
  background: #fff;

  padding: 30px 60px;

  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 30px;

  border-top: 1px solid #eee;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);

  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;

  z-index: 999;
}

/* SHOW DROPDOWN */
.all-tools:hover .all-tools-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =========================
   TOOL COLUMN
========================= */
.tool-column h4 {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.tool-column a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: 0.2s;
}

.tool-column a:hover {
  color: var(--primary-color);
}

/* =========================
   BRAND / LOGO
========================= */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-size: 20px;
  color: #6c63ff;
}

.brand-text {
  font-size: 18px;
  font-weight: 600;
}

/* =========================
   ACTIONS (THEME BUTTON)
========================= */
.nav-actions {
  display: flex;
  align-items: center;
}

.theme-toggle {
  background: #f5f5f5;
  border: none;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* =========================
   MOBILE MENU BUTTON
========================= */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 22px;
  height: 2px;
  background: #333;
}

/* =========================
   MOBILE RESPONSIVE
========================= */
@media (max-width: 768px) {

  .nav-menu {
    position: fixed; /* ✅ IMPORTANT (not absolute) */
    top: 70px; /* adjust حسب header height */
    left: 0;
    width: 100%;
    height: calc(100vh - 70px); /* ✅ full screen height */
    background: #fff;

    flex-direction: column;
    padding: 20px;
    display: none;

    align-items: center;
    text-align: center;

    overflow-y: auto; /* ✅ ENABLE SCROLL */
    -webkit-overflow-scrolling: touch; /* smooth on mobile */
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* ALL TOOLS DROPDOWN */
  .all-tools-dropdown {
    position: static;
    width: 100%;
    transform: none;

    grid-template-columns: 1fr;
    padding: 15px;

    box-shadow: none;
    border-top: none;

    opacity: 1;
    visibility: visible;
    display: none;

    text-align: center;
  }

  .all-tools.active .all-tools-dropdown {
    display: block;
  }

  /* TOOL COLUMN */
  .tool-column {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
  }

  /* LINKS CENTER */
  .tool-column a {
    display: flex;
    align-items: left;
    gap: 8px;
    padding: 8px 0px;
  }

}
/* MOBILE FIX */
