/* CSS Design System */
:root {
    --primary-red: #e5322d;
    --secondary-dark: #333;
    --background-light: #f8f8fa;
    --text-color: #555;
    --border-color: #ddd;
    --white: #fff;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
}

/* General Styles & Resets */
* {
    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;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
}

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

h1, h2, h3 {
    color: var(--secondary-dark);
    margin-bottom: 1rem;
}

/* Header & Navigation */
.header {
    background-color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 10px var(--shadow-light);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--secondary-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-red);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--secondary-dark);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(to bottom, var(--white), var(--background-light));
}

.hero h1 {
    font-size: 3rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Ad Placeholder */
.ad-placeholder {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    border: 2px dashed var(--border-color);
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-banner-top {
    width: 728px;
    height: 90px;
    max-width: 100%;
}
.ad-sidebar {
    width: 200px;
    height: 400px;
    display: none; /* Hidden by default, shown on desktop */
}

/* Main Content - Tools Grid */
#tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 40px 0;
}

.tool-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px var(--shadow-light);
    border-color: var(--primary-red);
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.9rem;
    flex-grow: 1;
}

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* CSS FOR THE "WHY CHOOSE US" SECTION */
.commitment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.commitment-card {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 4px solid var(--primary-red);
}
.commitment-card .icon {
    font-size: 2rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
}
.commitment-card h4 {
    margin-bottom: 0.5rem;
}

/* About Us Section */
.about-section {
    padding: 60px 0;
    background-color: var(--white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    display: flex;
    gap: 20px;
}

.modal-main {
    flex-grow: 1;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--secondary-dark);
}

#drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

#drop-area.dragover {
    background-color: #f0f0f0;
    border-color: var(--primary-red);
}

#file-list {
    margin-bottom: 20px;
}
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: var(--background-light);
    border-radius: 4px;
    margin-bottom: 5px;
}
.remove-file {
    cursor: pointer;
    color: var(--primary-red);
    font-weight: bold;
}

#tool-options {
    margin-bottom: 20px;
}

#process-btn {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s;
}

#process-btn:hover:not(:disabled) {
    background-color: #c42a25;
}

#process-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
/* =================================================================== */
/* START: NEW, ADVANCED CSS FOR POLISHED LOADER UI                 */
/* =================================================================== */

/* This container holds the spinning loader and text */
.loader-container {
    display: none; /* Hidden by default */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* More opaque */
    z-index: 10;
    display: flex; /* Use flex to center content */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 8px; /* Match the tool box corners */
    text-align: center;
}

/* The spinning circle animation */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-red); /* Your brand red */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* The text below the spinner */
#loader-text {
    margin-top: 15px;
    font-weight: bold;
    color: var(--secondary-dark);
    font-size: 1.1rem;
}

/* This is a new class we will add to the file list and buttons to fade them out */
.processing-fade {
    opacity: 0.3;
    pointer-events: none; /* Disables clicks */
    transition: opacity 0.3s ease;
}

/* Styling for the output messages (like "Download has started!") */
#output-area {
    width: 100%;
    margin-top: 1rem;
}

.message {
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

/* Style for informational messages */
.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Style for error messages */
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* =================================================================== */
/* END: NEW CSS                                                      */
/* =================================================================== */

/* NEW CSS FOR THE IMPROVED ABOUT SECTION */
.about-section h2, .about-section h3 { text-align: center; }
.about-section .lead-text { text-align: center; font-size: 1.1rem; max-width: 800px; margin: 0 auto 40px auto; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin: 40px 0; text-align: center; }
.feature-item .icon { font-size: 3rem; color: var(--primary-red); margin-bottom: 1rem; }
.feature-item h4 { color: var(--secondary-dark); font-size: 1.2rem; margin-bottom: 0.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; text-align: center; background-color: var(--background-light); padding: 2rem; border-radius: 8px; }
.stat-item .stat-number { font-size: 2.5rem; font-weight: bold; color: var(--primary-red); }
.stat-item .stat-label { font-size: 1rem; color: var(--secondary-dark); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.testimonial-card { background-color: var(--background-light); border-left: 4px solid var(--primary-red); padding: 1.5rem; border-radius: 0 8px 8px 0; }
.testimonial-card p { font-style: italic; margin-bottom: 1rem; }
.testimonial-card .author { font-weight: bold; color: var(--secondary-dark); }
.cta-button { display: inline-block; background-color: var(--primary-red); color: var(--white); padding: 12px 30px; border-radius: 5px; text-decoration: none; font-weight: bold; transition: background-color 0.3s; margin-top: 2rem; }
.cta-button:hover { background-color: #c42a25; }
.center-text { text-align: center; }
hr { border: 0; height: 1px; background-color: var(--border-color); margin: 60px 0; }

/* Footer */
.footer {
    background-color: var(--secondary-dark);
    color: #ccc;
    padding: 40px 0 20px;
}

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

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

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

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

.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Reveal on Scroll Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (min-width: 769px) {
    .ad-sidebar {
        display: flex;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        justify-content: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 2.5rem 0;
    }

    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }

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

@media (max-width: 480px) {
    #tools-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2rem;
    }
}
/* =================================================================== */
/* START: NEW CSS FOR LOADER OVERLAY AND DOWNLOAD MESSAGES         */
/* =================================================================== */

/* This container holds the spinning loader and text */
.loader-container {
    display: none; /* Hidden by default */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 8px; /* Match the tool box corners */
    text-align: center;
}

/* The spinning circle animation */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary-red); /* Your brand red */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* The text below the spinner */
#loader-text {
    margin-top: 20px;
    font-weight: bold;
    color: var(--secondary-dark);
}

/* Styling for the output messages (like "Download has started!") */
#output-area {
    width: 100%;
    margin-top: 1.5rem;
}

.message {
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

/* Style for informational messages (like the blue download box) */
.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Style for error messages */
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* =================================================================== */
/* END: NEW CSS                                                      */
/* =================================================================== */
