/* Ammarah Naeem website — mobile and small-screen hardening v17 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 92px;
}
body { min-width: 320px; }
button,
a,
input,
select,
textarea { touch-action: manipulation; }
input,
select,
textarea { max-width: 100%; }

/* Prevent long customer data, emails and URLs from forcing overflow. */
.admin-table td,
.contact-item,
.contact-item a,
.scheduler-profile-copy,
.scheduler-profile-copy a,
.footer-brand,
.footer-col,
.lead-success-card,
.booking-success-confirmation,
.page-kicker-box {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (hover: none) {
  .btn:hover,
  .card:hover,
  .area:hover,
  .case-card:hover .case-bg,
  .social-link:hover,
  .calendar-day:hover:not(:disabled),
  .time-slot:hover:not(:disabled) {
    transform: none;
  }
}

@media (max-width: 1000px) {
  .site-header { background: rgba(255,255,255,.97); border-bottom-color: rgba(0,0,0,.08); backdrop-filter: blur(16px); }
  .nav { min-height: 76px; }
  .nav-links {
    top: 0;
    bottom: 0;
    inset-inline: 0;
    margin-top: 76px;
    height: calc(100dvh - 76px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px max(22px, env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  }
  .nav-links a { min-height: 50px; display: flex; align-items: center; }
  .nav-links .btn { width: 100%; }
  .menu-toggle { flex: 0 0 48px; }
  .hero-grid { gap: 28px; }
  .page-hero-grid { gap: 28px; }
}

@media (max-width: 760px) {
  :root { --container: min(100% - 24px, 1180px); }
  .section { padding: 58px 0; }
  .section-sm { padding: 44px 0; }
  .section-head { margin-bottom: 30px; }
  .eyebrow { margin-bottom: 12px; font-size: .7rem; }
  .h1 { font-size: clamp(2.35rem, 12vw, 4rem); line-height: .98; }
  .h2 { font-size: clamp(2rem, 9.5vw, 3rem); line-height: 1.02; }
  .lead { font-size: 1rem; line-height: 1.58; }
  .yellow-mark { white-space: normal; }

  .btn { min-height: 50px; padding-inline: 18px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .hero-actions .btn { width: 100%; }

  .hero { min-height: auto; padding-top: 92px; }
  .hero-copy { padding: 34px 0 10px; }
  .hero-copy .lead { margin: 22px 0 26px; }
  .hero-proof { margin-top: 26px; gap: 12px; }
  .hero-visual { min-height: 410px; }
  .hero-photo-frame.logo-frame { inset: 12px 0 0; padding: 22px 18px; border-radius: 24px; }
  .floating-card { padding: 12px 14px; border-radius: 14px; }
  .floating-card strong { font-size: 1.05rem; }
  .floating-card small { font-size: .72rem; }
  .floating-card.one { left: 8px; bottom: 56px; }
  .floating-card.two { right: 8px; top: 52px; }
  .hero-badge { width: 92px; height: 92px; right: 8px; bottom: 10px; font-size: .72rem; }
  .marquee span { padding: 13px 20px; font-size: .78rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; border-radius: 18px; }
  .stat { padding: 22px 16px; }
  .stat-number { font-size: clamp(2rem, 12vw, 3.1rem); }
  .stat-label { font-size: .82rem; }

  .cards-3 { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 24px 20px; border-radius: 18px; }
  .card-icon { margin-bottom: 22px; }
  .case-card { min-height: 330px; border-radius: 18px; }
  .case-content { padding: 22px; }
  .case-content h3 { font-size: 1.5rem; }

  .split { gap: 34px; }
  .media-panel,
  .media-panel.logo-media-panel { min-height: 390px; border-radius: 20px; }
  .media-panel.logo-media-panel { padding: 28px 18px 98px; }
  .media-panel .quote { left: 14px; right: 14px; bottom: 14px; padding: 18px; }

  .steps { border-radius: 18px; }
  .step { grid-template-columns: 42px minmax(0,1fr); gap: 14px; padding: 22px 18px; }
  .step-no { font-size: .78rem; }
  .step h3 { font-size: 1rem; }
  .step p { font-size: .88rem; line-height: 1.5; }
  .areas-grid { grid-template-columns: 1fr 1fr; }
  .area { min-height: 112px; padding: 18px; font-size: 1rem; }

  .page-hero { padding: 118px 0 58px; }
  .page-kicker-box { padding: 20px; border-radius: 16px; }
  .timeline-row { padding: 25px 0; }
  .cta-panel { padding: 34px 22px; border-radius: 22px; }

  .form-wrap { gap: 22px; }
  .contact-panel { padding: 26px 20px; border-radius: 20px; }
  .contact-list { margin-top: 24px; gap: 16px; }
  .contact-item { grid-template-columns: 40px minmax(0,1fr); gap: 12px; }
  .contact-item .ci { width: 40px; height: 40px; }
  .form-card { padding: 24px 18px; border-radius: 20px; box-shadow: 0 16px 46px rgba(0,0,0,.09); }
  .form-grid { gap: 14px; }
  .field input,
  .field select,
  .field textarea { min-height: 52px; padding: 13px 14px; font-size: 16px; }
  .field textarea { min-height: 120px; }
  .checkbox { line-height: 1.45; }
  .faq-q { min-height: 58px; padding: 19px 0; font-size: 1rem; }

  .site-footer { padding: 52px 0 calc(24px + env(safe-area-inset-bottom)); }
  .footer-grid { gap: 28px; }
  .footer-bottom { margin-top: 34px; padding-top: 24px; font-size: .82rem; }
  .social-link { min-height: 46px; }

  .floating-actions {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    gap: 8px;
  }
  .fab { width: 50px; height: 50px; }
  .modal { padding: 10px; }
  .modal-card { max-height: calc(100dvh - 20px); padding: 28px 18px 22px; border-radius: 20px; }
  .modal-close { right: 12px; top: 12px; }

  .lead-success-overlay { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .lead-success-card { max-height: calc(100dvh - 24px); overflow-y: auto; padding: 32px 18px; border-radius: 22px; }
  .lead-success-card .h2 { font-size: clamp(2.25rem, 12vw, 3.25rem); }
  .lead-success-check { width: 72px; height: 72px; }
  .booking-success-confirmation { width: 100%; }
}

@media (max-width: 480px) {
  :root { --container: min(100% - 20px, 1180px); }
  .brand-logo { width: 132px; height: 48px; }
  .menu-toggle { width: 44px; height: 44px; }
  .display { font-size: clamp(2.75rem, 16vw, 4.2rem); }
  .hero-visual { min-height: 350px; }
  .floating-card.two { top: 34px; }
  .stats-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: 1fr; }
  .area { min-height: 92px; }
  .testimonial { padding: 24px 20px; }
  .testimonial blockquote { font-size: 1.05rem; }
}

/* Booking page */
@media (max-width: 760px) {
  .booking-page { padding-top: 76px; }
  .scheduler-section { padding: 10px 0 40px; }
  .scheduler-shell { border-radius: 0; border-inline: 0; box-shadow: none; }
  .scheduler-brandbar { padding: 10px 14px; }
  .scheduler-brand-logo { height: 62px; }
  .scheduler-profile.scheduler-profile--logo { gap: 14px; padding: 20px 16px; }
  .scheduler-logo { height: 118px; padding: 6px; border-radius: 16px; }
  .scheduler-profile-copy h1 { font-size: 1.35rem; }
  .scheduler-profile-copy a { font-size: .85rem; }
  .scheduler-duration { margin-top: 10px; font-size: .86rem; }
  .scheduler-duration span { width: 24px; height: 24px; }
  .scheduler-calendar-column { padding: 30px 14px 26px; }
  .scheduler-times-column { padding: 28px 14px 34px; }
  .scheduler-heading { margin-bottom: 22px; }
  .scheduler-heading h2,
  .scheduler-times-column h2 { font-size: 1.55rem; }
  .scheduler-calendar-toolbar { grid-template-columns: 42px minmax(0,1fr) 42px; gap: 6px; }
  .scheduler-arrow { width: 42px; height: 42px; }
  .scheduler-shell .calendar-weekdays,
  .scheduler-shell .booking-calendar { gap: 2px; }
  .scheduler-shell .calendar-weekdays { margin-top: 22px; font-size: .68rem; }
  .scheduler-shell .calendar-day { width: min(100%, 42px); max-width: 42px; font-size: .86rem; }
  .scheduler-timezone { margin-top: 20px; font-size: .76rem; line-height: 1.45; }
  .scheduler-times-column .time-slots { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 20px; }
  .scheduler-times-column .time-slot { min-height: 52px; padding-inline: 8px; }
  .scheduler-legend { margin-top: 18px; }
  .booking-details-section { padding: 48px 0 62px; }
  .booking-details-grid { width: min(100% - 20px, 1180px); gap: 24px; }
  .booking-details-intro .h2 { font-size: 2rem; }
  .booking-summary { margin: 18px 0; padding: 13px; }
}

@media (max-width: 390px) {
  .scheduler-logo { height: 102px; }
  .scheduler-profile-copy h1 { font-size: 1.22rem; }
  .scheduler-profile-copy a { font-size: .78rem; }
  .scheduler-times-column .time-slots { grid-template-columns: 1fr; }
  .scheduler-shell .calendar-weekdays { font-size: .62rem; }
  .scheduler-shell .calendar-day { font-size: .8rem; }
}

/* Meta Ads appraisal landing page */
@media (max-width: 620px) {
  body.meta-landing { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .landing-header-inner { gap: 10px; }
  .landing-logo { width: min(145px, 48vw); }
  .landing-call-btn { flex: 0 0 auto; min-width: 74px; }
  .ad-title { font-size: clamp(2.35rem, 12.5vw, 3.65rem); }
  .ad-benefits { gap: 10px; }
  .tick { grid-template-columns: 28px minmax(0,1fr); gap: 10px; }
  .ad-contact-line { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .ad-form-card { padding: 22px 15px; }
  .ad-form-head-row { align-items: flex-start; }
  .contact-pills { gap: 6px; }
  .contact-pill span { min-height: 50px; font-size: .75rem; }
  .ad-trust-grid { grid-template-columns: 1fr; }
  .ad-trust-item { border-right: 0; border-bottom: 1px solid #e3e3e0; padding: 12px 4px; }
  .ad-trust-item:last-child { border-bottom: 0; }
  .ad-section { padding: 52px 0; }
  .ad-section-head { margin-bottom: 26px; }
  .ad-step { padding: 22px 18px; }
  .ad-faq summary { padding: 18px 48px 18px 18px; }
  .ad-faq p { padding: 0 18px 18px; }
  .ad-final-cta { padding: 34px 18px; }
  .mobile-lead-cta {
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 370px) {
  .landing-logo { width: 128px; }
  .landing-call-btn { min-width: 66px; padding-inline: 11px; font-size: .78rem; }
  .contact-pills { grid-template-columns: 1fr; }
}

/* Admin portal: mobile tables become labelled record cards. */
@media (max-width: 760px) {
  body.admin-page .site-header .nav { min-height: 70px; justify-content: center; }
  body.admin-page .site-header .brand-logo { width: 150px; height: 54px; }
  .admin-shell { padding: 92px 0 44px; }
  .admin-login { width: min(100% - 20px, 520px); padding: 24px 18px; }
  #admin-dashboard { width: min(100% - 20px, 1180px); }
  .admin-topbar { align-items: stretch; gap: 18px; }
  .admin-topbar > div:first-child { width: 100%; }
  .admin-topbar .h2 { font-size: clamp(2.05rem, 10vw, 2.75rem) !important; }
  .admin-topbar .hero-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .admin-topbar .hero-actions .btn { width: 100%; min-height: 46px; padding-inline: 12px; }
  .admin-connection-line { align-items: flex-start; flex-direction: column; gap: 7px; }
  .admin-metrics { grid-template-columns: 1fr 1fr !important; gap: 9px; margin-bottom: 26px; }
  .admin-metric { padding: 17px 14px; border-radius: 14px; }
  .admin-metric small { font-size: .75rem; line-height: 1.3; }
  .admin-metric strong { font-size: 1.75rem; }
  .admin-section { margin-top: 34px; }
  .admin-section > .toolbar { align-items: stretch; margin-bottom: 14px; }
  .admin-section > .toolbar > div:first-child { width: 100%; }
  .admin-controls { display: grid; grid-template-columns: 1fr; width: 100%; gap: 10px; }
  .admin-controls .field,
  .admin-search-field { min-width: 0; width: 100%; }
  .admin-controls .btn { width: 100%; min-height: 48px; }

  .admin-table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .admin-table,
  .booking-admin-table { display: block; width: 100%; min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table tbody { display: grid; gap: 12px; }
  .admin-table tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.045); }
  .admin-table td { display: grid; grid-template-columns: minmax(88px, 31%) minmax(0,1fr); gap: 12px; width: 100%; padding: 13px 14px; border-bottom: 1px solid #ecece8; font-size: .84rem; line-height: 1.5; }
  .admin-table td:last-child { border-bottom: 0; }
  .admin-table td::before { content: attr(data-label); color: #6b6b6b; font-size: .68rem; font-weight: 900; letter-spacing: .075em; line-height: 1.4; text-transform: uppercase; }
  .admin-table td[data-empty="true"] { display: block; padding: 18px; }
  .admin-table td[data-empty="true"]::before { content: none; }
  .status-select { width: 100%; min-height: 46px; padding: 9px 10px; font-size: 16px; }
}

@media (max-width: 360px) {
  .admin-metrics { grid-template-columns: 1fr !important; }
  .admin-topbar .hero-actions { grid-template-columns: 1fr; }
  .admin-table td { grid-template-columns: 78px minmax(0,1fr); padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
