/* ===== OPTIMIZED CSS RESET & BASE STYLES ===== */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;font-size:16px}
body{font-family:'Cairo',sans-serif;line-height:1.6;color:#1e293b;background-color:#f8fafc;direction:rtl;text-align:right}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Spacing (8px grid system) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 2.5rem;   /* 40px */
    --space-6: 3rem;     /* 48px */
    --space-8: 4rem;     /* 64px */
    --space-10: 5rem;    /* 80px */
    --space-12: 6rem;    /* 96px */
    --space-16: 8rem;    /* 128px */
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    
    /* Container */
    --container-max-width: 1200px;
    --container-padding: var(--space-4);
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--space-2);
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn--primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn--secondary:hover:not(:disabled) {
    background-color: var(--gray-300);
}

.btn--success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn--success:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--danger {
    background-color: var(--error-color);
    color: var(--white);
}

.btn--danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn--sm {
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-sm);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
}

.nav__icon {
    font-size: var(--font-size-2xl);
}

.nav__menu {
    display: flex;
    list-style: none;
    gap: var(--space-6);
}

.nav__link {
    font-weight: 500;
    color: var(--text-color);
    transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary-color);
    position: relative;
}

.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

/* External link styling in navigation */
.nav__link--external {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white) !important;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav__link--external::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav__link--external:hover::before {
    left: 100%;
}

.nav__link--external:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: var(--white) !important;
}

.nav__link--external::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.8;
}

.nav__toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--text-color);
    cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
.main {
    margin-top: 80px; /* Account for fixed header */
}

/* ===== SECTION STYLES ===== */
section {
    padding: var(--space-12) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.section-title {
    font-size: var(--font-size-3xl);
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.section-description {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    text-align: center;
    padding: var(--space-16) 0;
}

.hero__content {
    margin-bottom: var(--space-10);
}

.hero__title {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--space-3);
    line-height: 1.1;
}

.hero__subtitle {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-top: var(--space-2);
}

.hero__description {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

/* Enhanced styling for inline links in hero section */
.hero__description .inline-link {
    color: #fbbf24;
    font-weight: 700;
    text-decoration: none;
    outline: none;
}

.hero__description .inline-link:hover {
    color: #f59e0b;
}

.hero__description .inline-link:focus {
    outline: none;
}

/* Apply same styling to inline links in features section */
.features .section-description .inline-link {
    color: #fbbf24;
    font-weight: 700;
    text-decoration: none;
    outline: none;
}

.features .section-description .inline-link:hover {
    color: #f59e0b;
}

.features .section-description .inline-link:focus {
    outline: none;
}

/* ===== ENHANCED CONVERTER STYLES ===== */
.converter {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 2rem;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.converter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 24px 24px 0 0;
}

/* ===== MODERN UPLOAD AREA ===== */
.upload-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    margin-bottom: 2rem;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover .upload-area__background {
    opacity: 1;
}

/* Upload Area Interactive States */
.upload-area:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(59, 130, 246, 0.1);
}

.upload-area.dragover {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    transform: scale(1.02);
    box-shadow:
        0 25px 50px -12px rgba(16, 185, 129, 0.25),
        0 0 0 1px rgba(16, 185, 129, 0.2);
}

.upload-area.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
    animation: shake 0.6s ease-in-out;
}

.upload-area.validating {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(217, 119, 6, 0.05) 100%);
    pointer-events: none;
}

.upload-area:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Upload Area Content Layout */
.upload-area__content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.upload-area__icon-container {
    margin-bottom: 1.5rem;
}

.upload-area__icon-wrapper {
    position: relative;
    display: inline-block;
}

.upload-area__icon {
    font-size: 4rem;
    color: #3b82f6;
    display: block;
    transition: all 0.3s ease;
}

.upload-area__icon-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover .upload-area__icon {
    transform: scale(1.1);
    color: #2563eb;
}

.upload-area:hover .upload-area__icon-pulse {
    opacity: 1;
}

.upload-area.validating .upload-area__icon {
    animation: pulse 1.5s ease-in-out infinite;
}

.upload-area__text-content {
    margin-bottom: 1.5rem;
}

.upload-area__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.upload-area__subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* Enhanced Upload Button */
.upload-area__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.upload-area__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.upload-area__btn:active {
    transform: translateY(0);
}

.upload-area__btn-icon {
    font-size: 1.1rem;
}

.upload-area__btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.upload-area__btn:active .upload-area__btn-ripple {
    width: 200px;
    height: 200px;
}

/* Enhanced Format Badges with Professional UX */
.upload-area__formats {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Enhanced formats header with icon */
.upload-area__formats-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.upload-area__formats-icon {
    font-size: 1rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.upload-area__formats-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.upload-area__formats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Enhanced format badge with professional styling */
.format-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Format badge icon styling */
.format-badge__icon {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.format-badge__text {
    font-weight: 700;
    letter-spacing: 0.025em;
}

/* Enhanced color schemes with better contrast and accessibility */
.format-badge--jpeg {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #f59e0b20;
}

.format-badge--png {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-color: #3b82f620;
}

.format-badge--gif {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
    border-color: #ec489920;
}

.format-badge--bmp {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
    border-color: #8b5cf620;
}

.format-badge--webp {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #10b98120;
}

.format-badge--tiff {
    background: linear-gradient(135deg, #fed7d7 0%, #fecaca 100%);
    color: #c53030;
    border-color: #ef444420;
}

.format-badge--svg {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0277bd;
    border-color: #0ea5e920;
}

/* Professional hover effects */
.format-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: currentColor;
}

.format-badge:hover .format-badge__icon {
    transform: scale(1.2) rotate(5deg);
}

/* Focus states for accessibility */
.format-badge:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    transform: translateY(-1px);
}

/* Touch feedback state for mobile devices */
.format-badge--touched {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

/* Active state for better feedback */
.format-badge:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

/* Professional tooltip styling */
.format-badge__tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    direction: rtl;
    text-align: center;
}

/* Tooltip arrow */
.format-badge__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Show tooltip on hover and focus */
.format-badge:hover .format-badge__tooltip,
.format-badge:focus .format-badge__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* Pulse animation for formats icon */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.upload-area__constraints {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.constraint-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.constraint-item i {
    color: #3b82f6;
    font-size: 1rem;
}

/* Enhanced Upload Info Cards */
.upload-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.upload-info__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-info__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.upload-info__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.upload-info__card:hover::before {
    transform: scaleX(1);
}

.upload-info__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.upload-info__icon--security {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.upload-info__icon--speed {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.upload-info__icon--free {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.upload-info__content {
    flex: 1;
}

.upload-info__title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.upload-info__description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes fadeInScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== ENHANCED FILES LIST ===== */
.files-list {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: fadeInScale 0.4s ease-out;
}

/* Enhanced Header Design */
.files-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.files-list__header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
}

.files-list__title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.files-list__icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.files-list__title-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.files-list__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.files-list__subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.files-list__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Enhanced Button Styles */
.btn--enhanced {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: none;
    cursor: pointer;
    text-decoration: none;
    min-height: 44px;
}

.btn--enhanced:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn--enhanced:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn--enhanced:not(:disabled):active {
    transform: translateY(0);
}

.btn--primary.btn--enhanced {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn--primary.btn--enhanced:not(:disabled):hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn--danger.btn--enhanced {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn--danger.btn--enhanced:not(:disabled):hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn__icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.btn__text {
    font-weight: 600;
}

.btn__ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn--enhanced:active .btn__ripple {
    width: 200px;
    height: 200px;
}

/* Files Container */
.files-list__container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.files-list__items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Files Statistics */
.files-list__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    margin-top: 1rem;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.stats-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-item i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.stats-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.stats-value {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 700;
    margin-right: auto;
}

/* ===== ENHANCED FILE ITEM WITH PREVIEW ===== */
.file-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Image Preview Container */
.file-item__preview {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item__preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem;
}

.file-item__preview-placeholder i {
    font-size: 1.5rem;
    color: #9ca3af;
}

.file-item__preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    border-radius: 8px;
}



.file-item__dimensions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    text-align: center;
}

.file-item__preview-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 100%;
}

.file-item__preview-error .file-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1rem;
}

.file-item__preview-error-text {
    font-size: 0.625rem;
    color: #6b7280;
    text-align: center;
    line-height: 1.2;
}

.file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.file-item:hover::before {
    transform: scaleY(1);
}

.file-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.file-item__details {
    flex: 1;
    min-width: 0;
}

.file-item__details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item__details p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-item__size-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.file-item__type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.file-item__type-badge--jpeg { background: #fef3c7; color: #92400e; }
.file-item__type-badge--png { background: #dbeafe; color: #1e40af; }
.file-item__type-badge--gif { background: #fce7f3; color: #be185d; }
.file-item__type-badge--bmp { background: #f3e8ff; color: #7c3aed; }
.file-item__type-badge--webp { background: #d1fae5; color: #065f46; }
.file-item__type-badge--tiff { background: #fed7d7; color: #c53030; }
.file-item__type-badge--svg { background: #e0f2fe; color: #0277bd; }

.file-item__meta {
    margin-top: 0.5rem;
}

.file-item__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.file-item__meta-item i {
    font-size: 0.625rem;
}

.file-item__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0 1rem;
    min-width: 120px;
    justify-content: center;
}

.file-item__status--pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.file-item__status--converting {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
    animation: pulse 2s ease-in-out infinite;
}

.file-item__status--success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.file-item__status--error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #ef4444;
}

.file-item__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.file-item__action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.file-item__action-btn--download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}



.file-item__action-btn--delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.file-item__action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.file-item__action-btn:active {
    transform: scale(0.95);
}

/* ===== IMAGE PREVIEW MODAL ===== */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.image-preview-modal__content {
    background: white;
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease-out;
}

.image-preview-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.image-preview-modal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.image-preview-modal__close {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.image-preview-modal__close:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.image-preview-modal__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f8fafc;
    min-height: 300px;
}

.image-preview-modal__image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-preview-modal__footer {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.image-preview-modal__info {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.image-preview-modal__info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.image-preview-modal__info i {
    color: #3b82f6;
    font-size: 1rem;
}

/* ===== ENHANCED DOWNLOAD SECTION ===== */
.download-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 2px solid #10b981;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #059669, #047857);
}

.download-section__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    text-align: right;
}

.download-section__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.download-section__content {
    flex: 1;
}

.download-section__title {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #065f46;
    line-height: 1.2;
}

.download-section__subtitle {
    margin: 0;
    font-size: 1rem;
    color: #047857;
    font-weight: 500;
}

.download-section__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.download-btn {
    min-width: 200px;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--secondary.btn--enhanced {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(107, 114, 128, 0.3);
}

.btn--secondary.btn--enhanced:not(:disabled):hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

.download-section__info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.download-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    font-size: 0.875rem;
    color: #047857;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.download-info-item i {
    color: #10b981;
    font-size: 1rem;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: var(--space-1);
}

.progress-bar__fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
    border-radius: var(--radius-sm);
}

/* ===== FEATURES SECTION ===== */
.features {
    background-color: var(--white);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    text-align: center;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background-color: var(--gray-50);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: var(--white);
}

.feature-card__title {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.feature-card__description {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== OTHER TOOLS SECTION STYLES ===== */
/* Professional styling for the other tools section with enhanced UX */
.other-tools {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    /* Removed overflow: hidden to prevent content hiding on mobile */
}

.other-tools::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* Tools Category Styling */
.tools-category {
    margin-bottom: var(--space-10);
    position: relative;
    z-index: 1;
}

.tools-category__title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-2xl);
    color: var(--text-color);
    margin-bottom: var(--space-6);
    text-align: center;
    justify-content: center;
}

.tools-category__title i {
    color: var(--primary-color);
    font-size: var(--font-size-3xl);
}

/* Tools Grid Layout */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

/* Individual Tool Card Styling */
.tool-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 180px;
    box-shadow: var(--shadow-sm);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.tool-card:hover::before {
    left: 100%;
}

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

.tool-card__icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 2;
}

.tool-card__icon i {
    font-size: var(--font-size-2xl);
    color: var(--white);
}

.tool-card__title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--space-2);
    position: relative;
    z-index: 2;
}

.tool-card__description {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-bottom: var(--space-3);
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.tool-card__badge {
    background: linear-gradient(135deg, var(--accent-color), #f97316);
    color: var(--white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

/* Wikipedia Reference Section */
.wikipedia-reference {
    margin: var(--space-10) 0;
}

.reference-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.reference-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #000000, #666666);
}

.reference-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.reference-card__icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #000000, #333333);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reference-card__icon i {
    font-size: var(--font-size-3xl);
    color: var(--white);
}

.reference-card__content {
    flex-grow: 1;
}

.reference-card__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.reference-card__description {
    color: var(--text-light);
    margin-bottom: var(--space-3);
    line-height: 1.6;
}

.reference-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.reference-link:hover {
    color: var(--primary-dark);
}

.reference-card__features {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.feature-tag {
    background: var(--gray-100);
    color: var(--text-color);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.feature-tag i {
    color: var(--primary-color);
}



/* ===== RESPONSIVE DESIGN WITH COMPREHENSIVE DEVICE SUPPORT ===== */
/*
 * Comprehensive responsive design implementation with the following breakpoints:
 *
 * 1. Touch Device Optimizations: (hover: none) and (pointer: coarse)
 *    - Optimizes interactions for touch-based devices
 *    - Removes problematic hover states
 *    - Enhances active states for better feedback
 *
 * 2. Large Desktop: min-width: 1440px
 *    - Ultra-wide and 4K displays
 *    - Maximum content width and spacing
 *
 * 3. Standard Desktop: max-width: 1439px and min-width: 1024px
 *    - Regular desktop computers
 *    - Standard grid layouts
 *
 * 4. Tablet and Mobile Navigation: max-width: 1023px
 *    - iPad and iPhone get identical mobile navigation
 *    - Hamburger menu for all devices under 1024px
 *    - Touch-optimized interface elements
 *
 * 5. Tablet Specific: min-width: 768px and max-width: 1023px
 *    - iPad-optimized layouts and spacing
 *    - Enhanced touch targets (minimum 44px)
 *    - Optimized grid layouts for tablet screens
 *
 * 6. Mobile Specific: max-width: 767px
 *    - Phone-specific optimizations
 *    - Compact layouts and reduced spacing
 *    - Single-column layouts where appropriate
 *
 * 7. Small Mobile: max-width: 480px
 *    - Extra small phone screens
 *    - Further reduced spacing and font sizes
 *
 * 8. Extra Small: max-width: 360px
 *    - Very small phone screens
 *    - Minimal spacing and compact layouts
 */

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
/* Enhance touch interactions across all devices */
@media (hover: none) and (pointer: coarse) {
    /* Touch-specific optimizations for mobile and tablet devices */
    .btn:hover {
        /* Disable hover effects on touch devices to prevent sticky states */
        background-color: initial;
        transform: none;
        box-shadow: initial;
    }

    .nav__link:hover {
        /* Simplify navigation hover effects for touch */
        background-color: initial;
        transform: none;
    }

    .tool-card:hover {
        /* Reduce hover effects on touch devices */
        transform: none;
        box-shadow: initial;
    }

    /* Enhanced active states for better touch feedback */
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .nav__link:active {
        background-color: var(--gray-100);
        transition: background-color 0.1s ease;
    }

    .tool-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Large desktop screens */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .features__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-8);
    }

    .formats__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }

    .hero__title {
        font-size: var(--font-size-6xl);
    }
}

/* Standard desktop and large tablets */
@media (max-width: 1439px) and (min-width: 1024px) {
    .features__grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--space-6);
    }

    .formats__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-5);
    }
}

@media (max-width: 1023px) {
    :root {
        --container-padding: var(--space-3);
    }

    .hero__title {
        font-size: var(--font-size-4xl);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .features__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-4);
    }

    .formats__grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-4);
    }
}

/* ===== TABLET AND MOBILE NAVIGATION (iPad and iPhone) ===== */
/* Extended mobile navigation to include iPad for consistent UX */
@media (max-width: 1023px) {
    :root {
        --container-padding: var(--space-3);
    }

    /* Enhanced Mobile Navigation - iPad and iPhone Implementation */
    .nav__menu {
        position: fixed;
        top: -100vh; /* Start completely hidden above viewport */
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-xl);
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-3);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999; /* Below header but above content */
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        border-top: 3px solid var(--primary-color);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    /* Active state for mobile menu - smooth slide-in animation */
    .nav__menu.active {
        top: 80px; /* Position below header when active */
        opacity: 1;
        visibility: visible;
    }

    /* Show hamburger toggle button on tablets and mobile */
    .nav__toggle {
        display: block;
        cursor: pointer;
        padding: var(--space-2);
        border-radius: var(--radius-md);
        transition: all var(--transition-fast);
        /* Ensure minimum touch target size for accessibility */
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Enhanced hover effect for toggle button - works on both touch and mouse */
    .nav__toggle:hover {
        background-color: var(--gray-100);
        transform: scale(1.05);
    }

    /* Touch-friendly active state */
    .nav__toggle:active {
        background-color: var(--gray-200);
        transform: scale(0.98);
    }

    /* Enhanced navigation links for tablets and mobile */
    .nav__link {
        padding: var(--space-3) var(--space-2);
        border-bottom: 1px solid var(--gray-200);
        font-size: var(--font-size-lg);
        font-weight: 500;
        transition: all var(--transition-fast);
        position: relative;
        /* Ensure minimum touch target size */
        min-height: 44px;
        display: flex;
        align-items: center;
        border-radius: var(--radius-md);
        margin-bottom: var(--space-1);
    }

    /* Remove border and margin from last navigation link */
    .nav__link:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    /* Enhanced hover effect for tablet and mobile navigation links */
    .nav__link:hover {
        color: var(--primary-color);
        background-color: var(--gray-50);
        transform: translateX(-4px);
        box-shadow: var(--shadow-sm);
    }

    /* Active state for touch devices */
    .nav__link:active {
        background-color: var(--gray-100);
        transform: translateX(-2px);
    }

    /* Add proper spacing to logo on tablets and mobile devices */
    .nav__brand {
        margin-left: var(--space-2);
        padding: var(--space-2);
        border-radius: var(--radius-md);
        transition: all var(--transition-fast);
        /* Ensure proper touch target */
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Enhanced hover effect for logo on tablets and mobile */
    .nav__brand:hover {
        background-color: var(--gray-100);
        transform: scale(1.02);
    }

    /* Tablet and mobile styling for external link */
    .nav__link--external {
        margin-top: var(--space-2);
        text-align: center;
        border: none !important;
        font-size: var(--font-size-md);
        padding: var(--space-3) var(--space-4);
        min-height: 44px;
        justify-content: center;
    }

    .nav__link--external:hover {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        transform: translateX(0) scale(1.02);
    }
}

/* ===== MOBILE-SPECIFIC STYLES (Phones Only) ===== */
@media (max-width: 767px) {
    :root {
        --container-padding: var(--space-2);
    }

    /* Fix for content visibility issues on mobile */
    .other-tools,
    .png-benefits,
    section {
        position: relative;
        overflow: visible !important;
        z-index: auto;
        min-height: auto;
        display: block;
    }

    /* Ensure proper spacing between sections on mobile */
    .formats,
    .other-tools,
    .png-benefits {
        margin-bottom: var(--space-8);
        padding: var(--space-8) 0;
    }

    /* Fix for any potential layout issues */
    .container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
    }

    /* Mobile responsive styles for other tools section */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .tool-card {
        min-height: 160px;
        padding: var(--space-3);
    }

    .tool-card__icon {
        width: 50px;
        height: 50px;
        margin-bottom: var(--space-2);
    }

    .tool-card__icon i {
        font-size: var(--font-size-xl);
    }

    .tool-card__title {
        font-size: var(--font-size-base);
    }

    .reference-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-4);
    }

    .reference-card__icon {
        width: 60px;
        height: 60px;
        margin-bottom: var(--space-3);
    }

    .reference-card__features {
        justify-content: center;
    }


    
    .hero {
        padding: var(--space-12) 0;
    }
    
    .hero__title {
        font-size: var(--font-size-3xl);
    }
    
    .converter {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .upload-area {
        padding: 1.5rem 1rem;
        min-height: 240px;
    }

    .upload-area__icon {
        font-size: 2.5rem;
    }

    .upload-area__icon-pulse {
        width: 70px;
        height: 70px;
    }

    .upload-area__title {
        font-size: 1.25rem;
    }

    .upload-area__subtitle {
        font-size: 0.875rem;
    }

    .upload-area__btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Enhanced mobile styles for format badges */
    .upload-area__formats {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }

    .upload-area__formats-header {
        gap: 0.375rem;
        margin-bottom: 0.5rem;
    }

    .upload-area__formats-icon {
        font-size: 0.875rem;
    }

    .upload-area__formats-label {
        font-size: 0.75rem;
    }

    .upload-area__formats-grid {
        gap: 0.5rem;
    }

    /* Mobile-optimized format badges */
    .format-badge {
        padding: 0.375rem 0.625rem;
        font-size: 0.625rem;
        gap: 0.375rem;
        border-radius: 8px;
        min-height: 44px; /* Ensure touch-friendly size */
        min-width: 60px;
    }

    .format-badge__icon {
        font-size: 0.75rem;
    }

    .format-badge__text {
        font-size: 0.625rem;
        font-weight: 600;
    }

    /* Mobile tooltip adjustments */
    .format-badge__tooltip {
        font-size: 0.625rem;
        padding: 0.5rem 0.75rem;
        white-space: normal;
        max-width: 200px;
        text-align: center;
    }

    /* Reduce hover effects on mobile for better performance */
    .format-badge:hover {
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .format-badge:hover .format-badge__icon {
        transform: scale(1.1);
    }

    .upload-area__constraints {
        gap: 1rem;
        margin-top: 0.75rem;
    }

    .constraint-item {
        font-size: 0.75rem;
    }

    .upload-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .upload-info__card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .upload-info__icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .upload-info__title {
        font-size: 0.875rem;
    }

    .upload-info__description {
        font-size: 0.75rem;
    }

    /* Enhanced Files List Mobile Styles */
    .files-list {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }

    .files-list__header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .files-list__title-section {
        justify-content: center;
        text-align: center;
    }

    .files-list__icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .files-list__title {
        font-size: 1.25rem;
    }

    .files-list__subtitle {
        font-size: 0.75rem;
    }

    .files-list__actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .btn--enhanced {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 48px;
    }

    .btn__icon {
        font-size: 0.875rem;
    }

    /* File Item Mobile Styles */
    .file-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
        padding: 1rem;
    }

    .file-item__preview {
        width: 80px;
        height: 80px;
        grid-row: 1 / 3;
    }

    .file-item__info {
        grid-column: 2;
        grid-row: 1;
        gap: 0.5rem;
    }

    .file-item__status {
        grid-column: 2;
        grid-row: 2;
        font-size: 0.75rem;
        padding: 0.5rem;
        margin: 0;
        min-width: auto;
        justify-self: start;
    }

    .file-item__actions {
        grid-column: 1 / 3;
        grid-row: 3;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid #e5e7eb;
    }

    .file-item__details h4 {
        font-size: 0.875rem;
    }

    .file-item__details p {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .file-item__size-badge,
    .file-item__type-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }

    .file-item__status {
        font-size: 0.75rem;
        padding: 0.5rem;
        margin: 0;
        min-width: auto;
    }

    .file-item__actions {
        justify-content: center;
        gap: 0.75rem;
    }

    .file-item__action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Files Statistics Mobile */
    .files-list__stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
        margin-top: 1rem;
    }

    .stats-item {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .stats-item i {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .stats-label,
    .stats-value {
        font-size: 0.75rem;
    }

    /* Download Section Mobile */
    .download-section {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }

    .download-section__header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .download-section__icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        margin: 0 auto;
    }

    .download-section__title {
        font-size: 1.5rem;
    }

    .download-section__subtitle {
        font-size: 0.875rem;
    }

    .download-section__actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .download-btn {
        min-width: auto;
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }

    .download-section__info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .download-info-item {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        justify-content: center;
    }

    /* Image Preview Modal Mobile */
    .image-preview-modal {
        padding: 1rem;
    }

    .image-preview-modal__content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .image-preview-modal__header {
        padding: 1rem 1.5rem;
    }

    .image-preview-modal__title {
        font-size: 1rem;
        max-width: 200px;
    }

    .image-preview-modal__close {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .image-preview-modal__body {
        padding: 1rem;
        min-height: 200px;
    }

    .image-preview-modal__image {
        max-height: 50vh;
    }

    .image-preview-modal__footer {
        padding: 1rem 1.5rem;
    }

    .image-preview-modal__info {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .image-preview-modal__info span {
        font-size: 0.75rem;
        justify-content: center;
    }
    
    .features__grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: var(--space-8) 0;
    }
}

/* ===== HOW TO USE SECTION ===== */
.how-to-use {
    background-color: var(--gray-50);
}

.steps {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.step {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    max-width: 300px;
    text-align: right;
}

.step__number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    flex-shrink: 0;
}

.step__title {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--space-1);
}

.step__description {
    color: var(--text-light);
    margin: 0;
}

/* ===== FORMATS SECTION ===== */
.formats {
    background-color: var(--white);
}

.formats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.format-card {
    text-align: center;
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
}

.format-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.format-card__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-3);
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    color: var(--white);
}

.format-card__title {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.format-card__description {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    margin: 0;
}

/* ===== FAQ SECTION ===== */
.faq {
    background-color: var(--gray-50);
}

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

.faq-item {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-item__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.faq-item__question:hover {
    background-color: var(--gray-50);
}

.faq-item__question h3 {
    margin: 0;
    font-size: var(--font-size-lg);
    color: var(--text-color);
}

.faq-item__question i {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-item__question i {
    transform: rotate(180deg);
}

.faq-item__answer {
    padding: 0 var(--space-4);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item.active .faq-item__answer {
    padding: 0 var(--space-4) var(--space-4);
    max-height: 200px;
}

.faq-item__answer p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.6;
}



/* ===== REVIEWS AND TESTIMONIALS SECTION ===== */
/*
 * User Reviews and Testimonials Section Styles
 *
 * This section displays user reviews, ratings, and testimonials to build trust
 * and credibility. It includes overall ratings, individual testimonials, and
 * trust indicators to improve conversion rates and SEO.
 *
 * Key Components:
 * - Overall rating display with star ratings
 * - Rating breakdown with progress bars
 * - Individual testimonial cards with user info
 * - Trust indicators for credibility
 */
.reviews {
    background-color: var(--gray-50);
    padding: var(--space-12) 0;
}

/* Overall Rating Display */
.overall-rating {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-8);
    align-items: center;
    background-color: var(--white);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-8);
}

/* Rating Score Section */
.rating__score {
    text-align: center;
    padding: var(--space-4);
}

.rating__number {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: var(--space-2);
}

.rating__stars {
    display: flex;
    justify-content: center;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.rating__stars i {
    color: #fbbf24;
    font-size: var(--font-size-xl);
}

.rating__text {
    color: var(--text-light);
    font-size: var(--font-size-lg);
    font-weight: 500;
}

/* Rating Details and Breakdown */
.rating__details {
    padding: var(--space-4);
}

.rating__summary {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--space-4);
}

.rating__breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Individual Rating Bar */
.rating__bar {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: var(--space-2);
}

.rating__label {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    font-weight: 500;
}

/* Progress Bar for Ratings */
.rating__progress {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.rating__fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: var(--radius-sm);
    transition: width var(--transition-slow);
}

.rating__percentage {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
}

/* Testimonials Section */
.testimonials {
    margin: var(--space-8) 0;
}

.testimonials__title {
    font-size: var(--font-size-2xl);
    color: var(--text-color);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* Testimonials Grid Layout */
.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-4);
}

/* Individual Testimonial Card */
.testimonial-card {
    background-color: var(--white);
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

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

/* Testimonial Rating Stars */
.testimonial__rating {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

.testimonial__rating i {
    color: #fbbf24;
    font-size: var(--font-size-base);
}

/* Testimonial Quote */
.testimonial__quote {
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-color);
    margin: 0 0 var(--space-4) 0;
    font-style: italic;
    position: relative;
}

.testimonial__quote::before {
    content: '"';
    font-size: var(--font-size-3xl);
    color: var(--primary-color);
    position: absolute;
    top: -10px;
    right: -5px;
    font-family: serif;
}

/* Testimonial Author Information */
.testimonial__author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.testimonial__avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.testimonial__info {
    display: flex;
    flex-direction: column;
}

.testimonial__name {
    font-weight: 600;
    color: var(--text-color);
    font-size: var(--font-size-base);
}

.testimonial__role {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* Trust Indicators Section */
.trust-indicators {
    margin-top: var(--space-8);
}

.trust__title {
    font-size: var(--font-size-2xl);
    color: var(--text-color);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* Trust Items Grid */
.trust__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

/* Individual Trust Item */
.trust-item {
    background-color: var(--white);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.trust-item__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-3);
    background: linear-gradient(135deg, var(--success-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    color: var(--white);
}

.trust-item__title {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.trust-item__description {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 0;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--gray-900);
    color: var(--white);
    padding: var(--space-8) 0 var(--space-4);
}

.footer__content {
    text-align: center;
    margin-bottom: var(--space-6);
}

.footer__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.footer__brand i {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
}

.footer__description {
    color: var(--gray-400);
    margin-bottom: var(--space-4);
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.footer__links a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

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

.footer__keywords {
    margin-top: var(--space-4);
    text-align: center;
}

.footer__keywords p {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-2);
}

.footer__keywords span {
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}

.footer__bottom {
    text-align: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--gray-700);
}

.footer__bottom p {
    margin: 0;
    color: var(--gray-400);
    font-size: var(--font-size-sm);
}

/* Developer credit styling */
.footer__developer {
    margin-top: var(--space-2) !important;
    font-size: var(--font-size-sm);
}

.developer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
}

.developer-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.developer-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Facebook link icon effect */
.developer-link::after {
    content: ' 🔗';
    opacity: 0;
    transition: opacity var(--transition-fast);
    font-size: 0.8em;
}

.developer-link:hover::after {
    opacity: 1;
}

/* Inline links styling for SEO and internal linking */
.inline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.inline-link:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.inline-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* External link indicator for inline links */
.inline-link[target="_blank"]::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.inline-link[target="_blank"]:hover::after {
    opacity: 1;
}

/* ===== LOADING STATES ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ALERTS & NOTIFICATIONS ===== */
.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.alert--success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert--error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert--warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.alert--info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== MOBILE RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767px) {
    .steps {
        flex-direction: column;
        align-items: center;
        gap: var(--space-6);
    }

    .step {
        flex-direction: column;
        text-align: center;
        max-width: none;
    }

    .formats__grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-3);
    }

    .footer__links {
        flex-direction: column;
        gap: var(--space-3);
    }
}

/* ===== ACCESSIBILITY ===== */
/* Screen reader only content - visually hidden but accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Respect user's motion preferences for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced focus styles for keyboard navigation */
.btn:focus,
.nav__link:focus,
.nav__toggle:focus,
.faq-item__question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background-color: var(--gray-100);
    border-radius: var(--radius-md);
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top 0.3s;
}

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

/* High contrast mode support for better accessibility */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-color: #000000;
        --bg-color: #ffffff;
    }

    .nav__toggle:hover {
        background-color: #000000;
        color: #ffffff;
    }
}

/* ===== TOOLS SECTION ===== */
.tools {
    background-color: var(--white);
}

.tools__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.tool-card {
    background-color: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

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

.tool-card__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: var(--white);
}

.tool-card__title {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.tool-card__description {
    color: var(--text-light);
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.tool-card__btn {
    margin-top: auto;
}

/* ===== TUTORIALS SECTION ===== */
.tutorials {
    background-color: var(--gray-50);
}

.tutorials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-6);
}

.tutorial-card {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.tutorial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tutorial-card__image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tutorial-card__play {
    font-size: 4rem;
    color: var(--white);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.tutorial-card:hover .tutorial-card__play {
    opacity: 1;
}

.tutorial-card__content {
    padding: var(--space-4);
}

.tutorial-card__title {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}

.tutorial-card__description {
    color: var(--text-light);
    margin-bottom: var(--space-3);
    line-height: 1.6;
}

.tutorial-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

.tutorial-card__duration,
.tutorial-card__level {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

/* ===== YOUTUBE VIDEO TUTORIAL STYLES ===== */
/*
 * Enhanced YouTube Video Integration Styles
 *
 * Responsive video container with modern design
 * Maintains aspect ratio and provides smooth loading
 */

.tutorial-card--video {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border: 2px solid #ff0000;
    position: relative;
    overflow: hidden;
}

/* Alternative styling for second video */
.tutorial-card--video:nth-of-type(2) {
    background: linear-gradient(135deg, #ff4444 0%, #dd2222 100%);
    border: 2px solid #ff4444;
}

.tutorial-card--video:nth-of-type(2)::before {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1) 0%, rgba(221, 34, 34, 0.1) 100%);
}

.tutorial-card--video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(204, 0, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.tutorial-card__video-container {
    position: relative;
    background: #000;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.youtube-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: all var(--transition-normal);
}

.tutorial-card--video .tutorial-card__content {
    background: var(--white);
    position: relative;
    z-index: 2;
}

.tutorial-card--video .tutorial-card__title {
    color: var(--primary-color);
    font-weight: 700;
}

.tutorial-card--video .tutorial-card__duration i {
    color: #ff0000;
}

/* Video loading state - Removed red triangle overlay as it's not needed for YouTube embeds */

/* Enhanced hover effects for video tutorials */
.tutorial-card--video:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(255, 0, 0, 0.15);
}

.tutorial-card--video:nth-of-type(2):hover {
    box-shadow: 0 20px 40px rgba(255, 68, 68, 0.15);
}

/* Video accessibility improvements */
.youtube-video:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading animation for videos */
@keyframes videoLoad {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.video-wrapper {
    animation: videoLoad 0.6s ease-out;
}

/* ===== SEO GUIDE SECTION ===== */
/*
 * Comprehensive SEO Guide Section Styles
 *
 * This section contains educational content about image conversion
 * optimized for search engines with rich, structured content.
 * Includes comparison tables, best practices, and troubleshooting.
 */
.seo-guide {
    background-color: var(--white);
    padding: var(--space-12) 0;
}

/* Format Comparison Table Styles */
.format-comparison {
    margin: var(--space-8) 0;
    background-color: var(--gray-50);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
}

.comparison__title {
    font-size: var(--font-size-2xl);
    color: var(--text-color);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* Responsive table layout for image format comparison */
.comparison__table {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background-color: var(--gray-300);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comparison__header {
    display: contents;
}

.comparison__row {
    display: contents;
}

.comparison__cell {
    background-color: var(--white);
    padding: var(--space-3);
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

/* Header cells styling */
.comparison__header .comparison__cell {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    font-size: var(--font-size-base);
}

/* Format name cells with special styling */
.format-name {
    font-weight: 700;
    color: var(--primary-color);
    background-color: var(--gray-100) !important;
}

/* Best Practices Section */
.best-practices {
    margin: var(--space-8) 0;
}

.practices__title {
    font-size: var(--font-size-2xl);
    color: var(--text-color);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* Grid layout for practice cards */
.practices__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

/* Individual practice card styling */
.practice-card {
    background-color: var(--gray-50);
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

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

.practice-card__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-3);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    color: var(--white);
}

.practice-card__title {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

.practice-card__description {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Technical Specifications Section */
.tech-specs {
    margin: var(--space-8) 0;
    background-color: var(--gray-50);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
}

.specs__title {
    font-size: var(--font-size-2xl);
    color: var(--text-color);
    text-align: center;
    margin-bottom: var(--space-6);
}

/* Two-column layout for specifications */
.specs__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.specs__column h4 {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    margin-bottom: var(--space-3);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--space-1);
}

/* Styled lists for specifications */
.specs__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specs__list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-light);
    line-height: 1.6;
}

.specs__list li:last-child {
    border-bottom: none;
}

.specs__list li strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Troubleshooting Accordion Section */
.troubleshooting {
    margin: var(--space-8) 0;
}

.troubleshooting__title {
    font-size: var(--font-size-2xl);
    color: var(--text-color);
    text-align: center;
    margin-bottom: var(--space-6);
}

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

/* Accordion item styling */
.troubleshooting__item {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--gray-200);
    transition: border-color var(--transition-fast);
}

.troubleshooting__item.active {
    border-color: var(--primary-color);
}

/* Accordion question/header styling */
.troubleshooting__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.troubleshooting__question:hover {
    background-color: var(--gray-50);
}

.troubleshooting__question h4 {
    margin: 0;
    font-size: var(--font-size-lg);
    color: var(--text-color);
    font-weight: 600;
}

.troubleshooting__question i {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
    font-size: var(--font-size-lg);
}

/* Rotate icon when accordion is active */
.troubleshooting__item.active .troubleshooting__question i {
    transform: rotate(180deg);
}

/* Accordion answer/content styling */
.troubleshooting__answer {
    padding: 0 var(--space-4);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.troubleshooting__item.active .troubleshooting__answer {
    padding: 0 var(--space-4) var(--space-4);
    max-height: 200px;
}

.troubleshooting__answer p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.7;
    font-size: var(--font-size-base);
}

/* ===== STATISTICS SECTION ===== */
.stats {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: var(--space-12) 0;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
}

.stat-item {
    text-align: center;
}

.stat-item__number {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
    background: linear-gradient(45deg, var(--white), rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item__label {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ===== KEYWORDS SECTION ===== */
.keywords {
    background-color: var(--gray-50);
}

.keywords__cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

.keyword-tag {
    background-color: var(--white);
    color: var(--text-color);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 2px solid var(--gray-200);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.keyword-tag:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE DESIGN FOR NEW SECTIONS ===== */
@media (max-width: 1023px) {
    .tools__grid,
    .tutorials__grid,
    .practices__grid,
    .testimonials__grid,
    .trust__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-4);
    }

    .stats__grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--space-4);
    }

    /* Responsive table for tablets */
    .comparison__table {
        grid-template-columns: repeat(3, 1fr);
        font-size: var(--font-size-xs);
    }

    .comparison__cell {
        padding: var(--space-2);
        min-height: 50px;
    }

    /* Reviews section responsive adjustments */
    .overall-rating {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        text-align: center;
    }

    .rating__bar {
        grid-template-columns: 70px 1fr 40px;
    }
}

/* Enhanced responsive design for all grid sections */
@media (max-width: 1023px) {
    .testimonials__grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: var(--space-5);
    }

    .trust__grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-4);
    }
}

@media (max-width: 767px) {
    .tools__grid,
    .tutorials__grid,
    .practices__grid,
    .testimonials__grid,
    .trust__grid,
    .benefits__grid,
    .tips__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .stat-item__number {
        font-size: var(--font-size-4xl);
    }

    .keywords__cloud {
        gap: var(--space-1);
    }

    .keyword-tag {
        font-size: var(--font-size-xs);
        padding: var(--space-1) var(--space-2);
    }

    .tutorial-card__image {
        height: 150px;
    }

    .tutorial-card__play {
        font-size: 3rem;
    }

    /* Mobile responsive styles for YouTube video */
    .tutorial-card--video {
        margin-bottom: var(--space-4);
    }

    .video-wrapper {
        padding-bottom: 56.25%; /* Maintain 16:9 aspect ratio on mobile */
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .youtube-video {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .tutorial-card--video .tutorial-card__content {
        padding: var(--space-3);
    }

    .tutorial-card--video .tutorial-card__title {
        font-size: var(--font-size-md);
        line-height: 1.3;
    }

    /* Mobile-specific styles for SEO guide section */
    .comparison__table {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .comparison__cell {
        padding: var(--space-2);
        min-height: auto;
        text-align: right;
        justify-content: flex-start;
    }

    .comparison__header .comparison__cell {
        display: none;
    }

    .comparison__row {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-1);
        margin-bottom: var(--space-3);
        background-color: var(--white);
        border-radius: var(--radius-md);
        padding: var(--space-3);
        box-shadow: var(--shadow-sm);
    }

    .comparison__cell::before {
        content: attr(data-label) ': ';
        font-weight: 700;
        color: var(--primary-color);
    }

    .specs__content {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .troubleshooting__question h4 {
        font-size: var(--font-size-base);
        line-height: 1.4;
    }

    .troubleshooting__answer {
        font-size: var(--font-size-sm);
    }

    /* Mobile-specific styles for reviews section */
    .overall-rating {
        grid-template-columns: 1fr;
        padding: var(--space-4);
    }

    .rating__score {
        padding: var(--space-2);
    }

    .rating__number {
        font-size: var(--font-size-4xl);
    }

    .rating__bar {
        grid-template-columns: 60px 1fr 35px;
        gap: var(--space-1);
    }

    .rating__label {
        font-size: var(--font-size-xs);
    }

    .testimonial-card {
        padding: var(--space-4);
    }

    .testimonial__quote {
        font-size: var(--font-size-sm);
    }

    .testimonial__avatar {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }

    .trust-item {
        padding: var(--space-3);
    }

    .trust-item__icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }
}

/* ===== ENHANCED MOBILE NAVIGATION - CONSOLIDATED ===== */
/* Mobile navigation styles have been consolidated above in the main mobile breakpoint section */
/* This prevents CSS conflicts and ensures consistent behavior */

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .nav__toggle,
    .btn,
    .newsletter-form,
    .footer {
        display: none !important;
    }

    .main {
        margin-top: 0;
    }

    .section-title {
        color: #000 !important;
    }

    .hero {
        background: #fff !important;
        color: #000 !important;
    }

    .stats {
        background: #fff !important;
        color: #000 !important;
    }

    .blog__cta {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}

/* ===== PNG BENEFITS SECTION ===== */
/* Educational section showcasing PNG format advantages for designers and developers */
.png-benefits {
    background-color: var(--gray-100);
    position: relative;
    z-index: 1;
    /* Ensure section is visible on all devices */
    display: block;
    overflow: visible;
}

/* Responsive grid layout for benefit cards with minimum width constraint */
.benefits__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

/* Individual benefit card styling with hover effects for better UX */
.benefit-card {
    background-color: var(--white);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

/* Hover effect with subtle lift animation and enhanced shadow */
.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Gradient icon container with rounded corners for visual appeal */
.benefit-card__icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

/* Icon styling with appropriate size and white color for contrast */
.benefit-card__icon i {
    font-size: var(--font-size-2xl);
    color: var(--white);
}

/* Card title with proper hierarchy and spacing */
.benefit-card__title {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    margin-bottom: var(--space-3);
}

/* Description text with improved readability through line-height */
.benefit-card__description {
    color: var(--text-light);
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

/* Custom styled list without default bullets */
.benefit-card__list {
    list-style: none;
    padding: 0;
}

/* List items with custom checkmark icons for better visual hierarchy */
.benefit-card__list li {
    padding: var(--space-1) 0;
    color: var(--text-light);
    position: relative;
    padding-right: var(--space-4);
}

/* Custom checkmark pseudo-element for list items */
.benefit-card__list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ===== OPTIMIZATION TIPS SECTION ===== */
/* Comprehensive guide section for image optimization best practices */
.optimization-tips {
    background-color: var(--white);
}

/* Responsive grid for tip categories with flexible column sizing */
.tips__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

/* Individual tip category container with hover interaction */
.tip-category {
    background-color: var(--gray-100);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-normal);
}

/* Hover effect for tip categories - background change and shadow */
.tip-category:hover {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
}

/* Category title with icon and accent border for visual hierarchy */
.tip-category__title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-xl);
    color: var(--text-color);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--primary-color);
}

/* Icon styling within category titles */
.tip-category__title i {
    font-size: var(--font-size-2xl);
    color: var(--primary-color);
}

/* Content container for tip items with vertical spacing */
.tip-category__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Individual tip item headings */
.tip-item h4 {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--space-2);
}

/* Tip item descriptions with improved readability */
.tip-item p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* ===== RESPONSIVE STYLES FOR NEW SECTIONS ===== */

/* Large screens - 4K and ultra-wide displays */
@media (min-width: 1920px) {
    .benefits__grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1400px;
        margin: 0 auto;
    }

    .tips__grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Desktop and large tablets */
@media (max-width: 1023px) {
    .benefits__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-5);
    }

    .tips__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-5);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .benefits__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-4);
    }

    .tips__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .benefit-card {
        padding: var(--space-5);
    }

    .tip-category {
        padding: var(--space-5);
    }
}

/* Mobile-specific adjustments for PNG benefits and optimization tips sections */
@media (max-width: 767px) {
    /* Additional fixes for mobile content visibility */
    .png-benefits,
    .other-tools,
    .formats {
        position: relative !important;
        z-index: 1 !important;
        overflow: visible !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Fix AOS animation issues on mobile */
    [data-aos] {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    /* Ensure all sections are visible */
    section {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

    /* Reduce padding for benefit list items on mobile for better spacing */
    .benefit-card__list li {
        padding-right: var(--space-3);
    }

    /* Stack tip category title elements vertically on mobile */
    .tip-category__title {
        flex-direction: column;
        text-align: center;
        gap: var(--space-2);
    }

    /* Single column layout for benefits grid on mobile */
    .benefits__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Single column layout for tips grid on mobile */
    .tips__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Reduce padding on mobile for better space utilization */
    .benefit-card {
        padding: var(--space-4);
    }

    .tip-category {
        padding: var(--space-4);
    }

    .benefit-card__icon {
        width: 50px;
        height: 50px;
    }

    .benefit-card__icon i {
        font-size: var(--font-size-xl);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .benefits__grid,
    .tips__grid {
        gap: var(--space-3);
    }

    .benefit-card,
    .tip-category {
        padding: var(--space-3);
    }

    .benefit-card__title,
    .tip-category__title {
        font-size: var(--font-size-lg);
    }

    .benefit-card__description,
    .tip-item p {
        font-size: var(--font-size-sm);
    }
}

/* Extra small devices - phones in portrait mode */
@media (max-width: 360px) {
    :root {
        --container-padding: var(--space-1);
    }

    .hero__title {
        font-size: var(--font-size-2xl);
        line-height: 1.2;
    }

    .section-title {
        font-size: var(--font-size-xl);
    }

    .converter {
        padding: var(--space-3);
    }

    .upload-area {
        padding: var(--space-4);
    }

    .upload-area__title {
        font-size: var(--font-size-base);
    }

    .btn {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-size-sm);
    }

    .feature-card,
    .format-card,
    .benefit-card,
    .tip-category {
        padding: var(--space-2);
    }

    .feature-card__icon,
    .format-card__icon,
    .benefit-card__icon {
        width: 40px;
        height: 40px;
    }

    .feature-card__icon i,
    .format-card__icon i,
    .benefit-card__icon i {
        font-size: var(--font-size-lg);
    }

    .stats__grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .upload-info {
        gap: var(--space-1);
    }

    .upload-info__item {
        font-size: var(--font-size-xs);
    }
}

/* ===== COMPREHENSIVE TABLET OPTIMIZATIONS (iPad Specific) ===== */
/* Tablet screens - optimized layout for medium-sized devices including iPad */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Enhanced container padding for tablets */
    :root {
        --container-padding: var(--space-4);
    }

    /* Optimized hero section for tablets */
    .hero {
        padding: var(--space-12) 0;
    }

    .hero__title {
        font-size: var(--font-size-4xl);
        line-height: 1.1;
    }

    .hero__subtitle {
        font-size: var(--font-size-xl);
    }

    .hero__description {
        font-size: var(--font-size-lg);
        max-width: 600px;
    }

    /* Enhanced converter area for tablets */
    .converter {
        padding: 2.5rem;
        max-width: 800px;
    }

    /* Optimized upload area for tablet touch interaction */
    .upload-area {
        padding: 3rem 2.5rem;
        min-height: 360px;
        border-radius: 24px;
    }

    .upload-area__icon {
        font-size: 4rem;
    }

    .upload-area__title {
        font-size: var(--font-size-2xl);
    }

    .upload-area__subtitle {
        font-size: var(--font-size-lg);
    }

    .upload-area__btn {
        padding: var(--space-3) var(--space-5);
        font-size: var(--font-size-lg);
        min-height: 48px;
    }

    /* Enhanced format badges for tablet touch */
    .format-badge {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-size-sm);
        min-height: 48px;
        min-width: 80px;
    }

    .format-badge__icon {
        font-size: var(--font-size-lg);
    }

    /* Tools grid with 2 columns for better space utilization on tablets */
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* Enhanced tool cards for tablet interaction */
    .tool-card {
        padding: var(--space-4);
        min-height: 180px;
        transition: all var(--transition-normal);
    }

    .tool-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

    .tool-card__icon {
        width: 64px;
        height: 64px;
        margin-bottom: var(--space-3);
    }

    .tool-card__icon i {
        font-size: var(--font-size-2xl);
    }

    .tool-card__title {
        font-size: var(--font-size-lg);
    }

    .tool-card__description {
        font-size: var(--font-size-base);
    }

    /* Enhanced features grid for tablets */
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    .feature-card {
        padding: var(--space-5);
    }

    .feature-card__icon {
        width: 72px;
        height: 72px;
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-4);
    }

    /* Optimized file list for tablets */
    .files-list {
        padding: 2rem;
    }

    .file-item {
        grid-template-columns: 100px 1fr auto auto;
        gap: var(--space-3);
        padding: var(--space-3);
    }

    .file-item__preview {
        width: 100px;
        height: 100px;
    }

    .file-item__action-btn {
        width: 44px;
        height: 44px;
        font-size: var(--font-size-lg);
    }

    /* Enhanced buttons for tablet touch */
    .btn {
        min-height: 48px;
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-base);
    }

    .btn--enhanced {
        min-height: 52px;
        padding: var(--space-3) var(--space-5);
    }

    /* Section spacing optimization for tablets */
    section {
        padding: var(--space-10) 0;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .section-description {
        font-size: var(--font-size-lg);
        max-width: 700px;
    }

    /* Enhanced touch interactions for tablets */
    .upload-area:hover {
        transform: translateY(-2px);
    }

    .upload-area:active {
        transform: translateY(0);
    }

    /* Improved tooltip positioning for tablets */
    .format-badge__tooltip {
        font-size: var(--font-size-sm);
        padding: var(--space-2) var(--space-3);
        max-width: 250px;
    }

    /* Enhanced upload info cards for tablets */
    .upload-info {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-4);
    }

    .upload-info__card {
        padding: var(--space-4);
    }

    .upload-info__icon {
        width: 56px;
        height: 56px;
        font-size: var(--font-size-xl);
    }

    /* Optimized steps section for tablets */
    .steps {
        gap: var(--space-8);
    }

    .step {
        max-width: 300px;
    }

    .step__number {
        width: 64px;
        height: 64px;
        font-size: var(--font-size-2xl);
    }

    /* Enhanced FAQ section for tablets */
    .faq-item {
        margin-bottom: var(--space-4);
    }

    .faq-question {
        padding: var(--space-4);
        font-size: var(--font-size-lg);
        min-height: 56px;
    }

    .faq-answer {
        padding: var(--space-4);
        font-size: var(--font-size-base);
    }

    /* Improved notification positioning for tablets */
    .notification {
        bottom: var(--space-6);
        right: var(--space-6);
        max-width: 400px;
        font-size: var(--font-size-base);
    }
}

    /* Restore horizontal layout for reference card on tablets */
    .reference-card {
        flex-direction: row;
        text-align: right;
    }

    /* Adjust reference card icon size for tablet */
    .reference-card__icon {
        width: 70px;
        height: 70px;
        margin-bottom: 0;
    }

    /* Adjust tools category title for tablet screens */
    .tools-category__title {
        font-size: var(--font-size-xl);
    }
}

/* ===== CACHE AND PERFORMANCE OPTIMIZATIONS ===== */

/* Optimize font loading for better caching */
@font-face {
    font-family: 'Cairo';
    font-display: swap;
    src: local('Cairo');
}

/* Cache-friendly animations */
.cache-loading {
    opacity: 0;
    animation: cacheLoadIn 0.3s ease-out forwards;
}

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

/* Cookie consent banner styles */
#cookie-consent-banner {
    font-family: var(--font-family);
}

#cookie-consent-banner h3 {
    font-weight: 700;
    margin: 0 0 8px 0;
}

#cookie-consent-banner p {
    margin: 0;
    line-height: 1.5;
}

#cookie-consent-banner button {
    font-family: var(--font-family);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

#cookie-consent-banner button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Performance indicators */
.performance-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: var(--font-size-sm);
    color: var(--text-color);
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-normal);
}

.performance-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

.performance-indicator__icon {
    color: var(--success-color);
    margin-left: var(--space-1);
}

/* Cache status indicator */
.cache-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.cache-status--enabled {
    background: var(--success-color);
    color: var(--white);
}

.cache-status--disabled {
    background: var(--warning-color);
    color: var(--white);
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: var(--error-color);
    color: var(--white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    z-index: 10000;
    transition: transform var(--transition-normal);
}

.offline-indicator.show {
    transform: translateX(-50%) translateY(0);
}
