/**
 * Mobile responsiveness — homepage, auth, admin.
 * Load after page-specific CSS. Breakpoints: 991px (tablet), 767px (phone).
 */

/* ══════════════════════════════════════════════════════════
   AUTH — Login & Register
   ══════════════════════════════════════════════════════════ */
body.auth-login-page,
body.auth-register-page {
  min-height: 100vh;
  min-height: 100dvh;
}

@media (max-width: 767.98px) {
  body.auth-login-page {
    background: #f4f8fc !important;
  }

  body.auth-login-page form.container,
  body.auth-login-page form.auth-login-form {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  body.auth-login-page #leftside,
  body.auth-login-page .auth-card {
    width: 100% !important;
    max-width: 100%;
    margin: 0 auto !important;
    padding: 1.25rem 1rem 1.5rem !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 28px rgba(0, 40, 80, 0.1) !important;
  }

  body.auth-login-page #leftside img,
  body.auth-login-page .auth-card__logo {
    float: none !important;
    display: block;
    margin: 0 auto 1rem;
    width: 56px !important;
    height: 56px !important;
  }

  body.auth-login-page #leftside h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }

  body.auth-login-page #leftside input {
    padding: 14px 4px !important;
    font-size: 16px !important;
  }

  body.auth-login-page button,
  body.auth-login-page .btn-auth-primary,
  body.auth-login-page #submit,
  body.auth-login-page .auth-submit-btn {
    float: none !important;
    width: 100% !important;
    margin: 0.75rem 0 0 !important;
    font-size: 1rem !important;
  }

  body.auth-login-page #forgot {
    padding: 0.75rem 0 0;
    font-size: 0.9rem;
  }

  /* Register */
  body.auth-register-page .auth-page-main {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  body.auth-register-page .card {
    font-size: 0.88rem !important;
    line-height: 1.5;
    margin-bottom: 0.65rem;
    border-radius: 10px;
  }

  body.auth-register-page .card .container {
    width: 100% !important;
    padding: 0.75rem !important;
  }

  body.auth-register-page .card b {
    font-size: 0.85rem !important;
    display: block;
    word-break: break-word;
  }

  body.auth-register-page .card h4 b {
    font-size: 1.25rem !important;
  }

  body.auth-register-page #container {
    width: 100% !important;
    padding: 0 !important;
  }

  body.auth-register-page #container > .row {
    margin: 0;
    flex-direction: column;
    gap: 0.65rem;
  }

  body.auth-register-page #leftside,
  body.auth-register-page #rightside {
    width: 100% !important;
    max-width: 100%;
    border-radius: 14px !important;
    padding: 1rem 0.85rem !important;
  }

  body.auth-register-page #rightside {
    margin-top: 0 !important;
  }

  body.auth-register-page #rightside br {
    display: none;
  }

  body.auth-register-page #container .row,
  body.auth-register-page #container > .row .row {
    padding: 0.35rem 0 !important;
  }

  body.auth-register-page #container h3 {
    float: none;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
  }

  body.auth-register-page #container input,
  body.auth-register-page #container select,
  body.auth-register-page #container .form-control {
    font-size: 16px !important;
    width: 100%;
  }

  body.auth-register-page #container .btn-success,
  body.auth-register-page #container button[type="submit"] {
    width: 100% !important;
    margin: 0.5rem 0 !important;
  }

  body.auth-register-page #container .col-md-6.offset-md-3,
  body.auth-register-page #container .col-md-6.offset-md-4 {
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  body.auth-register-page #captcha {
    transform: scale(0.92);
    transform-origin: left top;
    max-width: 100%;
    overflow-x: auto;
  }
}

/* ══════════════════════════════════════════════════════════
   HOMEPAGE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .home-page main:has(> .home-hero-section) {
    background: #f4f8fc;
  }

  .home-page .home-hero-section {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .home-page .slider-area.home-hero {
    min-height: 100vh !important;
    min-height: 100svh !important;
    height: 100vh !important;
    height: 100svh !important;
  }

  .home-page .home-hero-section .home-year-services {
    position: static !important;
    padding: 0.75rem 0.75rem 1rem !important;
    background: #f4f8fc;
  }
}

@media (max-width: 767.98px) {
  .home-page .slider-area.home-hero .home-hero__inner {
    padding: 1rem 0 1.5rem !important;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom)) !important;
    align-items: flex-end !important;
  }

  .home-page .slider-area.home-hero .hero__caption {
    width: 100%;
    text-align: left;
  }

  .home-page .slider-area.home-hero .hero__caption h1 {
    font-size: 1.7rem !important;
    line-height: 1.2 !important;
  }

  .home-page .slider-area.home-hero .hero__caption p {
    font-size: 0.95rem !important;
    margin-bottom: 0.85rem !important;
  }

  .home-page .slider-area.home-hero .hero__caption .hero-btn,
  .home-page a.btn.hero-btn {
    display: inline-flex !important;
    width: auto;
    max-width: 100%;
    padding: 12px 22px !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
  }

  .home-page .slider-area.home-hero .hero__actions {
    gap: 10px;
  }

  .home-page .home-year-services__row {
    gap: 0.5rem 0;
  }

  .home-page .home-year-services .home-year-card {
    padding: 10px 12px !important;
  }

  .home-page .section-tittle h2 {
    font-size: 1.35rem;
    padding: 0 1rem;
  }

  .home-page #videoCarousel .carousel-inner {
    height: auto !important;
    min-height: 0 !important;
    padding: 0.75rem 0 1rem !important;
  }

  .home-page #videoCarousel .carousel-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 50vh !important;
  }

  .home-page .carousel-control-prev,
  .home-page .carousel-control-next {
    width: 12%;
  }
}

/* ══════════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
  .g-sidenav-show .main-content {
    margin-left: 0 !important;
  }

  .main-content .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .navbar-main .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

@media (max-width: 767.98px) {
  .main-content .container-fluid.py-4 {
    padding-top: 0.85rem !important;
    padding-bottom: 1rem !important;
  }

  .main-content .card {
    border-radius: 12px;
  }

  .main-content .card-body {
    padding: 1rem !important;
  }

  .main-content .card-body h1 {
    font-size: 1.35rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .main-content .card-body h5 {
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
  }

  .main-content .card-header h4 {
    font-size: 1.1rem;
  }

  .main-content .btn-lg.w-100 {
    font-size: 0.95rem;
    padding: 0.65rem 1rem !important;
  }

  .admin-sidebar-brand__title {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }

  .admin-sidebar-brand__logo {
    height: 36px !important;
    padding: 0.25rem 0.4rem !important;
  }

  .admin-user-menu__label {
    max-width: 7.5rem;
    font-size: 0.85rem;
  }

  .admin-home-btn__label {
    display: none;
  }

  .admin-home-btn {
    padding: 0.4rem 0.55rem !important;
  }

  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .table thead th,
  .table tbody td {
    font-size: 0.8rem;
    padding: 0.5rem 0.4rem !important;
    vertical-align: middle;
  }

  .table .cate-image {
    width: 64px !important;
    max-width: 64px;
    height: auto;
  }

  .table .btn.dropdown-toggle {
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem !important;
    white-space: nowrap;
  }

  .table .dropdown-menu {
    font-size: 0.85rem;
  }

  .main-content .form-control,
  .main-content .form-select {
    font-size: 16px !important;
  }
}
