/*
Theme Name: Focus9x Blog Update 90 (A19.4 Classic, PHP 8.3-ready)
Theme URI: https://focus9x.com
Author: Bruce
Description: Hero+4; Latest=3 (total 8); category sections (Computers, Audio, Appliances) hero+4+3. Robust dark-mode. ALL-CAPS headings, pink dividers, mobile header fix. PHP 8.3-ready.
P.0-readable
Requires PHP: 8.0
Tested up to: 6.6
Text Domain: focus9x-blog-update

 * Version: 3.1
*/

/* Focus9x Footer (inspired by minimal editorial sites) */
.site-footer{ background: #0b0b0c; color: #c9c9cf; margin-top: 3rem; }
.f9x-footer-wrap{ max-width: 1100px; margin: 0 auto; padding: 2.5rem 1rem; }
.f9x-footer-top{ display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:1rem 2rem; }
.f9x-brand .f9x-logo{ font-family: var(--h-font, system-ui); font-weight: 900; font-size: 1.5rem; color: #fff; text-decoration:none; }
.f9x-brand .f9x-tagline{ margin:.25rem 0 0; opacity:.7; }
.f9x-footer-menu{ list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap: .75rem 1.25rem; }
.f9x-footer-menu a{ color:#d9d9df; text-decoration:none; border-bottom:1px solid transparent; padding-bottom:2px; }
.f9x-footer-menu a:hover{ border-color:#d9d9df; }
.f9x-footer-bottom{ border-top:1px solid rgba(255,255,255,.08); margin-top:1.5rem; padding-top:1rem; font-size:.95rem; opacity:.85; }
@media (max-width: 640px){ .f9x-footer-top{ flex-direction:column; } }



/* Focus9x Strapline (header tagline only) */
.site-description, .f9x-strapline{
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(1.05rem, 0.8vw + 0.9rem, 1.6rem);
}


/* Focus9x Blog Title sizing (moderated) */
.entry-title, .entry-title a{
  font-weight: 700;
  line-height: 1.15;
}
.single .entry-title{ font-size: clamp(1.8rem, 2vw + 1.2rem, 2.4rem); }
.archive .entry-title, .blog .entry-title, .home .entry-title{ font-size: clamp(1.2rem, 1.1vw + 0.9rem, 1.6rem); }


/* Focus9x Footer adaptive theme */
.site-footer{
  background: #ffffff;
  color: #111;
}
.site-footer a{ color:#111; }
.f9x-footer-bottom{ border-top:1px solid rgba(0,0,0,.08); }

@media (prefers-color-scheme: dark){
  .site-footer{
    background: #0b0b0c;
    color: #c9c9cf;
  }
  .site-footer a{ color:#d9d9df; }
  .f9x-footer-bottom{ border-top:1px solid rgba(255,255,255,.08); }
}



/* Footer adapts to site dark-mode toggles */
body.dark .site-footer,
body.dark-mode .site-footer,
.theme-dark .site-footer,
[data-theme="dark"] .site-footer,
.is-dark-mode .site-footer{
  background: #0b0b0c !important;
  color: #c9c9cf !important;
}
body.dark .site-footer a,
body.dark-mode .site-footer a,
.theme-dark .site-footer a,
[data-theme="dark"] .site-footer a,
.is-dark-mode .site-footer a{
  color: #d9d9df !important;
}
body.dark .f9x-footer-bottom,
body.dark-mode .f9x-footer-bottom,
.theme-dark .f9x-footer-bottom,
[data-theme="dark"] .f9x-footer-bottom,
.is-dark-mode .f9x-footer-bottom{
  border-top:1px solid rgba(255,255,255,.08) !important;
}



/* Left header nav (Engadget-like) */
.site-header nav a,
.main-navigation a,
.primary-menu > li > a,
.menu-primary > li > a{
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Avoid affecting right-side controls */
.site-header input[type="search"],
.site-header button,
.site-header .theme-toggle,
.site-header .search-form *{
  font-family: inherit;
}

/* =========================================
   FINAL OVERFLOW FIX (MOBILE ONLY)
   ========================================= */

/* Desktop: allow normal overflow behavior */
@media (min-width: 769px) {
  html, body {
    overflow-x: visible;
  }
}

/* Mobile Safari only */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Prevent flex children from exceeding viewport */
  .f9x-header,
  .f9x-header .f9x-header-row,
  .f9x-brand-nav,
  .f9x-actions,
  .f9x-center-logo {
    max-width: 100%;
    min-width: 0;
  }

  .search-form,
  .search-form .search-field {
    max-width: 100%;
    min-width: 0;
  }
}

/* =========================================
   FINAL MOBILE LOGO CONFLICT FIX
   ========================================= */

/* Mobile = ONE logo only (center) */
@media (max-width: 768px) {

  /* Kill the left logo completely */
  .f9x-brand-nav .f9x-logo {
    display: none !important;
  }

  /* Ensure center logo is the ONLY visible logo */
  .f9x-center-logo {
    display: flex !important;
    position: relative !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    transform: none !important;
    left: auto !important;
  }

  .f9x-center-logo img {
    display: block !important;
    height: 34px;
    max-width: 180px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .f9x-center-logo img {
    height: 30px;
    max-width: 160px;
  }
}

/* =========================================
   MOBILE: MAKE CENTER LOGO CLICKABLE (FINAL)
   ========================================= */
@media (max-width: 768px) {

  /* Ensure the whole logo block can receive taps */
  .f9x-center-logo {
    pointer-events: auto !important;
    position: relative;
    z-index: 5; /* above normal header content */
  }

  .f9x-center-logo a,
  .f9x-center-logo img {
    pointer-events: auto !important;
  }
}
/* =========================================
   OVERLAY: NEVER BLOCK CLICKS WHEN HIDDEN
   ========================================= */
.f9x-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.f9x-overlay {
  pointer-events: auto;
}

/* ===== FIX: Make Pages Fully Responsive ===== */

.f9x-page {
    width: 100% !important;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* === FIX BLOCK WRAPPER WIDTH LOCK === */

.wp-site-blocks {
    max-width: 100% !important;
    width: 100% !important;
}

.f9x-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}
/* ===== Page Banner Mobile Fix ===== */

.page-title {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
  text-align: center;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 30px !important;
  }
}

/* Fix Featured Image Responsiveness */

.page-thumb img,
.wp-post-image {
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* ==============================
   Missed Call Rescue Form Styling
   ============================== */

.wpcf7 {
  max-width: 650px;
  margin: 0 auto;
}

.wpcf7 label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 20px;
}

.wpcf7 input,
.wpcf7 textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 textarea {
  min-height: 120px;
  resize: vertical;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: #ff4d4d;
  box-shadow: 0 0 0 3px rgba(255,77,77,0.15);
}

.wpcf7-submit {
  margin-top: 25px;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  width: 100%;
}

.wpcf7-response-output {
  border: none;
  background: #f4f8ff;
  padding: 20px;
  border-radius: 14px;
  margin-top: 25px;
  font-weight: 500;
}
