/* --- Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    padding-top: 70px; /* Account for fixed header */
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #0056b3;
}
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #343a40;
}
section {
    padding: 60px 0;
    border-bottom: 1px solid #e9ecef;
}
.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 40px;
    color: #333;
}

/* --- Header & Navigation Styles --- */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo a {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: #333;
}
.logo img {
    height: 40px;
    width: auto;
    margin-right: 10px;
}
.desktop-nav {
    display: flex;
    align-items: center;
}
.nav-menu {
    display: flex;
    list-style: none;
}
.nav-item {
    position: relative;
    margin: 0 15px;
}
.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: #007bff;
}
.nav-link i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}
.nav-item:hover .nav-link i {
    transform: rotate(180deg);
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}
.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}
.dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    padding-left: 25px;
}
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 24px;
    justify-content: space-between;
}
.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    right: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: #ffffff;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    overflow-y: auto;
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
.mobile-menu.active {
    transform: translateX(0);
}
.mobile-nav-menu {
    list-style: none;
    padding: 20px;
}
.mobile-nav-item {
    border-bottom: 1px solid #e9ecef;
}
.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}
.mobile-nav-link i {
    transition: transform 0.3s ease;
}
.mobile-nav-link.active i {
    transform: rotate(180deg);
}
.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: #f8f9fa;
}
.mobile-dropdown-menu.active {
    max-height: 500px;
}
.mobile-dropdown-item {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}
.mobile-dropdown-item:last-child { border-bottom: none; }
.mobile-dropdown-item:hover { color: #007bff; }

/* --- Hero Section - Reduced by 40% --- */
.hero {
    background-color: #f8f9fa;
    text-align: center;
    padding-top: 50px; /* Reduced from 80px */
    padding-bottom: 50px; /* Reduced from 80px */
    transition: display 0.3s ease;
}
.hero h1 {
    font-size: 2.5rem; /* Reduced from 3rem */
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}
.hero .subtitle {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    color: #555;
    margin-bottom: 30px; /* Reduced from 40px */
}
.uploader-box {
    background-color: #ffffff;
    border: 2px dashed #007bff;
    border-radius: 12px;
    padding: 40px 25px; /* Reduced padding */
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.uploader-box.dragover {
    border-color: #0056b3;
    background-color: #f0f7ff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.uploader-icon {
    font-size: 3rem; /* Reduced from 4rem */
    color: #007bff;
    margin-bottom: 15px; /* Reduced from 20px */
}
.uploader-text {
    font-size: 1.3rem; /* Reduced from 1.5rem */
    font-weight: 500;
    color: #333;
    margin-bottom: 15px; /* Reduced from 20px */
}
.btn-upload {
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px; /* Reduced padding */
    font-size: 1rem; /* Reduced from 1.1rem */
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-upload:hover {
    background-color: #0056b3;
}
.hero .tools-prompt {
    margin-top: 25px; /* Reduced from 30px */
    font-size: 1rem; /* Reduced from 1.1rem */
    color: #444;
}
#file-upload-input {
    display: none;
}

/* --- Tool Context Bar --- */
#tool-context-bar {
    background-color: #e6f7ff;
    border: 1px solid #b3e0ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
    text-align: center;
    font-size: 1.1rem;
}
#tool-context-bar p {
    margin: 0;
    color: #333;
}
#tool-context-bar #reset-upload-link {
    margin-left: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* --- Tool Search Bar --- */
.tool-search-wrapper {
    max-width: 800px;
    margin: 0 auto 40px auto;
    position: relative;
}
#tool-search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    font-size: 1.1rem;
    border: 1px solid #ced4da;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
#tool-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}
.tool-search-wrapper i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
}

/* --- Tools Section --- */
.tools-section {
    background-color: #ffffff;
}
.tool-category-header {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}
/* Hide first category's top margin */
.tool-category-header:first-of-type {
    margin-top: 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Reduced from 280px */
    gap: 20px; /* Reduced from 25px */
    align-items: center; /* Align items to middle */
    justify-items: center; /* Center items horizontally */
}
.tool-card {
    display: block;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px; /* Reduced from 25px */
    text-align: center; /* Center content */
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px; /* Limit maximum width */
    height: 100%; /* Ensure consistent height */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
}
.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #007bff;
}
.tool-icon-wrapper {
    font-size: 1.6rem; /* Reduced from 1.8rem */
    margin-bottom: 12px; /* Reduced from 15px */
    display: flex;
    align-items: center;
    justify-content: center; /* Center icons */
}
.tool-icon-wrapper i {
    padding: 5px;
}
.tool-icon-wrapper .fa-file-pdf { color: #e63946; }
.tool-icon-wrapper .fa-file-word { color: #2b579a; }
.tool-icon-wrapper .fa-file-powerpoint { color: #d24726; }
.tool-icon-wrapper .fa-file-alt { color: #34a853; }
.tool-icon-wrapper .fa-file-excel { color: #1e8e3e; }
.tool-icon-wrapper .fa-file-csv { color: #1a73e8; }
.tool-icon-wrapper .fa-file-image { color: #f2a60c; }
.tool-icon-wrapper .fa-file-zipper { color: #795548; }
.tool-icon-wrapper .fa-file-code { color: #e83e8c; }
.tool-icon-wrapper .fa-object-group { color: #6f42c1; }
.tool-icon-wrapper .fa-scissors { color: #17a2b8; }
.tool-icon-wrapper .fa-copy { color: #6f42c1; }
.tool-icon-wrapper .fa-microphone-lines { color: #17a2b8; }
.tool-icon-wrapper .fa-qrcode { color: #333; }
.tool-icon-wrapper .fa-key { color: #fd7e14; }
.tool-icon-wrapper .fa-dollar-sign { color: #20c997; }

.tool-icon-wrapper .fa-arrow-right {
    font-size: 1.1rem; /* Reduced from 1.2rem */
    color: #aaa;
    margin: 0 8px; /* Reduced from 10px */
}
.tool-card h3 {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.tool-card p {
    font-size: 0.9rem; /* Reduced from 0.95rem */
    color: #555;
    line-height: 1.5;
}

/* --- AdSense Placeholder --- */
.ad-placeholder {
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #999;
    font-size: 1rem;
    margin: 40px auto;
    width: 100%;
    max-width: 970px; /* Common ad size */
    height: 250px; /* Common ad size */
}
.ad-placeholder p {
    max-width: 80%;
}

/* --- Features/Trust Section --- */
.features-section {
    background-color: #f8f9fa;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}
.feature-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.feature-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 15px;
}
.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.feature-item p {
    color: #555;
    font-size: 0.95rem;
}

/* --- Content/SEO Section --- */
.content-section {
    background: #fff;
    max-width: 900px;
}
.content-section p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: #444;
}

/* --- FAQ Section --- */
.faq-section {
    background-color: #f8f9fa;
    max-width: 900px;
}
.faq-container details {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
}
.faq-container summary {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 20px;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.faq-container summary::-webkit-details-marker {
    display: none;
}
.faq-container summary::after {
    content: '\f078'; /* Font Awesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}
.faq-container details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}
.faq-answer {
    padding: 0 20px 20px 20px;
    color: #555;
    border-top: 1px solid #e9ecef;
}

/* --- Footer Section --- */
footer {
    background-color: #343a40;
    color: #adb5bd;
    padding: 50px 0 20px 0;
    font-size: 0.9rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-about p {
    margin-top: 15px;
    line-height: 1.7;
}
.footer-content h4 {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 600;
}
.footer-links ul {
    list-style: none;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: #adb5bd;
    transition: all 0.3s ease;
}
.footer-links a:hover {
    color: #ffffff;
    padding-left: 5px;
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-links a {
    font-size: 1.8rem;
    color: #adb5bd;
}
.social-links a:hover.fa-twitter { color: #1DA1F2; }
.social-links a:hover.fa-facebook { color: #1877F2; }
.social-links a:hover.fa-instagram { color: #C13584; }
.social-links a:hover.fa-youtube { color: #FF0000; }

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* --- Responsive Styles --- */
@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }
    .hamburger {
        display: flex;
    }
}
@media (max-width: 1100px) {
    .hero h1 {
        font-size: 2.1rem; /* Adjusted for mobile */
    }
    .hero .subtitle {
        font-size: 1rem; /* Adjusted for mobile */
    }
    .section-title {
        font-size: 1.8rem;
    }
    .ad-placeholder {
        height: 100px;
    }
    
    /* Hide uploader box on mobile */
    .uploader-box {
        display: none;
    }
    /* Adjust hero padding when uploader is hidden */
    .hero {
        padding-bottom: 30px; /* Further reduced for mobile */
        padding-top: 40px; /* Further reduced for mobile */
    }
    /* Make tools prompt more prominent on mobile */
    .tools-prompt {
        font-size: 1.1rem !important;
        font-weight: 500;
        margin-top: 20px !important;
    }
    
    /* Adjust tool cards for mobile */
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Smaller cards on mobile */
        gap: 15px;
    }
    .tool-card {
        padding: 15px;
        max-width: 240px;
    }
    .tool-icon-wrapper {
        font-size: 1.4rem;
    }
    .tool-card h3 {
        font-size: 1rem;
    }
    .tool-card p {
        font-size: 0.85rem;
    }
}
@media (max-width: 480px) {
     .hero h1 {
        font-size: 1.8rem;
    }
    .uploader-box {
        padding: 30px 20px;
    }
    .uploader-text {
        font-size: 1.2rem;
    }
    .tools-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
    .tool-card {
        max-width: 100%;
    }
}