/* The Screen Doctor of Lee County — site styles (mobile first) */

@font-face {
  font-family: "Brandyscript";
  src: url("../fonts/brandyscript.woff") format("woff");
  font-display: swap;
}

:root {
  --red: #fa0404;          /* brand red, exactly as on the original site */
  --red-bright: #fa0404;
  --red-dark: #d50606;     /* original site's second red: hover / pressed states */
  --ink: #1d1d1f;
  --text: #3a3a3c;
  --muted: #6b6b70;
  --line: #e3e3e6;
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --postit: #fafbbf;       /* original "post-it" yellow */
  --screen: url("../img/screen.png");  /* the signature window-screen mesh */
  --dark: #232325;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.07);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --script: "Brandyscript", "Segoe Script", cursive;
  --wrap: 1180px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 var(--font);
  color: var(--text);
  background: #fff var(--screen);   /* window screen behind the whole page */
  overflow-x: hidden;
}
img, iframe, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--red); text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.2; margin: 1.4em 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); margin-top: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.65rem); }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Legacy content helpers ---------------------------------------------- */
.large { font-size: 1.15em; }
.small { font-size: .88em; }
.centered { text-align: center; }
.clear { clear: both; }
.button, a.button, button.button {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: .6em 1.2em;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  line-height: 1.3;
  transition: background .15s, transform .15s;
}
.button:hover, a.button:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }
.button-alt, a.button-alt { background: var(--dark); }

/* Top bar ------------------------------------------------------------- */
.topbar { background: var(--dark); color: #d9d9dc; font-size: .85rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 36px; }
.topbar-note { margin: 0; padding: 6px 0; }
.social { list-style: none; display: flex; gap: .35rem; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: inherit; }
.social a:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar .social { display: none; }

/* Header -------------------------------------------------------------- */
.site-header { background: #fff; position: relative; z-index: 40; box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-top: 8px; padding-bottom: 12px; }
.brand { flex: 1 1 0; min-width: 0; }
.brand img { width: 100%; max-width: 300px; }
.header-cta {
  /* the "post-it note" behind the phone number, as on the original site.
     On phones it is a full-width strip under the logo; beside it from 600px up. */
  order: 3; flex: 1 0 100%; text-align: center;
  background: var(--postit);
  box-shadow: 0 8px 16px rgba(0,0,0,.4);
  padding: .35rem .7rem;
}
.phone {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 800; font-size: 1.05rem; color: var(--red); text-decoration: none; white-space: nowrap;
}
.phone:hover { color: var(--red-dark); }
.phone .icon { width: 18px; height: 18px; }
.tagline { display: none; margin: 0; font-weight: 700; color: var(--ink); line-height: 1.25; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--red); color: #fff; border: 0; border-radius: 8px;
  padding: .55rem .7rem; font: 600 .9rem var(--font); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; transition: transform .2s;
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle-label { display: none; }

.site-nav { background: var(--red); display: none; }
.site-nav.is-open { display: block; max-height: calc(100vh - 70px); overflow-y: auto; }
.nav-list { list-style: none; margin: 0 auto; padding-top: 4px; padding-bottom: 8px; }
.nav-item { position: relative; display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid rgba(255,255,255,.15); }
.nav-item > a { flex: 1; color: #fff; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1.06rem; padding: .8rem 0; }
.nav-item.is-active > a { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.subnav-toggle { background: transparent; border: 0; color: #fff; width: 44px; height: 44px; cursor: pointer; }
.subnav-toggle::before { content: "▾"; font-size: 1.1rem; display: inline-block; transition: transform .2s; }
.subnav-toggle[aria-expanded="true"]::before { transform: rotate(180deg); }
.subnav { display: none; list-style: none; margin: 0 0 .5rem; padding: 0 0 0 .75rem; width: 100%; }
.subnav.is-open { display: block; }
.subnav a { display: block; color: #fff; text-decoration: none; padding: .45rem 0; font-size: .95rem; }
.nav-cta { border: 0; padding: .75rem 0 .25rem; }
.nav-cta a { flex: 0 0 auto; background: var(--postit); color: var(--ink); border-radius: 999px; padding: .55rem 1.1rem; text-align: center; }

/* Hero ---------------------------------------------------------------- */
.hero { position: relative; background: var(--dark); overflow: hidden; }
.hero-slide { position: relative; }
.hero-slide img { width: 100%; height: clamp(260px, 52vw, 520px); object-fit: cover; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,0) 100%); pointer-events: none; }
.hero-card { position: absolute; inset: 0; display: flex; align-items: center; z-index: 1; }
.hero-text { max-width: 30rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); font-size: 1.05rem; }
.hero-text p { margin: 0 0 .4em; }
.hero-text strong { display: block; font-size: clamp(1.6rem, 1.1rem + 2.6vw, 2.8rem); line-height: 1.1; font-weight: 800; margin: .1em 0; }
.hero-text a:not(.button) { color: #fff; }
.hero-text .button { margin-top: .6rem; text-shadow: none; }

/* Carousel (hero + in-page slideshows) -------------------------------- */
.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.88); color: var(--ink); font-size: 1.6rem; line-height: 1; box-shadow: var(--shadow);
}
.carousel-btn:hover { background: #fff; }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.carousel-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; }
.carousel-dots button[aria-selected="true"] { background: #fff; }
.page-body .carousel { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.carousel-figure { margin: 0; position: relative; }
.carousel-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.carousel-figure figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem 1rem .7rem; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.7)); }

/* Page layout --------------------------------------------------------- */
.page-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 1.5rem; padding-bottom: 3rem;
  /* the window screen shows through behind the text: stronger at the top, then soft */
  background:
    linear-gradient(to bottom, rgba(255,255,255,.35) 0, rgba(255,255,255,.82) 220px, rgba(255,255,255,.82) 100%),
    var(--screen);
}
.content { min-width: 0; }
.content:focus { outline: none; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 .75rem; padding: 0; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: .25rem; }
.breadcrumbs a { color: var(--muted); }
.page-head { margin-bottom: 1rem; }
.page-head h1 { position: relative; padding-bottom: .4rem; }
.page-head h1::after { content: ""; display: block; width: 64px; height: 4px; background: var(--red); border-radius: 2px; margin-top: .5rem; }
.post-date { color: var(--muted); margin-top: -.25rem; }

/* Content blocks ------------------------------------------------------ */
.block { margin-bottom: 1.5rem; }
.block::after { content: ""; display: table; clear: both; }
.block-title { margin-top: .2em; }
.block-figure { margin: 0 0 1rem; }
.block-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.block-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.block-figure.size-small { max-width: 220px; }
.block-figure.size-medium { max-width: 320px; }
.block-figure.size-large { max-width: 440px; }
.block-figure.is-before-center, .block-figure.is-after-center { margin-left: auto; margin-right: auto; text-align: center; }
.block-figure.is-before-center img, .block-figure.is-after-center img { margin: 0 auto; }
.file-link a { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; }

.embed { margin: 1rem 0; }
.embed iframe { max-width: 100%; border: 0; border-radius: var(--radius); }
.embed iframe[src*="google.com/maps"], .embed iframe[src*="vimeo"], .embed iframe[src*="youtube"] { width: 100%; aspect-ratio: 16 / 9; height: auto; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 1.5rem; clear: both; }
.gallery-item { min-width: 0; }
.gallery-figure { margin: 0; }
.gallery-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; transition: transform .2s, box-shadow .2s; }
.gallery-figure a:hover img { transform: scale(1.02); box-shadow: var(--shadow); }
.gallery-figure figcaption { font-size: .82rem; color: var(--muted); margin-top: .3rem; line-height: 1.35; }
.gallery-item h3 { font-size: 1rem; margin: .4rem 0 .2rem; }
.gallery-item .block-body { font-size: .9rem; }

/* Section index cards ------------------------------------------------- */
.card-grid { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; clear: both; }
.card a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: box-shadow .2s, transform .2s; }
.card a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.card-title { font-weight: 700; color: var(--ink); font-size: 1.1rem; line-height: 1.25; }
.card-text { font-size: .93rem; }
.card-more { margin-top: auto; color: var(--red); font-weight: 600; font-size: .92rem; }

.link-list { list-style: none; padding: 0; margin: 1.5rem 0; clear: both; }
.link-list li { padding: 1rem 0; border-top: 1px solid var(--line); }
.link-list li > a { font-weight: 700; font-size: 1.08rem; }
.link-list p { margin: .3rem 0 0; font-size: .95rem; }
.news-list time { display: block; font-size: .85rem; color: var(--muted); }

.cta-band { margin-top: 2.5rem; padding: 1.25rem 1.5rem; background: var(--postit); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cta-band p { margin: 0; color: var(--ink); }

/* Sidebar ------------------------------------------------------------- */
.sidebar .block { background: var(--bg-soft); border-radius: var(--radius); padding: 1.1rem 1.25rem; font-size: .95rem; }
.sidebar .block-title { font-family: var(--script); font-weight: 400; font-size: 1.9rem; color: var(--ink); margin: 0 0 .35rem; line-height: 1.1; }
.sidebar .block-title a { color: inherit; text-decoration: none; }
.sidebar .block-figure { max-width: 110px; float: right; margin: 0 0 .5rem .75rem; }
.sidebar .block-figure img { box-shadow: none; border-radius: 4px; }
.sidebar .block-body p:last-child { margin-bottom: 0; }
.sidebar h5 { font-size: 1rem; margin: 0 0 .5rem; }
.sidebar .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--bg-soft); border-radius: var(--radius); padding: 1rem; }
.sidebar .gallery-figure img { aspect-ratio: auto; object-fit: contain; }
.section-nav { background: #fff !important; border: 1px solid var(--line); }
.section-nav ul { list-style: none; margin: 0; padding: 0; }
.section-nav li a { display: block; padding: .4rem 0; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.section-nav li:last-child a { border-bottom: 0; }
.section-nav a[aria-current] { color: var(--red); font-weight: 700; }
.news-mini { list-style: none; padding: 0; margin: 0 0 .5rem; }
.news-mini li { margin-bottom: .6rem; line-height: 1.35; }
.news-mini time { display: block; font-size: .8rem; color: var(--muted); }
.review-mini { margin: 0 0 .5rem; font-style: italic; }
.review-mini p { margin-bottom: .5rem; }
.more { margin: 0; font-weight: 600; }

/* Forms --------------------------------------------------------------- */
.form-card { background: var(--bg-soft); border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; clear: both; }
.form-card h2 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: .3rem; font-size: .95rem; }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #c9c9ce; border-radius: 8px; padding: .65rem .75rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: 2px solid rgba(250,4,4,.2); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--red); }
.field-error { color: var(--red-dark); font-size: .88rem; margin: .25rem 0 0; }
.field-full { grid-column: 1 / -1; }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-errors { background: #fdecee; border: 1px solid #f5c2c9; color: var(--red-dark); border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; }
.form-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }

/* Footer -------------------------------------------------------------- */
.site-footer { background: var(--dark); color: #cfcfd3; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2rem; }
.footer-name { font-family: var(--script); font-size: 2rem; color: #fff; margin: 0 0 .25rem; line-height: 1.1; }
.footer-phone { font-size: 1.3rem; font-weight: 800; text-decoration: none; }
.license { font-size: .85rem; color: #a7a7ad; }
.footer-links ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-social > p:first-child { font-weight: 700; color: #fff; margin-bottom: .4rem; }
.footer-social .social { margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; padding-bottom: 1.25rem; font-size: .82rem; color: #a7a7ad; }
.footer-bottom p { margin: 0; }

/* Lightbox ------------------------------------------------------------ */
.lightbox-dialog { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox-dialog::backdrop { background: rgba(0,0,0,.88); }
.lightbox-dialog[open] { display: grid; place-items: center; }
.lightbox-dialog figure { margin: 0; max-width: min(1200px, 92vw); text-align: center; }
.lightbox-dialog img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 6px; }
.lightbox-dialog figcaption { color: #eee; margin-top: .6rem; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* Wider screens ------------------------------------------------------- */
@media (min-width: 600px) {
  .header-inner { flex-wrap: nowrap; padding-bottom: 8px; }
  .brand { flex: 0 1 auto; }
  .header-cta { order: 0; flex: 0 0 auto; margin-left: auto; padding: .55rem 1.1rem .65rem; min-width: 220px; }
  .tagline { font-size: 1rem; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.3fr 1fr; }
  .block-figure.is-float-left.size-small, .block-figure.is-float-left.size-medium, .block-figure.is-float-left.size-large { float: left; margin: .25rem 1.5rem 1rem 0; }
  .block-figure.is-float-right.size-small, .block-figure.is-float-right.size-medium, .block-figure.is-float-right.size-large { float: right; margin: .25rem 0 1rem 1.5rem; }
  .block-figure.is-float-left.size-small, .block-figure.is-float-right.size-small { width: 34%; }
  .block-figure.is-float-left.size-medium, .block-figure.is-float-right.size-medium { width: 42%; }
  .block-figure.is-float-left.size-large, .block-figure.is-float-right.size-large { width: 50%; }
  .tagline { display: block; }
  .topbar .social { display: flex; }
  .brand img { max-width: 400px; }
  .phone { font-size: 1.45rem; }
  .phone .icon { width: 22px; height: 22px; }
  .nav-toggle-label { display: inline; }
}

@media (min-width: 760px) {
  .gallery.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery.cols-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .header-inner { padding-top: 12px; padding-bottom: 12px; }
  .header-cta { min-width: 250px; padding: .6rem 1.25rem .75rem; }
  .phone { font-size: 1.8rem; }
  .phone .icon { width: 24px; height: 24px; }
  .tagline { font-size: 1.3rem; }
  .page-grid { box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 10px 30px rgba(0,0,0,.08); }
  .brand img { max-width: 580px; }
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .nav-list { display: flex; align-items: center; justify-content: center; gap: .25rem; padding-top: 0; padding-bottom: 0; }
  .nav-item { border: 0; flex-wrap: nowrap; }
  .nav-item > a { padding: .95rem .9rem; font-size: 1.01rem; }
  .nav-item > a:hover { background: var(--red-dark); }
  .subnav-toggle { display: none; }
  .subnav { position: absolute; top: 100%; left: 0; min-width: 270px; padding: .5rem 0; margin: 0; background: #fff; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
  .subnav a { color: var(--ink); padding: .5rem 1rem; }
  .subnav a:hover { background: var(--bg-soft); color: var(--red); }
  .nav-item.has-children:hover .subnav, .nav-item.has-children:focus-within .subnav { display: block; }
  .nav-cta { padding: 0 0 0 .75rem; }
  .nav-cta a { padding: .45rem 1rem; }
  .nav-cta a:hover { background: #fff; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; padding-top: 2rem; }
  .gallery.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .form-card { padding: 1.75rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .site-nav, .nav-toggle, .sidebar, .site-footer, .hero, .cta-band { display: none !important; }
  .site-header { position: static; box-shadow: none; }
}
