/**
 * PDFlux Main Stylesheet
 * Complete styling for the entire website
 */

/* ==========================================
   HEADER STYLES
   ========================================== */

/* --- Header Layout (Desktop) --- */
.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    position: relative; /* Essential for mobile menu positioning */
}

.site-branding { flex-shrink: 0; }
.header-search { margin-left: auto; margin-right: 20px; }
.mobile-menu-toggle { display: none; } /* Hidden on desktop */

/* Navigation Menu (Desktop) */
.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

/* --- Mobile Styles (Max Width 768px) --- */
@media (max-width: 768px) {
    /* 1. Show Hamburger, Hide Search (optional to hide search if too crowded) */
    .mobile-menu-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 1001;
    }
    
    .hamburger-line {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
        transition: 0.3s;
        border-radius: 2px;
    }

    /* 2. Hide Menu by default */
    .main-navigation {
        order: 99; /* Move to end */
    }

    .nav-menu {
        display: none; /* Hidden */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Push below header */
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 1000;
        border-top: 1px solid #eee;
    }

    /* 3. The "Open" State (Added by JS) */
    .nav-menu.mobile-open {
        display: flex;
    }

    .nav-menu li {
        text-align: center;
        margin-bottom: 15px;
        width: 100%;
    }

    .nav-menu li a {
        display: block;
        padding: 10px;
        font-size: 18px;
    }

    /* Adjust Search bar on mobile */
    .header-search {
        display: none; /* Hide search on mobile for cleaner look, or remove this line to keep it */
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-section {
    position: relative;
    background: var(--gradient);
    color: white;
    padding: 5rem 0;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-description {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
    animation: fadeInUp 1s ease;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1.2s ease;
}

.trust-badges {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    animation: fadeInUp 1.4s ease;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
}

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

/* ==========================================
   TOOLS SECTION
   ========================================== */

.tools-section {
    padding: 4rem 0;
}

.section-title {
    font-size: var(--font-size-4xl);
    text-align: center;
    margin-bottom: 3rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-secondary);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--surface);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid var(--border);
    position: relative;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.default-icon {
    font-size: 48px;
}

.tool-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tool-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.popular-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

/* No Tools Message */
.no-tools-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

/* ==========================================
   FEATURES SECTION
   ========================================== */

.features-section {
    padding: 4rem 0;
    background: var(--surface);
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */

.about-section {
    padding: 4rem 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: var(--font-size-3xl);
    margin-bottom: 1.5rem;
}

.about-content h3 {
    font-size: var(--font-size-2xl);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-content p {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-content ol {
    padding-left: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-branding .footer-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-branding .logo-text {
    color: white;
}

.footer-branding .logo-accent {
    color: var(--secondary);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    margin: 0;
}

.footer-middle {
    margin-bottom: 2rem;
}

.footer-menu {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-base);
}

.footer-menu a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
}

.footer-copyright a {
    color: white;
    text-decoration: none;
}

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

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* ==========================================
   TOOL PAGE
   ========================================== */

.tool-page-wrapper {
    padding: 2rem 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: var(--text-secondary);
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

.tool-page-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.tool-page-title {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
}

.tool-page-excerpt {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.tool-page-actions {
    margin-bottom: 2rem;
}

.tool-page-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.tool-page-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.tool-page-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.tool-page-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.tool-page-content ul,
.tool-page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.tool-page-content li {
    margin-bottom: 0.5rem;
}

.related-tools {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.related-tools h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* ==========================================
   ERROR 404 PAGE
   ========================================== */

.error-404-wrapper {
    padding: 4rem 0;
    text-align: center;
}

.error-404-title {
    font-size: 8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
}

.error-404-content h2 {
    font-size: var(--font-size-3xl);
    margin-bottom: 1rem;
}

.error-404-content p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.error-404-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.error-404-search {
    max-width: 500px;
    margin: 0 auto;
}

.error-404-search h3 {
    margin-bottom: 1rem;
}

/* ==========================================
   SKIP LINK
   ========================================== */

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-to-content:focus {
    top: 0;
}

/* ==========================================
   LAST Update
   ========================================== */


/* --- Tool Page Layout --- */
.tool-page-container {
    padding-bottom: 60px;
    background-color: #F8F9FA;
    min-height: 80vh;
}

.tool-workspace-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.tool-workspace-wrapper h1 {
    font-size: 2.5rem;
    color: #1A1A1A;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* --- The Main Interface Card --- */
.tool-interface-card {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Soft shadow */
    padding: 40px;
    margin-top: 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
}

/* --- Drop Zone (Upload Area) --- */
.drop-zone {
    width: 100%;
    max-width: 600px;
    border: 2px dashed #0066FF; /* Electric Blue */
    background-color: rgba(0, 102, 255, 0.02);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover {
    background-color: rgba(0, 102, 255, 0.05);
    transform: translateY(-2px);
}

.drop-zone .icon-large {
    font-size: 48px;
    margin-bottom: 20px;
}

.drop-zone h3 {
    margin-bottom: 20px;
    color: #4B5563;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 102, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 12px rgba(0, 102, 255, 0.3);
    transform: translateY(-1px);
}

.btn-success {
    background: #10B981;
    color: white;
}

.btn-text {
    background: transparent;
    color: #6B7280;
    text-decoration: underline;
}

/* --- Processing/File List --- */
.file-list {
    width: 100%;
    margin-bottom: 20px;
}

.file-item {
    background: #F3F4F6;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- SEO Content Area (Below the tool) --- */
.tool-seo-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
    border: 1px solid #E5E7EB;
    line-height: 1.8;
    color: #374151;
}

.tool-seo-content h2 {
    color: #111827;
    margin-top: 30px;
}