/* responsive.css - Enhanced for wider layout */

/* ================= GLOBAL RESPONSIVE ================= */

/* Large Desktop (1200px and above) */
@media screen and (min-width: 1201px) {
    .main-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 30px;
    }
    
    .content-wrapper {
        display: grid;
        grid-template-columns: 260px 1fr 280px;
        gap: 30px;
    }
}

/* Desktop (1200px and below) */
@media screen and (max-width: 1200px) {
    .typing-card {
        width: 98%;
        padding: 2.5rem;
    }
    
    .text-display {
        font-size: 1.8rem;
        padding: 2.5rem;
    }
    
    .content-wrapper {
        grid-template-columns: 220px 1fr 240px;
        gap: 20px;
    }
    
    .certificate-levels {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-links-grid {
        gap: 15px 20px;
    }
}

/* Tablet Landscape (992px and below) */
@media screen and (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 200px 1fr 220px;
    }
    
    .certificate-levels {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-left, 
    .footer-right {
        align-items: center;
        text-align: center;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, auto);
    }
}

/* Tablet Portrait (768px and below) */
@media screen and (max-width: 768px) {
    body {
        padding: 1rem;
    }

    /* Layout */
    .main-container {
        padding: 0 10px;
        overflow-x: hidden;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar, 
    .right-sidebar,
    .certificate-sidebar,
    .certificate-right,
    .results-sidebar,
    .results-right {
        display: none;
    }

    /* Header */
    .main-header {
        padding: 10px 0;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .mobile-menu-btn {
        display: block;
        background: var(--accent-primary);
        color: white;
        border: none;
        padding: 8px 15px;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        font-weight: 600;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .login-btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }

    /* Typing Card */
    .typing-card {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }

    .logo h1 {
        font-size: 2rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
        gap: 1.2rem;
    }

    .stat-value {
        font-size: 2.2rem;
    }

    /* Hero Section */
    .hero-section h2 {
        font-size: 2.2rem;
    }

    /* Time Buttons */
    .time-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .time-btn {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }

    /* Text Display */
    .text-display {
        font-size: 1.4rem;
        padding: 2rem;
        min-height: 180px;
    }

    /* Language Selector */
    .language-selector {
        flex-wrap: wrap;
        justify-content: center;
    }

    .lang-option {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }

    /* Input Meta */
    .input-meta {
        padding: 1rem 1.5rem;
    }
    
    .fake-type {
        font-size: 1.1rem;
    }

    /* Results */
    .result-main {
        font-size: 4rem;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Certificate */
    .certificate-container {
        padding: 2rem;
    }

    .certificate-header h2 {
        font-size: 2rem;
    }

    .certificate-header h3 {
        font-size: 1.8rem;
    }

    /* Forms */
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    /* Test Areas */
    .test-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .test-timer {
        font-size: 1.5rem;
    }
    
    .test-requirements {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .test-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Certificate Levels */
    .certificate-levels {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .level-card {
        padding: 20px;
    }
    
    /* Results */
    .results-main {
        padding: 20px;
    }
    
    .score-cards {
        grid-template-columns: 1fr;
    }
    
    .wpm-large {
        font-size: 4rem;
    }
    
    .retake-buttons {
        flex-direction: column;
    }
    
    .easy-test-btn,
    .tricky-keys-btn,
    .typing-lessons-btn {
        width: 100%;
    }
    
    .take-it-easy {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tests-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-grid {
        grid-template-columns: 1fr;
    }
    
    .professional-tests {
        flex-direction: column;
        gap: 10px;
    }
    
    .prof-badge {
        width: 100%;
        text-align: center;
    }
    
    /* Footer */
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-left, 
    .footer-right {
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-links-grid a {
        font-size: 13px;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
    
    .footer-right p {
        font-size: 12px;
    }
    
    .theme-toggle {
        bottom: 10px;
        right: 10px;
    }
    
    .theme-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Mobile (480px and below) */
@media screen and (max-width: 480px) {
    .site-title {
        font-size: 1.3rem;
    }
    
    .login-btn {
        padding: 4px 12px;
        font-size: 0.85rem;
    }
    
    .mobile-menu-btn {
        padding: 4px 10px;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 1rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-main {
        font-size: 3rem;
    }

    .text-display {
        font-size: 1.2rem;
        padding: 1.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    .time-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .lang-option {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .certificate-container {
        padding: 1.5rem 1rem;
    }
    
    .certificate-header h2 {
        font-size: 1.5rem;
    }
    
    .certificate-header h3 {
        font-size: 1.3rem;
    }
    
    .result-main {
        font-size: 3rem;
    }
    
    .wpm-large {
        font-size: 3rem;
    }
    
    .speed-markers {
        font-size: 0.7rem;
        flex-wrap: wrap;
    }
    
    .retake-section {
        padding: 15px;
    }
    
    .difficulty-buttons {
        flex-wrap: wrap;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .footer-links-grid a {
        font-size: 12px;
    }
}

/* Small Mobile (360px and below) */
@media screen and (max-width: 360px) {
    .site-title {
        font-size: 1.1rem;
    }
    
    .login-btn {
        padding: 3px 8px;
        font-size: 0.75rem;
    }
    
    .mobile-menu-btn {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
    
    .header-right {
        gap: 4px;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .result-main {
        font-size: 2.5rem;
    }
    
    .certificate-header h2 {
        font-size: 1.3rem;
    }
    
    .certificate-header h3 {
        font-size: 1.1rem;
    }
}

/* ================= RESULTS PAGE RESPONSIVE ================= */

/* Results page specific breakpoints */
@media screen and (max-width: 1200px) {
    .results-container {
        grid-template-columns: 220px 1fr 240px;
        gap: 20px;
    }
    
    .wpm-large {
        font-size: 4rem;
    }
    
    .net-speed-value {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 992px) {
    .results-container {
        grid-template-columns: 200px 1fr 220px;
    }
    
    .score-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tests-grid {
        grid-template-columns: 1fr;
    }
    
    .advanced-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .results-sidebar,
    .results-right {
        display: none;
    }
    
    .retake-buttons {
        flex-direction: column;
    }
    
    .easy-test-btn,
    .tricky-keys-btn,
    .typing-lessons-btn {
        width: 100%;
    }
    
    .take-it-easy {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .professional-tests {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .results-main {
        padding: 15px;
    }
    
    .wpm-large {
        font-size: 3.5rem;
    }
    
    .speed-markers {
        font-size: 0.7rem;
        flex-wrap: wrap;
    }
    
    .retake-section {
        padding: 15px;
    }
    
    .difficulty-buttons {
        flex-wrap: wrap;
    }
}

/* ================= LANDSCAPE ORIENTATION ================= */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .main-container {
        padding: 10px;
    }
    
    .hero-section {
        margin: 10px 0;
    }
    
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    .text-display {
        max-height: 150px;
        overflow-y: auto;
    }
    
    .certificate-card {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .theme-toggle {
        bottom: 5px;
        right: 5px;
    }
    
    .theme-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

/* ================= PRINT STYLES ================= */
@media print {
    .theme-toggle,
    .mobile-menu-btn,
    .login-btn,
    .sidebar,
    .right-sidebar,
    .footer-links-grid,
    .test-controls,
    .result-actions {
        display: none !important;
    }
    
    .main-container {
        padding: 0;
        max-width: 100%;
    }
    
    .certificate-card {
        border: 2px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .certificate-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
}

/* ================= UNIVERSAL MOBILE FIXES - SARE PAGES KE LIYE ================= */
/* Ye sirf mobile par apply hoga, laptop/Desktop par zero changes */

@media screen and (max-width: 768px) {
    /* === MAIN FIX - Har page ke main-content ko sahi padding === */
    .main-content {
        padding: 15px 12px !important;  /* About page jaisa padding */
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* === PRIVACY POLICY PAGE SPECIFIC FIXES === */
    .privacy-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .privacy-hero {
        padding: 30px 15px !important;
        margin: 0 0 25px 0 !important;
        width: 100% !important;
        border-radius: 20px !important;
        box-sizing: border-box !important;
    }
    
    .privacy-card {
        padding: 25px 15px !important;
        margin: 0 0 25px 0 !important;
        width: 100% !important;
        border-radius: 20px !important;
        box-sizing: border-box !important;
    }
    
    .important-box {
        padding: 20px 15px !important;
        margin: 0 0 25px 0 !important;
        width: 100% !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }
    
    .contact-section {
        padding: 20px 15px !important;
        margin: 0 0 20px 0 !important;
        width: 100% !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }
    
    .section-title {
        font-size: 1.3rem !important;
        margin: 25px 0 12px 0 !important;
        flex-wrap: wrap !important;
    }
    
    .privacy-text {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
    }
    
    .privacy-list {
        margin-left: 5px !important;
        padding-left: 20px !important;
    }
    
    .privacy-list li {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
        line-height: 1.5 !important;
    }
    
    .gdpr-box {
        padding: 18px 15px !important;
        margin: 20px 0 !important;
        border-radius: 14px !important;
    }
    
    .ccpa-note {
        padding: 15px !important;
        margin: 15px 0 !important;
        border-radius: 12px !important;
    }
    
    .policy-note {
        padding: 15px !important;
        margin: 20px 0 !important;
        border-radius: 12px !important;
        font-size: 0.9rem !important;
    }
    
    .last-updated {
        padding: 6px 15px !important;
        font-size: 0.8rem !important;
    }
    
    /* === COMMON FIXES FOR ALL PAGES === */
    .about-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .about-hero {
        padding: 30px 15px !important;
        border-radius: 20px !important;
        margin-bottom: 25px !important;
    }
    
    .mission-section {
        padding: 20px 15px !important;
        border-radius: 16px !important;
        margin-bottom: 25px !important;
    }
    
    .founder-note {
        padding: 25px 15px !important;
        border-radius: 16px !important;
        margin: 25px 0 !important;
    }
    
    .stats-grid-about {
        gap: 12px !important;
        margin: 25px 0 !important;
    }
    
    .stat-card-about {
        padding: 20px 10px !important;
        border-radius: 16px !important;
    }
    
    .stat-number-about {
        font-size: 2rem !important;
    }
    
    .contact-section {
        padding: 20px 15px !important;
        border-radius: 16px !important;
    }
    
    /* === FOOTER FIXES - SABKE LIYE SAME === */
    .footer-container {
        padding: 30px 15px !important;
        gap: 25px !important;
    }
    
    .footer-left {
        width: 100% !important;
        text-align: center !important;
        align-items: center !important;
    }
    
    .footer-logo {
        font-size: 1.8rem !important;
    }
    
    .footer-copyright {
        font-size: 0.85rem !important;
    }
    
    .footer-center {
        width: 100% !important;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    
    .footer-links-grid a {
        font-size: 0.85rem !important;
        padding: 8px 5px !important;
        text-align: center !important;
        background: var(--bg-secondary);
        border-radius: 8px;
        border: 1px solid var(--border-color);
        white-space: normal !important;
        word-break: break-word !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 44px;
    }
    
    .footer-right {
        width: 100% !important;
        text-align: center !important;
    }
    
    .footer-right p {
        font-size: 0.85rem !important;
    }
}

/* === Small phones (480px and below) === */
@media screen and (max-width: 480px) {
    .main-content {
        padding: 12px 10px !important;
    }
    
    .privacy-hero {
        padding: 25px 12px !important;
    }
    
    .privacy-hero h1 {
        font-size: 1.8rem !important;
    }
    
    .privacy-hero p {
        font-size: 0.95rem !important;
    }
    
    .privacy-card {
        padding: 20px 12px !important;
    }
    
    .section-title {
        font-size: 1.2rem !important;
    }
    
    .about-hero h1 {
        font-size: 2rem !important;
    }
    
    .stats-grid-about {
        grid-template-columns: 1fr !important;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .footer-links-grid a {
        font-size: 0.8rem !important;
        padding: 8px 3px !important;
        min-height: 40px;
    }
}

/* === Very small phones (under 360px) === */
@media screen and (max-width: 360px) {
    .main-content {
        padding: 10px 8px !important;
    }
    
    .privacy-hero {
        padding: 20px 10px !important;
    }
    
    .privacy-hero h1 {
        font-size: 1.5rem !important;
    }
    
    .privacy-card {
        padding: 15px 10px !important;
    }
    
    .section-title {
        font-size: 1.1rem !important;
    }
    
    .section-title .number {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.8rem !important;
    }
    
    .about-hero h1 {
        font-size: 1.8rem !important;
    }
    
    .footer-links-grid a {
        font-size: 0.75rem !important;
        padding: 6px 2px !important;
        min-height: 36px;
    }
}

/* === Ultra small phones (320px and below) === */
@media screen and (max-width: 320px) {
    .main-content {
        padding: 8px 5px !important;
    }
    
    .privacy-hero {
        padding: 15px 8px !important;
    }
    
    .privacy-hero h1 {
        font-size: 1.3rem !important;
    }
    
    .privacy-card {
        padding: 12px 8px !important;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
}