/* ==============================================================
   Urdu Coach Pro - Complete Responsive Stylesheet
   Mobile-First Approach
   Breakpoints:
     - XXS: 320px (iPhone 5/SE)
     - XS:  480px (small phones)
     - SM:  640px (large phones)
     - MD:  768px (tablets portrait)
     - LG:  992px (tablets landscape / small laptops)
     - XL:  1200px (laptops)
     - XXL: 1440px (desktops)
   ============================================================== */

/* ============================================
   XXS Phones (320px - 479px) - iPhone SE, small Android
   ============================================ */
@media (max-width: 479px) {
    body {
        font-size: 15px;
        line-height: 1.7;
    }

    .container {
        padding: 0 12px;
    }

    /* Top bar */
    .top-bar {
        font-size: 13px;
        padding: 5px 0;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 4px;
    }

    .top-bar-left,
    .top-bar-right {
        text-align: center !important;
    }

    .social-links {
        gap: 4px;
    }

    .social-links li a {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    /* Header */
    .site-header {
        padding: 12px 0;
    }

    .site-title {
        font-size: 20px !important;
        line-height: 1.2;
    }

    .site-description {
        font-size: 14px;
    }

    .header-ad-area {
        display: none;
    }

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

    .menu-toggle {
        padding: 10px 12px;
    }

    .menu-icon {
        width: 22px;
        height: 2.5px;
    }

    .primary-menu-list li a,
    .fallback-menu li a {
        padding: 10px 14px;
        font-size: 14px;
    }

    .search-toggle {
        padding: 10px 12px;
        font-size: 18px;
    }

    /* Currency Ticker */
    .currency-ticker-label {
        padding: 6px 10px;
        font-size: 13px;
        gap: 5px;
    }

    .currency-ticker-wrap {
        padding: 0 8px;
    }

    .ticker-item {
        padding: 4px 8px;
        gap: 4px;
    }

    .ticker-code, .ticker-name {
        font-size: 13px;
    }

    .ticker-price, .ticker-change {
        font-size: 10px;
    }

    /* Slider */
    .slider-track {
        height: 240px !important;
    }

    .slider-overlay {
        padding: 14px;
    }

    .slider-title {
        font-size: 16px !important;
        line-height: 1.35;
    }

    .slider-cat {
        padding: 2px 8px;
        font-size: 10px;
    }

    .slider-meta {
        font-size: 13px;
        gap: 4px;
    }

    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .slider-arrow-prev { right: 8px; }
    .slider-arrow-next { left: 8px; }

    /* Home row */
    .home-row {
        flex-direction: column;
        gap: 20px;
    }

    .home-row-sidebar {
        width: 100% !important;
    }

    /* Section heading */
    .section-heading {
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 18px;
    }

    .section-title {
        font-size: 17px !important;
        gap: 6px;
    }

    .title-bar {
        height: 20px;
        width: 4px;
    }

    .section-more {
        font-size: 14px;
    }

    .more-arrow {
        font-size: 14px;
    }

    /* Posts Grid */
    .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .post-card-body {
        padding: 12px;
    }

    .post-card-category {
        padding: 2px 8px;
        font-size: 10px;
    }

    .post-card-title {
        font-size: 15px !important;
        line-height: 1.45;
        -webkit-line-clamp: 3;
    }

    .post-card-meta {
        font-size: 13px;
    }

    .post-card-excerpt {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }

    /* Numbered cards */
    .numbered-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .numbered-title {
        font-size: 15px !important;
        min-height: 50px;
        -webkit-line-clamp: 3;
    }

    .numbered-badge {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: -8px;
        right: -8px;
    }

    /* Circular cards */
    .latest-circular-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .circular-card {
        padding: 10px;
    }

    .circular-thumb {
        width: 50px;
        height: 50px;
    }

    .circular-title {
        font-size: 15px !important;
    }

    /* Video section */
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .video-thumb-small {
        width: 100px;
        height: 60px;
    }

    .video-card-title-small {
        font-size: 14px !important;
    }

    .video-play-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .video-card-title {
        font-size: 16px !important;
    }

    /* Photo Gallery */
    .photo-gallery-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    .gallery-title {
        font-size: 14px !important;
        min-height: 32px;
    }

    .gallery-num {
        width: 22px;
        height: 22px;
        font-size: 13px;
    }

    /* Important links */
    .important-links-grid {
        grid-template-columns: 1fr !important;
        padding: 12px;
        gap: 8px;
    }

    .important-link {
        padding: 8px;
        gap: 8px;
    }

    .important-link-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .important-link-title {
        font-size: 14px;
    }

    .important-link-desc {
        font-size: 10px;
    }

    /* Social media section */
    .social-media-section {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .social-col-header {
        padding: 12px 15px;
    }

    .social-col-header h3 {
        font-size: 14px;
    }

    .social-icon-large {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .social-feed-thumb {
        width: 40px;
        height: 40px;
    }

    .social-feed-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .social-yt-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .social-ig-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }

    /* Mobile app banner */
    .mobile-app-banner {
        padding: 14px;
    }

    .app-content {
        flex-direction: column;
        gap: 12px;
    }

    .app-image {
        display: none;
    }

    .app-title {
        font-size: 15px;
    }

    .app-subtitle {
        font-size: 14px;
    }

    .app-btn {
        padding: 6px 10px;
        font-size: 14px;
    }

    /* Telegram widget */
    .telegram-widget {
        padding: 14px;
    }

    .tg-title {
        font-size: 14px;
    }

    .tg-subtitle {
        font-size: 13px;
    }

    .tg-stat {
        padding: 6px 4px;
    }

    .tg-stat-value {
        font-size: 15px;
    }

    .tg-stat-label {
        font-size: 9px;
    }

    .tg-join-btn {
        padding: 8px 14px;
        font-size: 15px;
    }

    /* Sidebar social */
    .sidebar-social-block {
        padding: 14px;
    }

    .sidebar-social-heading {
        font-size: 15px;
    }

    .sidebar-social-btn {
        padding: 8px 12px;
        font-size: 15px;
        gap: 8px;
    }

    .sidebar-social-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    /* Single post */
    .single-article {
        padding: 14px;
    }

    .entry-title {
        font-size: 20px !important;
        line-height: 1.35;
    }

    .entry-meta {
        font-size: 14px;
        gap: 6px;
    }

    .entry-content {
        font-size: 15px;
        line-height: 1.75;
    }

    .entry-content h1 { font-size: 22px !important; }
    .entry-content h2 { font-size: 20px !important; }
    .entry-content h3 { font-size: 18px !important; }
    .entry-content h4 { font-size: 16px !important; }

    .entry-content img {
        border-radius: 3px;
    }

    .entry-content table {
        font-size: 15px;
    }

    .breadcrumb {
        padding: 8px 12px !important;
        font-size: 14px;
    }

    /* Author box */
    .author-box {
        flex-direction: column;
        text-align: center;
        padding: 14px;
        gap: 12px;
    }

    .author-avatar img {
        width: 60px;
        height: 60px;
    }

    .author-name {
        font-size: 16px;
    }

    .author-bio {
        font-size: 15px;
    }

    /* Comments */
    .comments-area {
        padding: 14px;
    }

    .comments-title {
        font-size: 17px;
    }

    .comment-form input,
    .comment-form textarea {
        font-size: 14px;
    }

    .submit-comment {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Footer */
    .site-footer {
        margin-top: 30px;
    }

    .footer-widgets {
        padding: 25px 0;
    }

    .footer-widgets .container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .footer-col {
        padding: 0 8px;
    }

    .footer-bottom {
        padding: 14px 0;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }

    .footer-menu-list {
        gap: 10px;
        justify-content: center;
    }

    .footer-credit {
        font-size: 13px;
    }

    /* Cookie bar */
    .cookie-consent-bar {
        padding: 12px 0;
    }

    .cookie-consent-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .cookie-message {
        font-size: 14px;
    }

    .cookie-btn {
        padding: 6px 16px;
        font-size: 14px;
    }

    /* Back to top */
    .back-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 70px;
        left: 12px;
    }

    .back-arrow {
        font-size: 18px;
    }

    /* Category section */
    .category-section {
        padding: 14px;
    }

    .cat-card-feature .cat-card-title {
        font-size: 16px !important;
    }

    .cat-card-feature .cat-card-excerpt {
        font-size: 15px;
        -webkit-line-clamp: 3;
    }

    .cat-card-small {
        padding: 8px;
    }

    .cat-card-thumb {
        width: 70px;
        height: 50px;
    }

    .cat-card-small .cat-card-title {
        font-size: 15px;
    }

    /* Page header */
    .archive-header,
    .page-header {
        padding: 18px 14px;
    }

    .archive-title,
    .page-title {
        font-size: 22px !important;
    }

    .archive-description {
        font-size: 15px;
    }

    /* Sidebar */
    .widget-area.sidebar .widget {
        padding: 14px;
    }

    .widget-title {
        font-size: 15px;
    }

    .widget ul li {
        padding: 6px 0;
    }

    /* 404 */
    .error-404 {
        padding: 30px 18px;
    }

    .error-code {
        font-size: 70px;
    }

    .error-title {
        font-size: 18px;
    }

    .error-text {
        font-size: 14px;
    }

    .error-categories ul li {
        padding: 4px 8px;
        font-size: 14px;
    }
}

/* ============================================
   XS Phones (480px - 639px)
   ============================================ */
@media (min-width: 480px) and (max-width: 639px) {
    .container {
        padding: 0 14px;
    }

    .posts-grid {
        grid-template-columns: 1fr !important;
    }

    .numbered-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }

    .footer-widgets .container {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   SM Large phones (640px - 767px)
   ============================================ */
@media (min-width: 640px) and (max-width: 767px) {
    .posts-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .numbered-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    .photo-gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .latest-circular-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .important-links-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .social-media-section {
        grid-template-columns: 1fr !important;
    }

    .footer-widgets .container {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ============================================
   MD Tablets portrait (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        padding: 0 16px;
    }

    .header-inner {
        gap: 16px;
    }

    .header-ad-area {
        min-width: 200px;
    }

    .site-title {
        font-size: 26px;
    }

    .posts-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .numbered-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
    }

    .home-row {
        flex-direction: column;
    }

    .home-row-sidebar {
        width: 100% !important;
    }

    .video-grid {
        grid-template-columns: 1fr !important;
    }

    .social-media-section {
        grid-template-columns: 1fr 1fr !important;
    }

    .important-links-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .footer-widgets .container {
        grid-template-columns: 1fr 1fr !important;
    }

    .single-article {
        padding: 22px;
    }

    .entry-title {
        font-size: 26px;
    }
}

/* ============================================
   LG Tablets landscape / small laptops (992px - 1199px)
   ============================================ */
@media (min-width: 992px) and (max-width: 1199px) {
    .home-row {
        flex-direction: row;
    }

    .home-row-main {
        flex: 1;
    }

    .home-row-sidebar {
        width: 320px;
    }

    .numbered-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr !important;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .video-grid {
        grid-template-columns: 1.5fr 1fr !important;
    }

    .social-media-section {
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    .important-links-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    .footer-widgets .container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ============================================
   XL Laptops (1200px - 1439px)
   ============================================ */
@media (min-width: 1200px) and (max-width: 1439px) {
    .home-row-main {
        flex: 0 0 68%;
    }

    .home-row-sidebar {
        width: 30%;
    }
}

/* ============================================
   XXL Desktops (1440px+)
   ============================================ */
@media (min-width: 1440px) {
    body {
        font-size: 18px;
    }

    .container {
        padding: 0 24px;
    }

    .entry-content {
        font-size: 18px;
    }

    .entry-title {
        font-size: 38px;
    }

    .site-title {
        font-size: 40px;
    }
}

/* ============================================
   Ultra-wide (1920px+)
   ============================================ */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .top-bar,
    .main-navigation,
    .header-ad-area,
    .site-footer,
    .cookie-consent-bar,
    .back-to-top-btn,
    .currency-ticker,
    .home-row-sidebar,
    .related-posts,
    .comments-area,
    .navigation.pagination {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .single-article,
    .page-article {
        box-shadow: none;
        border: 0;
        padding: 0;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ============================================
   ACCESSIBILITY - Reduce Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   HIGH CONTRAST / DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Future dark mode support - placeholder */
}

/* ============================================
   TOUCH IMPROVEMENTS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets for touch */
    .menu-toggle,
    .search-toggle,
    .slider-arrow,
    .slider-dot,
    .section-more,
    .post-card-title a,
    .cat-card-link {
        -webkit-tap-highlight-color: rgba(184, 0, 31, 0.1);
    }

    .slider-arrow {
        width: 44px;
        height: 44px;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}
