/*
Theme Name: Convertor
Description: A modern WordPress theme for file conversion services with full customizer support
Version: 1.0
Author: Your Name
Text Domain: convertor
*/

/* Minimalist CSS Custom Properties */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #059669;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --link-color: #2563eb;
    --border-color: #e5e7eb;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --container-width: 1200px;
    --base-font-size: 16px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global horizontal scroll prevention and mobile optimization */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

/* Allow vertical overflow for dropdowns on desktop */
@media (min-width: 769px) {
    html, body {
        overflow-y: auto;
    }
    
    .site {
        overflow: visible;
    }
    
    .site-header {
        overflow-y: visible;
    }
}

/* Ensure all content respects viewport boundaries */
* {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Exception for desktop dropdown menus */
@media (min-width: 769px) {
    .desktop-nav .dropdown-menu {
        max-width: min(280px, calc(100vw - 2rem)) !important;
    }
    
    .desktop-nav .dropdown-menu * {
        max-width: none !important;
    }
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, span, div, a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
}

/* Ensure images and media are responsive */
img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Prevent tables from overflowing */
table {
    width: 100% !important;
    table-layout: fixed !important;
    word-wrap: break-word !important;
}

td, th {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 0 !important;
}

/* Prevent pre and code blocks from overflowing */
pre, code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

/* Ensure form elements are responsive */
input, textarea, select, button {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Prevent long URLs from overflowing */
a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-all !important;
}

/* WordPress Admin Bar Positioning Fix */
#wpadminbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure admin bar is at the very top */
html {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}



/* Ensure no extra spacing above admin bar */
body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix any potential margin/padding issues */
#wpadminbar * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Enhanced mobile viewport constraints - consolidated with base styles above */

/* Specific container constraints */
.container, .wrapper, .site, .site-content, .main-content {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Ensure grid and flex containers don't overflow */
.grid, .flex, [class*="grid"], [class*="flex"] {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Prevent specific layout elements from overflowing */
.tools-layout, .converter-layout, .benefits-grid, .stats-grid {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip Link */
.skip-link {
    left: -9999em;
    top: 2.5em;
}

.skip-link:focus {
    left: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #f8f9fa;
    font-size: var(--base-font-size);
    margin: 0 !important;
    padding: 0 !important;
}

/* Site Structure */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Site Header */
.site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    padding: 0.25rem 0;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100vw;
    box-sizing: border-box;
    margin: 0 !important;
}

/* Prevent any scrolling within header */
.site-header * {
    overflow: visible !important;
}

.site-header .container,
.site-header .header-content,
.site-header .main-navigation,
.site-header .desktop-nav,
.site-header .nav-menu {
    overflow: visible !important;
    white-space: nowrap;
}

/* Ensure header and navigation don't cause horizontal scroll */
@media (min-width: 769px) {
    .site-header {
        overflow: visible !important;
    }
    
    .site-header .container {
        overflow: visible !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 1200px;
    }
    
    .main-navigation {
        overflow: visible !important;
    }
    
    .desktop-nav {
        overflow: visible !important;
    }
    
    .desktop-nav .nav-menu {
        overflow: visible !important;
    }
    
    /* Prevent menu items from wrapping or causing overflow */
    .desktop-nav .nav-item {
        overflow: visible !important;
    }
    
    .desktop-nav .nav-link {
        overflow: visible !important;
    }
}

/* Add top margin to main content to account for fixed header */
.main-content {
    margin-top: 80px !important;
    position: relative;
    z-index: 1;
}

/* Adjust main content margin when admin bar is present */
body.admin-bar .main-content {
    margin-top: 126px !important; /* 46px admin bar + 80px header */
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Desktop admin bar adjustment */
@media screen and (min-width: 783px) {
    body.admin-bar .site-header {
        top: 32px !important;
    }
    
    body.admin-bar .main-content {
        margin-top: 112px !important; /* 32px admin bar + 80px header */
    }
}

/* Mobile admin bar adjustment */
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px !important;
    }
    
    body.admin-bar .main-content {
        margin-top: 126px !important; /* 46px admin bar + 80px header */
    }
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
    box-sizing: border-box;
    overflow: visible;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

/* Desktop header container adjustments */
@media (min-width: 769px) {
    .site-header .container {
        flex-wrap: nowrap;
        overflow: visible;
        max-width: 1200px;
        justify-content: space-between;
    }
    
    .header-content {
        overflow: visible;
        flex-wrap: nowrap;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .site-branding {
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .main-navigation {
        flex: 0 0 auto;
        overflow: visible;
    }
}

/* Site Branding */
.site-branding {
    flex: 1;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.site-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: #667eea;
}

.site-description {
    margin: 0;
    font-size: 0.9rem;
    color: #718096;
    font-style: italic;
}

/* Footer */
.site-footer {
    background: var(--text-color);
    color: #e5e7eb;
    padding: 0.75rem 0;
    margin-top: auto;
}

/* Site footer container uses base container styles with specific width override */
.site-footer .container {
    width: 90%;
    text-align: center;
}

.footer-navigation {
    margin-bottom: 1rem;
}

/* Footer menu styles consolidated below in Footer Navigation Menu Styles section */

.site-info {
    border-top: 1px solid #4a5568;
    padding-top: 0.5rem;
    font-size: 0.9rem;
}

.footer-copyright {
    margin-bottom: 0.5rem;
}

.theme-credit {
    opacity: 0.8;
}

.theme-credit a {
    color: #cbd5e0;
}

.container {
    width: 100%;
    margin: 0 auto;
    max-width: 100vw;
    box-sizing: border-box;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    overflow-x: hidden;
}

/* Main Content */
.main-content {
    padding: 0.5rem 0;
}



/* Converter Interface */
.converter-container {
    background: var(--bg-color);
    border-radius: 4px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.converter-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* File Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    background: var(--bg-light);
    margin-bottom: 0.375rem;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.upload-icon {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 0.375rem;
}

.upload-text {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.375rem;
}

.upload-subtext {
    color: var(--text-light);
    font-size: 0.85rem;
}

#file-input {
    display: none;
}

/* Format Selection */
.format-selection {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.375rem;
}

.format-group {
    text-align: center;
}

.format-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-color);
}

.format-select {
    width: 100%;
    padding: 0.375rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    background: var(--bg-color);
}

.format-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.arrow-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Convert Button */
.convert-btn {
    width: 100%;
    padding: 0.375rem 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.375rem;
}

.convert-btn:hover {
    background: var(--secondary-color);
}

.convert-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

/* Progress Bar */
.progress-container {
    display: none;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 0.375rem;
    color: var(--text-color);
}

/* Result Area */
.result-area {
    display: none;
    text-align: center;
    padding: 0.5rem;
    background: #f0fdf4;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.result-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.result-text {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.download-btn {
    padding: 0.375rem 0.75rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.download-btn:hover {
    background: #047857;
    text-decoration: none;
    color: white;
}

/* Error Area */
.error-area {
    display: none;
    text-align: center;
    padding: 0.5rem;
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.error-icon {
    font-size: 2rem;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.error-text {
    font-size: 1rem;
    color: #dc2626;
}

/* Supported Formats */
.supported-formats {
    background: var(--bg-light);
    border-radius: 4px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

.formats-title {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.format-card {
    background: var(--bg-color);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.format-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.375rem;
}

.format-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-color);
}

.format-card-desc {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    /* Container adjustments */
    .converter-container {
        padding: 0.375rem;
        margin: 0.25rem;
        width: calc(100% - 0.5rem);
        max-width: calc(100vw - 0.5rem);
        box-sizing: border-box;
    }
    
    /* Container responsive adjustments */
    .container {
        width: 98%;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* Layout adjustments */
    .format-selection {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .arrow-icon {
        transform: rotate(90deg);
    }
    
    /* Typography adjustments */
    .site-title {
        font-size: 1.25rem;
        line-height: 1.2;
    }
    
    .converter-title {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    /* Grid layouts */
    .formats-grid, .benefits-grid, .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Mode toggle */
    .mode-toggle {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .mode-btn {
        max-width: none;
        width: 100%;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Form elements */
    .format-select, .convert-btn, input, textarea, select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Upload area */
    .upload-area {
        padding: 0.5rem 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .upload-text {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    /* Navigation adjustments */
    .nav-menu {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* Nav link responsive adjustments - consolidated with specific media query styles */
    
    /* Button adjustments */
    .cta-button, .download-btn, .action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    /* Container extra small mobile adjustments */
    .container {
        width: 98%;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .converter-container {
        padding: 0.125rem;
        margin: 0.125rem;
        width: calc(100% - 0.25rem);
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    .converter-title {
        font-size: 1.25rem;
    }
    
    .upload-text {
        font-size: 0.8rem;
    }
    
    /* Nav link extra small mobile adjustments - consolidated with specific media query styles */
    
    /* Reduce spacing on very small screens */
    .upload-area {
        padding: 0.25rem 0.125rem;
    }
    
    .format-selection {
        gap: 0.125rem;
    }
    
    .mode-toggle {
        gap: 0.125rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* File Info Display */
.file-info {
    display: none;
    background: #e6fffa;
    border: 2px solid #4fd1c7;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.file-name {
    font-weight: 600;
    color: #234e52;
    margin-bottom: 0.5rem;
}

.file-size {
    color: #2c7a7b;
    font-size: 0.9rem;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    padding: 0.25rem;
    gap: 0.5rem;
}

.mode-btn {
    flex: 1;
    max-width: 200px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #4a5568;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mode-btn:hover:not(.active) {
    background: #e2e8f0;
}

/* Bulk Upload Area */
.bulk-upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f7fafc;
    margin-bottom: 1rem;
}

.bulk-upload-area:hover,
.bulk-upload-area.dragover {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateY(-2px);
}

#bulk-file-input {
    display: none;
}

/* Bulk File List */
/* Bulk File List Styles */
.bulk-file-list {
    margin-top: 2rem;
}

/* Image Compressor Styles */
.compression-mode {
    margin-bottom: 1rem;
}

.compression-settings {
    background: #fff;
    border-radius: 15px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.compression-settings h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.3rem;
}

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

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Quality Slider */
.quality-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quality-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.quality-value {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 50px;
    text-align: center;
}

/* Quality Presets */
.quality-presets {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.preset-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

/* Resize Options */
.resize-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.resize-controls {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.dimension-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dimension-inputs input[type="number"] {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.dimension-inputs span {
    font-weight: bold;
    color: #666;
}

.preset-sizes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.size-preset {
    padding: 0.4rem 0.8rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.size-preset:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Compression Stats */
.compression-stats {
    margin: 1rem 0;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.stat-value.savings {
    color: var(--accent-color);
    font-size: 1.3rem;
}

/* Compression Info Section */
.compression-info {
    margin-top: 4rem;
}

.info-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2rem;
}

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

.info-card {
    background: #fff;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

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

.info-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.info-card-desc {
    color: #666;
    line-height: 1.6;
}

/* Bulk Download Items */
.bulk-download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.bulk-download-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.bulk-download-item.error-item {
    background: #fed7d7;
    border-color: #fc8181;
}

.download-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.download-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.download-item-name {
    font-weight: 600;
    color: #333;
}

.download-item-stats {
    font-size: 0.9rem;
    color: #666;
}

.download-item-stats .savings {
    color: var(--accent-color);
    font-weight: 600;
}

.download-item-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsive Design for Compressor */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .quality-presets {
        flex-direction: column;
    }
    
    .dimension-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dimension-inputs input[type="number"] {
        width: 100%;
    }
    
    .preset-sizes {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .bulk-download-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .download-item-info {
        justify-content: center;
    }
}

.bulk-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.bulk-file-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-item-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.file-item-details {
    flex: 1;
}

.file-item-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.file-item-size {
    color: #718096;
    font-size: 0.9rem;
}

.file-item-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 1rem;
}

.status-pending {
    background: #fed7d7;
    color: #c53030;
}

.status-converting {
    background: #fef5e7;
    color: #dd6b20;
}

.status-completed {
    background: #c6f6d5;
    color: #2f855a;
}

.status-error {
    background: #fed7d7;
    color: #e53e3e;
}

.remove-file-btn {
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.remove-file-btn:hover {
    background: #fc8181;
    color: white;
}

/* Bulk Progress */
.bulk-progress-container {
    background: #f7fafc;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.bulk-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.bulk-progress-header h3 {
    color: #2d3748;
    margin: 0;
}

.overall-progress {
    font-weight: 600;
    color: #667eea;
}

.bulk-progress-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.progress-item-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 1rem;
}

.progress-item-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Bulk Results */
.bulk-result-area {
    text-align: center;
    padding: 1rem;
    background: #f0fff4;
    border: 2px solid #68d391;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.bulk-downloads {
    margin: 1.5rem 0;
}

/* Bulk download item styles consolidated above - removed duplicate */

.download-all-btn {
    padding: 0.5rem 2rem;
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(56, 161, 105, 0.3);
}

/* Responsive Design for Bulk Mode */
@media (max-width: 768px) {
    .bulk-file-item,
    .bulk-progress-item,
    .bulk-download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .file-item-info,
    .progress-item-info,
    .download-item-info {
        width: 100%;
    }
    
    .progress-item-bar {
        margin: 0.5rem 0;
    }
    
    .bulk-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Compression Info Text - Smart Compression Badge */
.compression-info-text {
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.compression-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.compression-info-text p {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Chatrooms.fun Style Header */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Ensure proper layout for mobile */
@media (max-width: 768px) {
    .header-content {
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .site-branding {
        flex: 1;
        order: 1;
    }
    
    .main-navigation {
        flex: 0 0 auto;
        order: 2;
        position: relative;
    }
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: var(--primary-color);
}

.site-description {
    display: none;
}

/* Chatrooms.fun Style Navigation */
.main-navigation {
    position: relative;
}

/* Desktop navigation overflow fixes */
@media (min-width: 769px) {
    .main-navigation {
        overflow: visible;
        position: static;
        flex-shrink: 0;
    }
    
    .desktop-nav {
        overflow: visible;
    }
    
    .desktop-nav .nav-menu {
        flex-wrap: nowrap;
        overflow: visible;
        white-space: nowrap;
    }
    
    .desktop-nav .nav-item {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .desktop-nav .nav-link {
        white-space: nowrap;
        padding: 0.75rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    overflow: visible;
    flex-shrink: 0;
}

/* Hide desktop nav on mobile */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
}

.desktop-nav .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: center;
    overflow: visible;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.desktop-nav .nav-item {
    position: relative;
    flex-shrink: 0;
    white-space: nowrap;
}

.desktop-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
    white-space: nowrap;
    overflow: visible;
    gap: 0.5rem;
}

.desktop-nav .nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* Desktop Dropdown Arrow */
.desktop-nav .dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
}

.desktop-nav .has-dropdown.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* Navigation Icons */
.nav-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.submenu-icon {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Desktop Dropdown */
.desktop-nav .has-dropdown {
    position: relative;
    overflow: visible;
}

.desktop-nav .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0;
    min-width: 200px;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 10000 !important;
    list-style: none;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
    box-sizing: border-box;
    display: none;
}

/* Ensure dropdown appears above everything - only when dropdown-open class is added */
.desktop-nav .has-dropdown.dropdown-open .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 10000 !important;
}

/* Right-align dropdown for items near the right edge */
.desktop-nav .nav-item:nth-last-child(-n+2) .dropdown-menu {
    left: auto;
    right: 0;
}

/* Prevent dropdown from extending beyond viewport */
@media (min-width: 769px) {
    .desktop-nav .dropdown-menu {
        max-width: min(280px, calc(100vw - 2rem));
    }
    
    /* Ensure dropdowns don't cause horizontal scroll */
    .desktop-nav .has-dropdown {
        position: relative;
        overflow: visible;
    }
    
    /* Force dropdown positioning within viewport */
    .desktop-nav .nav-item:last-child .dropdown-menu,
    .desktop-nav .nav-item:nth-last-child(2) .dropdown-menu {
        left: auto;
        right: 0;
        transform-origin: top right;
    }
}



.desktop-nav .dropdown-menu li {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.desktop-nav .dropdown-menu li:last-child {
    border-bottom: none;
}

.desktop-nav .dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.desktop-nav .dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: relative;
    z-index: 10001;
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-menu-dropdown {
        display: none !important;
    }
}

/* Show mobile menu toggle on mobile devices */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
        margin-left: auto;
    }
}

/* Chatrooms.fun Style Mobile Menu Button */
.menu-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s ease;
    position: relative;
    z-index: 10002;
    margin-left: auto;
    display: block;
}

.menu-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.menu-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Ensure menu button is always on the right */
@media (max-width: 768px) {
    .menu-btn {
        margin-left: auto;
        float: right;
    }
}

/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-top: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    display: none;
    opacity: 0;
    visibility: hidden;
}

/* Show mobile menu dropdown only on mobile */
@media (max-width: 768px) {
    .mobile-menu-dropdown {
        display: block;
    }
}

/* Hide mobile menu dropdown on desktop */
@media (min-width: 769px) {
    .mobile-menu-dropdown {
        display: none !important;
    }
}

.mobile-menu-dropdown.active {
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    display: block !important;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-dropdown.active::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-dropdown.active::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-menu-dropdown.active::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.mobile-menu-dropdown.active::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item.has-submenu {
    position: relative;
    overflow: visible;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    gap: 0.5rem;
}

.mobile-nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    text-decoration: none !important;
}

/* Mobile Navigation Link Layout */
.mobile-nav-item.has-submenu .mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.mobile-nav-item.has-submenu .nav-text {
    flex: 1;
}

.mobile-nav-item:not(.has-submenu) .mobile-nav-link {
    justify-content: flex-start;
}

/* Mobile Dropdown Arrow */
.mobile-dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.mobile-nav-item.submenu-open .mobile-dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

/* Mobile Submenu */
.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--bg-light);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    display: none;
    opacity: 0;
    visibility: hidden;
}

.mobile-nav-item.submenu-open .mobile-submenu {
    max-height: 300px !important;
    overflow: visible;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none !important;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 3;
}

.mobile-submenu-link:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    padding-left: 2rem;
    text-decoration: none !important;
}

.mobile-submenu li {
    position: relative;
    z-index: 3;
    width: 100%;
    box-sizing: border-box;
}

.mobile-submenu li:last-child .mobile-submenu-link {
    border-bottom: none;
}





/* Mobile Navigation Styles - Chatrooms.fun Style */
@media (max-width: 768px) {
    /* Hide Desktop Navigation */
    .desktop-nav {
        display: none !important;
    }
    
    /* Adjust Header for Mobile */
    .header-content {
        padding: 0 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    /* Position Mobile Menu */
    .main-navigation {
        position: relative;
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    /* Mobile Menu Button Positioning */
    .mobile-menu-toggle {
        display: block !important;
        position: relative;
        z-index: 10001;
    }
    
    .menu-btn {
        margin-left: auto;
        display: block;
    }
    
    /* Mobile Menu Dropdown Positioning */
    .mobile-menu-dropdown {
        display: block;
        position: fixed !important;
        top: 80px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-top: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 10000 !important;
        box-sizing: border-box;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    /* Show mobile menu when active */
    .mobile-menu-dropdown.active {
        transform: translateX(0);
    }
    
    /* Adjust for admin bar */
    body.admin-bar .mobile-menu-dropdown {
        top: 126px !important;
    }
    
    /* Prevent body scroll when mobile menu is open */
        body.mobile-menu-open,
        body.menu-open {
            overflow: hidden;
        }
    
    /* Ensure submenu items are properly contained */
    .mobile-nav-item.submenu-open {
        overflow: visible;
    }
    
    .mobile-submenu {
        position: relative;
        z-index: 1;
    }
}

/* Small Mobile Navigation Styles */
@media (max-width: 480px) {
    .header-content {
        padding: 0 0.5rem;
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    .menu-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .mobile-nav-link {
        padding: 0.85rem;
        font-size: 0.9rem;
        text-decoration: none !important;
    }
    
    .mobile-submenu-link {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
        text-decoration: none !important;
    }
}

/* Tablet Navigation Styles */
@media (max-width: 1080px) and (min-width: 769px) {
    .header-content {
        gap: 1rem;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .brand-container {
        gap: 0.75rem;
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 120px);
    }
    
    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
        border-radius: 8px;
        flex-shrink: 0;
    }
    
    .brand-text {
        min-width: 0;
        overflow: hidden;
    }
    
    .brand-text .site-title {
        font-size: 1.3rem;
        line-height: 1.2;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .brand-text .site-description {
        font-size: 0.75rem;
        line-height: 1.1;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .menu-toggle {
        display: flex;
        flex-shrink: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .menu-wrapper {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 0.125rem;
        width: 100%;
        z-index: 9995 !important;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        overflow-x: hidden;
        text-align: left;
        min-height: auto;
        height: auto;
        box-sizing: border-box;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* Adjust menu position when admin bar is present */
    body.admin-bar .menu-wrapper {
        top: 126px;
        max-height: calc(100vh - 126px);
    }
    
    .menu-wrapper.toggled {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0.25rem;
        align-items: stretch;
        text-align: left;
        overflow: hidden;
        position: relative;
        display: flex;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .nav-item {
        width: 100%;
        text-align: left;
        position: relative;
        overflow: hidden;
        clear: both;
        display: block;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .nav-link {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0.5rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0;
        text-align: left;
        display: flex;
        background: var(--bg-color);
        font-size: 0.85rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .nav-link .nav-content {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        flex: 1;
        text-align: left;
    }
    

    
    .nav-link:hover {
        background: var(--bg-light);
        color: var(--primary-color);
    }
    
    /* Tablet Dropdown Styles */
    .has-dropdown {
        position: relative;
        overflow: visible;
        display: block;
        width: 100%;
    }
    
    .has-dropdown .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .has-dropdown .nav-link .nav-content {
        display: flex;
        align-items: center;
        flex: 1;
        text-align: left;
    }
    
    .has-dropdown .nav-link .nav-icon {
        margin-right: 0.75rem;
        flex-shrink: 0;
    }
    
    .has-dropdown .nav-link .nav-text {
        flex: 1;
        text-align: left;
    }
    
    .dropdown-arrow {
        display: block;
        font-size: 0.8rem;
        transition: transform 0.3s ease;
    }
    
    .has-dropdown.dropdown-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .has-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-light);
        border-radius: 0;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        display: block;
        z-index: auto !important;
        width: 100%;
        clear: both;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .has-dropdown.dropdown-open .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 500px !important;
        padding: 0 !important;
    }
    
    .dropdown-item {
        width: 100%;
        text-align: left;
        position: relative;
        overflow: visible;
        margin-bottom: 0;
    }
    
    .dropdown-item:last-child {
        margin-bottom: 0;
    }
    
    .dropdown-item:last-child .dropdown-link {
        margin-bottom: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.375rem;
        min-height: 44px;
    }
    
    .dropdown-link {
        width: 100%;
        padding: 0.375rem 0.375rem 0.375rem 0.75rem;
        font-size: 0.8rem;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        text-align: left;
        justify-content: flex-start;
        display: block;
        background: var(--bg-color);
        margin: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        word-wrap: break-word;
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        position: relative;
        z-index: 10;
        cursor: pointer;
    }
    
    .dropdown-link .nav-content {
        display: flex;
        align-items: center;
        width: 100%;
        height: 100%;
        min-height: 44px;
        padding: 0.375rem 0;
    }
    
    .dropdown-link .nav-icon {
        margin-right: 0.375rem;
        flex-shrink: 0;
        font-size: 0.85rem;
    }
    
    .dropdown-link .nav-text {
        flex: 1;
        text-align: left;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Dropdown link hover states - see mobile section for consolidated styles */
    .dropdown-link:hover {
        background: var(--bg-light);
        color: var(--primary-color);
        transform: translateX(2px);
        transition: all 0.2s ease;
    }
    
    .dropdown-link:active {
        background: var(--primary-color);
        color: white;
        transform: translateX(0);
    }
    
    .dropdown-link:last-child {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.375rem;
        min-height: 44px;
    }
    
    /* Ensure last dropdown items have full clickable area - Tablet */
    .dropdown-item:last-child .dropdown-link,
    .dropdown-link:last-child {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
        position: relative !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
        padding: 0.375rem 0.375rem 0.375rem 0.75rem !important;
        margin: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        background: var(--bg-color) !important;
        text-decoration: none !important;
        color: var(--text-color) !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        touch-action: manipulation !important;
        z-index: 10 !important;
    }
    
    .dropdown-item:last-child .dropdown-link .nav-content,
    .dropdown-link:last-child .nav-content {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 44px !important;
        padding: 0.375rem 0 !important;
        box-sizing: border-box !important;
        pointer-events: none !important;
    }
    
    /* Ensure last dropdown items have proper hover states - Tablet */
    .dropdown-item:last-child .dropdown-link:hover,
    .dropdown-link:last-child:hover {
        background: var(--bg-light) !important;
        color: var(--primary-color) !important;
        transform: translateX(2px) !important;
        transition: all 0.2s ease !important;
    }
    
    .dropdown-item:last-child .dropdown-link:active,
    .dropdown-link:last-child:active {
        background: var(--primary-color) !important;
        color: white !important;
        transform: translateX(0) !important;
    }
    
    .nav-cta {
        margin-left: 0;
        margin-top: 0.25rem;
        padding-top: 0.25rem;
        border-top: 1px solid var(--border-color);
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 0.375rem 0.5rem;
        border-radius: 4px;
        text-align: center;
        font-size: 0.8rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .cta-button .cta-text {
        flex: 1;
        text-align: center;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .cta-button .cta-arrow {
        margin-left: 0.5rem;
        flex-shrink: 0;
    }
}

/* Legacy Mobile Navigation Styles (Backup) */
@media (max-width: 480px) {
    .header-content {
        gap: 0.5rem;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .brand-container {
        gap: 0.5rem;
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 80px);
    }
    
    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
        border-radius: 6px;
        flex-shrink: 0;
    }
    
    .brand-text {
        min-width: 0;
        overflow: hidden;
    }
    
    .brand-text .site-title {
        font-size: 1.1rem;
        line-height: 1.2;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .brand-text .site-description {
        font-size: 0.7rem;
        line-height: 1.1;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .menu-toggle {
        display: flex;
        flex-shrink: 0;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .menu-wrapper {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 0.25rem;
        width: 100%;
        z-index: 9995 !important;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        overflow-x: hidden;
        text-align: left;
        min-height: auto;
        height: auto;
        box-sizing: border-box;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* Adjust menu position when admin bar is present */
    body.admin-bar .menu-wrapper {
        top: 126px;
        max-height: calc(100vh - 126px);
    }
    
    .menu-wrapper.toggled {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.125rem;
        margin-bottom: 0.5rem;
        align-items: stretch;
        text-align: left;
        overflow: hidden;
        position: relative;
        display: flex;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .nav-item {
        width: 100%;
        text-align: left;
        position: relative;
        overflow: hidden;
        clear: both;
        display: block;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .nav-link {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem;
        border-radius: 4px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0;
        text-align: left;
        display: flex;
        background: var(--bg-color);
        font-size: 0.85rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .nav-link .nav-content {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        flex: 1;
        text-align: left;
    }
    

    
    .nav-link:hover {
        background: var(--bg-light);
        color: var(--primary-color);
    }
    
    /* Mobile Dropdown Styles - Same as Desktop */
    .has-dropdown {
        position: relative;
        overflow: visible;
        display: block;
        width: 100%;
    }
    
    .has-dropdown .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .has-dropdown .nav-link .nav-content {
        display: flex;
        align-items: center;
        flex: 1;
        text-align: left;
    }
    
    .has-dropdown .nav-link .nav-icon {
        margin-right: 0.75rem;
        flex-shrink: 0;
    }
    
    .has-dropdown .nav-link .nav-text {
        flex: 1;
        text-align: left;
    }
    
    .dropdown-arrow {
        display: block;
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }
    
    .has-dropdown.dropdown-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .has-dropdown .dropdown-menu {
        position: static !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-light);
        border-radius: 0;
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        display: block;
        z-index: auto !important;
        width: 100%;
        clear: both;
        transition: max-height 0.3s ease;
    }
    
    .has-dropdown.dropdown-open .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 500px !important;
        padding: 0 !important;
    }
    
    .dropdown-item {
        width: 100%;
        text-align: left;
        position: relative;
        overflow: visible;
        margin-bottom: 0;
    }
    
    .dropdown-item:last-child {
        margin-bottom: 0;
    }
    
    .dropdown-item:last-child .dropdown-link {
        margin-bottom: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.25rem;
        min-height: 44px;
    }
    
    .dropdown-link {
        width: 100%;
        padding: 0.25rem 0.375rem 0.25rem 0.5rem;
        font-size: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        text-align: left;
        justify-content: flex-start;
        display: block;
        background: var(--bg-color);
        margin: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        word-wrap: break-word;
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        position: relative;
        z-index: 10;
        cursor: pointer;
    }
    
    .dropdown-link .nav-content {
        display: flex;
        align-items: center;
        width: 100%;
        height: 100%;
        min-height: 44px;
        padding: 0.25rem 0;
    }
    
    .dropdown-link .nav-icon {
        margin-right: 0.25rem;
        flex-shrink: 0;
        font-size: 0.75rem;
    }
    
    .dropdown-link .nav-text {
        flex: 1;
        text-align: left;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Dropdown link hover and active states */
    .dropdown-link:hover {
        background: var(--bg-light);
        color: var(--primary-color);
        transform: translateX(2px);
        transition: all 0.2s ease;
    }
    
    .dropdown-link:active {
        background: var(--primary-color);
        color: white;
        transform: translateX(0);
    }
    
    .dropdown-link:last-child {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.25rem;
        min-height: 44px;
    }
    
    /* Ensure last dropdown items have full clickable area */
    .dropdown-item:last-child .dropdown-link,
    .dropdown-link:last-child {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
        position: relative !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
        padding: 0.25rem 0.375rem 0.25rem 0.5rem !important;
        margin: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        background: var(--bg-color) !important;
        text-decoration: none !important;
        color: var(--text-color) !important;
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        touch-action: manipulation !important;
        z-index: 10 !important;
    }
    
    .dropdown-item:last-child .dropdown-link .nav-content,
    .dropdown-link:last-child .nav-content {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 44px !important;
        padding: 0.25rem 0 !important;
        box-sizing: border-box !important;
        pointer-events: none !important;
    }
    
    /* Ensure last dropdown items have proper hover states */
    .dropdown-item:last-child .dropdown-link:hover,
    .dropdown-link:last-child:hover {
        background: var(--bg-light) !important;
        color: var(--primary-color) !important;
        transform: translateX(2px) !important;
        transition: all 0.2s ease !important;
    }
    
    .dropdown-item:last-child .dropdown-link:active,
    .dropdown-link:last-child:active {
        background: var(--primary-color) !important;
        color: white !important;
        transform: translateX(0) !important;
    }
    
    /* Force proper layout flow */
    .has-dropdown.dropdown-open .dropdown-menu {
        position: static !important;
        display: block !important;
        width: 100% !important;
        clear: both !important;
        float: none !important;
    }
    
    /* Ensure subsequent menu items appear below dropdown */
    .has-dropdown.dropdown-open + .nav-item,
    .has-dropdown.dropdown-open ~ .nav-item {
        clear: both;
        display: block;
        width: 100%;
        position: relative;
    }
    
    .nav-cta {
        margin-left: 0;
        margin-top: 0.125rem;
        padding-top: 0.125rem;
        border-top: 1px solid var(--border-color);
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 0.25rem 0.375rem;
        border-radius: 4px;
        text-align: center;
        font-size: 0.75rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .cta-button .cta-text {
        flex: 1;
        text-align: center;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .cta-button .cta-arrow {
        margin-left: 0.25rem;
        flex-shrink: 0;
    }
}



/* Footer Navigation Menu Styles */
.footer-navigation {
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.footer-menu li {
    position: relative;
    margin: 0;
}

.footer-menu a {
    color: #e5e7eb;
    padding: 0.25rem 0;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-menu a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Footer menu separators for horizontal style */
.footer-menu li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-weight: 300;
}

/* Vertical footer menu style */
.footer-menu.vertical {
    flex-direction: column;
    gap: 0.5rem;
}

.footer-menu.vertical li:not(:last-child)::after {
    display: none;
}

/* Footer menu alignment variations */
.footer-navigation.align-left {
    text-align: left;
}

.footer-navigation.align-left .footer-menu {
    justify-content: flex-start;
}

.footer-navigation.align-right {
    text-align: right;
}

.footer-navigation.align-right .footer-menu {
    justify-content: flex-end;
}

/* Mobile responsive footer menu */
@media (max-width: 768px) {
    .footer-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-menu li:not(:last-child)::after {
        display: none;
    }
    
    .footer-navigation {
        margin-bottom: 1rem;
    }
}

/* Footer content wrapper for two-column layout */
.footer-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    flex: 1;
    text-align: left;
}

.footer-right {
    flex-shrink: 0;
}

/* Footer links styling */
.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
    position: relative;
}

.footer-links a:hover {
    color: #667eea;
    text-decoration: none;
    transform: translateY(-1px);
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #667eea;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-separator {
    color: #718096;
    font-weight: 300;
    user-select: none;
}

/* Mobile responsive footer layout */
@media (max-width: 768px) {
    .footer-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-left {
        text-align: center;
        order: 2;
    }
    
    .footer-right {
        order: 1;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Footer site-info styling update */
.site-info {
    border-top: 1px solid #4a5568;
    padding-top: 1rem !important;
}