/* ============================================================
   SkyTech24 - Comprehensive Responsive Stylesheet  v3.0
   Breakpoints: 480 | 576 | 640 | 768 | 880 | 1024
   ============================================================ */

html { overflow-x: hidden; }
body { overflow-x: hidden; min-width: 0; }
img  { max-width: 100%; height: auto; display: block; }
*, *::before, *::after { box-sizing: border-box; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 768px)  { .container { padding: 0 16px; } }
@media (max-width: 480px)  { .container { padding: 0 12px; } }

@media (max-width: 880px) {
  .nav-links { display: none; flex-direction: column; width: 100%; }
  .menu-toggle { display: block; }
  .nav.open {
    flex-direction: column !important; flex-wrap: nowrap !important;
    gap: 4px !important; z-index: 998;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav.open a {
    display: block; padding: 12px 16px; border-radius: 12px; font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,.06); text-decoration: none;
  }
  .nav.open a:last-child { border-bottom: none; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 380px) {
  .brand .name { font-size: 14px; } .brand img { width: 30px; } .nav-toggle { width: 36px; height: 36px; }
}

@media (max-width: 768px) {
  .page-header { padding: 80px 16px 60px; }
  .page-header-content h1 { font-size: 2rem; line-height: 1.2; }
  .page-header-content p  { font-size: 1rem; }
}
@media (max-width: 480px) {
  .page-header { padding: 60px 12px 40px; }
  .page-header-content h1 { font-size: 1.6rem; }
}

@media (max-width: 768px) { section, .section { padding: 40px 0; } }
@media (max-width: 480px) { section, .section { padding: 28px 0; } }

@media (max-width: 640px) {
  .section-title { font-size: 1.6rem; } .section-subtitle { font-size: .95rem; margin-bottom: 28px; }
  h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
}
@media (max-width: 400px) { h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } }

@media (max-width: 768px) {
  .services-grid { grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
  .service-card  { max-width: 100%; width: 100%; }
}
@media (max-width: 480px) { .services-grid { grid-template-columns: 1fr; gap: 12px; } .service-card { border-radius: 14px; } }

@media (max-width: 640px) { .vcard, .v-card { padding: 14px; border-radius: 14px; } .vcard.sm, .v-card.sm { padding: 12px; } }
@media (max-width: 400px) { .vcard, .v-card { padding: 12px; } }

@media (max-width: 480px) {
  .btn,.btn-primary,.btn.primary,.btn-secondary,.btn.secondary,.btn-ghost,.btn.ghost {
    padding: 9px 14px; font-size: 13px; border-radius: 12px;
  }
  .btn-group, .button-group { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .btn-group .btn,.btn-group [class*="btn-"],.button-group .btn,.button-group [class*="btn-"] { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  input[type="text"],input[type="email"],input[type="password"],input[type="tel"],
  input[type="number"],input[type="date"],input[type="url"],input[type="search"],select,textarea {
    font-size: 16px !important; max-width: 100%;
  }
  .form-row { display: flex; flex-direction: column; gap: 10px; }
  .form-row > * { width: 100% !important; }
  form .input-group { flex-direction: column; gap: 8px; }
  form .input-group input, form .input-group button { width: 100%; }
}

@media (max-width: 768px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; }
  table thead, table tbody { display: block; }
  table tr { display: table-row; }
  table th, table td { white-space: nowrap; font-size: 13px; padding: 8px 10px; }
}

@media (max-width: 640px) {
  .login-wrapper  { padding: 16px; align-items: flex-start; padding-top: 80px; }
  .login-card     { padding: 24px 18px; border-radius: 16px; width: 100%; }
  .signup-wrapper { padding: 16px; padding-top: 80px; }
  .auth-card      { padding: 24px 18px; border-radius: 16px; width: 100%; }
}
@media (max-width: 400px) { .login-card, .auth-card { padding: 20px 14px; } }

@media (max-width: 980px) {
  #adminSidebar {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100vh;
    z-index: 1050; transition: left .28s ease; overflow-y: auto; box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  #adminSidebar.open { left: 0; }
  #adminSidebarBackdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1049; }
  #adminSidebarBackdrop.show { display: block; }
  .admin-grid, [class*="admin-grid"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
  .admin-section h2 { font-size: 1.05rem; } .admin-section { padding: 16px 12px; }
  .btn-small { font-size: 12px; padding: 5px 9px; }
  .admin-kpi-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
}
@media (max-width: 400px) { .admin-kpi-grid { grid-template-columns: 1fr !important; } }

@media (max-width: 980px) { .is-dashboard .dash-shell { padding: 0 12px 28px; } }
@media (max-width: 640px) {
  .is-dashboard .dash-title { font-size: 18px; }
  .is-dashboard .v-card     { padding: 14px; }
  .is-dashboard .dash-lead  { font-size: 13px; }
}
@media (max-width: 480px) { .is-dashboard .v-card { padding: 12px; } .is-dashboard .dash-title { font-size: 16px; } }

@media (max-width: 640px) {
  .modal-box, .modal-content, .dialog-box {
    margin: 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0;
    position: fixed; bottom: 0; left: 0; right: 0;
  }
  .modal-overlay, .modal-backdrop { align-items: flex-end; }
}

@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; gap: 20px; } .plan-card { max-width: 480px; margin: 0 auto; } }

@media (max-width: 640px) { .billing-tiles { grid-template-columns: 1fr 1fr !important; gap: 10px !important; } .billing-tile { padding: 14px !important; } }
@media (max-width: 400px) { .billing-tiles { grid-template-columns: 1fr !important; } }

@media (max-width: 480px) {
  .chatbot-card { width: calc(100vw - 20px) !important; left: 10px !important; right: 10px !important; bottom: 10px !important; border-radius: 18px !important; max-height: 80vh; }
  #chatbot-btn  { right: 14px !important; bottom: 14px !important; width: 50px !important; height: 50px !important; }
}

@media (max-width: 768px) { .footer-container { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (max-width: 560px) { .footer-container { grid-template-columns: 1fr; gap: 18px; } .footer-item,.footer-col { text-align: center; } }
@media (max-width: 480px) { .footer-card { padding: 28px 16px 20px; } .footer-bottom { font-size: 12px; text-align: center; } }

@media (max-width: 768px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr !important; } }
@media (min-width: 481px) and (max-width: 768px) { .grid-3,.grid-4 { grid-template-columns: repeat(2,1fr) !important; } }

@media (max-width: 768px) {
  .overflow-x-mobile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .no-overflow-x     { overflow-x: hidden !important; }
  .w-full-mobile     { width: 100% !important; }
  .center-mobile     { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }
}

@media (max-width: 640px) {
  /* Cookie banner & modal — detailed rules live in footer.php <style>.
     These rules ensure no overflow on any screen width. */
  #stCookieBanner { max-width: 100vw !important; box-sizing: border-box !important; }
  .stcm-box       { max-width: 100vw !important; box-sizing: border-box !important; }
}

@media (max-width: 980px) {
  .admin-nav { display: none; }
  .admin-nav.open { display: block; }
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { white-space: nowrap; }
}
