/* ============================================
   ON POINT PRO DOORS — KC MOBILE CSS
   Phone-optimized for screens 768px and below
   ============================================ */

@media (max-width: 768px) {

  /* === GLOBAL RESET FOR MOBILE === */
  html, body {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    font-size: 15px;
  }
  body {
    padding-bottom: 72px; /* room for sticky bottom bar */
  }
  * { box-sizing: border-box; }
  img { max-width: 100%; height: auto; }
  .container, [class*="container"] {
    padding-left: 16px !important;
    padding-right: 16px !important;
    max-width: 100% !important;
  }

  /* === HEADER / TOP NAV === */
  .topbar {
    padding: 8px 0;
    background: #fff !important;
    border-bottom: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
  .topbar .nav {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .topbar .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
  }
  .topbar .brand img {
    width: 38px !important;
    height: 38px !important;
    border-radius: 6px;
  }
  .topbar .brand .title strong {
    font-size: 14px !important;
    line-height: 1.1;
    display: block;
  }
  .topbar .brand .title span {
    font-size: 11px !important;
    color: #666;
  }
  .topbar .navlinks {
    display: none !important;
  }
  .topbar .actions {
    flex: 0 0 auto;
  }
  .topbar .actions .btn,
  .topbar .actions a {
    background: #CC2222 !important;
    color: #fff !important;
    padding: 9px 14px !important;
    border-radius: 8px;
    font-size: 13px !important;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .topbar .actions .btn::before {
    content: "📞 ";
  }

  /* === HERO === */
  .hero {
    padding: 24px 0 !important;
    min-height: auto !important;
  }
  .hero .heroCard,
  section.hero .heroCard {
    padding: 22px 18px !important;
    border-radius: 12px;
    text-align: left;
  }
  .h1, h1, .hero h1 {
    font-size: 26px !important;
    line-height: 1.2 !important;
    margin: 0 0 12px !important;
    font-weight: 900;
  }
  .hero .sub, .sub {
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin: 0 0 16px !important;
  }
  .hero .btn,
  .hero a.btn-accent,
  section.hero a {
    width: 100%;
    text-align: center;
    padding: 16px 18px !important;
    font-size: 17px !important;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(204,34,34,0.35);
  }

  /* === HEADINGS THROUGHOUT === */
  h2 { font-size: 22px !important; line-height: 1.25 !important; }
  h3 { font-size: 18px !important; line-height: 1.3 !important; }
  p, li { font-size: 15px !important; line-height: 1.6 !important; }

  /* === SECTIONS & SPACING === */
  section {
    padding: 32px 0 !important;
  }
  section > div,
  main section > div {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* === IMAGES === */
  main img,
  div img {
    max-height: 240px !important;
    object-fit: cover;
    border-radius: 10px;
  }

  /* === TABLES — convert to cards === */
  table {
    font-size: 14px !important;
    width: 100% !important;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: normal;
  }
  table thead { display: none; }
  table tr {
    display: block;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fff;
  }
  table td {
    display: block;
    padding: 4px 0 !important;
    border-bottom: none !important;
    text-align: left !important;
  }
  table td:first-child {
    font-weight: 800;
    color: #1a1a1a;
    font-size: 14px;
  }
  table td:nth-child(2) {
    color: #CC2222;
    font-size: 16px;
    font-weight: 700;
  }

  /* === GRIDS COLLAPSE TO STACK === */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  div[style*="display:grid"],
  div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }

  /* === FAQ DETAILS === */
  details {
    padding: 14px 16px !important;
    margin-bottom: 8px !important;
    border-radius: 8px;
  }
  details summary {
    font-size: 15px !important;
    line-height: 1.4;
  }
  details p {
    font-size: 14px !important;
  }

  /* === FOOTER === */
  footer {
    padding: 32px 16px 92px !important;
    text-align: center;
  }
  footer p { font-size: 13px !important; }

  /* === FLOATING CALL BUTTON (existing in pages) === */
  a[href^="tel:"][style*="position:fixed"],
  a[href^="tel:"][style*="position: fixed"] {
    display: none !important; /* replaced by sticky bottom bar */
  }

  /* === STICKY BOTTOM CTA BAR === */
  body::after {
    content: "";
    display: block;
    height: 0;
  }

  /* === RESERVATION FORM === */
  form, .form, .reserveForm {
    padding: 14px !important;
  }
  input, select, textarea, button {
    font-size: 16px !important; /* prevents iOS zoom on focus */
    padding: 12px 14px !important;
    border-radius: 8px;
    width: 100% !important;
    margin-bottom: 10px;
  }
  button[type="submit"] {
    background: linear-gradient(135deg,#CC2222 0%,#E85D00 100%) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(204,34,34,0.35);
  }

  /* === REVIEW CARDS === */
  div[style*="background:#fff"][style*="border-radius:8px"] {
    padding: 16px !important;
  }
}

/* ============================================
   PHONE-ONLY STICKY BOTTOM CTA BAR
   Always visible, two buttons: CALL + RESERVE
   ============================================ */
@media (max-width: 768px) {
  .opx-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    padding: 8px;
    gap: 8px;
  }
  .opx-mobile-cta a {
    flex: 1;
    text-align: center;
    padding: 11px 4px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
  }
  .opx-mobile-cta a span {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.85;
    margin-top: 2px;
  }
  .opx-mobile-cta a.opx-call {
    background: linear-gradient(135deg,#CC2222 0%,#8B0000 100%);
    color: #fff;
  }
  .opx-mobile-cta a.opx-reserve {
    background: #1a1a1a;
    color: #fff;
  }
  .opx-mobile-cta a.opx-text {
    background: #25D366;
    color: #fff;
  }
}

/* Hide on desktop */
@media (min-width: 769px) {
  .opx-mobile-cta { display: none !important; }
}

/* ============================================
   24/7 BADGE STYLING
   ============================================ */
.opx-247-badge {
  display: inline-block;
  background: #FFD700;
  color: #CC2222;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
@media (max-width: 768px) {
  .opx-247-badge {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* ============================================
   HOVER TWEAKS — TABLET RANGE
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
  .h1, h1 { font-size: 30px !important; }
  h2 { font-size: 24px !important; }
}
