/* ========================================
   TABLET (iPAD) OPTIMIZATIONS
   Breakpoints: 768px - 1024px
   ======================================== */

/* General Container Adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    
    /* ============ NAVIGATION FIX FOR TABLET ============ */
    /* Show desktop menu on tablet */
    nav .hidden.md\\:flex {
        display: flex !important;
    }
    
    /* Hide mobile menu button on tablet */
    nav #mobileMenuButton {
        display: none !important;
    }
    
    /* Tablet menu adjustments */
    nav .inline-flex.items-center.gap-1\\.5 {
        gap: 0.375rem !important;
        padding: 0.375rem !important;
    }
    
    nav .inline-flex.items-center.gap-1\\.5 a {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
        gap: 0.375rem !important;
    }
    
    nav .inline-flex.items-center.gap-1\\.5 a span:first-child {
        font-size: 0.875rem !important;
    }
    
    /* Hide scrollbar for menu overflow */
    .no-scrollbar::-webkit-scrollbar {
        display: none;
    }
    
    .no-scrollbar {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* Logo size for tablet */
    nav img[alt*="DashboardCoin"] {
        height: 2rem !important; /* 32px */
    }
    
    /* Auth links spacing */
    nav .md\\:space-x-3 {
        gap: 0.5rem !important;
    }
    
    nav .md\\:space-x-3 a,
    nav .md\\:space-x-3 button {
        font-size: 0.8125rem !important;
        padding: 0.375rem 0.75rem !important;
    }
    
    /* Navigation bar height */
    nav .h-16 {
        height: 3.5rem !important; /* 56px */
    }
    
    /* Adjust top position */
    nav.fixed {
        top: 2.5rem !important; /* Adjust based on top bar */
    }
    
    /* Container Spacing */
    .max-w-7xl {
        max-width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* Markets Section */
    .market-tabs-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .market-tabs-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .market-tabs-container::-webkit-scrollbar-thumb {
        background: rgba(99, 102, 241, 0.5);
        border-radius: 2px;
    }
    
    .market-tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Market Table */
    .market-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .market-table {
        min-width: 700px;
    }
    
    .market-table th,
    .market-table td {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Latest News Feed - Horizontal Scroll */
    #latest-news-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    #latest-news-section .rounded-2xl {
        border-radius: 1rem !important;
    }
    
    .news-card {
        width: 14rem !important; /* 224px */
        flex-shrink: 0;
    }
    
    .news-card img {
        height: 8rem !important;
    }
    
    #scrollLeft,
    #scrollRight {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    #scrollLeft svg,
    #scrollRight svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    
    /* Progress Indicator */
    #prevPage,
    #nextPage {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Latest Comments */
    .latest-comments-section {
        padding: 0.75rem !important;
    }
    
    .comment-card {
        padding: 0.75rem !important;
        gap: 0.75rem !important;
    }
    
    .comment-avatar {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .comment-badge {
        width: 1.75rem !important;
        height: 1.75rem !important;
        font-size: 0.75rem !important;
    }
    
    .comment-content {
        font-size: 0.875rem !important;
    }
    
    .comment-meta {
        font-size: 0.75rem !important;
    }
    
    /* Stock Market Table */
    .stock-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .stock-table {
        min-width: 700px !important;
    }
    
    /* Crypto Sections */
    .crypto-section-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .crypto-card {
        padding: 1rem !important;
    }
    
    /* Trending Tags */
    .trending-tags-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .tag-badge {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Statistics Cards */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
    
    .stat-card {
        padding: 1rem !important;
    }
    
    .stat-value {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
    
    /* News Grid */
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    /* Modal/Popup Adjustments */
    .modal-content {
        max-width: 90% !important;
        margin: 2rem auto !important;
    }
    
    /* Button Sizing */
    .btn-large {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    .btn-medium {
        padding: 0.5rem 1rem !important;
        font-size: 0.8125rem !important;
    }
    
    /* Card Padding */
    .card-padding {
        padding: 1.25rem !important;
    }
    
    /* Section Spacing */
    .section-spacing {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* Header/Title Sizing */
    .section-title {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    .section-subtitle {
        font-size: 0.875rem !important;
    }
    
    /* Icon Sizing */
    .icon-large {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .icon-medium {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    .icon-small {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    /* Badge Sizing */
    .badge {
        padding: 0.25rem 0.625rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Form Elements */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.625rem 0.875rem !important;
    }
    
    /* Navigation */
    .nav-item {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Footer */
    .footer-content {
        padding: 2rem 1.5rem !important;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* Horizontal Scroll Improvements */
    .horizontal-scroll {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
    }
    
    .horizontal-scroll::-webkit-scrollbar {
        height: 6px;
    }
    
    .horizontal-scroll::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .horizontal-scroll::-webkit-scrollbar-thumb {
        background-color: rgba(156, 163, 175, 0.5);
        border-radius: 3px;
    }
    
    .horizontal-scroll::-webkit-scrollbar-thumb:hover {
        background-color: rgba(156, 163, 175, 0.7);
    }
    
    /* Touch Targets */
    a, button, .clickable {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text selection during scroll */
    .no-select {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
    
    /* Image Optimization */
    img {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Smooth Scrolling */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    html {
        scroll-behavior: smooth;
    }
}

/* Specific iPad Pro (1024px) */
@media (min-width: 1024px) and (max-width: 1024px) {
    .container {
        max-width: 960px !important;
    }
}

/* iPad in Portrait (768px) */
@media (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
    .news-card {
        width: 12rem !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .crypto-section-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* iPad in Landscape (1024px) */
@media (min-width: 1024px) and (max-width: 1024px) and (orientation: landscape) {
    .news-card {
        width: 15rem !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}






