* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

h1, h2, h3, .nav-menu {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,0.1);
    padding: 0.6rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Add these after the header styles */

.mobile-scroll-menu {
    display: none;
    width: 100%;
    overflow: hidden;
    margin-top: 1rem;
    background: #f8f8f8;
    padding: 0.8rem 0;
}

.scroll-menu-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 0.8rem;
    padding: 0 1rem;
}

.scroll-menu-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.menu-item {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.menu-item:active {
    background: #f5f5f5;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 45px; /* Reduced from 60px */
    width: auto;
}

/* Remove logo-text styles as we're not using it anymore */

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
}

/* Dropdown Styles */
.nav-menu .dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-content a:hover {
    background: #f5f5f5;
    color: #2196F3;
}

.dropdown > a::after {
    content: '▼';
    font-size: 0.8em;
    margin-left: 5px;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 1.5rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Section Title */
.section-title {
    text-align: center;
    margin: 1.5rem 0;
    color: #333;
    font-size: 1.8rem;
}

/* Tools Grid */
.tools-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.8rem;
    padding: 0.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    min-height: 180px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.tool-card p {
    font-size: 0.85rem;
    color: #666;
}

.tool-button {
    margin-top: auto;
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.tool-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Footer Styles */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #2196F3;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Tool Page Footer */
.tool-footer {
    background: #f5f5f5;
    padding: 1rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.7rem;
    }
}

@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tools-grid {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Mobile Menu Container */
    .mobile-menu-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
        margin-top: 1rem;
        background: #f8f8f8;
        padding: 0.5rem 0;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        position: relative;
        top: auto;
        right: auto;
        height: auto;
        width: auto;
        background: transparent;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        gap: 0.5rem;
        padding: 0.5rem;
        box-shadow: none;
    }

    .nav-menu::-webkit-scrollbar {
        height: 4px;
    }

    .nav-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }

    .nav-menu li {
        flex: 0 0 auto;
    }

    .nav-menu a {
        padding: 0.5rem 1rem;
        white-space: nowrap;
        font-size: 0.9rem;
        border-radius: 20px;
        background: white;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    /* Tool Cards with new colors */
    .tool-card[data-type="word"] .tool-icon { color: var(--color-word); }
    .tool-card[data-type="excel"] .tool-icon { color: var(--color-excel); }
    .tool-card[data-type="powerpoint"] .tool-icon { color: var(--color-powerpoint); }
    .tool-card[data-type="pdf"] .tool-icon { color: var(--color-pdf); }
    .tool-card[data-type="jpg"] .tool-icon { color: var(--color-jpg); }
    .tool-card[data-type="merge"] .tool-icon { color: var(--color-merge); }
    .tool-card[data-type="split"] .tool-icon { color: var(--color-split); }
    .tool-card[data-type="compress"] .tool-icon { color: var(--color-compress); }
    .tool-card[data-type="secure"] .tool-icon { color: var(--color-secure); }

    .tool-button {
        background: var(--color-pdf);
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background: white;
        padding: 4rem 1rem 2rem;
        transition: 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .nav-menu.active {
        display: flex;
        right: 0;
    }

    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .menu-overlay.active {
        display: block;
    }

    .menu-toggle {
        display: block;
        position: relative;
        right: 0;
        top: 0;
        z-index: 1001;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary-color);
        cursor: pointer;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin: 1rem 0;
    }

    .nav-menu a {
        font-size: 0.95rem;
    }

    .dropdown-content a {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .tool-card {
        flex-direction: column;
        min-height: auto;
        padding: 0.8rem;
        text-align: left;
        gap: 0.3rem;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    .tool-icon {
        font-size: 1.2rem;
        margin: 0;
        grid-row: 1 / 3;
        padding-right: 0.8rem;
    }

    .tool-card h3 {
        font-size: 0.9rem;
        margin: 0;
        font-weight: 500;
        grid-column: 2;
    }

    .tool-card p {
        font-size: 0.75rem;
        margin: 0;
        color: #666;
        grid-column: 2;
    }

    .tool-button {
        margin: 0;
        padding: 0.35rem 0.8rem;
        font-size: 0.8rem;
        grid-row: 1 / 3;
        grid-column: 3;
        height: fit-content;
        align-self: center;
    }

    .logo-image {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }

    .dropdown-content {
        position: static;
        display: none;
        background: #f5f5f5;
        margin-top: 0.5rem;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: #f8f8f8;
        margin-top: 0.5rem;
        border-radius: 4px;
    }

    .dropdown-content a {
        padding: 0.8rem 1rem;
    }

    .nav-menu {
        display: none; /* Hide original menu on mobile */
    }

    .mobile-scroll-menu {
        display: block; /* Show scrollable menu on mobile */
    }

    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    /* Update spacing between cards */
    .tools-grid {
        gap: 0.4rem;
        padding: 0.4rem;
    }

    /* ...existing mobile styles... */
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Update color scheme */
:root {
    --primary-color: #ff4b4b;
    --primary-dark: #ff1a1a;
    --gradient-primary: linear-gradient(135deg, #ff4b4b, #ff1a1a);
    --color-word: #2B579A;
    --color-excel: #217346;
    --color-powerpoint: #B7472A;
    --color-pdf: #FF5733;
    --color-jpg: #4CAF50;
    --color-html: #E44D26;
    --color-merge: #9C27B0;
    --color-split: #FF9800;
    --color-compress: #00BCD4;
    --color-secure: #607D8B;
    --gradient-primary: linear-gradient(135deg, #FF5733, #FF8C00);
}

/* Add these at the top level of the CSS */
.menu-toggle {
    display: none; /* Hide by default on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.menu-overlay {
    display: none; /* Hide by default */
}
