/* core/style.css - Desktop First */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #0f0f17;
    --surface: #161622;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --border: #2d2d3d;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.light-mode {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --primary: #6366f1;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { margin:0; padding:0; box-sizing:border-box;}
.arrow { margin:0; padding:0; box-sizing:border-box; color: var(--text-primary, #1e293b); }
body { font-family: 'Inter', sans-serif; background:var(--bg); color:var(--text); line-height:1.6; transition: all 0.3s; }

.container { max-width: 1280px; margin:0 auto; padding:0 1.5rem; }

/* Header */
.main-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top:0; z-index:1000;
    backdrop-filter: blur(12px);
}
.header-content { display:flex; justify-content:space-between; align-items:center; height:76px; }
.logo a { display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--text); font-weight:700; font-size:1.5rem; }
/* .logo img { border-radius:8px; } */

#themeToggle {
    background:none; border:none; font-size:1.5rem; cursor:pointer; width:48px; height:48px;
    display:flex; align-items:center; justify-content:center; border-radius:50%;
    transition:0.3s; background:var(--bg);
}
#themeToggle:hover { transform:scale(1.1); }

/* Hero */
.hero { text-align:center; padding:4rem 0 3rem; }
.hero h1 { font-size:3.5rem; margin-bottom:1rem; }
.hero h1 .gradient-text {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color:transparent;
}
.subtitle { font-size:1.3rem; color:var(--text-light); margin-bottom:2rem; }

.search-box {
    max-width:580px; margin:0 auto; position:relative;
}
.search-box input {
    width:100%; padding:1rem 1rem 1rem 3.5rem;
    border-radius: var(--radius); border:none;
    background:var(--surface); color:var(--text);
    font-size:1.1rem; box-shadow:var(--shadow);
}
.search-icon { position:absolute; left:1rem; top:50%; transform:translateY(-50%); width:24px; height:24px; fill:var(--text-light); }

/* Tools Grid */
.category-section { margin:4rem 0; }
.category-title {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:1.5rem; font-size:1.8rem; font-weight:700;
}
.tool-count { font-size:1rem; color:var(--text-light); font-weight:500; }

.tools-grid {
    display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:1.5rem;
}
.tool-card {
    background:var(--surface); border-radius:var(--radius);
    padding:1.8rem; display:flex; flex-direction:column;
    border:1px solid var(--border); transition:0.3s all;
    text-decoration:none; color:var(--text);
    box-shadow:var(--shadow);
}
.tool-card:hover {
    transform:translateY(-8px); border-color:var(--primary);
    box-shadow:0 20px 40px rgba(99,102,241,0.2);
}
.tool-icon { font-size:3rem; margin-bottom:1rem; }
.tool-card h3 { font-size:1.4rem; margin-bottom:0.5rem; }
.tool-card p { color:var(--text-light); font-size:0.95rem; flex-grow:1; }
.view-btn { margin-top:1rem; color:var(--primary); font-weight:600; }

/* Footer */
.main-footer {
    background:var(--surface); border-top:1px solid var(--border);
    margin-top:6rem; padding:4rem 0 2rem;
}
.footer-grid {
    display:grid; grid-template-columns:repeat(auto-fit, minmax(250px,1fr)); gap:2rem;
    margin-bottom:3rem;
}
.footer-col h3,.footer-col h4 { margin-bottom:1rem; }
.footer-col ul { list-style:none; }
.footer-col a { color:var(--text-light); text-decoration:none; }
.footer-col a:hover { color:var(--primary); }
.footer-bottom { text-align:center; padding-top:2rem; border-top:1px solid var(--border); color:var(--text-light); font-size:0.9rem; }

/* Breadcrumb */
.breadcrumb-nav {
    background:var(--surface); padding:1rem 0; border-bottom:1px solid var(--border);
}
.breadcrumb-nav a { color:var(--primary); text-decoration:none; }
.current { color:var(--text-light); }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size:2.5rem; }
    .tools-grid { grid-template-columns:1fr; }
}

/* Logo Auto Switch */
.logo img { transition: opacity 0.4s ease; position: relative; }
.logo-dark { opacity: 1; }
.logo-light { opacity: 0; position: absolute; top: 0; left: 0; }
.light-mode .logo-dark { opacity: 0; }
.light-mode .logo-light { opacity: 1; }

/* Theme Toggle Icons */
.theme-toggle {
    background: none; border: none; cursor: pointer; padding: 8px; border-radius: 50%;
    position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
.theme-toggle svg { 
    position: absolute; transition: opacity 0.4s ease, transform 0.4s ease;
    color: var(--text-light);
}
.sun-icon { opacity: 1; transform: rotate(0deg); color:white }
.moon-icon { opacity: 0; transform: rotate(-30deg); }
.light-mode .sun-icon { opacity: 0; transform: rotate(30deg); }
.light-mode .moon-icon { opacity: 1; transform: rotate(0deg); }

/* Desktop Nav */
.desktop-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; }
.desktop-nav a { color: var(--text-light); text-decoration: none; font-weight: 500; padding: 0.5rem 0; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--primary); }

/* === HIDE/SHOW CORRECTLY ON MOBILE & DESKTOP === */
.desktop-nav { display: none; }
.mobile-only { display: none; }
.mobile-menu, .mobile-overlay { display: none !important; }

@media (min-width: 768px) {
    .desktop-nav { display: flex !important; }
}

@media (max-width: 767px) {
    .mobile-only { display: block !important; }
    .mobile-menu { 
        display: block !important;
        position: fixed; top: 0; right: -300px; width: 280px; height: 100vh;
        background: var(--surface); z-index: 9999; transition: right 0.35s ease;
        padding: 1.5rem; overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,0.4);
    }
    .mobile-menu.active { right: 0; }
    .mobile-overlay.active { 
        display: block !important; position: fixed; inset: 0; 
        background: rgba(0,0,0,0.7); z-index: 9998; 
    }
}

/* Logo Switch */
.logo { position: relative; display: inline-block; }
.logo img { transition: opacity 0.4s ease; position: relative; }
.logo-light { opacity: 0; position: absolute; top: 0; left: 0; }
.light-mode .logo-dark { opacity: 0; }
.light-mode .logo-light { opacity: 1; }

/* Theme Toggle Animation */
.theme-toggle svg { position: absolute; transition: all 0.4s ease; }
.sun-icon { opacity: 1; transform: rotate(0deg); }
.moon-icon { opacity: 0; transform: rotate(-40deg); }
.light-mode .sun-icon { opacity: 0; transform: rotate(40deg); }
.light-mode .moon-icon { opacity: 1; transform: rotate(0deg); }


.header-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
    background: none; border: none; cursor: pointer; padding: 8px;
    width: 44px; height: 44px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; transition: 0.3s;
}
.icon-btn:hover { background: rgba(255,255,255,0.1); }
.light-mode .icon-btn:hover { background: rgba(0,0,0,0.1); }

.theme-toggle svg { position: absolute; transition: opacity 0.4s ease; }
.sun-icon { opacity: 1; }
.moon-icon { opacity: 0; }
.light-mode .sun-icon { opacity: 0; }
.light-mode .moon-icon { opacity: 1; }

/* Hide desktop nav on mobile, show mobile button only on mobile */
.desktop-nav { display: none; }
.mobile-only { display: none; }

@media (min-width: 768px) {
    .desktop-nav { display: flex; }
}
@media (max-width: 767px) {
    .mobile-only { display: flex; }
    .mobile-menu { 
        position: fixed; top: 0; right: -300px; width: 280px; height: 100vh;
        background: var(--surface); z-index: 9999; transition: right 0.35s ease;
        padding: 1.5rem; box-shadow: -10px 0 30px rgba(0,0,0,0.4);
    }
    .mobile-menu.active { right: 0; }
    .mobile-overlay.active { 
        position: fixed; inset: 0; background: rgba(0,0,0,0.75); 
        z-index: 9998; 
    }
}


        .featured-section {
            margin: 3rem 0 4rem;
        }
        
        .featured-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
            margin-top: 1.5rem;
        }
        
        .featured-card {
            border-radius: var(--radius);
            display: flex;
            flex-direction: column;
            text-decoration: none;
            color: white;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            background:var(--surface); border-radius:var(--radius);
            padding:1.8rem; display:flex; flex-direction:column;
            border:1px solid var(--border); transition:0.3s all;
            text-decoration:none; color:var(--text);
            box-shadow:var(--shadow);
        }
        
        .featured-card::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200px;
            height: 200px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            transform: rotate(15deg);
        }
        
        .featured-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
        }
        
        .featured-icon {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            position: relative;
            z-index: 1;
        }
        
        .featured-name {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            position: relative;
            z-index: 1;
        }
        
        .featured-desc {
            font-size: 0.9rem;
            opacity: 0.9;
            margin-bottom: 1rem;
            position: relative;
            z-index: 1;
        }
        
        .featured-link {
            font-weight: 600;
            font-size: 0.95rem;
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .featured-link::after {
            content: '→';
            transition: transform 0.3s ease;
        }
        
        .featured-card:hover .featured-link::after {
            transform: translateX(5px);
        }
        
        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.5rem;
        }
        
    .featured-badge {
            background: linear-gradient(135deg, #060245, #7c3aed);
            color: white;
            font-size: 0.85rem;
            padding: 0.35rem 1rem;
            border-radius: 50px;
            font-weight: 600;
        }
        
        .no-results {
            text-align: center;
            padding: 4rem 2rem;
            background: var(--surface);
            border-radius: var(--radius);
            border: 1px solid var(--border);
            margin: 2rem 0;
        }
        
        .no-results.hidden {
            display: none;
        }
        
        .no-results p {
            color: var(--text-light);
            font-size: 1.1rem;
            margin-bottom: 1.5rem;
        }
        
        .clear-search {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.75rem 2rem;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .clear-search:hover {
            background: var(--primary-light);
            transform: translateY(-2px);
        }
        
        .category-section.hidden,
        .featured-section.hidden {
            display: none;
        }
        
        @media (max-width: 768px) {
            .featured-grid {
                grid-template-columns: 1fr;
            }
            
            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
            }
        }



        
/* Global Styles for Tool Pages related tools */

/* ====================== RELATED RESOURCES STYLES ====================== */

.imagesplit-related {
    margin: 3rem 0 2rem;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius, 16px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.imagesplit-related h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.related-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.related-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-category li {
    margin-bottom: 0.7rem;
}

.related-category a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.related-category a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.related-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.related-footer p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .imagesplit-related {
        padding: 1.5rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .imagesplit-related h3 {
        font-size: 1.3rem;
    }
    
    .related-category h4 {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .imagesplit-related {
        padding: 1rem;
    }
    
    .related-category li {
        margin-bottom: 0.5rem;
    }
    
    .related-category a {
        font-size: 0.85rem;
    }
}