/* EXCEL INFOTECH - public website responsive compatibility layer
   Additive layout-only rules. Existing content, colors, links and functionality remain unchanged. */

html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
*, *::before, *::after { box-sizing: border-box; }
img, picture, video, iframe, svg, canvas {
  max-width: 100%;
}
img, video { height: auto; }
button, input, select, textarea { max-width: 100%; }
.container, .wrap, .content, .section, .panel, .card, main, header, footer {
  min-width: 0;
}
table { max-width: 100%; }
.table-responsive, .table-wrap, .table-wrapper, .table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
form, fieldset, .form-row, .form-group, .form-card, .field, .actions {
  min-width: 0;
}
input, select, textarea {
  min-width: 0;
}
a, button { touch-action: manipulation; }
iframe { border: 0; }

/* Homepage header and the already-existing mobile navigation */
@media screen and (max-width: 1100px) {
  .mainhead .container {
    grid-template-columns: minmax(130px, 210px) minmax(0, 1fr) auto;
    gap: 14px;
  }
  .brand img { max-width: 100%; }
  .institute-name-branding img { max-width: 100%; }
  .contact-head { gap: 12px; }
  .nav li a { padding-left: 9px; padding-right: 9px; }
}
@media screen and (max-width: 800px) {
  .topbar .container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 10px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .top-left, .top-center, .top-right { min-width: 0; flex-wrap: wrap; }
  .top-right { grid-column: 1 / -1; justify-content: center; }
  .mainhead .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
  }
  .brand { flex: 1 1 140px; min-width: 0; }
  .brand img { width: auto; max-width: min(100%, 210px); max-height: 62px; }
  .institute-name-branding {
    order: 3;
    flex: 1 0 100%;
    min-width: 0;
    justify-content: flex-start;
    padding-top: 3px;
  }
  .institute-name-branding img {
    width: min(100%, 340px);
    max-height: 58px;
  }
  .contact-head { display: none !important; }
  .desktop-nav { display: none !important; }
  button, input[type="button"], input[type="submit"], input[type="reset"] {
    min-height: 40px;
  }
  .mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px;
    color: #fff;
    background: #062957;
    cursor: pointer;
  }
  .nav .container {
    min-height: 52px;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .ei-nav-language { max-width: 100%; min-width: 0; }
  .ei-nav-language select { max-width: min(68vw, 230px); }
  .mobile-nav {
    display: none;
    width: 100%;
    max-height: min(70vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav.show { display: block !important; }
  .mobile-nav a {
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .mobile-nav-item > a { padding-top: 12px; padding-bottom: 12px; }
  .mobile-subnav { width: 100%; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-main { min-height: clamp(430px, 72vw, 560px); background-position: center; }
  .hero-copy { width: 100%; max-width: 720px; padding: 42px 18px; }
  .hero h1 { font-size: clamp(34px, 6vw, 46px); overflow-wrap: anywhere; }
  .hero-side { min-width: 0; }
  .feature-grid, .course-grid, .quick-grid, .notice-grid, .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media screen and (max-width: 600px) {
  .container { width: min(100% - 24px, 100%); }
  .topbar { font-size: 11px; }
  .top-left, .top-center { gap: 7px; }
  .socials { flex-wrap: wrap; justify-content: center; }
  .brand img { max-width: 175px; max-height: 56px; }
  .institute-name-branding img { max-height: 48px; }
  .nav .container { min-height: 48px; }
  .ei-nav-language select { min-width: 0; width: min(54vw, 190px); font-size: 13px; }
  .hero-main { min-height: 440px; }
  .hero-copy { padding: 36px 12px; }
  .hero h1 { font-size: clamp(30px, 9vw, 38px); line-height: 1.08; letter-spacing: -.5px; }
  .hero p { font-size: 15px; }
  .eyebrow { max-width: 100%; white-space: normal; font-size: 12px; }
  .actions { align-items: stretch; }
  .actions .btn { max-width: 100%; white-space: normal; }
  .feature-grid, .course-grid, .quick-grid, .notice-grid, .footer-grid,
  .grid4, .dashboard-grid, .stats-grid, .profile-grid, .info-grid,
  .cards, .two, .three, .two-col, .mission-grid, .course-detail-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .section { padding-top: 38px; padding-bottom: 38px; }
  .section-head h2 { font-size: clamp(25px, 7vw, 30px); }
  .contact-map-grid { grid-template-columns: minmax(0, 1fr); }
  .form-row, .form-grid, .query-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .form-card, .login-box, .box, .modal-card, .modal-content {
    width: min(100% - 24px, 520px);
    max-width: calc(100vw - 24px);
    margin-left: auto;
    margin-right: auto;
  }
  input, select, textarea { font-size: 16px; }
  .table-responsive, .table-wrap, .table-wrapper, .table-scroll {
    display: block;
    overflow-x: auto;
  }
  table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
}
@media screen and (max-width: 380px) {
  .container { width: calc(100% - 20px); }
  .brand img { max-width: 145px; }
  .mobile-toggle { flex-basis: 40px; width: 40px; height: 40px; }
  .hero h1 { font-size: 29px; }
  .btn { padding: 10px 14px; }
}

/* Public utility, lookup, payment and exam pages */
@media screen and (max-width: 800px) {
  .ei-public-main, .page-wrap, .page-container, .content-wrap, .form-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .two-column, .two-col, .form-grid, .details-grid, .payment-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .toolbar, .actions, .button-row, .form-actions, .header-row {
    flex-wrap: wrap;
  }
  .modal, .modal-dialog, .modal-content, .dialog, .popup {
    max-width: calc(100vw - 20px);
  }
}
@media screen and (max-width: 520px) {
  .page-wrap, .page-container, .content-wrap, .form-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
  .form-card, .lookup-card, .payment-card, .result-card {
    max-width: 100%;
  }
  .actions > *, .form-actions > *, .button-row > * {
    max-width: 100%;
  }
  .sheet { max-width: none; }
}
@media print {
  html, body { overflow: visible !important; max-width: none; }
  img, svg, canvas { max-width: none; }
}


/* EXCEL INFOTECH - mobile header and floating-control refinement (2026-11-06) */
@media screen and (max-width: 800px) {
  .topbar .container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px 8px !important;
    align-items: center;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .top-left {
    grid-column: 1;
    justify-content: space-between !important;
    gap: 8px 12px !important;
    flex-wrap: wrap;
  }
  .top-left span {
    display: inline-flex !important;
    align-items: center;
    min-width: 0;
  }
  .top-center {
    grid-column: 1;
    justify-content: flex-start !important;
    font-size: 12px;
  }
  .top-right {
    grid-column: 1;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap;
  }
  .top-right > span { white-space: nowrap; }
  .socials {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 6px !important;
    flex-wrap: wrap;
  }
  .socials a {
    width: 26px !important;
    height: 26px !important;
    flex: 0 0 26px;
  }
  body .mainhead .container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "brand login toggle"
      "nameplate nameplate nameplate"
      "contact contact contact";
    align-items: center;
    gap: 8px 10px !important;
    padding: 9px 0 10px !important;
  }
  body .mainhead .brand { grid-area: brand; min-width: 0; }
  body .mainhead .brand img {
    display: block;
    width: auto;
    max-width: 118px;
    max-height: 66px;
    object-fit: contain;
  }
  body .mainhead .institute-name-branding {
    grid-area: nameplate;
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    margin: 0;
  }
  body .mainhead .institute-name-branding img {
    display: block;
    width: min(100%, 270px);
    max-width: 270px;
    max-height: 39px;
    object-fit: contain;
  }
  body .mainhead .contact-head {
    grid-area: contact;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    justify-content: stretch;
    gap: 8px 12px !important;
    width: 100%;
    padding-top: 7px;
    border-top: 1px solid #e5eaf1;
    font-size: 11px;
    line-height: 1.3;
  }
  body .mainhead .contact-head > div,
  body .mainhead .contact-head > div > a {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  body .mainhead .contact-head strong {
    display: block;
    font-size: 12px;
    line-height: 1.25;
  }
  body .mainhead .contact-head .header-icon {
    width: 15px;
    height: 15px;
    margin-right: 4px;
  }
  body .mainhead .login-details {
    grid-area: login;
    justify-self: end;
    min-width: 0;
  }
  body .mainhead .login-details .login-btn {
    min-width: 94px;
    min-height: 44px;
    padding: 9px 10px;
    justify-content: center;
    font-size: 14px;
  }
  body .mainhead .mobile-toggle {
    grid-area: toggle;
    justify-self: end;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px !important;
    font-size: 21px;
  }
  .nav .container {
    min-height: 48px !important;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .ei-nav-language {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
  .ei-nav-language select {
    width: min(100%, 230px);
    max-width: 100%;
    min-height: 42px;
  }
}
@media screen and (max-width: 520px) {
  .topbar { font-size: 11px !important; }
  .top-left { justify-content: flex-start !important; }
  .top-left span { white-space: normal; }
  .top-center { font-size: 11px; }
  .top-right { gap: 7px !important; }
  .socials { gap: 5px !important; }
  .socials a { width: 24px !important; height: 24px !important; flex-basis: 24px; }
  body .mainhead .brand img { max-width: 106px; max-height: 60px; }
  body .mainhead .institute-name-branding img { max-width: 245px; max-height: 35px; }
  body .mainhead .login-details .login-btn {
    min-width: 88px;
    min-height: 42px;
    font-size: 13px;
  }
  body .mainhead .contact-head {
    gap: 6px 8px !important;
    font-size: 10px;
  }
  body .mainhead .contact-head strong { font-size: 11px; }
  .ei-nav-language select { width: min(100%, 200px); }
  /* Keep the two floating helpers small and in separate corners. */
  body { padding-bottom: 64px; }
  body .ei-sa-root {
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 2147483000;
  }
  body .ei-sa-launch {
    min-height: 40px;
    padding: 5px 9px 5px 6px !important;
    gap: 6px !important;
    font-size: 11px !important;
  }
  body .ei-sa-bot {
    width: 30px !important;
    height: 30px !important;
    flex-basis: 30px !important;
  }
  body .ei-sa-bot svg { width: 27px !important; height: 27px !important; }
  body .ei-sa-launch-copy b { font-size: 11px !important; }
  body .ei-sa-launch-copy small { display: none; }
  body .ei-sa-spark { font-size: 12px !important; }
  body .ei-sa-panel {
    right: -1px !important;
    bottom: 48px !important;
    width: min(360px, calc(100vw - 20px)) !important;
    height: min(460px, calc(100dvh - 100px)) !important;
  }
  body .ei-public-utility .ei-visitor-counter {
    left: 10px !important;
    right: auto !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 34px !important;
    padding: 0 9px !important;
    gap: 5px !important;
    border-radius: 18px !important;
    font-size: 11px !important;
    z-index: 2147482999;
  }
  body .ei-public-utility .ei-visitor-icon,
  body .ei-public-utility .ei-visitor-icon svg {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
  }
  body .ei-public-utility .ei-visitor-icon { flex-basis: 15px !important; }
  body .ei-public-utility .ei-scroll-top {
    right: 10px !important;
    bottom: 58px !important;
    width: 36px !important;
    height: 36px !important;
  }
}
@media screen and (max-width: 360px) {
  body .mainhead .container {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 6px !important;
  }
  body .mainhead .brand img { max-width: 92px; }
  body .mainhead .login-details .login-btn { min-width: 78px; padding-left: 7px; padding-right: 7px; }
  .socials { gap: 4px !important; }
  .socials a { width: 22px !important; height: 22px !important; flex-basis: 22px; }
}
