/* ===================================================================
   EDUORBIT — MOBILE.CSS
   Complete Mobile Responsiveness Fix
   Covers: 320px → 768px (phones) + 768px → 1024px (tablets)
   =================================================================== */

/* ============================================================
   BASE MOBILE RESETS
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
}

img, video, iframe, embed {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   TYPOGRAPHY — FLUID SCALING (MOBILE)
   ============================================================ */
@media (max-width: 768px) {
  .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
    max-width: 100%;
    color: #0F172A !important;
    line-height: 1.25 !important;
  }
  .section-sub {
    font-size: 0.84rem !important;
    max-width: 100%;
    color: #475569 !important;
    line-height: 1.45 !important;
  }
  .section-header {
    margin-bottom: 16px !important;
  }
}

/* ============================================================
   NAVIGATION — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .nav {
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
  }
  .nav-logo {
    font-size: 1.25rem !important;
  }
  .nav-cta {
    display: none !important; /* hide desktop CTA, show in mobile menu */
  }
}

/* ============================================================
   HERO — MOBILE (High-Contrast & Clean Layout)
   ============================================================ */
@media (max-width: 768px) {
  .hero {
    padding: 76px 16px 24px !important;
    min-height: auto !important;
    background: linear-gradient(180deg, #F0F4FA 0%, #FFFFFF 100%) !important;
  }
  /* Hide watermark and orbs on mobile to stop text color collision */
  .hero-orbs,
  .hero-bg-text,
  .hero-scroll {
    display: none !important;
  }
  .hero-badge {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #1E40AF !important;
    background: #EEF2FF !important;
    border: 1px solid #C7D2FE !important;
    padding: 5px 12px !important;
    margin-bottom: 12px !important;
    border-radius: 100px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .badge-dot {
    width: 6px !important;
    height: 6px !important;
    background: #2563EB !important;
  }
  .hero-title {
    margin-bottom: 12px !important;
  }
  .hero-title .title-line {
    font-size: clamp(1.85rem, 8vw, 2.35rem) !important;
    letter-spacing: -0.025em !important;
    line-height: 1.15 !important;
    color: #0F172A !important;
  }
  .title-line--accent {
    color: #1B4D8E !important;
  }
  .hero-sub {
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    color: #334155 !important; /* High contrast dark slate - never blends! */
    padding: 0 !important;
    margin-bottom: 18px !important;
    font-weight: 400 !important;
  }
  .hero-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
  }
  .hero-actions .btn {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    min-height: 46px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    justify-content: center !important;
    border-radius: 12px !important;
  }
  .hero-actions .btn-primary:first-child {
    background: linear-gradient(135deg, #1B4D8E, #2563EB) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(27, 77, 142, 0.25) !important;
  }
  .hero-actions .btn-outline {
    background: #ffffff !important;
    color: #1B4D8E !important;
    border: 1.5px solid #1B4D8E !important;
  }
  .hero-actions .btn:last-child {
    background: linear-gradient(135deg, #059669, #10B981) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
  }
  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27, 77, 142, 0.12) !important;
    border-radius: 14px !important;
    padding: 12px 6px !important;
    box-shadow: 0 4px 14px rgba(27, 77, 142, 0.06) !important;
    width: 100% !important;
  }
  .hero-stats .stat {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .stat-num {
    font-size: 1.3rem !important;
    font-weight: 900 !important;
    color: #1B4D8E !important; /* Bold navy blue for crisp contrast */
  }
  .stat-plus {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #D97706 !important;
  }
  .stat-label {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    color: #475569 !important; /* Dark slate gray - 100% readable */
    margin-top: 2px !important;
    line-height: 1.2 !important;
  }
  .stat-divider {
    display: none !important;
  }
}

/* ============================================================
   ABOUT SECTION — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .about-text p {
    font-size: 0.88rem !important;
    color: #334155 !important;
    line-height: 1.5 !important;
  }
  /* Remove wordy essay text on phone screen to reduce scrolling */
  .about-text p:nth-child(2) {
    display: none !important;
  }
  .about-features {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .feature-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1px solid rgba(27, 77, 142, 0.08) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    margin: 0 !important;
    border-bottom: none !important;
  }
  .feature-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: #EEF2FF !important;
    color: #1B4D8E !important;
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .feature-card h3 {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    margin-bottom: 2px !important;
  }
  .feature-card p {
    font-size: 0.78rem !important;
    color: #475569 !important;
    line-height: 1.4 !important;
  }
  /* Hide animated marquee on mobile to save space */
  .marquee {
    display: none !important;
  }
}

/* ============================================================
   COLLEGES GRID — MOBILE (Clean 1-Card per row, High Contrast)
   ============================================================ */
@media (max-width: 768px) {
  .colleges-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 0 !important;
  }
  .college-card {
    padding: 18px 16px 16px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27, 77, 142, 0.12) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .college-card:active {
    transform: scale(0.98);
  }
  .college-card-abbr {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #1B4D8E !important;
    background: #EEF2FF !important;
    border: 1px solid rgba(27, 77, 142, 0.15) !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    letter-spacing: 0.04em !important;
  }
  .college-card-emoji {
    font-size: 1.8rem !important;
    margin-bottom: 8px !important;
    display: block !important;
  }
  .college-card-name {
    font-size: 1.08rem !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
    padding-right: 50px !important;
  }
  .college-card-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .college-tag {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
  }
  .college-tag--naac {
    background: #ECFDF5 !important;
    color: #065F46 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
  }
  .college-tag--est {
    background: #F1F5F9 !important;
    color: #475569 !important;
    border: 1px solid rgba(100, 116, 139, 0.2) !important;
  }
  .college-card-location {
    font-size: 0.82rem !important;
    color: #334155 !important;
    margin-bottom: 4px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .college-card-insta {
    font-size: 0.76rem !important;
    color: #E1306C !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
  }
  /* High contrast primary CTA button on mobile */
  .college-card::after {
    content: 'View Full Profile & Fees →' !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    background: linear-gradient(135deg, #1B4D8E, #2563EB) !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    padding: 11px 16px !important;
    border-radius: 10px !important;
    margin-top: 12px !important;
    border: none !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 4px 12px rgba(27, 77, 142, 0.2) !important;
  }
  .colleges-click-hint {
    font-size: 0.78rem !important;
    color: #64748B !important;
    margin-top: 10px !important;
    text-align: center !important;
  }
}

/* ============================================================
   COMPARE SECTION — MOBILE (Swipeable row chips, saves ~150px)
   ============================================================ */
@media (max-width: 768px) {
  .cmp-picker {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27, 77, 142, 0.1) !important;
  }
  .cmp-picker-label {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    margin-bottom: 8px !important;
  }
  .cmp-picker-chips {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .cmp-picker-chips::-webkit-scrollbar { display: none !important; }
  .cmp-chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    padding: 7px 12px !important;
    border-radius: 8px !important;
    min-height: 36px !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #F8FAFC !important;
    color: #0F172A !important;
  }
  .cmp-chip.selected {
    background: #1B4D8E !important;
    color: #ffffff !important;
    border-color: #1B4D8E !important;
  }
  .cmp-compare-btn {
    width: 100% !important;
    min-height: 44px !important;
    padding: 12px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #1B4D8E, #2563EB) !important;
    color: #ffffff !important;
    border: none !important;
  }
  .cmp-scroll {
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid rgba(27, 77, 142, 0.1) !important;
    margin-top: 12px !important;
  }
  .cmp-table {
    min-width: 540px !important;
  }
  .cmp-table thead th,
  .cmp-table tbody td {
    padding: 9px 10px !important;
    font-size: 0.78rem !important;
  }
  .cmp-table thead th:first-child,
  .cmp-table tbody td:first-child {
    position: sticky !important;
    left: 0 !important;
    background: #ffffff !important;
    z-index: 2 !important;
    box-shadow: 2px 0 6px rgba(0,0,0,0.06) !important;
    font-weight: 800 !important;
    color: #0F172A !important;
  }
  .cmp-reset-btn {
    width: 100% !important;
    margin-top: 10px !important;
    padding: 10px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
    background: #F1F5F9 !important;
    color: #475569 !important;
  }
}
/* ============================================================
   FEE STRUCTURE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .fee-filters {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px 14px !important;
    margin-bottom: 14px !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    border: 1.5px solid rgba(27, 77, 142, 0.1) !important;
  }
  .filter-group label {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #1E293B !important;
    margin-bottom: 4px !important;
  }
  .filter-select,
  .filter-search {
    width: 100% !important;
    font-size: 16px !important; /* Prevents iPhone auto-zoom */
    padding: 10px 12px !important;
    border-radius: 8px !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #F8FAFC !important;
    color: #0F172A !important;
  }
  .fee-count {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    margin-bottom: 8px !important;
  }
  .fee-table-scroll {
    -webkit-overflow-scrolling: touch;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27,77,142,0.1) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    position: relative;
  }
  .fee-table-scroll::before {
    content: '👉 Swipe left/right to view all fees ➔' !important;
    display: block !important;
    background: #EFF6FF !important;
    color: #1E40AF !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 7px 10px !important;
    border-bottom: 1px solid #DBEAFE !important;
  }
  .fee-table-scroll::after {
    display: none !important;
  }
  .fee-table {
    min-width: 600px !important;
    border-collapse: separate;
    border-spacing: 0;
  }
  /* Sticky Course column with pure white background & bold contrast */
  .fee-table th:first-child,
  .fee-table td:first-child {
    position: sticky !important;
    left: 0 !important;
    background: #ffffff !important;
    z-index: 3 !important;
    box-shadow: 3px 0 8px rgba(0,0,0,0.07) !important;
    font-weight: 800 !important;
    color: #0F172A !important;
  }
  .fee-table th:first-child {
    background: #F1F5F9 !important;
  }
  .fee-table th {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    padding: 9px 10px !important;
    background: #F1F5F9 !important;
    color: #1E293B !important;
    text-transform: uppercase;
  }
  .fee-table td {
    font-size: 0.8rem !important;
    color: #334155 !important;
    padding: 10px 10px !important;
    border-bottom: 1px solid #F1F5F9 !important;
  }
  .fee-detail-btn {
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
    background: #EEF2FF !important;
    color: #1B4D8E !important;
    border: 1px solid rgba(27,77,142,0.2) !important;
    white-space: nowrap;
  }
  .fee-load-more { padding: 14px 0 0; }
  .fee-more-btn {
    width: 100% !important;
    padding: 12px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    border: 1.5px solid #1B4D8E !important;
    color: #1B4D8E !important;
  }
}

/* ============================================================
   HIDE UNNECESSARY SECTIONS ON MOBILE (Saves ~900px of scrolling)
   ============================================================ */
@media (max-width: 768px) {
  /* Services section is 100% duplicate of About Us features */
  #services,
  .section--services {
    display: none !important;
  }
  /* Standalone CTA banner before Contact is redundant with Sticky Bar & Contact Form */
  #cta,
  .section--cta {
    display: none !important;
  }
}

/* ============================================================
   ELIGIBILITY CHECKER — MOBILE (High Contrast)
   ============================================================ */
@media (max-width: 768px) {
  .elig-checker {
    padding: 0 !important;
  }
  .elig-form {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27, 77, 142, 0.1) !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.03) !important;
  }
  .elig-form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }
  .elig-field label {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #1E293B !important;
    margin-bottom: 4px !important;
  }
  .elig-field select,
  .elig-field input {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    padding: 11px 12px !important;
    border-radius: 10px !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #F8FAFC !important;
    color: #0F172A !important;
    width: 100% !important;
  }
  .elig-btn {
    width: 100% !important;
    min-height: 46px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #1B4D8E, #2563EB) !important;
    color: #ffffff !important;
    border: none !important;
  }
  .elig-cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 14px !important;
  }
  .elig-card {
    padding: 14px 14px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27,77,142,0.12) !important;
  }
  .elig-card-name {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #0F172A !important;
  }
}

/* ============================================================
   LOANS & SCHOLARSHIPS — MOBILE (Swipeable Tabs & High Contrast)
   ============================================================ */
@media (max-width: 768px) {
  .loan-tabs {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    margin-bottom: 14px !important;
  }
  .loan-tabs::-webkit-scrollbar { display: none !important; }
  .loan-tab {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 8px 14px !important;
    font-size: 0.76rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #ffffff !important;
    color: #334155 !important;
    min-height: 38px !important;
  }
  .loan-tab.active {
    background: #1B4D8E !important;
    color: #ffffff !important;
    border-color: #1B4D8E !important;
  }
  .loan-details {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .loan-box {
    padding: 16px 14px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27, 77, 142, 0.1) !important;
    border-radius: 14px !important;
  }
  .loan-box h4 {
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    color: #1B4D8E !important;
    margin-bottom: 8px !important;
  }
  .loan-box li {
    font-size: 0.8rem !important;
    color: #334155 !important;
    line-height: 1.45 !important;
    margin-bottom: 6px !important;
  }
  .loan-pane h3 {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    margin-bottom: 8px !important;
  }
  .loan-pane p {
    font-size: 0.84rem !important;
    color: #475569 !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }
  .medhabritti-tables {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* ============================================================
   CONTACT SECTION — MOBILE (2x2 Quick Contact Grid + Form)
   ============================================================ */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .contact-info {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .contact-item {
    background: #ffffff !important;
    border: 1px solid rgba(27, 77, 142, 0.1) !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
  }
  .contact-label {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: #64748B !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  }
  .contact-value {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    color: #1B4D8E !important;
    word-break: break-word !important;
    display: block !important;
    margin-top: 2px !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .contact-form {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(27, 77, 142, 0.1) !important;
    gap: 10px !important;
  }
  .form-group label {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #1E293B !important;
    margin-bottom: 4px !important;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    border: 1.5px solid #CBD5E1 !important;
    background: #F8FAFC !important;
    color: #0F172A !important;
  }
  .contact-form .btn {
    width: 100% !important;
    min-height: 46px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #1B4D8E, #2563EB) !important;
    color: #ffffff !important;
    border: none !important;
  }
}

/* ============================================================
   FOOTER — MOBILE (Compact & Clear)
   ============================================================ */
@media (max-width: 768px) {
  .footer {
    padding: 28px 16px calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    background: #0F172A !important;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
  }
  .footer-brand p {
    font-size: 0.8rem !important;
    color: #94A3B8 !important;
    line-height: 1.4 !important;
  }
  .footer-links-group h4 {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    color: #F8FAFC !important;
    margin-bottom: 8px !important;
  }
  .footer-links-group a {
    font-size: 0.8rem !important;
    color: #94A3B8 !important;
    margin-bottom: 6px !important;
    display: block !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    gap: 6px !important;
    text-align: center !important;
    font-size: 0.72rem !important;
    color: #64748B !important;
  }
}

@media (max-width: 400px) {
  .footer-top {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   COLLEGE PROFILE MODAL — MOBILE (Bottom sheet feel)
   ============================================================ */
@media (max-width: 768px) {
  .cp-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    background: rgba(15, 23, 42, 0.8) !important;
  }
  .cp-modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 22px 22px 0 0 !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  .cp-banner {
    padding: 22px 18px 18px !important;
    position: relative;
    border-radius: 22px 22px 0 0 !important;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
  .cp-close {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
    top: 14px !important;
    right: 14px !important;
  }
  .cp-banner-icon {
    width: 52px;
    height: 52px;
    font-size: 2rem;
    border-radius: 14px;
    flex-shrink: 0;
  }
  .cp-name {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    padding-right: 36px;
  }
  .cp-body {
    padding: 16px 18px 24px !important;
  }
  .cp-stats-row {
    flex-direction: row;
  }
  .cp-stat {
    padding: 12px 8px;
  }
  .cp-stat-val {
    font-size: 0.92rem;
  }
  .cp-stat-label {
    font-size: 0.6rem;
  }
  .cp-tabs {
    gap: 6px !important;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cp-tabs::-webkit-scrollbar { display: none; }
  .cp-tab {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 9px 14px !important;
    border-radius: 8px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .cp-links-row {
    flex-direction: column;
    gap: 10px;
  }
  .cp-link {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }
  .cp-placement-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .cp-plc-val {
    font-size: 1.1rem;
  }
}

/* ============================================================
   MODALS (Year-wise detail) — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .modal {
    padding: 28px 20px;
    max-height: 90vh;
    border-radius: 16px;
  }
  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }
  .modal-table th, .modal-table td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }
}

/* ============================================================
   RECEIPT MODAL — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .receipt-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    background: rgba(15, 23, 42, 0.8) !important;
  }
  .receipt-modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 28px 18px 24px !important;
    max-height: 92vh;
    overflow-y: auto;
  }
  .receipt-form input,
  .receipt-form select {
    font-size: 16px !important;
    border-radius: 10px !important;
  }
  .printer-machine {
    max-width: 320px !important;
  }
  .receipt-btn-wa {
    min-height: 48px;
    font-size: 0.94rem !important;
  }
  .receipt-sub-actions {
    gap: 8px !important;
  }
  .receipt-btn-sub {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================================
   LEAD POPUP — MOBILE
   ============================================================ */
@media (max-width: 480px) {
  .lead-popup {
    padding: 24px 18px;
    margin: 14px;
    border-radius: 18px;
    max-height: 88vh;
    overflow-y: auto;
  }
  .lead-popup-title {
    font-size: 1.2rem;
    font-weight: 800;
  }
  .lead-popup-sub {
    font-size: 0.85rem;
  }
  .lead-popup-btn {
    font-size: 0.92rem;
    padding: 14px;
    font-weight: 700;
  }
  .lead-popup-form input,
  .lead-popup-form select {
    font-size: 16px !important;
  }
}

/* ============================================================
   FLOATING WHATSAPP BUTTON ON MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .wa-float,
  .whatsapp-float {
    display: flex !important;
    position: fixed !important;
    bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 16px)) !important;
    right: 18px !important;
    left: auto !important;
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45) !important;
  }
  .wa-tooltip {
    display: none !important;
  }
}

/* ============================================================
   MARKETING POPUPS & BUTTONS — TOUCH FRIENDLY
   ============================================================ */
@media (max-width: 768px) {
  /* Admission popup */
  #admissionBanner {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 100%;
    padding: 20px 18px;
  }
  .floating-cta {
    font-size: 0.78rem;
    padding: 10px 18px;
  }
  .btn {
    padding: 12px 24px;
    font-size: 0.88rem;
    min-height: 44px; /* Apple's recommended touch target */
  }
  .btn--large {
    padding: 14px 28px;
  }
  /* Increase tap targets for small buttons */
  .fee-detail-btn,
  .pill,
  .loan-tab,
  .cmp-chip {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }
}

/* ============================================================
   SECTION PADDING & DEAD SPACE ELIMINATION — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .section {
    padding: 30px 16px !important; /* Compact & eliminates dead vertical space */
  }
  .section-header {
    margin-bottom: 16px !important;
  }
  .section-tag {
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    color: #1B4D8E !important;
    background: rgba(27, 77, 142, 0.08) !important;
    padding: 4px 12px !important;
    border-radius: 100px !important;
    display: inline-flex !important;
    margin-bottom: 6px !important;
  }
  .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
    font-weight: 900 !important;
    color: #0F172A !important;
    line-height: 1.25 !important;
  }
  .section-title em {
    color: #1B4D8E !important;
    font-style: normal !important;
  }
  .section-sub {
    font-size: 0.84rem !important;
    color: #475569 !important;
    line-height: 1.45 !important;
    margin-top: 4px !important;
  }
  .container {
    padding: 0 !important;
    max-width: 100% !important;
  }
  /* Hide animated marquee ticker on mobile */
  .marquee {
    display: none !important;
  }
}

/* ============================================================
   ANIMATIONS — REDUCE ON MOBILE FOR PERFORMANCE
   ============================================================ */
@media (max-width: 768px) {
  /* Simpler entrance on mobile */
  [data-anim] {
    --anim-duration: 0.35s;
    --anim-distance: 14px;
  }
  /* Disable 3D tilt on touch devices */
  .college-card,
  .elig-card {
    transform: none !important;
  }
  /* Disable particle trail on mobile */
  .particle-trail {
    display: none !important;
  }
}

/* ============================================================
   SAFE AREA — iPhone X+ Notch/Home Bar
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .nav {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .footer {
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }
  .whatsapp-float {
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 16px));
    right: max(20px, env(safe-area-inset-right));
  }
}

/* ============================================================
   TABLET — 768px → 1024px
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .section {
    padding: 80px 32px;
  }
  .hero {
    padding: 110px 40px 70px;
  }
  .colleges-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-grid {
    gap: 40px;
  }
  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .contact-grid {
    gap: 40px;
  }
  .cmp-table thead th,
  .cmp-table tbody td {
    padding: 12px 14px;
    font-size: 0.8rem;
  }
}

/* ============================================================
   LANDSCAPE PHONE — Special fixes
   ============================================================ */
@media (max-height: 500px) and (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 80px 20px 40px;
  }
  .mobile-menu {
    overflow-y: auto;
  }
  .mobile-menu-links {
    padding: 60px 0 20px;
  }
  .mobile-link {
    font-size: 1.4rem;
  }
}

/* ============================================================
   TOUCH INTERACTION IMPROVEMENTS
   ============================================================ */
@media (hover: none) {
  .btn:hover {
    transform: none;
  }
  /* Make clickable elements more obvious */
  .college-card {
    border: 1.5px solid rgba(27,77,142,0.12);
  }
  .college-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }
  .btn:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

/* ============================================================
   COOKIE CONSENT BANNER & MODAL — FULL MOBILE RESPONSIVENESS
   (Fixes desktop-version glitch on Android and iPhones)
   ============================================================ */
@media (max-width: 768px) {
  .cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding: 14px 16px !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45) !important;
    z-index: 10000 !important;
    overflow-x: hidden !important;
  }

  .cookie-banner-content {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .cookie-banner-text {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .cookie-icon {
    font-size: 1.4rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
  }

  .cookie-banner-text h4 {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
  }

  .cookie-banner-text p,
  .cookie-banner-p {
    font-size: 0.76rem !important;
    color: #cbd5e1 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
  }

  .cookie-banner-text a {
    color: #93c5fd !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
  }

  .cookie-banner-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-cookie {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 8px !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
    white-space: normal !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    line-height: 1.25 !important;
  }

  .btn-cookie--reject {
    grid-column: 1 / 2 !important;
    font-size: 0.75rem !important;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
  }

  .btn-cookie--accept {
    grid-column: 2 / 3 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    background: #2563eb !important;
    color: #ffffff !important;
  }

  .btn-cookie--pref {
    grid-column: 1 / -1 !important;
    font-size: 0.75rem !important;
    padding: 8px 12px !important;
    min-height: 36px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px dashed rgba(255, 255, 255, 0.3) !important;
    color: #e2e8f0 !important;
  }

  /* Cookie Modal Mobile Polish */
  .cookie-modal-overlay {
    padding: 12px !important;
  }

  .cookie-modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    border-radius: 14px !important;
  }

  .cookie-modal-header {
    padding: 14px 16px !important;
  }

  .cookie-modal-header h3 {
    font-size: 0.98rem !important;
  }

  .cookie-modal-body {
    padding: 14px 16px !important;
    gap: 12px !important;
  }

  .cookie-category {
    padding: 12px !important;
  }

  .cookie-category-head strong {
    font-size: 0.85rem !important;
  }

  .cookie-category-info {
    font-size: 0.76rem !important;
  }

  .cookie-modal-footer {
    padding: 12px 16px !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .cookie-modal-footer .btn-cookie {
    width: 100% !important;
  }
}

/* ============================================================
   MOBILE MENU — CTA BUTTONS
   ============================================================ */
.mobile-menu-cta {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu {
    padding-bottom: 80px;
    justify-content: space-between;
    flex-direction: column;
    padding-top: 80px;
  }
  .mobile-menu-links {
    gap: 18px;
  }
  .mobile-link {
    font-size: clamp(1.3rem, 5vw, 2rem);
  }
  .mobile-menu-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 32px 20px;
    width: 100%;
  }
  .mobile-menu-call-btn,
  .mobile-menu-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    width: 100%;
    gap: 8px;
    transition: transform 0.2s, opacity 0.2s;
  }
  .mobile-menu-call-btn:active,
  .mobile-menu-wa-btn:active {
    transform: scale(0.97);
    opacity: 0.85;
  }
  .mobile-menu-call-btn {
    background: linear-gradient(135deg, #1B4D8E, #2563EB);
    color: #fff;
  }
  .mobile-menu-wa-btn {
    background: linear-gradient(135deg, #075E54, #25D366);
    color: #fff;
  }
}
