/* Mobile-first overrides — JAC Delhi Counseling */

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

body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ─── Top bar: keep Hindi/English side by side ─── */
@media (max-width: 768px) {
  .top-bar__inner {
    padding: 0.35rem 0.65rem;
    gap: 0.35rem;
  }
}

/* ─── Branding: slightly smaller type on mobile (exception to site-wide font) ─── */
@media (max-width: 900px) {
  .top-bar__hi {
    font-size: 0.86em;
    line-height: 1.25;
  }

  .top-bar__en {
    font-size: 0.8em;
    line-height: 1.25;
  }

  .brand-hindi {
    font-size: 0.88em;
    line-height: 1.25;
  }

  .brand-title {
    font-size: 0.82em;
    line-height: 1.3;
  }

  .brand-sub,
  .brand-sub a {
    font-size: 0.76em;
    line-height: 1.3;
  }

  .call-pill,
  .call-pill__text {
    font-size: 0.78em;
    line-height: 1.2;
  }
}

/* ─── Header: Zeline left · text center · college rotator right ─── */
@media (max-width: 900px) {
  .site-header__inner {
    padding: 0.5rem 0.5rem 0.6rem;
    gap: 0;
  }

  .college-rotator {
    display: block;
    width: 64px;
    height: 64px;
  }

  .college-rotator__link {
    width: 64px;
    height: 64px;
  }

  .brand-row {
    align-items: center;
    gap: 0.5rem;
  }

  .brand-logo-link {
    flex-shrink: 0;
    width: 54px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
    border-width: 2px;
    box-shadow: 0 4px 14px rgba(0, 139, 94, 0.25);
  }

  .brand-center {
    flex: 1;
    min-width: 0;
    text-align: center;
    align-items: center;
    padding: 0 0.2rem;
  }

  .brand-hindi {
    margin-bottom: 0.12rem;
    font-weight: 800;
  }

  .brand-title {
    font-weight: 800;
    color: var(--navy) !important;
  }

  .brand-sub {
    margin-top: 0.15rem;
    padding: 0;
  }

  .call-pill {
    margin-top: 0.4rem;
    padding: 0.28rem 0.5rem;
    gap: 0.2rem;
    box-shadow: 0 3px 12px rgba(0, 139, 94, 0.5);
    max-width: 100%;
  }

  .call-pill__phone {
    width: 0.75rem;
    height: 0.75rem;
  }

  .call-pill__text {
    white-space: nowrap;
    letter-spacing: -0.02em;
  }

  .call-pill__pulse {
    inset: -2px;
  }
}

@media (max-width: 380px) {
  .top-bar__hi {
    font-size: 0.82em;
  }

  .top-bar__en {
    font-size: 0.76em;
  }

  .brand-hindi {
    font-size: 0.84em;
  }

  .brand-title {
    font-size: 0.78em;
  }

  .brand-sub,
  .brand-sub a {
    font-size: 0.72em;
  }

  .call-pill,
  .call-pill__text {
    font-size: 0.74em;
  }

  .brand-logo,
  .brand-logo-link {
    width: 48px;
    height: 48px;
  }

  .college-rotator,
  .college-rotator__link {
    width: 58px;
    height: 58px;
  }

  .call-pill {
    padding: 0.24rem 0.42rem;
  }

  .nav-list a {
    padding: 0.5rem 0.35rem;
  }
}

/* ─── Navbar: fit all links on one row ─── */
@media (max-width: 900px) {
  .site-nav__scroll {
    padding: 0;
    overflow-x: hidden;
  }

  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    padding: 0 0.15rem;
  }

  .nav-list li {
    flex: 1 1 0;
    min-width: 0;
  }

  .nav-list a {
    padding: 0.55rem 0.2rem;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .nav-list a::after {
    display: none;
  }

  .nav-list a.nav-cta {
    margin: 0.25rem 0.3rem 0.25rem 0.2rem;
  }
}

/* ─── News ticker (scroll only, no label) ─── */
@media (max-width: 600px) {
  .news-ticker {
    min-height: 2rem;
  }

  .news-ticker__track {
    padding: 0.35rem 0;
  }

  .news-ticker__items {
    gap: 2rem;
    animation-duration: 40s;
  }
}

/* ─── Page padding ─── */
@media (max-width: 768px) {
  .page-wrap {
    padding: 1rem 0.75rem 2.5rem;
  }

  .btn {
    padding: 0.75rem 1.1rem;
  }

  .page-hero {
    padding: 1.35rem 1rem;
    margin-bottom: 1.15rem;
  }

  .section-title {
    flex-wrap: wrap;
  }

  .card {
    padding: 1.1rem 1rem;
    border-radius: 12px;
  }
}

/* ─── Home hero ─── */
@media (max-width: 768px) {
  .hero {
    border-radius: 14px;
    margin-bottom: 1.25rem;
  }

  .hero__layout {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    padding: 1.25rem 1rem 1rem;
  }

  .hero__main {
    text-align: center;
    min-width: 0;
  }

  .hero__badge {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 br {
    display: none;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__main .hero-actions {
    align-items: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.55rem;
  }

  .hero-actions__pair {
    justify-content: center;
  }

  .hero-actions__pair {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100%;
    max-width: 100%;
    gap: 0.5rem;
  }

  .hero-actions__pair .btn {
    flex: 1 1 0;
    width: auto !important;
    min-width: 0;
    padding: 0.7rem 0.45rem;
  }

  .hero-actions > .btn-outline {
    width: 100%;
    max-width: 100%;
    padding: 0.38rem 0.75rem;
    line-height: 1.2;
  }

  .hero__aside {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.65rem 0.5rem 0.75rem;
  }

  .hero__aside-label {
    margin-bottom: 0.5rem;
    font-size: 0.62rem;
  }

  .hero-colleges.hero-colleges--side {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.35rem !important;
    width: 100%;
  }

  .college-logo-pill {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.2rem;
    gap: 0.25rem;
  }

  .college-logo-pill img {
    width: 32px;
    height: 32px;
  }

  .college-logo-pill__name {
    font-size: 0.58rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

}

@media (max-width: 380px) {
  .college-logo-pill img {
    width: 28px;
    height: 28px;
  }

  .college-logo-pill__name {
    font-size: 0.52rem;
  }

  .header-uni {
    width: 36px;
    height: 36px;
  }
}

/* ─── Home: stacked section cards ─── */
@media (max-width: 900px) {
  .grid-2col {
    gap: 1rem;
  }

  .intro-block {
    padding: 1.15rem 1rem;
  }

  .intro-block h2 {
    margin-bottom: 0.65rem;
    padding-bottom: 0.45rem;
  }

  .intro-block p {
    margin-bottom: 0;
  }

  .tab-panel {
    padding: 0.65rem 0.75rem;
  }

  .page-faq {
    padding: 1.15rem 1rem;
  }

  .page-faq--compact {
    padding: 0.75rem 0.7rem 0.8rem;
  }

  .page-faq h2 {
    font-size: 1.08em;
  }

  .home-faq--compact summary {
    font-size: 0.74rem;
  }

  .intro-block .plan-promo--nested {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding: 0.85rem 0.75rem 0.9rem;
    border-width: 2px;
    border-radius: 12px;
  }

  .plan-promo__brand {
    font-size: 0.82rem;
    gap: 0.35rem;
    padding: 0.24rem 0.5rem 0.24rem 0.3rem;
  }

  .plan-promo__brand img {
    width: 22px;
    height: 22px;
  }

  .plan-promo__main h3 {
    font-size: 1.05em;
  }

  .plan-promo__institutes {
    font-size: 0.88em;
    margin-bottom: 0.5rem;
  }

  .plan-promo__price-ribbon {
    padding: 0.55rem 0.6rem 0.5rem;
  }

  .intro-block .plan-promo__price {
    font-size: 1.95rem;
  }

  .plan-promo__features-panel {
    padding: 0.55rem 0.6rem 0.5rem;
  }

  .plan-promo__features li {
    font-size: 0.88rem;
    padding: 0.32rem 0;
  }

  .plan-promo__alt {
    font-size: 0.9em;
  }

}

/* ─── Tabs: horizontal split (same as laptop) ─── */
@media (max-width: 768px) {
  .tab-head {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.55rem 0.25rem;
    letter-spacing: 0.03em;
    text-align: center;
    white-space: normal;
  }

  .notice-list a {
    padding: 0.1rem 0.28rem;
    font-weight: 600;
  }
}

@media (max-width: 380px) {
  .tab-btn {
    padding: 0.55rem 0.25rem;
  }
}

/* ─── Institute grid ─── */
@media (max-width: 600px) {
  .institute-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .institute-card {
    padding: 1.15rem 1rem;
  }
}

/* ─── Cutoffs page (mobile-first) ─── */
@media (max-width: 900px) {
  .filter-bar,
  .filter-bar--cutoffs {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .filter-bar__duo {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .cutoffs-filters {
    padding: 1rem 0.9rem;
  }

  .cutoffs-filters__title {
    font-size: 0.95rem;
  }

  .cutoffs-filters__hint {
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
  }

  .field select {
    padding: 0.58rem 1.85rem 0.58rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .cutoff-college-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.28rem;
    margin-bottom: 0.7rem;
  }

  .cutoff-college-btn {
    padding: 0.24rem 0.12rem;
    font-size: 0.6rem;
    gap: 0.18rem;
    border-radius: 7px;
  }

  .cutoff-college-btn img {
    width: 18px;
    height: 18px;
  }

  .cutoff-viewer {
    border-radius: 10px;
  }

  .cutoff-viewer__frame iframe {
    height: 52vh;
    min-height: 240px;
  }

  .cutoff-toolbar {
    padding: 0.55rem 0.7rem;
  }

  .cutoff-toolbar__title {
    font-size: 0.78rem;
  }

  .cutoff-toolbar__title img {
    width: 30px;
    height: 30px;
  }

  .cutoff-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0.65rem 0.75rem;
    gap: 0.45rem;
  }

  .cutoff-actions .btn {
    flex: 1 1 0;
    padding: 0.5rem 0.45rem;
    font-size: 0.75rem;
  }

  .cutoff-empty {
    padding: 2rem 0.85rem;
    font-size: 0.82rem;
  }

  .page-hero--compact {
    padding-bottom: 0.25rem;
  }

  .cutoffs-intro {
    margin-bottom: 0.65rem;
    padding: 0.48rem 0.6rem;
    font-size: 0.82rem;
    border-left-width: 3px;
  }
}

@media (max-width: 380px) {
  .cutoff-college-btn {
    font-size: 0.56rem;
    padding: 0.22rem 0.08rem;
  }

  .cutoff-college-btn img {
    width: 16px;
    height: 16px;
  }
}

/* ─── PDF embed ─── */
@media (max-width: 768px) {
  .pdf-embed iframe {
    height: 50vh;
    min-height: 260px;
  }
}

/* ─── Contact & about ─── */
@media (max-width: 600px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-details__row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.65rem 0;
  }

  .contact-details__row dt {
    font-size: 0.72rem;
  }

  .contact-channel-actions .hero-actions__pair .btn {
    font-size: 0.78rem;
    padding: 0.62rem 0.45rem;
  }

  .about-zeline {
    flex-direction: column;
    text-align: center;
  }

  .about-zeline img {
    margin: 0 auto;
  }

  .doc-list a {
    padding: 0.75rem;
    font-size: 0.88rem;
  }
}

/* ─── Footer: compact 2-column layout on mobile ─── */
@media (max-width: 768px) {
  .site-footer {
    font-size: 0.78rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    padding: 1.15rem 0.85rem 0.85rem;
    gap: 0.75rem 1rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.65rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-brand img {
    width: 42px;
    height: 42px;
    padding: 3px;
  }

  .footer-brand h3 {
    margin-bottom: 0.15rem;
  }

  .footer-brand p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    max-width: none;
  }

  .footer-col h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.4rem;
    color: rgba(255, 255, 255, 0.88);
  }

  .site-footer li {
    margin-bottom: 0.22rem;
  }

  .footer-col--institutes ul {
    display: block;
  }

  .footer-col--contact {
    grid-column: 1 / -1;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .footer-col--contact ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
  }

  .footer-col--contact li {
    margin-bottom: 0;
  }

  .footer-bottom {
    padding: 0.65rem 0.75rem;
    letter-spacing: 0.01em;
  }
}

@media (max-width: 380px) {
  .site-footer__inner {
    padding: 1rem 0.7rem 0.7rem;
    gap: 0.65rem 0.75rem;
  }

  .footer-brand img {
    width: 38px;
    height: 38px;
  }
}

/* ─── WhatsApp FAB + safe areas ─── */
@media (max-width: 768px) {
  .go-top-fab {
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: calc(max(0.85rem, env(safe-area-inset-bottom)) + 3.85rem);
    width: 2.5rem;
    height: 2.5rem;
  }

  .go-top-fab__svg {
    width: 20px;
    height: 20px;
  }

  .page-faq__cta .btn-faq-rules,
  .page-faq__cta .btn-faq-guide {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8rem;
    padding: 0.55rem 0.75rem;
  }

  .whatsapp-fab {
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    width: 3.25rem;
    height: 3.25rem;
  }

  .whatsapp-fab svg {
    width: 1.55rem;
    height: 1.55rem;
  }
}

/* Spot round — 15-section guide scroll panel */
@media (max-width: 640px) {
  .spot-round-page .spot-guide-scroll {
    max-height: min(68vh, 28rem);
    padding: 0.4rem 0.4rem 0.55rem;
    scrollbar-width: thin;
  }

  .spot-round-page .spot-guide-scroll::-webkit-scrollbar {
    width: 8px;
  }

  .spot-round-page .spot-guide-scroll .guide-section {
    padding: 1rem 1.05rem;
  }

  .spot-round-page .guide-table--schedule {
    font-size: 0.82rem;
  }

  .spot-rules-block__embed iframe {
    height: min(34vh, 240px);
  }

  .spot-hero-rules-link__full {
    display: none;
  }

  .spot-hero-rules-link__short {
    display: inline;
  }

  .spot-hero-rules-link {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .page-hero__sub {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
  }

  .spot-rules-block__toolbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.45rem;
  }

  .spot-pdf-tabs {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .spot-pdf-tabs__btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.3rem 0.35rem;
    font-size: 0.65rem;
    text-align: center;
    white-space: nowrap;
  }

  .spot-pdf-tabs__label-full {
    display: none;
  }

  .spot-pdf-tabs__label-short {
    display: inline;
  }

  .spot-rules-block__open {
    width: auto;
    flex-shrink: 0;
    padding: 0.3rem 0.45rem;
    font-size: 0.65rem;
  }

  .spot-rules-block__open-full {
    display: none;
  }

  .spot-rules-block__open-short {
    display: inline;
  }

  .spot-round-page .spot-cta-actions .hero-actions__pair .btn {
    font-size: 0.78rem;
    padding: 0.62rem 0.4rem;
  }
}

@media (max-width: 380px) {
  .spot-round-page .spot-cta-actions .hero-actions__pair .btn {
    white-space: normal;
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .trust-bar {
    grid-template-columns: 1fr 1fr;
  }

  .trust-quotes__grid {
    grid-template-columns: 1fr;
  }

  .trust-quotes__cta .btn {
    width: 100%;
    text-align: center;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .go-top-fab {
    transition: opacity 0.2s, visibility 0.2s;
  }

  .plan-promo__price-ribbon,
  .cutoff-empty--prompt .cutoff-empty__text,
  .cutoff-empty--prompt .cutoff-empty__text::before {
    animation: none;
  }

  .news-ticker__items,
  .site-nav,
  .reveal {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
