/* =========================================================================
   MASTER RESPONSIVE OVERRIDES - FLUID TYPOGRAPHY & LAYOUT FIXES
   ========================================================================= */

/* Base Fluid Typography Overrides for standard tags */
h1, .h1 { font-size: clamp(2rem, 5vw, 3.5rem) !important; line-height: 1.2 !important; }
h2, .h2 { font-size: clamp(1.75rem, 4.5vw, 2.8rem) !important; line-height: 1.25 !important; }
h3, .h3 { font-size: clamp(1.3rem, 3.5vw, 2.25rem) !important; line-height: 1.3 !important; }
h4, .h4 { font-size: clamp(1.15rem, 2.5vw, 1.75rem) !important; line-height: 1.4 !important; }
h5, .h5 { font-size: clamp(1.05rem, 2vw, 1.5rem) !important; line-height: 1.4 !important; }
h6, .h6 { font-size: clamp(0.95rem, 1.5vw, 1.25rem) !important; line-height: 1.5 !important; }

/* Bootstrap fs-* Class Fluid Overrides */
.fs-1 { font-size: clamp(2.5rem, 6vw, 4rem) !important; }
.fs-2 { font-size: clamp(1.8rem, 5vw, 3rem) !important; }
.fs-3 { font-size: clamp(1.4rem, 4vw, 2.5rem) !important; }
.fs-4 { font-size: clamp(1.15rem, 3vw, 1.75rem) !important; }
.fs-5 { font-size: clamp(1.05rem, 2vw, 1.5rem) !important; }
.fs-6 { font-size: clamp(0.9rem, 1.5vw, 1.25rem) !important; }

/* General Paragraphs & Content Text */
p { font-size: clamp(0.95rem, 1.2vw, 1.125rem) !important; }
.text-muted, .text-secondary { font-size: clamp(0.85rem, 1.1vw, 1rem) !important; }

/* Hero Specific Typography */
.xb-hero--title h1 { font-size: clamp(2.5rem, 7vw, 4.5rem) !important; }
.hero__content h1 { font-size: clamp(2rem, 6vw, 4.2rem) !important; }
.xb-hero-content2 .xb-item--title { font-size: clamp(1.8rem, 5vw, 3.5rem) !important; line-height: 1.2 !important; }

/* Global Button Fixes */
.thm-btn {
    padding: clamp(12px, 2vw, 20px) clamp(20px, 4vw, 40px) !important;
    font-size: clamp(14px, 1.5vw, 16px) !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

/* Global Padding/Margin Clamping */
/* This prevents massive desktop paddings from stretching mobile screens */
.p-4, .p-5, .p-lg-5 {
    padding: clamp(1rem, 4vw, 3rem) !important;
}
.m-4, .m-5, .mt-5, .mb-5 {
    margin-top: clamp(1rem, 5vw, 4rem) !important;
    margin-bottom: clamp(1rem, 5vw, 4rem) !important;
}

/* =========================================================================
   SPECIFIC MEDIA QUERY BREAKPOINTS
   ========================================================================= */

/* Desktop Large (>= 1200px) */
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

/* Desktop Small (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    /* Adjust tight paddings in grids */
    .xb-service .xb-item--inner { padding: 30px !important; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Tablet Landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .xb-hero-content { margin-left: 0 !important; text-align: center; }
    .single-content-feature { width: 50% !important; margin-bottom: 20px; }
    .custom-exam-tabs .nav-link { padding: 10px 15px !important; font-size: 14px !important; }
    
    /* Table Safety */
    .table-responsive { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
}

/* Tablet Portrait (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .xb-hero-content { margin-left: 0 !important; text-align: center; }
    .single-content-feature { width: 100% !important; margin: 10px 0 !important; }
    
    .custom-exam-tabs ul { flex-direction: column !important; }
    .custom-exam-tabs .nav-link { margin-bottom: 5px; width: 100%; }
    
    /* Table Safety */
    .table-responsive { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
    
    img { max-width: 100% !important; height: auto !important; }
}

/* Mobile Portrait & Landscape (< 576px) */
@media (max-width: 575.98px) {
    .xb-hero-content { margin-left: 0 !important; text-align: center; }
    .single-content-feature { width: 100% !important; margin: 10px 0 !important; }
    
    .header__top-info { flex-direction: column; align-items: flex-start; }
    
    /* Center text inside tabs for mobile */
    .custom-exam-tabs ul { flex-direction: column !important; }
    .custom-exam-tabs .nav-item { width: 100%; margin: 5px 0 !important; }
    .custom-exam-tabs .nav-link { width: 100%; padding: 12px !important; text-align: center; }
    
    /* Fix table overflows heavily acting up on mobile */
    .table-responsive { 
        width: 100%; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
    }
    .table-responsive th, .table-responsive td {
        white-space: nowrap !important;
    }
    
    /* Shrink huge margins on small screens */
    .m-none { margin: 0 !important; }
    
    /* Fix images blowing out bounds */
    img { max-width: 100% !important; height: auto !important; }
    
    /* Calculator Responsive Fixes */
    .rounded-circle.d-flex { flex-shrink: 0 !important; }
    #jee-calc-input-section .input-group { flex-direction: column; }
    #jee-input-value {
        width: 100% !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        margin-bottom: 10px;
    }
    #jee-calc-input-section .btn {
        width: 100% !important;
        border-radius: 8px !important;
    }
    #jee-input-value::placeholder {
        font-size: 11.5px !important;
    }
}

/* Extracted Lighthouse Inline Styles */
.calc-logo-box { width: 48px; height: 48px; flex-shrink: 0; }
