:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #EFF6FF;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --border-focus: #2563EB;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease-in-out;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.sr-only.focus\:not-sr-only:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--primary);
    color: white;
    z-index: 9999;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

/* ========== NAVBAR ========== */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s var(--ease);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* EDUPIDIA LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    transition: transform 0.3s var(--ease);
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    transition: transform 0.3s var(--ease);
}

.logo:hover .logo-mark {
    transform: rotate(-8deg) scale(1.05);
}

.logo-text {
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s var(--ease), transform 0.2s var(--ease);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2563EB, #7C3AED);
    transition: width 0.3s var(--ease);
}

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

/* ========== HAMBURGER MENU (FIX) ========== */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s var(--ease);
    position: relative;
    z-index: 1101;
}

.menu-toggle:hover {
    background: var(--primary-light);
}

.hamburger-line {
    width: 22px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.2s ease,
                top 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
    .menu-toggle {
        display: none;
    }
}

/* Mobile Menu */
/* Mobile Menu - FIXED */
@media (max-width: 767px) {
    .nav-links {
        display: flex;  /* ⬅️ YE ADD KARNA ZAROORI HAI! display:none ko override karta hai */
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        padding: 12px 20px 20px;
        gap: 0;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease,
                    visibility 0.3s,
                    padding 0.3s ease;
    }
    
    .nav-links.open {
        max-height: 400px;
        opacity: 1;
        visibility: visible;
        padding: 20px;
    }
    
    .nav-links a {
        display: block;
        padding: 14px 4px;
        border-bottom: 1px solid var(--border);
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-links.open a {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links.open a:nth-child(1) { transition-delay: 0.05s; }
    .nav-links.open a:nth-child(2) { transition-delay: 0.1s; }
    .nav-links.open a:nth-child(3) { transition-delay: 0.15s; }
    
    .nav-links a::after {
        display: none;
    }
}

/* ========== HERO ========== */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
    background: linear-gradient(to bottom, var(--bg-light), var(--bg-white));
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 0.6s var(--ease);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s var(--ease) 0.1s both;
}

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

@media (min-width: 768px) {
    .hero {
        padding: 5rem 0 3rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
}

/* Purana: padding: 2rem 0 4rem; */
/* Naya: */
.tool-section {
    padding: 1rem 0 7rem;
}

.tool-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s var(--ease);
}

@media (min-width: 768px) {
    .tool-card {
        padding: 3rem;
    }
}

.tool-state {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tool-state.active {
    display: block;
}

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

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    background: var(--bg-light);
}

.drop-zone:hover, .drop-zone:focus {
    border-color: var(--primary);
    background: var(--primary-light);
    outline: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.drop-zone-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: var(--text-main);
}

.drop-zone-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.browse-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

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

.file-limit {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
}

.error-message {
    color: #DC2626;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    font-size: 0.95rem;
    display: none;
    animation: shake 0.4s var(--ease);
}

.error-message.visible {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    animation: slideIn 0.3s var(--ease);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.file-info svg {
    color: var(--primary);
    flex-shrink: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.tool-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.compression-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .compression-options {
        flex-direction: row;
    }
}

.compression-card {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.compression-card input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.card-content {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s var(--ease);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
}

.compression-card input:focus-visible + .card-content {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.compression-card input:checked + .card-content {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.25rem;
}

.badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.tool-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-text:hover {
    color: #DC2626;
    background: #FEF2F2;
}

.processing-content {
    text-align: center;
    padding: 2rem 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

#progress-text {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #7C3AED);
    width: 0%;
    transition: width 0.3s ease-out;
    position: relative;
}

.progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.success-icon {
    text-align: center;
    margin-bottom: 1rem;
    animation: pop 500ms var(--ease);
}

@keyframes pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    animation: fadeIn 0.4s var(--ease);
}

@media (min-width: 480px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.result-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.result-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.result-item.highlight .result-value {
    color: #16A34A;
    font-size: 1.5rem;
}

.download-filename {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    word-break: break-all;
}

/* ========== SECTIONS ========== */
section.how-it-works, section.features, section.benefits, section.privacy, section.faq {
    padding: 4rem 0;
}

section.how-it-works { background: var(--bg-light); }
section.features { background: var(--bg-white); }
section.benefits { background: var(--bg-light); }
section.privacy { background: var(--bg-white); }
section.faq { background: var(--bg-light); }

section h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--text-main);
}

.steps-grid, .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .steps-grid, .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.step-card, .feature-item {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s var(--ease);
}

.feature-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.step-card:hover, .feature-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.2);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transition: transform 0.3s var(--ease);
}

.step-card:hover .step-number {
    transform: scale(1.1) rotate(-8deg);
}

.feature-item svg {
    flex-shrink: 0;
}

.step-card h3, .feature-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.step-card p, .feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.benefits-list {
    max-width: 800px;
    margin: 0 auto;
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.benefits-list li {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 1.05rem;
    color: var(--text-main);
    transition: all 0.3s var(--ease);
}

.benefits-list li:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.benefits-list li strong {
    color: var(--primary);
}

.privacy .container {
    max-width: 800px;
    text-align: center;
}

.privacy p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s var(--ease);
}

.faq-item[open] {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    transition: all 0.2s var(--ease);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 400;
    transition: transform 0.3s var(--ease);
}

.faq-item[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-item summary:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.faq-item p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    animation: fadeIn 0.3s var(--ease);
}

/* ========== RELATED TOOLS ========== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.related-card {
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    text-decoration: none;
    color: #0F172A;
    transition: all 0.25s var(--ease);
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: #2563EB;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    text-decoration: none;
}

.related-icon {
    width: 42px;
    height: 42px;
    padding: 10px;
    background: #EFF6FF;
    border-radius: 10px;
    color: #2563EB;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s var(--ease);
}

.related-card:hover .related-icon {
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    color: white;
    transform: rotate(-8deg);
}

.related-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.related-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0F172A;
}

.related-card p {
    font-size: 13px;
    line-height: 1.5;
    color: #64748B;
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .related-card {
        padding: 18px 14px;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}