/**
 * Mobile-First Responsive Styles
 * Priority: Mobile Responsive
 */

/* ==================== 
   Base Mobile Styles (320px - 480px)
   ==================== */

/* Viewport fix for iOS */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
    }
}

/* Mobile-first font sizes */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Logo - smaller on mobile */
    .logo-section {
        padding: 10px 0;
    }
    
    .logo-text {
        font-size: 20px !important;
        font-weight: 700;
    }
    
    .logo-section img {
        max-height: 35px;
        width: auto;
    }
    
    /* Navigation - stack items */
    .sub-nav-list {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sub-nav-list li {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 50%;
    }
    
    .sub-nav-list a {
        padding: 8px 10px;
        font-size: 11px;
        text-align: center;
    }
    
    /* Section headers */
    .section-header {
        font-size: 14px !important;
        padding: 10px !important;
    }
    
    /* Job cards - full width on mobile */
    .job-card-pg {
        margin-bottom: 12px;
        padding: 10px 12px;
        display: block;
    }
    
    .job-card-pg .job-title {
        font-size: 13px;
        min-height: auto;
        line-height: 1.35;
        margin-bottom: 8px;
    }
    
    .job-card-pg .job-meta {
        font-size: 11px;
    }
    
    .job-card-pg .job-meta-row {
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin-bottom: 4px;
        padding-bottom: 3px;
    }
    
    .job-card-pg .job-meta-label {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .job-card-pg .job-meta-value {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: right;
        min-width: 0;
    }
    
    /* Post page */
    .post-title-center {
        font-size: 18px !important;
        padding: 0 10px;
    }
    
    .post-info-bar {
        font-size: 12px;
        padding: 8px;
    }
    
    .post-content-box {
        padding: 15px !important;
        margin: 0 10px !important;
        font-size: 14px !important;
    }
    
    .post-content-box h2,
    .post-content-box h3 {
        font-size: 16px !important;
    }
    
    /* Quick links */
    .quick-link-btn {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    /* Apply button */
    .apply-button-main {
        font-size: 14px !important;
        padding: 10px 20px !important;
        width: 90%;
    }
    
    /* Footer */
    .footer-links-row a {
        font-size: 12px !important;
        margin: 0 8px !important;
        display: inline-block;
    }
    
    .main-footer .footer-bottom p {
        font-size: 11px !important;
    }
    
    /* Pagination */
    .pagination-pg a,
    .pagination-pg span {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-width: 35px !important;
    }
    
    /* View all button */
    .view-all-btn {
        font-size: 12px !important;
        padding: 8px 25px !important;
    }
}

/* ==================== 
   Tablet Styles (481px - 767px)
   ==================== */
@media (min-width: 481px) and (max-width: 767px) {
    .logo-text {
        font-size: 26px !important;
    }
    
    .sub-nav-list a {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .post-title-center {
        font-size: 20px !important;
    }
    
    .job-card-pg .job-title {
        font-size: 13px;
    }
}

/* ==================== 
   Large Mobile / Small Tablet (768px - 991px)
   ==================== */
@media (min-width: 768px) and (max-width: 991px) {
    .logo-text {
        font-size: 28px !important;
    }
    
    .post-title-center {
        font-size: 22px !important;
    }
}

/* ==================== 
   Touch Device Optimizations
   ==================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .quick-link-btn,
    .apply-button-main,
    .view-all-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .job-card-pg {
        min-height: 44px;
    }
    
    .sub-nav-list a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .quick-link-btn:hover,
    .apply-button-main:hover,
    .job-card-pg:hover {
        transform: none !important;
    }
}

/* ==================== 
   Landscape Mobile
   ==================== */
@media (max-height: 500px) and (orientation: landscape) {
}

/* ==================== 
   High DPI / Retina Displays
   ==================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ==================== 
   Prevent Horizontal Scroll
   ==================== */
/* Let ad network code control sizing - no viewport clipping */

/* Ensure all containers respect viewport width */
.container {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* ==================== 
   Responsive Typography
   ==================== */
@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    h5 { font-size: 0.9rem; }
    h6 { font-size: 0.85rem; }
}

/* ==================== 
   Safe Area for Notch Phones
   ==================== */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}