/* ---------------------------------- */
/* 1. RESET & BASE STYLES             */
/* ---------------------------------- */
:root {
    --primary-color: #007bff; /* A nice blue for accents */
    --text-color: #333;
    --background-color: #f9f9f9;
    --white-color: #ffffff;
    --dark-color: #1a1a1a;
    --font-family: 'Inter', sans-serif;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3; /* A darker blue on hover */
}

ul {
    list-style: none;
}

/* ---------------------------------- */
/* 2. HEADER & NAVIGATION LAYOUT      */
/* ---------------------------------- */
.main-header {
    background-color: var(--white-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    
    /* Flex container for the whole header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    text-transform: lowercase;
}

.logo .dot {
    color: var(--primary-color);
}

/* Navigation Menu Positioning (Center on Desktop) */
.main-nav {
    flex-grow: 1; /* Allows it to take up space */
    display: flex;
    justify-content: center; /* Pushes the menu items to the center */
}

.nav-list {
    display: flex;
    gap: 30px; /* Space between menu items */
}

.nav-list a {
    color: var(--text-color);
    font-weight: 400;
    padding: 5px 0;
    position: relative;
    /* Underline animation effect */
    transition: color 0.3s ease;
}

.nav-list a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

/* Hide the toggle button by default (Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* ---------------------------------- */
/* 3. MAIN CONTENT STYLES             */
/* ---------------------------------- */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.content-section {
    padding: 80px 0;
    border-bottom: 1px solid #eee;
}

.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 600;
}

/* Hero Section (Landing Page) */
.hero-section {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

/* CTA Button Styling */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Tools Section Grid */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.tool-item {
    background-color: var(--background-color);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    border: 1px solid #ddd;
}

/* Projects Section */
.project-card {
    background-color: var(--background-color);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Contact Form */
#contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
    gap: 15px;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: var(--dark-color);
    color: #bbb;
    font-size: 0.9rem;
}


/* Make sure the hero section is positioned relatively to contain absolute children */
.hero-section {
    position: relative; /* CRITICAL: Ensures birds/butterfly stay within the hero section */
}

/* ---------------------------------- */
/* 4. MEDIA QUERIES (Responsiveness)  */
/* ---------------------------------- */
@media (max-width: 850px) {
    /* Breakpoint for tablets/smaller devices */
    
    .main-header {
        padding: 10px 20px;
    }
    
    /* Make the logo slightly smaller */
    .logo a {
        font-size: 1.3rem;
    }

    /* Show the hamburger menu */
    .menu-toggle {
        display: block;
    }

    /* Hide desktop nav and turn it into a column layout */
    .main-nav {
        /* Initially hidden and positioned for mobile */
        display: none;
        position: absolute;
        top: 60px; /* Below the header */
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        z-index: 99;
    }

    /* Class added by JavaScript to show the menu */
    .main-nav.open {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 10px 0;
    }

    .nav-list li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .nav-list a {
        display: block;
        padding: 15px 0;
    }
    
    .nav-list a::after {
        display: none; /* Remove desktop underline effect on mobile */
    }

    /* Content adjustments */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .content-section {
        padding: 60px 0;
    }
}








/* tools image to pdf */
/* ---------------------------------- */
/* 5. IMAGE TO PDF TOOL STYLES (New)  */
/* ---------------------------------- */

/* Container for the main tool area */
.converter-section {
    padding: 80px 20px;
    max-width: 900px; /* Wider for preview elements */
    margin: 0 auto;
    text-align: center;
}

.converter-section h2 {
    /* Inherit main heading styles */
    margin-bottom: 20px;
}

.stage-heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 40px 0 15px 0;
    color: var(--dark-color);
    text-align: center;
}

/* ------------------ */
/* Stage 1: Upload Box */
/* ------------------ */
.tool-upload-box {
    width: 100%;
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.tool-upload-box.active-drag {
    border-color: var(--primary-color);
    background-color: #f0f8ff; /* Light blue background when dragging over */
}

.upload-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.drag-drop-text {
    margin-top: 15px;
    color: #666;
    font-size: 1rem;
}

.page-count-display {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: var(--text-color);
}

.info-icon {
    font-size: 0.9em;
    cursor: help;
    color: var(--primary-color);
    margin-left: 5px;
}

.process-btn {
    width: 300px; /* Fixed width for prominence */
    font-size: 1.2rem;
    padding: 15px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.process-btn.disabled,
.convert-btn.disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
    transform: none;
}

/* ------------------ */
/* Stage 2: Preview & Results */
/* ------------------ */

.preview-carousel-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.carousel-nav {
    background: var(--background-color);
    border: 1px solid #ddd;
    color: var(--text-color);
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.carousel-nav:hover:not(:disabled) {
    background-color: #eee;
}

.carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preview-carousel {
    flex-grow: 1;
    display: flex;
    overflow-x: auto; /* Enables horizontal scrolling */
    white-space: nowrap; /* Prevents wrapping */
    padding: 10px 0;
    gap: 10px;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.preview-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.preview-thumbnail {
    display: inline-block;
    width: 120px; /* Fixed size for thumbnails */
    height: 120px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0; /* Prevents shrinking */
}

.preview-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Important: Fits the whole image inside without cropping */
    background-color: #fff;
}

/* Result Section Styling */
.pdf-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100px;
    background-color: #e6f7ff; /* Light blue hint */
    border: 2px solid #a0c4e1;
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

.convert-btn {
    margin: 30px auto;
    width: 250px;
}

/* Spinner for processing */
.loader {
    border: 3px solid #f3f3f3; 
    border-top: 3px solid var(--white-color); 
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Download buttons */
.download-btn,
.download-zip-btn {
    width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
h4 {
	text-align: Center;
}