/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #dc2626;
    --secondary-color: #ef4444;
    --accent-color: #b91c1c;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --ad-color: #f1f5f9;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #ef4444;
    --secondary-color: #f87171;
    --accent-color: #dc2626;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --ad-color: #1e293b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  min-height: 120px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    min-height: 40px;
}

.logo img {
    height: 24px;
    width: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.logo h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--background-color);
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0.5rem;
    flex: 1;
    max-width: 400px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.search-bar:focus-within {
    border-color: #888;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 0.25rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    border-radius: 10px;
}

.search-bar input:focus {
    outline: none !important;
    box-shadow: none !important;
    border-radius: 10px !important;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #3b82f6;
    transition: color 0.2s ease;
}

.search-bar button:hover {
    color: #1d4ed8;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.top-nav a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

/* Ad Banner */
.ad-banner {
    background-color: var(--ad-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1rem 2rem;
    padding: 1rem;
    text-align: center;
}

/* Ad Sidebar */
.ad-sidebar {
    width: 250px;
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid var(--border-color);
}

.ad-box {
    text-align: center;
}

.ad-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.ad-sidebar .ad-space {
    background-color: var(--background-color);
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-space {
    background-color: var(--surface-color);
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1;
    gap: 2rem;
    padding: 0 2rem 2rem !important;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    align-items: stretch;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100vh;
    border: 1px solid var(--border-color);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar:hover {
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0;
    background-color: var(--surface-color);
    z-index: 10;
    padding-bottom: 0.5rem;
}

.sidebar-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.2s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

.tool-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: color 0.2s ease;
}

.category h4:hover {
    color: var(--primary-color);
}

.category ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.category a:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
    transform: translateX(4px);
}

/* Main Content Area */
.content {
    flex: 1;
    max-width: 100%;
}

.content h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

.content h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    font-family: 'Poppins', sans-serif;
}

.content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content ul {
    color: var(--text-secondary);
    margin: 1rem 0;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.content a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.featured-tools {
    margin-bottom: 3rem;
}

.featured-tools h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--primary-color);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tool-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.about-preview {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.about-preview h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature {
    text-align: center;
    padding: 1rem;
}

.feature h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
}

.footer {
    clear: both;
    width: 100vw;
    left: 0;
    position: relative;
    z-index: 100;
    box-sizing: border-box;
    background: #f7f7f7;
    padding: 24px 0 12px 0;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    font-size: 0.98em;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links .category h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links .category a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-links .category a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    width: 100%;
    text-align: center;
    font-size: 13px;
    padding: 15px 10px;
    background-color: #f1f1f1;
    color: #666;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #e53935;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #d32f2f;
    text-decoration: underline;
}

.footer-contact {
    color: #666;
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-icon {
    font-size: 16px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        order: -1;
    }

    .sidebar-toggle {
        display: block;
    }

    .tool-categories {
        display: none;
    }

    .tool-categories.active {
        display: flex;
    }
}

/* Old mobile styles removed - using new mobile header system */

@media (max-width: 480px) {
    .hero {
        padding: 1rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* Tool Page Styles */
.tool-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.tool-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-header .tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tool-container {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tool-container.main-tool-bordered {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tool-input {
    margin-bottom: 2rem;
}

.tool-input label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
}

.tool-input input,
.tool-input select,
.tool-input textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
}

.tool-input input:focus,
.tool-input select:focus,
.tool-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.tool-input textarea {
    resize: vertical;
    min-height: 120px;
}

.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--background-color);
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(220, 38, 38, 0.05);
}

.file-upload input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.upload-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tool-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.tool-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-container {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.result-container h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.download-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    margin-top: 1rem;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.related-tools {
    margin-bottom: 3rem;
}

.related-tools h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.related-tool {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    text-align: center;
}

.related-tool:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

.related-tool .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.related-tool h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.related-tool p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Content sections spacing */
.how-to-use-jpg-to-pdf,
.faq-jpg-to-pdf,
.why-choose-pdf-station,
.similar-tools {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.how-to-use-jpg-to-pdf h2,
.faq-jpg-to-pdf h2,
.why-choose-pdf-station h2,
.similar-tools h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.similar-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.similar-tool {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.2s ease;
    font-weight: 500;
}

.similar-tool:hover {
    border-color: var(--primary-color);
    background-color: rgba(220, 38, 38, 0.05);
    color: var(--primary-color);
}

/* Loading and Messages */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .sidebar,
    .top-bar,
    .footer,
    .ad-banner {
        display: none !important;
    }

    .main-content {
        padding: 0;
    }

    .content {
        max-width: none;
    }
} 

/* Footer grid for tool links */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 1.5rem;
}
.footer-grid > div {
  min-width: 170px;
}
.footer-grid h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.7rem;
  margin-top: 0;
  letter-spacing: 0.5px;
}
.footer-grid a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}
.footer-grid a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  width: 100%;
  line-height: 1;
}
.footer-logo-row img {
  height: 80px;
  width: auto;
  flex-shrink: 0;
  vertical-align: middle;
}
.footer-logo-row .footer-brand {
  font-family: 'Inter', sans-serif;
  font-size: 60px;
  font-weight: 700;
  color: #e53935;
  line-height: 1.2;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 0.7rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.2rem;
  margin-bottom: 0.5rem;
}
.footer-nav a {
  color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover {
  color: #b91c1c;
  text-decoration: underline;
}
@media (max-width: 900px) {
  .footer-grid {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .footer-grid > div {
    min-width: 0;
  }
  .footer-logo-row {
    flex-direction: column;
    gap: 0.5rem;
  }
}
/* Logo+name in header - Fixed font consistency and sizing */
.logo {
  display: flex;
  align-items: center;
  gap: 15px !important;
  text-decoration: none;
  line-height: 1;
}

.logo img {
  height: 80px !important;
  width: auto !important;
  display: block;
  flex-shrink: 0;
  vertical-align: middle;
  max-width: none;
}

.logo .brand-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 40px !important;
  font-weight: 700 !important;
  color: #e53935 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}

/* Footer logo styling to match header */
.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  width: 100%;
  line-height: 1;
}

.footer-logo-row img {
  height: 80px !important;
  width: auto !important;
  flex-shrink: 0;
  vertical-align: middle;
  max-width: none;
}

.footer-logo-row .footer-brand {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 60px !important;
  font-weight: 700 !important;
  color: #e53935 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}

/* Ensure header height accommodates logo */
.top-bar {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  min-height: 100px;
}

.tool-button {
  background-color: #e53935;
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 14px;
  margin-top: 1rem;
}

.tool-button:hover {
  background-color: #d32f2f;
  color: #ffffff !important;
}

.tool-button:disabled {
  background-color: #ccc;
  color: #666 !important;
  cursor: not-allowed;
} 

/* Responsive footer improvements */
@media (max-width: 768px) {
  .footer {
    padding: 20px 15px;
  }
  
  .footer-grid {
    flex-direction: column;
    gap: 15px;
  }
  
  .footer-grid > div {
    flex: 1 1 auto;
    margin: 5px 0;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    padding: 12px 8px;
  }
  
  .footer-nav {
    gap: 15px;
    flex-wrap: wrap;
  }
  
  .footer-nav a {
    font-size: 13px;
  }
  
  .footer-copyright,
  .footer-contact {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .footer-logo-row {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .footer-logo-row img {
    height: 28px;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 20px;
  }
  
  .footer-grid h4 {
    font-size: 14px;
  }
  
  .footer-grid a {
    font-size: 13px;
  }
} 

/* Responsive improvements for logo and brand - 2.5x larger version */
@media (max-width: 768px) {
  .logo {
    gap: 8px !important;
  }
  
  .logo img {
    height: 20px;
  }
  
  .logo .brand-name {
    font-size: 32px;
  }
  
  .footer-logo-row {
    gap: 12px;
  }
  
  .footer-logo-row img {
    height: 60px;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 45px;
  }
  
  .top-bar {
    padding: 0.75rem 1rem;
    min-height: 70px;
  }
}

@media (max-width: 480px) {
  .logo {
    gap: 6px !important;
  }
  
  .logo img {
    height: 18px;
  }
  
  .logo .brand-name {
    font-size: 28px;
  }
  
  .footer-logo-row {
    gap: 10px;
  }
  
  .footer-logo-row img {
    height: 50px;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 38px;
  }
  
  .top-bar {
    padding: 0.5rem 0.75rem;
    min-height: 80px;
  }
} 

/* Responsive adjustments for logo and brand name */
@media (max-width: 768px) {
  .logo img {
    height: 60px !important;
  }
  
  .logo .brand-name {
    font-size: 45px !important;
  }
  
  .footer-logo-row img {
    height: 60px !important;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 45px !important;
  }
  
  .top-bar {
    min-height: 100px;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 50px !important;
  }
  
  .logo .brand-name {
    font-size: 36px !important;
  }
  
  .footer-logo-row img {
    height: 50px !important;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 36px !important;
  }
  
  .top-bar {
    min-height: 90px;
    padding: 0.5rem 1rem;
  }
}

/* Force font loading and prevent FOUT (Flash of Unstyled Text) */
.logo .brand-name,
.footer-logo-row .footer-brand {
  font-display: swap;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
} 

/* Sidebar category styling */
.category h4.clickable-category {
    cursor: pointer;
    padding: 0.75rem 1rem;
    margin: 0;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    user-select: none;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.category h4.clickable-category:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
    transform: translateX(4px);
}

.category h4.clickable-category:active {
    transform: translateX(2px);
}

.category-header.all-tools {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.category-header.all-tools h4.clickable-category {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.category-header.all-tools h4.clickable-category:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Active category state */
.category h4.clickable-category.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
} 

/* --- Layout Fixes: Prevent Overlap with Fixed Header, Footer, Sidebar --- */
@media (min-width: 1025px) {
  .main-content {
    display: flex;
    flex: 1;
    gap: 2rem;
    padding: 0 2rem 2rem !important;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch; /* Ensure children fill height */
  }
  .sidebar {
    position: sticky;
    top: 120px; /* Height of header */
    z-index: 10;
    /* Fill all vertical space between header and footer */
    height: calc(100vh - 120px - 220px);
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow-y: auto;
  }
  .content {
    flex: 1;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
}
@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
    padding: 0 0 2rem 0 !important;
  }
  .sidebar {
    width: 100vw;
    max-width: 100vw;
    position: fixed;
    left: 0;
    top: 120px;
    z-index: 1000;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .tool-categories.active {
    display: flex;
  }
}
@media (max-width: 700px) {
  .main-content {
    padding: 0 !important;
  }
  .sidebar {
    padding: 1rem 0.5rem;
  }
}
/* Ensure footer is always visible and content never overlaps */
.footer {
  width: 100vw;
  z-index: 100;
  background: #f7f7f7;
  padding: 24px 0 12px 0;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  font-size: 0.98em;
}

/* Update footer year to 2025 PDF Station if present */
.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    color: #e53935;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #d32f2f;
    text-decoration: underline;
}

.footer-contact {
    color: #666;
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-icon {
    font-size: 16px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        order: -1;
    }

    .sidebar-toggle {
        display: block;
    }

    .tool-categories {
        display: none;
    }

    .tool-categories.active {
        display: flex;
    }
}

/* Old mobile styles removed - using new mobile header system */

@media (max-width: 480px) {
    .hero {
        padding: 1rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* Tool Page Styles */
.tool-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.tool-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-header .tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tool-container {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tool-container.main-tool-bordered {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tool-input {
    margin-bottom: 2rem;
}

.tool-input label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
}

.tool-input input,
.tool-input select,
.tool-input textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
}

.tool-input input:focus,
.tool-input select:focus,
.tool-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.tool-input textarea {
    resize: vertical;
    min-height: 120px;
}

.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--background-color);
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(220, 38, 38, 0.05);
}

.file-upload input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.upload-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tool-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.tool-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-container {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.result-container h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.download-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    margin-top: 1rem;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.related-tools {
    margin-bottom: 3rem;
}

.related-tools h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-primary);
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.related-tool {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    text-align: center;
}

.related-tool:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

.related-tool .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.related-tool h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.related-tool p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Content sections spacing */
.how-to-use-jpg-to-pdf,
.faq-jpg-to-pdf,
.why-choose-pdf-station,
.similar-tools {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.how-to-use-jpg-to-pdf h2,
.faq-jpg-to-pdf h2,
.why-choose-pdf-station h2,
.similar-tools h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.similar-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.similar-tool {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.2s ease;
    font-weight: 500;
}

.similar-tool:hover {
    border-color: var(--primary-color);
    background-color: rgba(220, 38, 38, 0.05);
    color: var(--primary-color);
}

/* Loading and Messages */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .sidebar,
    .top-bar,
    .footer,
    .ad-banner {
        display: none !important;
    }

    .main-content {
        padding: 0;
    }

    .content {
        max-width: none;
    }
} 

/* Footer grid for tool links */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 1.5rem;
}
.footer-grid > div {
  min-width: 170px;
}
.footer-grid h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.7rem;
  margin-top: 0;
  letter-spacing: 0.5px;
}
.footer-grid a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}
.footer-grid a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  width: 100%;
  line-height: 1;
}
.footer-logo-row img {
  height: 80px;
  width: auto;
  flex-shrink: 0;
  vertical-align: middle;
}
.footer-logo-row .footer-brand {
  font-family: 'Inter', sans-serif;
  font-size: 60px;
  font-weight: 700;
  color: #e53935;
  line-height: 1.2;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 0.7rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.2rem;
  margin-bottom: 0.5rem;
}
.footer-nav a {
  color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover {
  color: #b91c1c;
  text-decoration: underline;
}
@media (max-width: 900px) {
  .footer-grid {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .footer-grid > div {
    min-width: 0;
  }
  .footer-logo-row {
    flex-direction: column;
    gap: 0.5rem;
  }
}
/* Logo+name in header - Fixed font consistency and sizing */
.logo {
  display: flex;
  align-items: center;
  gap: 15px !important;
  text-decoration: none;
  line-height: 1;
}

.logo img {
  height: 80px !important;
  width: auto !important;
  display: block;
  flex-shrink: 0;
  vertical-align: middle;
  max-width: none;
}

.logo .brand-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 40px !important;
  font-weight: 700 !important;
  color: #e53935 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}

/* Footer logo styling to match header */
.footer-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  width: 100%;
  line-height: 1;
}

.footer-logo-row img {
  height: 80px !important;
  width: auto !important;
  flex-shrink: 0;
  vertical-align: middle;
  max-width: none;
}

.footer-logo-row .footer-brand {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 60px !important;
  font-weight: 700 !important;
  color: #e53935 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}

/* Ensure header height accommodates logo */
.top-bar {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  min-height: 100px;
}

.tool-button {
  background-color: #e53935;
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 14px;
  margin-top: 1rem;
}

.tool-button:hover {
  background-color: #d32f2f;
  color: #ffffff !important;
}

.tool-button:disabled {
  background-color: #ccc;
  color: #666 !important;
  cursor: not-allowed;
} 

/* Responsive footer improvements */
@media (max-width: 768px) {
  .footer {
    padding: 20px 15px;
  }
  
  .footer-grid {
    flex-direction: column;
    gap: 15px;
  }
  
  .footer-grid > div {
    flex: 1 1 auto;
    margin: 5px 0;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    padding: 12px 8px;
  }
  
  .footer-nav {
    gap: 15px;
    flex-wrap: wrap;
  }
  
  .footer-nav a {
    font-size: 13px;
  }
  
  .footer-copyright,
  .footer-contact {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .footer-logo-row {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .footer-logo-row img {
    height: 28px;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 20px;
  }
  
  .footer-grid h4 {
    font-size: 14px;
  }
  
  .footer-grid a {
    font-size: 13px;
  }
} 

/* Responsive improvements for logo and brand - 2.5x larger version */
@media (max-width: 768px) {
  .logo {
    gap: 8px !important;
  }
  
  .logo img {
    height: 20px;
  }
  
  .logo .brand-name {
    font-size: 32px;
  }
  
  .footer-logo-row {
    gap: 12px;
  }
  
  .footer-logo-row img {
    height: 60px;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 45px;
  }
  
  .top-bar {
    padding: 0.75rem 1rem;
    min-height: 70px;
  }
}

@media (max-width: 480px) {
  .logo {
    gap: 6px !important;
  }
  
  .logo img {
    height: 18px;
  }
  
  .logo .brand-name {
    font-size: 28px;
  }
  
  .footer-logo-row {
    gap: 10px;
  }
  
  .footer-logo-row img {
    height: 50px;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 38px;
  }
  
  .top-bar {
    padding: 0.5rem 0.75rem;
    min-height: 80px;
  }
} 

/* Responsive adjustments for logo and brand name */
@media (max-width: 768px) {
  .logo img {
    height: 60px !important;
  }
  
  .logo .brand-name {
    font-size: 45px !important;
  }
  
  .footer-logo-row img {
    height: 60px !important;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 45px !important;
  }
  
  .top-bar {
    min-height: 100px;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 50px !important;
  }
  
  .logo .brand-name {
    font-size: 36px !important;
  }
  
  .footer-logo-row img {
    height: 50px !important;
  }
  
  .footer-logo-row .footer-brand {
    font-size: 36px !important;
  }
  
  .top-bar {
    min-height: 90px;
    padding: 0.5rem 1rem;
  }
}

/* Force font loading and prevent FOUT (Flash of Unstyled Text) */
.logo .brand-name,
.footer-logo-row .footer-brand {
  font-display: swap;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
} 

/* Sidebar category styling */
.category h4.clickable-category {
    cursor: pointer;
    padding: 0.75rem 1rem;
    margin: 0;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    user-select: none;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.category h4.clickable-category:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
    transform: translateX(4px);
}

.category h4.clickable-category:active {
    transform: translateX(2px);
}

.category-header.all-tools {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.category-header.all-tools h4.clickable-category {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.category-header.all-tools h4.clickable-category:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Active category state */
.category h4.clickable-category.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
} 

/* --- Layout Fixes: Prevent Overlap with Fixed Header, Footer, Sidebar --- */
@media (min-width: 1025px) {
  .main-content {
    display: flex;
    flex: 1;
    gap: 2rem;
    padding: 0 2rem 2rem !important;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch; /* Ensure children fill height */
  }
  .sidebar {
    position: sticky;
    top: 120px; /* Height of header */
    z-index: 10;
    /* Fill all vertical space between header and footer */
    height: calc(100vh - 120px - 220px);
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow-y: auto;
  }
  .content {
    flex: 1;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }
}
@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
    padding: 0 0 2rem 0 !important;
  }
  .sidebar {
    width: 100vw;
    max-width: 100vw;
    position: fixed;
    left: 0;
    top: 120px;
    z-index: 1000;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .tool-categories.active {
    display: flex;
  }
}
@media (max-width: 700px) {
  .main-content {
    padding: 0 !important;
  }
  .sidebar {
    padding: 1rem 0.5rem;
  }
}
/* Ensure footer is always visible and content never overlaps */
.footer {
  width: 100vw;
  z-index: 100;
  background: #f7f7f7;
  padding: 24px 0 12px 0;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  font-size: 0.98em;
}

/* Remove any global outline for .tool-container, .tool-main, .content > .tool-section */
/* .tool-container, .tool-main, .content > .tool-section {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
} */

/* Add a thin red outline only to the main tool card */
.main-tool-bordered {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
} 

.main-content, .content, .tool-main, .text-case-converter-section {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
} 

.tool-main.content, .text-case-converter-section {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
} 

.related-tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.related-tool {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
    padding: 1.25rem 1.5rem;
    min-width: 220px;
    max-width: 260px;
    text-align: left;
    text-decoration: none;
    color: #1e293b;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}
.related-tool:hover {
    border-color: #e53935;
    box-shadow: 0 4px 16px 0 rgba(229,57,53,0.10);
    transform: translateY(-4px) scale(1.03);
    color: #e53935;
}
.related-tool h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.related-tool p {
    font-size: 0.98rem;
    color: #64748b;
    margin: 0;
}
.related-tool-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
} 

.layout-row {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 320px;
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100vh;
    border: 1px solid var(--border-color);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.main-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
} 

.search-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    margin-top: 4px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 2000;
    padding: 1rem;
    font-family: 'Inter', sans-serif;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.dropdown-category {
    margin-bottom: 1.5rem;
}

.dropdown-category:last-child {
    margin-bottom: 0;
}

.dropdown-category-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-tool-link {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.15s ease;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.dropdown-tool-link:hover {
    background: var(--border-color);
}

.dropdown-tool-link:last-child {
    margin-bottom: 0;
}

.dropdown-tool-link .tool-icon {
    font-size: 1.2rem;
    min-width: 1.2rem;
    text-align: center;
}

.dropdown-tool-link a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-tool-link .tool-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    flex: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-no-result {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1rem;
    font-style: italic;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .search-dropdown {
        max-height: 300px;
        padding: 0.75rem;
    }
    
    .dropdown-tool-link {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .dropdown-tool-link .tool-description {
        display: none; /* Hide descriptions on mobile for cleaner look */
    }

    .tool-page {
        padding: 1rem 0.5rem;
    }
    
    .tool-header {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
    
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .related-tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .how-to-use-jpg-to-pdf,
    .faq-jpg-to-pdf,
    .why-choose-pdf-station,
    .similar-tools {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
    
    .how-to-use-jpg-to-pdf h2,
    .faq-jpg-to-pdf h2,
    .why-choose-pdf-station h2,
    .similar-tools h2 {
        font-size: 1.5rem;
    }
    
    .faq-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .tool-page {
        padding: 0.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.75rem;
    }
    
    .tool-container {
        padding: 1rem;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .similar-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 

/* Mobile Header Layout */
.mobile-header {
    display: none;
}

.mobile-header .top-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.mobile-header .logo {
    flex: 0 0 auto;
    order: 1;
}

.mobile-header .search-bar {
    flex: 1;
    max-width: none;
    margin: 0;
    order: 3;
    width: 100%;
    margin-top: 0.75rem;
}

.mobile-header .hamburger-menu {
    flex: 0 0 auto;
    position: relative;
    order: 2;
}

.hamburger-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.hamburger-button:hover {
    background-color: var(--border-color);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.hamburger-menu-dropdown.show {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
}

.hamburger-menu-dropdown.open {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
}

.hamburger-menu-dropdown a,
.hamburger-menu-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    background: none;
    border: none;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.hamburger-menu-dropdown a:hover,
.hamburger-menu-dropdown button:hover {
    background-color: var(--border-color);
    color: var(--primary-color);
}

.hamburger-menu-dropdown .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    border: none;
    background: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

/* Desktop Header (hide on mobile) */
.desktop-header {
    display: block;
}

/* Mobile Header (hide on desktop) */
.mobile-header {
    display: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .desktop-header {
        display: none !important;
    }
    
    .mobile-header {
        display: block !important;
    }
    
    .mobile-header .top-bar {
        padding: 0.75rem;
        gap: 0.75rem;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
    }
    
    .mobile-header .search-bar {
        max-width: none;
        order: 3 !important;
        width: 100% !important;
        margin-top: 0.75rem !important;
    }
    
    .mobile-header .logo {
        flex-shrink: 0;
        order: 1 !important;
    }
    
    .mobile-header .logo .brand-name {
        font-size: 1.1rem;
    }
    
    .mobile-header .logo img {
        width: 32px;
        height: 32px;
    }
    
    .mobile-header .hamburger-menu {
        order: 2 !important;
    }

    .search-dropdown {
        max-height: 300px;
        padding: 0.75rem;
    }
    
    .dropdown-tool-link {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .dropdown-tool-link .tool-description {
        display: none; /* Hide descriptions on mobile for cleaner look */
    }

    .tool-page {
        padding: 1rem 0.5rem;
    }
    
    .tool-header {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
    
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .related-tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .how-to-use-jpg-to-pdf,
    .faq-jpg-to-pdf,
    .why-choose-pdf-station,
    .similar-tools {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
    
    .how-to-use-jpg-to-pdf h2,
    .faq-jpg-to-pdf h2,
    .why-choose-pdf-station h2,
    .similar-tools h2 {
        font-size: 1.5rem;
    }
    
    .faq-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .mobile-header .top-bar {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .mobile-header .logo .brand-name {
        font-size: 1rem;
    }
    
    .mobile-header .logo img {
        width: 28px;
        height: 28px;
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
    }

    .tool-page {
        padding: 0.5rem;
    }
    
    .tool-header h1 {
        font-size: 1.75rem;
    }
    
    .tool-container {
        padding: 1rem;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .similar-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 

/* --- HEADER VISIBILITY FIX: Only one header visible at a time --- */
.desktop-header { display: block !important; }
.mobile-header { display: none !important; }

@media (max-width: 768px) {
  .desktop-header { display: none !important; }
  .mobile-header { display: block !important; }
} 

.search-bar input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-radius: 10px !important;
} 

.dropdown-tool-link:focus, .dropdown-tool-link:active, .tools-grid a:focus, .tools-grid a:active, .tool-card:focus, .tool-card:active, .related-tool:focus, .related-tool:active {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(229,57,53,0.12) !important;
    border-radius: 12px !important;
    background: rgba(220,38,38,0.04) !important;
    transition: box-shadow 0.2s, background 0.2s;
} 

.about-page, .about-page * { text-align: center !important; }
.about-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.about-card { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.07); border-radius: 14px; padding: 1.5rem 1.2rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.about-card ul { text-align: center; margin: 0 auto; display: inline-block; }
.about-card a { text-align: center; } 

.terms-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.terms-card { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.07); border-radius: 14px; padding: 1.5rem 1.2rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.terms-card h2, .terms-card p, .terms-card a { text-align: center; } 

.dropdown-tool-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7em 1.1em;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  background: none;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}
.dropdown-tool-card:hover, .dropdown-tool-card:focus {
  background: #f3f4f6;
  color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-color, #e53935)33;
}
.dropdown-tool-card:active {
  background: #f1f1f1;
  outline: none;
  box-shadow: none;
}
.dropdown-tool-link {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
} 

