/* Charleston Custom Roofing Service — base styles.
   Page and header/footer layout rules are generated from measurements of the original site
   (assets/css/chrome.css and each page's <style>); this file holds the shared behaviour. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: rgb(8, 16, 50); font-family: Arial, Helvetica, sans-serif; overflow-x: clip; }
img, video, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(h1, h2, h3, h4, h5, h6, p, ul, ol, figure) { margin: 0; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; padding: 10px 16px; background: rgb(8, 16, 50); color: #fff; font: 700 14px/1 'wfont_014e4b_1e955856c00f4191a78c570176256929', Arial, sans-serif; text-decoration: none; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 2px solid rgb(40, 180, 201); outline-offset: 2px; }

/* Desktop: the original is a fixed-grid Wix site, at least 980px wide. */
#site { position: relative; min-width: 980px; overflow-x: clip; }
.sec { position: relative; display: block; width: 100%; }
#SITE_HEADER { z-index: 49; }
#SITE_FOOTER { z-index: 1; }
.c { position: absolute; }

/* section / strip backgrounds */
.bg-fill, .bgm { position: absolute; inset: 0; pointer-events: none; }
.bgm { overflow: clip; }
.bgm picture { display: contents; }
.bgm img, .bgm video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* pinned background (Wix "reveal"): the photo stays put while the section scrolls over it.
   Like the original, only when the visitor allows motion. */
.bgm .pinw { position: absolute; inset: 0; }
.bgtile { position: absolute; inset: 0; background-repeat: repeat; }
@media (prefers-reduced-motion: no-preference) {
  .bgm.pin { overflow: clip; }
  .bgm.pin .pinw { inset: auto; left: 0; right: 0; top: -100lvh; height: calc(100% + 200lvh); }
  .bgm.pin .pinw img, .bgm.pin .pinw video, .bgm.pin .pinw .bgtile { position: sticky; inset: auto; top: 0; height: 100lvh; width: 100%; }
}
.strip-bg { overflow: clip; }

/* rich text (Wix WRichText) */
.rt { overflow-wrap: break-word; word-wrap: break-word; text-align: start; }
.rt :where(p, h1, h2, h3, h4, h5, h6, blockquote) { margin: 0; }
.rt :where(h1, h2, h3, h4, h5, h6) { font-weight: inherit; font-size: inherit; }
.rt a { color: inherit; text-decoration: none; }
.rt li { font-style: inherit; font-weight: inherit; line-height: inherit; letter-spacing: normal; }
.rt :where(ul, ol) { letter-spacing: normal; margin-inline: .5em 0; line-height: normal; padding-inline: 1.3em 0; margin-block: 0; }
.rt.po :where(ul, ol) { padding-inline: 0; }
.rt.po li { margin-inline: 1.3em 0; }
.rt ul { list-style-type: disc; }
.rt ol { list-style-type: decimal; }
.rt ul ul { list-style-type: circle; }

.img img, .img picture { width: 100%; height: 100%; }
.img img { object-fit: cover; }
.img a, .vec a { display: block; width: 100%; height: 100%; }
.vec svg { width: 100%; height: 100%; overflow: visible; }

/* buttons (Wix StylableButton): label and icon sit where the original's do */
.btn { display: block; overflow: hidden; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn .lb { position: absolute; white-space: nowrap; transition: color .2s; }
.btn .ic { position: absolute; }
.btn .ic svg { width: 100%; height: 100%; }
span.btn { cursor: default; }

/* header: desktop menu */
#site-nav ul { list-style: none; margin: 0; padding: 0; }
#site-nav > ul > li { position: absolute; top: 0; height: 100%; }
#site-nav > ul > li > a { position: absolute; inset: 4px 4px; display: flex; align-items: center; justify-content: center; text-decoration: none;
  font: 15px/normal 'wfont_014e4b_1e955856c00f4191a78c570176256929', 'Fira Sans', Arial, sans-serif; letter-spacing: .75px; color: rgb(8, 16, 50); white-space: nowrap; }
#site-nav > ul > li > a:hover, #site-nav > ul > li:hover > a, #site-nav > ul > li:focus-within > a { color: rgb(40, 180, 201); }
#site-nav > ul > li > a.is-cur, #site-nav > ul > li > a.is-cur:hover { color: rgb(31, 129, 173); text-decoration: underline; }
#site-nav .sub { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: max-content; padding: 10px; background: #fff;
  visibility: hidden; opacity: 0; transition: opacity .15s, visibility .15s; z-index: 5; }
#site-nav li:hover > .sub, #site-nav li:focus-within > .sub { visibility: visible; opacity: 1; }
#site-nav .sub li { margin-bottom: 8px; }
#site-nav .sub li:last-child { margin-bottom: 0; }
#site-nav .sub a { display: block; padding: 10px; text-align: center; text-decoration: none; white-space: nowrap;
  font: 700 16px/21px 'wfont_308de7_af60499990c74858bd2bbb1fdaeb2183', 'Red Hat Text', Arial, sans-serif; letter-spacing: .05em; color: rgb(8, 16, 50); }
#site-nav .sub a:hover { color: rgb(31, 129, 173); text-decoration: underline; }
#site-nav .sub a[aria-current] { text-decoration: underline; }
.site-search { display: flex; align-items: center; justify-content: center; color: rgb(8, 16, 50); }
.site-search svg { width: 26px; height: 26px; fill: currentColor; }

.nav-toggle, .mobile-menu { display: none; }

/* forms (Wix Forms) */
.wform label, .wform .fl, .wform .fbox, .wform button, .wform .rb { position: absolute; }
.wform .fl { white-space: nowrap; }
.wform .req { margin-left: 0; }
.wform .fbox { display: flex; align-items: center; overflow: hidden; }
.wform input:not([type=radio]), .wform textarea { width: 100%; height: 100%; border: 0; background: transparent; outline: 0; }
.wform .fbox:focus-within { box-shadow: 0 0 0 1px rgb(31, 129, 173); }
.email-form input { padding: 0 12px; }
.quote-form .fbox input { padding: 8px 12px; }
.quote-form textarea { padding: 8px 12px; resize: vertical; }
.quote-form .has-cc .cc { display: flex; align-items: center; gap: 4px; padding: 0 0 0 12px; flex: none; height: 100%; }
.quote-form .has-cc .cc .flag { width: 20px; height: 14px; }
.quote-form .has-cc .cc .chev { width: 14px; height: 14px; fill: rgb(8, 16, 50); }
.quote-form .has-cc input { padding-left: 8px; }
.quote-form .has-date .cal { width: 20px; height: 20px; margin-left: 8px; flex: none; fill: rgb(8, 16, 50); }
.quote-form .has-date input { padding-left: 4px; }
.quote-form .radios label { position: static; cursor: pointer; }
.quote-form .radios input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quote-form .rb { border-radius: 50%; background: #fff; }
.quote-form .radios input:checked + .rb { box-shadow: inset 0 0 0 4px #fff; background: rgb(8, 16, 50); }
.quote-form .radios input:focus-visible + .rb { outline: 2px solid rgb(40, 180, 201); outline-offset: 2px; }
.wform button { cursor: pointer; text-align: center; transition: background-color .2s; }
.wform button:hover { background-color: rgb(40, 180, 201) !important; }



.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* home: "Why Choose Us" photo slideshow (vertical slide) */
.slideshow .ss-slide { position: absolute; overflow: hidden; transform: translateY(100%); visibility: hidden; }
.slideshow .ss-slide.is-on { transform: none; visibility: visible; }
.slideshow .ss-slide.is-in, .slideshow .ss-slide.is-out { visibility: visible; transition: transform var(--ss-dur, 1s) ease-in-out; }
.slideshow .ss-slide img { width: 100%; height: 100%; object-fit: cover; }

/* home: auto-scrolling gallery strip (Pro Gallery slider) */
.hg { overflow: hidden; }
.hg-track { display: flex; gap: var(--gap); height: 100%; will-change: transform; }
.hg-item { flex: none; width: var(--tile); height: var(--tile); border-radius: 5px; overflow: hidden; }
.hg-item img { width: 100%; height: 100%; object-fit: cover; }
.hg-arrow { position: absolute; top: calc(50% - 17.5px); width: 40px; height: 40px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; z-index: 2; }
.hg-arrow svg { width: 10px; height: 17px; fill: rgb(8, 16, 50); }
.hg-next { right: 28px; }
.hg-prev { left: 28px; }
.hg-prev svg { transform: scaleX(-1); }

/* gallery page grids */
.gg-item { position: relative; overflow: hidden; border-radius: 10px; }
.gg-item img, .gg-item picture { width: 100%; height: 100%; }
.gg-item img { object-fit: cover; }
.gg-title { position: absolute; left: 46px; top: 29px; color: #fff; font: 25px/35px 'wfont_014e4b_1e955856c00f4191a78c570176256929', 'Fira Sans', Arial, sans-serif; }

/* service area map */
.gmap { background: #1d2c1f; z-index: 0; }
.gmap .leaflet-control-attribution { font-size: 10px; }

/* mobile: the original's Wix mobile site, a 320px-wide layout (phones are given a 320px viewport) */
@media (max-width: 750px) {
  #site { min-width: 0; }
  .d-only { display: none !important; }
  #site-nav { display: none; }
  .nav-toggle { display: block; position: absolute; left: calc(50% + 97px); top: 30px; width: 50px; height: 50px; }
  .nav-toggle span { position: absolute; left: 14px; width: 22px; height: 2px; background: rgb(8, 16, 50); }
  .nav-toggle span:nth-child(1) { top: 15px; }
  .nav-toggle span:nth-child(2) { top: 24px; }
  .nav-toggle span:nth-child(3) { top: 33px; }
  .mobile-menu:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 100; background: #fff; overflow-y: auto; }
  .mm-close { position: absolute; right: 27px; top: 44px; width: 24px; height: 24px; }
  .mm-close svg { width: 100%; height: 100%; fill: rgb(8, 16, 50); }
  .mm-list { list-style: none; margin: 83px 22px 0 27px; padding: 0; }
  .mm-list > li { border-bottom: 1px solid rgba(8, 16, 50, .29); }
  .mm-row { position: relative; display: flex; align-items: center; justify-content: flex-end; min-height: 56px; }
  .mm-row a { display: block; padding-right: 10px; text-decoration: none; text-align: right;
    font: 15px/56px 'wfont_014e4b_1e955856c00f4191a78c570176256929', 'Fira Sans', Arial, sans-serif; color: rgb(8, 16, 50); }
  .mm-row a.is-cur, .mm-sub a[aria-current] { color: rgb(31, 129, 173); }
  .mm-exp { position: absolute; left: 0; top: 0; width: 50px; height: 56px; display: flex; align-items: center; justify-content: center; }
  .mm-exp svg { width: 12px; height: 7px; fill: rgb(8, 16, 50); transition: transform .2s; }
  .mm-exp[aria-expanded="true"] svg { transform: rotate(180deg); }
  .mm-sub { list-style: none; margin: 0; padding: 0 0 10px; }
  .mm-sub a { display: block; text-align: center; text-decoration: none; padding: 0 10px;
    font: 15px/55px 'wfont_308de7_af60499990c74858bd2bbb1fdaeb2183', 'Red Hat Text', Arial, sans-serif; color: rgb(8, 16, 50); }
  .mm-cta { display: flex; align-items: center; justify-content: center; margin: 16px 22px 40px auto; width: 200px; height: 42px; background: rgb(8, 16, 50);
    border-bottom: 2px solid rgb(40, 180, 201); border-radius: 4px; color: #fff; text-decoration: none;
    font: 700 16px/1 'wfont_014e4b_1e955856c00f4191a78c570176256929', 'Fira Sans', Arial, sans-serif; letter-spacing: 1.6px; }
  .hg-arrow { display: none; }
  .gg-title { left: 0; right: 0; top: auto; bottom: 31px; text-align: center; font-size: 16px; line-height: 20px; }
}
@media (min-width: 751px) { .m-only { display: none !important; } }

/* Wix entrance animations play once the element scrolls into view */
[data-mo][data-motion-enter="running"] { animation-play-state: running !important; }
@media (prefers-reduced-motion: reduce) {
  .hg-track { transform: none !important; }
  .slideshow .ss-slide { transition: none !important; }
}

/* home gallery tiles: the original's hover overlay (always shown on the Wix mobile site) */
.hg-item { position: relative; }
.hg-item::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 71%, rgba(31, 129, 173, .82) 100%), rgba(0, 0, 0, .14); }
.hg-item:hover::after { opacity: 1; }

/* Wix mobile "quick action bar": floating button with Phone / Email / Facebook */
.qab { display: none; }
@media (max-width: 750px) {
  .hg-item::after { opacity: 1; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 71%, rgba(31, 129, 173, .82) 100%), rgba(255, 255, 255, .14); }
  .qab { display: block; position: fixed; right: 16px; bottom: 16px; z-index: 90; }
  .qab-veil { display: none; position: fixed; inset: 0; background: rgba(255, 255, 255, .8); }
  .qab.is-open .qab-veil { display: block; }
  .qab-btn { position: relative; width: 50px; height: 50px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
  .qab-btn span { position: absolute; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: rgb(31, 129, 173); transition: transform .2s, width .2s, left .2s, border-radius .2s; }
  .qab-btn span:nth-child(1) { left: 12px; } .qab-btn span:nth-child(2) { left: 22px; } .qab-btn span:nth-child(3) { left: 32px; }
  .qab.is-open .qab-btn span { left: 14px; top: 23.5px; width: 22px; height: 3px; border-radius: 2px; }
  .qab.is-open .qab-btn span:nth-child(1) { transform: rotate(45deg); }
  .qab.is-open .qab-btn span:nth-child(2) { opacity: 0; }
  .qab.is-open .qab-btn span:nth-child(3) { transform: rotate(-45deg); }
  .qab-list { position: absolute; right: 3px; bottom: 66px; display: flex; flex-direction: column; gap: 14px; }
  .qab-list a { position: relative; display: block; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); color: #000; text-decoration: none; }
  .qab-i svg { position: absolute; left: 8px; top: 13.5px; width: 28px; height: 17px; fill: #000; }
  .qab-t { position: absolute; right: 60px; top: 7px; padding: 0 6px; height: 27px; line-height: 27px; white-space: nowrap; border-radius: 4px; background: #fff;
    box-shadow: 0 0 8px #ccc; font: 12px/27px Helvetica, Arial, sans-serif; color: rgb(29, 45, 60); }
}

.menu-open .qab { display: none !important; }

/* Contact Us: two-step form. Step 1 is placed like the original; step 2 flows inside the form and the
   section grows to fit it (assets/site.js). */
.contact-form .s2 { position: relative; display: flex; flex-direction: column; gap: 24px; }
.contact-form.on-s2 { height: auto !important; }
.contact-form .s2 .q { position: static; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.contact-form .s2 legend { padding: 0; margin-bottom: 8px; }
.contact-form .s2 .fl, .contact-form .s2 .fbox, .contact-form .s2 button, .contact-form .s2 .opt { position: static; }
.contact-form .s2 .fbox input, .contact-form .s2 textarea { padding: 8px 12px; }
.contact-form .s2 textarea { resize: vertical; }
.contact-form .s2 .fbox.ta { align-items: stretch; }
.contact-form .s2 .opts { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 12px 24px; }
.contact-form .s2 .opt { display: flex; align-items: center; gap: 10px; cursor: pointer; white-space: normal; }
.contact-form .s2 .opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.contact-form .s2 .mk { position: static; flex: none; width: 18px; height: 18px; border: 1px solid rgba(8, 16, 50, .6); background: #fff; }
.contact-form .s2 .rb { border-radius: 50%; }
.contact-form .s2 .cb { border-radius: 3px; }
.contact-form .s2 .opt input:checked + .rb { background: rgb(8, 16, 50); box-shadow: inset 0 0 0 4px #fff; }
.contact-form .s2 .opt input:checked + .cb { background: rgb(8, 16, 50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/14px no-repeat; border-color: rgb(8, 16, 50); }
.contact-form .s2 .opt input:focus-visible + .mk { outline: 2px solid rgb(40, 180, 201); outline-offset: 2px; }
.contact-form .s2 .fbox.other { margin-top: 4px; }
.contact-form .cf-nav { display: flex; justify-content: flex-end; gap: 16px; }
.contact-form .cf-back { background: #fff !important; color: rgb(31, 129, 173) !important; box-shadow: inset 0 0 0 1px rgb(31, 129, 173); padding: 0 16px; }
.contact-form .cf-back:hover { background: rgb(238, 243, 248) !important; }
.contact-form .cf-submit { padding: 0 16px; }

/* Wix "FadeLine" divider: a soft shadow that fades out at both ends (the original's own sprite) */
.fadeline { overflow: hidden; height: 29px; }
.fadeline i, .fadeline i::before, .fadeline i::after { position: absolute; top: 0; height: 100%; background-image: url(img/fadeline.png); }
.fadeline i { left: 45px; right: 45px; min-width: 90px; background-position: 0 -29px; }
.fadeline i::before { content: ""; left: -45px; width: 45px; background-position: 0 0; }
.fadeline i::after { content: ""; right: -45px; width: 45px; background-position: 100% 0; }
