/* ==========================================================
   كلية الباحة الأهلية للعلوم — التجاوب (لابتوب / تابلت / جوال)
   التصميم الأساسي مبني على 1440px
   ========================================================== */

/* عناصر الشبكات لا تتجاوز عرض الأعمدة */
.about-grid > *, .depts-grid > *, .dean-grid > *, .dept-page__grid > *, .article-layout > *,
.acc-layout > *, .legal-layout > *, .auth-card > *, .programs-grid > *, .forms-grid > *,
.media-grid > *, .news-grid > *, .contact-cards > *, .values-grid > *, .regs-grid > * { min-width: 0; }

/* ---------- شاشات أقل من عرض التصميم (≤1365) ---------- */
@media (max-width: 1365.98px) {
  .about-media__dots { right: -12px; }
}

/* ---------- لابتوب صغير (≤1279) ---------- */
@media (max-width: 1279.98px) {
  /* كروت البرامج: عمود واحد عشان محتوى الكارت المفتوح ياخد مساحته */
  .programs-grid { grid-template-columns: 1fr; }
  .main-nav ul { gap: 18px; }
  .main-nav { margin-right: 30px; }
  .site-header--inner .main-nav { margin-right: 24px; }

  .about-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .about-media__img--tall { width: 45.2%; }
  .about-media__img--short,
  .about-media__stat { right: 49.7%; width: 45.2%; }
  .about-media__dots { right: 0; }
  .about-text { margin: 0; }
  .about-text__title { font-size: 28px; line-height: 46px; }
  .vision-card { height: auto; padding-bottom: 76px; }

  .depts-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .depts-info__title { font-size: 32px; line-height: 50px; margin-right: 0; }
  .dept-cards { grid-template-columns: 1fr 1fr; gap: 18px; }
  .dept-cards__col { gap: 18px; }
  .dept-card { width: 100%; height: 190px; }
  .dept-card__name { font-size: 16px; line-height: 24px; }
  .dept-careers { margin-right: 0; width: 100%; grid-template-columns: 1fr 1fr; }
  .dept-meta span + span { margin-right: 50px; }

  .dean-grid { grid-template-columns: 1fr 1.2fr; gap: 40px; padding-right: 0; }
  .dean-media__img { right: 50%; transform: translateX(50%); }
  .dean-media:hover .dean-media__img { transform: translateX(50%) scale(1.02); }
  .dean-media__name,
  .dean-media__role { width: auto; margin-right: 0; }

  .footer-grid { padding-right: 0; }
  .footer-about { margin-left: 50px; }
  .footer-col--sitemap { margin-left: 40px; }
  .footer-col:nth-child(3) { margin-left: 60px; }
  .footer-bottom { padding-right: 0; }

  .values-grid { grid-template-columns: repeat(4, 1fr); column-gap: 30px; padding-right: 0; }
  .value-item::after { right: auto !important; left: -15px; }

  .dept-page__grid { grid-template-columns: minmax(0, 1fr) 340px; margin-right: 0; gap: 30px; }
  .goals-list li { white-space: normal; line-height: 32px; padding: 5px 0; }
  .info-box--goals { padding-left: 20px; }
  .careers-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-info { padding-left: 18px; }
  .program-info__btn { font-size: 19px; }

  .conditions-box { margin: 0; }
  .conditions-box__text { width: 62%; }
  .conditions-box__media { width: 34%; left: 2%; }
  .conditions-box__shape { width: 100%; }
  .conditions-box__img { left: 50%; transform: translateX(-50%); width: 82%; height: auto; }

  .auth-card { grid-template-columns: minmax(0, 1fr) 440px; }
  .auth-form-wrap { padding: 48px 44px; }
}

/* ---------- تابلت كبير (≤1199): قائمة الجوال ---------- */
@media (max-width: 1199.98px) {
  .main-nav,
  .navbar-main .btn-register { display: none; }
  /* البحث واللغة والسوشيال بينتقلوا للمنيو الجانبية */
  .topbar { display: none; }
  .site-header--home { padding-top: 10px; }
  .nav-toggle { display: flex; margin-right: auto; }
  .site-header--inner .nav-toggle { margin-top: 0; }
  .site-header--inner .navbar-main__inner { height: 100px; align-items: center; padding-top: 0; }
  .site-header--inner .site-logo img { width: 124px; height: 86px; }
  .site-header--inner .container { padding-inline: 16px; }
  .navbar-main__inner { height: 96px; }
  .site-logo img { width: 124px; height: 86px; }

  .stats-sec { height: auto; padding: 80px 0; }
  .stats-grid { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 255px)); }

  .regs-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-steps { grid-template-columns: repeat(2, 1fr); row-gap: 90px; margin-top: 90px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-side { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .side-search { grid-column: 1 / -1; }
  .dept-page__grid { grid-template-columns: 1fr; }
  .dept-page__content,
  .program-info { grid-column: 1; grid-row: auto; }
  .program-info { position: static; height: auto; padding-bottom: 30px; margin-top: 30px; max-width: 520px; }
  .contact-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .contact-card__box { padding: 60px 18px 0; }
}

/* ---------- تابلت (≤991) ---------- */
@media (max-width: 991.98px) {
  .section-title { font-size: 30px; line-height: 46px; }
  .section-title--janna { line-height: 52px; }
  .section-desc { font-size: 18px; line-height: 30px; }
  .sec-head--split { flex-direction: column; align-items: stretch; gap: 20px; }
  .sec-head--split .filter-tabs { margin-top: 0 !important; }
  .sec-head--bottom .btn-arrow { margin-top: 0 !important; align-self: flex-start; }
  .filter-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px 14px; margin-inline: -2px; scrollbar-width: none; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-tab { flex: 0 0 auto; }
  .filter-tabs--center { justify-content: flex-start; }

  /* بانر الصفحات */
  .page-banner { height: 340px; }
  .page-banner .container { padding-top: 150px; }
  .page-banner__title { font-size: 36px; line-height: 54px; }
  .breadcrumb-nav { margin-top: 20px; font-size: 18px; line-height: 30px; }

  /* الهيرو */
  .hero__slider,
  .hero__slide { height: 470px; }
  .hero__slider { border-radius: 28px; }
  .hero__content { padding: 110px 48px 0; }
  .hero__title { font-size: 46px; line-height: 70px; }
  .hero__sub { font-size: 20px; line-height: 32px; }

  /* عن الكلية */
  .about-sec,
  .page-about .about-sec { padding-top: 60px; }
  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .about-media { max-width: 586px; width: 100%; margin: 0 auto; }
  .about-text { padding-top: 0; order: -1; }
  .about-text__btn { margin-top: 36px; }

  /* الأقسام */
  .depts-sec { padding-top: 80px; }
  .depts-grid { grid-template-columns: 1fr; gap: 40px; }
  .depts-info { padding-top: 0; }

  .stats-sec { margin-top: 80px; }

  /* العميد */
  .dean-sec,
  .page-about .dean-sec { padding-top: 70px; }
  .dean-grid { grid-template-columns: 1fr; gap: 40px; }
  .dean-media { max-width: 490px; width: 100%; margin: 0 auto; }
  .dean-text { padding-top: 0; }

  .media-sec { padding-top: 80px; }
  .media-grid,
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card { height: auto; min-height: 430px; }
  .news-sec { padding-bottom: 90px; }
  .partners-sec { padding-top: 80px; }

  /* نداء التسجيل */
  .cta-band { margin-top: 90px !important; }
  .cta-box { height: auto; flex-direction: column; align-items: flex-start; gap: 24px; padding: 44px 36px; }
  .cta-box__text h2 { font-size: 34px; line-height: 44px; }
  .cta-box__text p { margin-top: 8px; font-size: 18px; line-height: 30px; }
  .cta-box__lines { width: 1320px; height: 100%; left: auto; right: -200px; }

  /* الفوتر */
  .footer-grid { flex-wrap: wrap; row-gap: 36px; min-height: 0; padding-bottom: 36px; }
  .footer-about { flex: 1 1 100%; margin: 0; text-align: center; }
  .footer-logo img { margin: 0 auto; }
  .footer-about p { max-width: 420px; margin-inline: auto; text-align: center; }
  .footer-col,
  .footer-col--sitemap,
  .footer-col:nth-child(3),
  .footer-col--contact { flex: 1 1 30%; margin: 0; padding-top: 0; }
  .footer-bottom { height: auto; padding: 18px 0 24px; display: flex; flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; }

  /* عن الكلية: الرؤية/الرسالة */
  .vmq-band { grid-template-columns: 1fr; height: auto; margin-top: 70px; }
  .vmq-panel,
  .vmq-panel.is-active { padding: 50px 24px; min-height: 0; }
  .vmq-panel__icon { height: 110px; }
  .vmq-panel.is-active .vmq-panel__icon { height: 70px; }
  .vmq-panel__title { font-size: 38px; line-height: 60px; }
  .vmq-panel__text { opacity: 1; transform: none; }
  .vmq-panel.is-active .vmq-panel__title,
  .vmq-panel.is-active .vmq-panel__text { margin-right: 0; }
  .vmq-panel:not(.is-active):hover .vmq-panel__icon,
  .vmq-panel:not(.is-active):hover .vmq-panel__title,
  .vmq-panel:not(.is-active):hover .vmq-panel__text { transform: none; }
  .values-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .value-item::after { display: none; }
  .page-about .partners-sec { padding-top: 90px; }

  /* الأقسام والبرامج */
  .programs-sec,
  .forms-sec,
  .careers-sec,
  .contact-sec,
  .regs-sec,
  .reg-steps-sec,
  .listing-sec,
  .faq-sec--page,
  .legal-sec,
  .dept-page { padding-top: 70px; }
  .programs-grid { grid-template-columns: 1fr; }
  .dept-page__title { font-size: 28px; line-height: 44px; }
  .dept-page__cover { height: 380px; }

  /* اللوائح والنماذج */
  .regs-grid { margin-top: 44px; }
  .faq-sec { padding-top: 70px; }
  .faq-item__head { font-size: 18px; line-height: 28px; padding: 16px 20px; min-height: 70px; }
  .faq-item.is-open .faq-item__head { padding-top: 20px; }
  .faq-item__body { padding: 12px 20px 26px; }
  .faq-item__body p { font-size: 17px; line-height: 29px; }
  .forms-grid { grid-template-columns: 1fr; }
  .form-card { height: auto; min-height: 381px; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .step-card { height: auto; padding: 26px 16px; }

  /* التسجيل */
  .conditions-box { height: auto; padding: 30px 24px 0; }
  .conditions-box__text { width: 100%; }
  .conditions-box__media { position: relative; left: auto; bottom: auto; width: 100%; max-width: 420px; height: 440px; margin: 30px auto 0; }
  .conditions-box__shape { height: 290px; }
  .conditions-box__img { width: auto; height: 100%; }
  .form-card-wrap { width: 100%; }
  .site-form--apply { padding: 44px 30px 30px; }
  .site-form__head h2 { font-size: 28px; line-height: 44px; }
  .job-form-card { width: 100%; }

  /* تواصل */
  .contact-cards { grid-template-columns: 1fr; gap: 30px; max-width: 520px; margin-inline: auto; }
  .contact-map { height: 440px; margin-top: 60px; }
  .contact-form-sec { margin-top: -140px; }
  .site-form--contact { padding: 50px 30px 34px; }

  /* الأخبار */
  .article-sec,
  .acc-sec,
  .auth-sec,
  .search-sec,
  .error-sec { padding-top: 60px; }
  .article__title { font-size: 30px; line-height: 46px; }
  .article__cover { height: 360px; }

  /* الدخول والحساب */
  .auth-card { grid-template-columns: 1fr; }
  .auth-visual { order: -1; }
  .auth-visual__content { padding: 34px 30px; }
  .auth-visual__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .auth-visual__list li + li { margin-top: 0; }
  .acc-layout { grid-template-columns: 1fr; }
  .acc-side { position: static; }
  .acc-nav { flex-direction: row; overflow-x: auto; padding: 12px; scrollbar-width: none; }
  .acc-nav::-webkit-scrollbar { display: none; }
  .acc-nav a { flex: 0 0 auto; white-space: nowrap; }
  .acc-nav a:hover { padding-right: 16px; }
  .acc-nav__logout { margin-top: 0; border-top: 0; }
  .acc-stats { grid-template-columns: repeat(2, 1fr); }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .faq-help { flex-direction: column; align-items: flex-start; }
}

/* ---------- جوال (≤767) ---------- */
@media (max-width: 767.98px) {
  .container { padding-inline: 16px; }
  .section-title { font-size: 26px; line-height: 40px; }
  .section-desc { font-size: 16px; line-height: 27px; }
  .topbar .social-links { gap: 10px; }
  .topbar .social-links img { transform: scale(.85); }

  .hero__slider,
  .hero__slide { height: 440px; }
  .hero__slider { border-radius: 22px; }
  .hero__content { padding: 90px 24px 0; }
  .hero__title { font-size: 34px; line-height: 52px; }
  .hero__sub { font-size: 17px; line-height: 28px; }
  .hero__content .btn-arrow { margin-top: 26px; }

  .about-text__title { font-size: 24px; line-height: 40px; }
  .about-text__desc,
  .check-list li { font-size: 16px; line-height: 27px; }
  .check-list li { align-items: flex-start; }

  .media-grid,
  .news-grid,
  .news-grid--listing { grid-template-columns: 1fr; }
  .news-card { min-height: 0; }
  .news-card__meta { gap: 24px; }

  .dean-text__basmala { font-size: 26px; }
  .dean-text__body p { font-size: 16px; line-height: 30px; }

  .stat-card__num { font-size: 52px; line-height: 76px; }
  .stat-card { height: 160px; }
  .stat-card p { font-size: 16px; }

  .partners-marquee { margin-top: 30px; }
  .partner-card { flex-basis: 160px; width: 160px; height: 96px; }
  .partner-card img { width: 130px; height: 70px; }
  .partners-track { gap: 30px; }

  .cta-box { padding: 36px 24px; }
  .cta-box__text h2 { font-size: 26px; line-height: 38px; }
  .cta-box__text p { font-size: 16px; line-height: 27px; }
  .btn-cta { width: 100%; }

  .footer-col,
  .footer-col--sitemap,
  .footer-col:nth-child(3) { flex: 1 1 45%; }
  .footer-col--contact { flex: 1 1 100%; }
  .footer-legal { flex-wrap: wrap; justify-content: center; }

  .page-banner { height: 300px; }
  .page-banner .container { padding-top: 130px; }
  .page-banner__title { font-size: 28px; line-height: 44px; }
  .breadcrumb-nav { font-size: 15px; }

  .values-grid { grid-template-columns: 1fr; }
  .value-item p { max-width: none; }

  .program-card { height: auto; min-height: 330px; }
  .program-card__inner { position: relative; inset: auto; padding: 150px 18px 18px; min-height: 330px; }
  .program-card__name { font-size: 19px; line-height: 30px; }
  .program-card__icon { flex-basis: 52px; height: 52px; }
  .program-card__code { min-width: 52px; height: 52px; font-size: 22px; line-height: 52px; }
  .program-card__desc { font-size: 16px; line-height: 27px; padding-top: 20px; }
  .program-card__bottom { flex-direction: column; align-items: flex-start; }
  .program-card__careers ul { grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .program-card__careers li { white-space: normal; font-size: 14px; }

  .dept-page__head { flex-wrap: wrap; gap: 12px; }
  .dept-page__title { margin-right: 0; font-size: 22px; line-height: 36px; flex: 1 1 60%; }
  .dept-page__code { margin-left: 0; }
  .dept-page__cover { height: 240px; }
  .info-box,
  .info-box--goals,
  .info-box--careers { padding: 18px 18px 22px; }
  .info-box__title { font-size: 24px; line-height: 38px; }
  .info-box__text,
  .goals-list li { font-size: 16px; line-height: 28px; }
  .careers-tiles { grid-template-columns: 1fr; }
  .careers-tiles li { height: 64px; font-size: 17px; }
  .program-info { max-width: none; }
  .program-info__list li { white-space: normal; line-height: 28px; }
  .program-info__btn { font-size: 18px; height: 58px; }

  .regs-grid { grid-template-columns: 1fr; }
  .form-card__desc { font-size: 17px; line-height: 28px; }
  .form-card__title { font-size: 20px; line-height: 32px; }
  .steps-grid { grid-template-columns: 1fr; }
  .adm-steps { grid-template-columns: 1fr; row-gap: 80px; margin-top: 80px; }

  .conditions-list span { font-size: 32px; }
  .conditions-list p { font-size: 17px; line-height: 27px; }
  .conditions-box__media { height: 380px; }
  .conditions-box__shape { height: 250px; border-radius: 30px; }

  .site-form__grid { grid-template-columns: 1fr; }
  .site-form--apply,
  .site-form--job,
  .site-form--contact { padding: 34px 18px 26px; }
  .site-form__head { flex-direction: column; }
  .site-form__head h2,
  .site-form__center-head h2 { font-size: 24px; line-height: 38px; }
  .site-form__head p,
  .site-form__center-head p { font-size: 16px !important; line-height: 27px !important; margin-top: 4px !important; }
  .form-card-wrap { box-shadow: 5px 6px 0 0 var(--navy), 0 3px 18px rgba(0, 0, 0, .1); }
  .btn-submit--auto { width: 100%; margin-right: 0; }

  .contact-map { height: 340px; }
  .contact-form-sec { margin-top: -90px; }

  .article__title { font-size: 24px; line-height: 38px; }
  .article__cover { height: 240px; }
  .article__body p,
  .article__body ul li { font-size: 16px; line-height: 30px; }
  .article__gallery a { height: 100px; }
  .article-side { grid-template-columns: 1fr; }

  .auth-form-wrap { padding: 34px 20px 30px; }
  .auth-title { font-size: 28px; line-height: 44px; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-visual__list { grid-template-columns: 1fr; }
  .auth-card { box-shadow: 5px 6px 0 0 var(--navy), 0 3px 18px rgba(0, 0, 0, .1); }
  .auth-steps li { font-size: 0; gap: 0; }
  .auth-steps li + li::before { width: 26px; }
  .otp input { width: 58px; height: 64px; }

  .acc-welcome { flex-direction: column; align-items: flex-start; padding: 22px; }
  .acc-box { padding: 20px 16px; }
  .acc-box__head { flex-wrap: wrap; }
  .acc-timeline { grid-template-columns: 1fr; gap: 18px; }
  .acc-timeline li { display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; text-align: right; align-items: center; }
  .acc-timeline li::before { top: 46px; right: 22px; width: 3px; height: calc(100% - 28px); }
  .acc-timeline span { grid-row: span 2; margin: 0; }
  .acc-timeline b { margin-top: 0; }

  .legal-block { padding: 22px 18px; }
  .legal-block h2 { font-size: 21px; line-height: 32px; }
  .legal-block p,
  .legal-block li { font-size: 16px; line-height: 29px; }

  .search-page-form { height: 64px; padding-right: 20px; }
  .search-page-form .btn-arrow { min-width: 0; width: 50px; padding: 0; }
  .search-page-form .btn-arrow span { display: none; }
  .search-page-form .btn-arrow__icon { position: static; margin: 0; }
  .search-results { grid-template-columns: 1fr; }

  .error-box__code { font-size: 110px; }
  .error-box__zero { width: 104px; height: 104px; }
  .error-box__zero img { width: 80px; }
  .error-box h2 { font-size: 24px; line-height: 38px; }

  .whatsapp-float { right: 16px; bottom: 20px; }
  .back-top { left: 16px; bottom: 24px; }
}

/* ---------- جوال صغير (≤575) ---------- */
@media (max-width: 575.98px) {
  .navbar-main__inner,
  .site-header--inner .navbar-main__inner { height: 84px; }
  .site-logo img,
  .site-header--inner .site-logo img { width: 104px; height: 72px; }

  .hero__slider,
  .hero__slide { height: 400px; }
  .hero__content { padding-top: 80px; }
  .hero__title { font-size: 28px; line-height: 44px; }

  .about-media__visual { height: auto; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 12px; }
  .about-media__dots { display: none; }
  .about-media__img,
  .about-media__stat { position: static; width: 100% !important; }
  .about-media__img--tall { grid-column: 1; grid-row: 1 / span 2; height: 100%; min-height: 300px; }
  .about-media__img--short { grid-column: 2; grid-row: 1; height: 200px; }
  .about-media__stat { grid-column: 2; grid-row: 2; height: auto; min-height: 90px; padding: 10px 12px; flex-wrap: wrap; justify-content: center; }
  .about-media__stat strong { font-size: 34px; line-height: 44px; }
  .about-media__line { display: none; }
  .about-media__stat p { font-size: 13px; line-height: 20px; white-space: normal; text-align: center; }
  .vision-card__item p { font-size: 16px; line-height: 28px; }

  .dept-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dept-cards__col { gap: 12px; }
  .dept-cards__col--offset { padding-top: 34px; }
  .dept-card { height: 170px; }
  .dept-card__code { top: 10px; left: 10px; min-width: 34px; height: 34px; font-size: 14px; line-height: 34px; }
  .dept-card__foot { right: 10px; left: 10px; bottom: 12px; }
  .dept-card__icon { flex-basis: 34px; height: 34px; border-radius: 9px; }
  .dept-card__icon .svg-ic { transform: scale(.75); }
  .dept-card__name { font-size: 13px; line-height: 20px; }
  .depts-info__title { font-size: 26px; line-height: 40px; }
  .depts-info__desc { font-size: 17px; line-height: 28px; }
  .dept-careers { grid-template-columns: 1fr; row-gap: 10px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { height: 140px; padding-top: 16px; }
  .stat-card__num { font-size: 38px; line-height: 56px; }
  .stat-card p { margin-top: 8px; font-size: 14px; }

  .dean-media__frame { height: auto; aspect-ratio: 490 / 675; }
  .dean-media__box { height: 52%; border-radius: 28px; }
  .dean-media__img { width: auto; height: 100%; }

  .media-card { height: 240px; }
  .footer-col,
  .footer-col--sitemap,
  .footer-col:nth-child(3) { flex: 1 1 100%; }
  .footer-links--2col { grid-template-columns: repeat(2, 1fr); }

  .stats-sec { padding: 60px 0; }
  .vmq-panel__title { font-size: 32px; line-height: 50px; }
  .form-card__chips li { min-width: 0; }
  .form-card__actions { gap: 8px; }
  .contact-card__num { font-size: 64px; line-height: 110px; }
  .acc-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .acc-stat { padding: 16px 14px; }
  .acc-stat strong { font-size: 30px; line-height: 40px; }
  .otp { gap: 8px; }
  .otp input { width: 52px; height: 58px; font-size: 24px; }
  .program-card__careers ul { grid-template-columns: 1fr; }
}
