/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.nav-brand h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.nav-brand p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
    background: white;
}

.search-box button {
    padding: 1rem 1.5rem;
    background: #4f46e5;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background: #3730a3;
}

.quick-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-search span {
    opacity: 0.8;
    margin-right: 0.5rem;
}

.quick-search button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.quick-search button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Layout Container */
.layout-container {
    display: flex;
    min-height: calc(100vh - 120px); /* Adjust based on header height */
    gap: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mobile-menu-toggle:hover {
    background: #3730a3;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin: 0;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.sidebar-close:hover {
    background: #e2e8f0;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-list li {
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-nav-list a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.sidebar-nav-list a:hover {
    background: #f8fafc;
    color: #4f46e5;
}

.sidebar-nav-list a.active {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border-right: 3px solid #4f46e5;
}

.sidebar-nav-list a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.quick-actions h4 {
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.quick-action-btn:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.quick-action-btn i {
    margin-right: 0.5rem;
}

/* Top Navigation */
.top-nav {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb {
    color: #64748b;
    font-size: 0.95rem;
}

.breadcrumb span {
    font-weight: 600;
    color: #1e293b;
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
}

.view-toggle,
.filter-toggle {
    background: none;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle:hover,
.filter-toggle:hover {
    background: #f8fafc;
    border-color: #4f46e5;
    color: #4f46e5;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content-wrapper {
    display: flex;
    flex: 1;
    gap: 0;
}

.content-area {
    flex: 1;
    padding: 1rem 1rem 2rem 0;
    overflow-y: auto;
}

/* Filters Panel */
.filters-panel {
    width: 250px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.filters-panel.show {
    transform: translateX(0);
}

.filters-panel h4 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    color: #64748b;
    margin-bottom: 0;
    cursor: pointer;
}

.filter-options input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #4f46e5;
}

.clear-filters {
    width: 100%;
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.clear-filters:hover {
    background: #dc2626;
}

.tools-section {
    margin-bottom: 3rem;
}

.section-header {
    text-align: left;
    margin-bottom: 1rem;
    padding-left: 0;
}

.section-header h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    justify-content: start;
    justify-items: start;
    margin-left: 0;
    padding-left: 0;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    border-color: #4f46e5;
}

.tool-card.featured {
    border: 2px solid #4f46e5;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tool-card.featured .tool-info h3,
.tool-card.featured .tool-info p {
    color: white;
}

.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: #f1f5f9;
}

.tool-card.featured .tool-icon {
    background: rgba(255, 255, 255, 0.2);
}

.tool-icon img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.tool-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.tool-info p {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.tool-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-card.featured .tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tool-link {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #4f46e5;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.tool-link:hover {
    background: #3730a3;
    transform: scale(1.05);
}

.tool-card.featured .tool-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tool-card.featured .tool-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* List View Styles */
.tools-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tools-grid.list-view .tool-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
}

.tools-grid.list-view .tool-icon {
    margin-right: 1.5rem;
    margin-bottom: 0;
    min-width: 50px;
}

.tools-grid.list-view .tool-info {
    flex: 1;
    margin-right: 1rem;
}

.tools-grid.list-view .tool-info h3 {
    margin-bottom: 0.25rem;
}

.tools-grid.list-view .tool-info p {
    margin-bottom: 0.5rem;
}

.tools-grid.list-view .tool-link {
    position: static;
    margin-left: auto;
    transform: none;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #4f46e5;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #334155;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #4f46e5;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filters-panel {
        width: 200px;
    }
    
    .sidebar {
        width: 240px;
    }
    
    .content-area {
        padding: 2rem 2rem 2rem 0;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1.5rem 0;
    }

    .nav-brand h1 {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: 12px;
    }

    .search-box input,
    .search-box button {
        border-radius: 0;
    }

    .search-box input {
        border-radius: 12px 12px 0 0;
    }

    .search-box button {
        border-radius: 0 0 12px 12px;
    }

    .quick-search {
        margin-top: 1rem;
    }

    /* Mobile Sidebar */
    .mobile-menu-toggle {
        display: block;
    }

    .layout-container {
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .main-content {
        width: 100%;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .filters-panel {
        width: 100%;
        transform: translateY(-100%);
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .filters-panel.show {
        transform: translateY(0);
    }

    .content-area {
        padding: 1rem;
        margin-left: 0;
        padding-left: 1rem;
    }

    .tools-grid {
        padding-left: 0;
    }

    .section-header {
        padding-left: 0;
    }

    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .tool-card {
        padding: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar Styling */
.nav-list::-webkit-scrollbar {
    height: 4px;
}

.nav-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.nav-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.nav-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
} 