/*
Theme Name: Tahmoor Signs
Description: Divi child theme for the Tahmoor Signs website.
Template: Divi
Version: 2.0.0
Text Domain: tahmoor-signs-divi
*/

@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@600;700;800&family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
    --ts-heading-font: "Exo 2", "Segoe UI", sans-serif;
    --ts-body-font: "Source Sans 3", "Segoe UI", sans-serif;
    --ts-paper: #fff;
    --ts-surface: #f5f4f3;
    --ts-ink: #242427;
    --ts-muted: #4b4b53;
    --ts-charcoal: #252529;
    --ts-red: #a92839;
    --ts-red-hover: #87202e;
    --ts-line: #dedce0;
    --ts-radius: 8px;
    --ts-width: 1180px;
    --ts-gutter: clamp(18px, 4vw, 32px);
    --ts-section-space: clamp(40px, 6vw, 76px);
}

/* Shared type and navigation. */
body {
    color: var(--ts-ink);
    background: var(--ts-paper);
    font: 400 16px/1.55 var(--ts-body-font);
}

#main-content :is(h1, h2, h3, h4, h5, h6),
.ts-heading {
    color: inherit;
    font-family: var(--ts-heading-font);
    font-weight: 800;
    line-height: 1.13;
    letter-spacing: -.025em;
}

#main-content .entry-content a:not(.wp-element-button):not(.ts-button) {
    text-underline-offset: .18em;
}

#main-header {
    background: var(--ts-paper);
    box-shadow: 0 1px 0 var(--ts-line);
}

#main-header .et_menu_container {
    width: min(calc(100% - 2 * var(--ts-gutter)), var(--ts-width));
    max-width: none;
}

#main-header :is(#top-menu .sub-menu, .et_mobile_menu) { border-top-color: var(--ts-red); }

#top-menu a,
#main-header .et_mobile_menu a {
    color: var(--ts-ink);
    font-family: var(--ts-body-font);
    font-weight: 700;
}

#main-header :is(#top-menu, #mobile_menu) :is(.current-menu-item, .current-menu-ancestor) > a {
    color: var(--ts-red);
}

#main-header #top-menu .ts-nav-quote > a,
#main-header #mobile_menu .ts-nav-quote > a {
    display: inline-flex;
    padding: 12px 17px !important;
    background: var(--ts-red);
    color: #fff;
    border: 0;
    border-radius: calc(var(--ts-radius) - 3px);
    line-height: 1.2;
}

#main-header :is(#top-menu, #mobile_menu) .ts-nav-quote > a:hover {
    background: var(--ts-red-hover);
    opacity: 1;
}

:is(#main-content, #main-header) :focus-visible {
    outline: 3px solid #3977ca;
    outline-offset: 4px;
}

#main-header :focus-visible { outline-color: var(--ts-red); }
.ts-mobile-actions { display: none; }

@media (min-width: 981px) {
    #main-header #logo { max-height: 62%; }
    #main-header #top-menu .sub-menu {
        width: 270px;
        padding: 8px;
        border-radius: 0 0 var(--ts-radius) var(--ts-radius);
    }
    #main-header #top-menu .sub-menu li { display: block; width: 100%; padding: 0; }
    #main-header #top-menu .sub-menu a { width: 100%; padding: 8px 10px; line-height: 1.35; border-radius: 4px; }
    #main-header #top-menu .sub-menu a:hover { color: var(--ts-red); background: var(--ts-surface); opacity: 1; }
    #main-header #top-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; }
}

@media (max-width: 980px) {
    .et_header_style_left #main-header #et-top-navigation { display: flex; align-items: center; gap: 8px; padding: 13px 0; }
    #main-header .logo_container { pointer-events: none; }
    #main-header .logo_container > a { pointer-events: auto; }
    .et_header_style_left #main-header #logo { max-width: min(36vw, 176px); max-height: 70%; }
    #main-header #et_top_search { margin: 0; width: 28px; height: 44px; }
    #main-header #et_search_icon::before { top: 12px; left: 4px; }
    #main-header .mobile_menu_bar { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; cursor: pointer; }
    #main-header .mobile_menu_bar::before { color: var(--ts-ink); }
    #main-header #mobile_menu { max-height: 65dvh; overflow-y: auto !important; padding: 8px 12px; }
    #main-header #mobile_menu :is(.sub-menu, .ts-nav-quote) { display: none !important; }
    #main-header #mobile_menu > li > a { padding: 10px 12px; min-height: 44px; }

    body:has(.ts-mobile-actions) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .ts-mobile-actions {
        position: fixed;
        z-index: 9990;
        inset: auto 0 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px var(--ts-gutter) calc(8px + env(safe-area-inset-bottom));
        background: var(--ts-paper);
        border-top: 1px solid var(--ts-line);
        box-shadow: 0 -3px 12px rgb(36 36 39 / 10%);
    }
    .ts-mobile-actions a.ts-button { justify-content: center; text-align: center; padding-inline: 8px; }
    .ts-mobile-actions a.ts-mobile-call {
        color: var(--ts-red);
        border: 1px solid var(--ts-red);
        background: var(--ts-paper);
    }
    .ts-mobile-actions a.ts-mobile-call:hover { background: var(--ts-surface); }
    .ts-mobile-actions :focus-visible { outline: 3px solid var(--ts-red); outline-offset: 2px; }
}

/* Reuse these classes on WordPress blocks or Divi sections and modules. */
.ts-section {
    padding-block: var(--ts-section-space);
}

.ts-wrap {
    width: min(calc(100% - 2 * var(--ts-gutter)), var(--ts-width));
    max-width: none;
    margin-inline: auto;
}

.ts-light { background: var(--ts-surface); color: var(--ts-ink); }
.ts-dark { background: var(--ts-charcoal); color: #fff; }
.ts-dark a:not(.wp-element-button) { color: inherit; }

.ts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.4vw, 24px);
}

.ts-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ts-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.ts-button,
.ts-button .wp-element-button {
    font-family: var(--ts-body-font);
    font-weight: 700;
}

a.ts-button,
.ts-button .wp-element-button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 11px 19px;
    color: #fff;
    background: var(--ts-red);
    border-radius: calc(var(--ts-radius) - 3px);
    line-height: 1.25;
    text-decoration: none;
}

a.ts-button:hover,
.ts-button .wp-element-button:hover {
    background: var(--ts-red-hover);
}

.ts-text-link a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.ts-card {
    position: relative;
    overflow: hidden;
    color: var(--ts-ink);
    background: var(--ts-paper);
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
}

.ts-card:focus-within {
    outline: 3px solid #3977ca;
    outline-offset: 3px;
}

.ts-card figure { margin: 0; }
.ts-card img { display: block; width: 100%; aspect-ratio: 1.83; object-fit: cover; }
.ts-card-copy { padding: 16px 18px 18px; }
.ts-card h3 a { color: inherit; text-decoration: none; }
.ts-card h3 a::after { content: ""; position: absolute; inset: 0; }
.ts-card:hover h3 a { text-decoration: underline; }
.ts-card p { color: var(--ts-muted); }

/* Full-width landing pages built with editable WordPress blocks. */
body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) #main-content > .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) #content-area #left-area {
    float: none;
    width: 100%;
    padding: 0;
}

body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) #main-content > .container::before,
body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) #sidebar,
body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) .et_post_meta_wrapper,
body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) article > .entry-title,
body:has(:is(.ts-home, .ts-landing)) #main-footer { display: none; }

body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) #left-area > article,
body:has(:is(.ts-home, .ts-landing, .ts-article, .ts-contact)) .entry-content { margin: 0; padding: 0; }
:is(.ts-home, .ts-landing, .ts-contact) :is(h1, h2, h3, p, figure, .wp-block-buttons) { margin: 0; padding: 0; }

.ts-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
    align-items: center;
    gap: clamp(28px, 6vw, 76px);
}

.ts-location {
    color: var(--ts-red);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

#main-content .ts-hero-title {
    max-width: 15ch;
    margin-block: 11px 20px;
    font-size: clamp(2.7rem, 5.5vw, 4.5rem);
    line-height: .99;
}

.ts-hero .ts-lead { max-width: 41ch; color: var(--ts-muted); font-size: clamp(1.12rem, 2vw, 1.26rem); line-height: 1.45; }
.ts-hero .ts-actions { margin-top: 26px; }
.ts-hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ts-radius); }
.ts-hero-photo figcaption { margin: 8px 0 0; text-align: left; color: var(--ts-muted); font-size: .95rem; }

/* The front-page banner pairs its main action with an edge-to-edge work photo. */
.ts-hero-banner { padding: 0; }
.ts-hero-banner .ts-hero-grid {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: stretch;
    gap: 0;
}
.ts-hero-banner .ts-hero-copy {
    align-self: center;
    padding: clamp(38px, 6vw, 84px) clamp(24px, 4vw, 64px);
    padding-inline-start: max(var(--ts-gutter), calc((100% + 1.05 * 100% - var(--ts-width)) / 2));
}
.ts-hero-banner .ts-hero-photo { position: relative; min-height: 380px; }
.ts-hero-banner .ts-hero-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
}
.ts-hero-banner .ts-hero-photo figcaption {
    position: absolute;
    inset: auto var(--ts-gutter) 16px auto;
    padding: 5px 9px;
    max-width: calc(100% - 2 * var(--ts-gutter));
    border-radius: 4px;
    background: rgb(20 20 22 / 86%);
    color: #fff;
}
.ts-home-services .ts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ts-home-steps .ts-grid { margin-top: 22px; }
.ts-home-steps .ts-card { background: var(--ts-surface); }
.ts-home-steps .ts-card h3 { line-height: 1.25; }
.ts-home .ts-section-bar .ts-lead { max-width: 62ch; color: var(--ts-muted); }
.ts-home .ts-section-bar .ts-lead,
.ts-home .ts-quote .ts-lead { margin-top: 9px; }

@media (max-width: 1050px) {
    .ts-home-services .ts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .ts-hero-banner .ts-hero-grid, .ts-home-services .ts-grid { grid-template-columns: minmax(0, 1fr); }
    .ts-hero-banner .ts-hero-copy { padding-inline: var(--ts-gutter); }
    .ts-hero-banner .ts-hero-photo { min-height: 0; aspect-ratio: 16 / 9; }
}

.ts-section-bar, .ts-quote-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; }
.ts-section-bar { margin-bottom: 25px; }
.ts-section-bar .ts-text-link a { color: var(--ts-red); }
#main-content :is(.ts-home, .ts-landing) h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
#main-content .ts-card h3 { font-size: 1.36rem; margin-bottom: 6px; }
.ts-process .ts-lead { max-width: 66ch; color: var(--ts-muted); margin-top: 10px; }
.ts-process .ts-text-link { margin-top: 13px; }
.ts-quote { padding-block: clamp(33px, 5vw, 54px); scroll-margin-top: 120px; }
.ts-quote .ts-lead { color: #dddbe0; margin-top: 8px; }
.ts-address { padding-block: 18px; color: var(--ts-muted); }

/* Use the same footer on overview, detail and contact pages. */
body:has(.ts-site-footer) :is(#main-footer, .ts-address) { display: none; }
.ts-site-footer {
    background: #141416;
    border-top: 2px solid var(--ts-red);
    color: #c4c3c8;
    font-size: 1rem;
}
.ts-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr);
    gap: clamp(28px, 6vw, 76px);
    padding-block: clamp(32px, 5vw, 54px);
}
.ts-site-footer h2 {
    color: #f8f7f8;
    font: 700 1.2rem / 1.25 var(--ts-heading-font);
    margin-bottom: 12px;
    padding: 0;
}
.ts-site-footer a { color: inherit; text-underline-offset: .18em; }
.ts-site-footer a:hover { color: #fff; text-decoration: underline; }
.ts-site-footer a:focus-visible { outline: 2px solid #f2a8b2; outline-offset: 4px; }
.ts-site-footer address { font-style: normal; overflow-wrap: anywhere; }
.ts-site-footer :is(.ts-footer-links, .ts-footer-social) { margin: 0; padding: 0; list-style: none; }
.ts-footer-links li + li { margin-top: 5px; }
.ts-footer-brand { display: inline-block; width: min(190px, 100%); margin-bottom: 14px; }
.ts-footer-brand img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(1) invert(1) brightness(1.45);
    mix-blend-mode: screen;
}
.ts-site-footer .ts-footer-social { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 13px; }
.ts-footer-social a { text-decoration: underline; }
.ts-footer-bottom { border-top: 1px solid var(--ts-red); font-size: .94rem; }
.ts-footer-bottom .ts-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 18px; padding-block: 14px; }
.ts-footer-bottom p { margin: 0; padding: 0; }
.ts-footer-bottom a { text-decoration: underline; }

@media (max-width: 760px) {
    .ts-footer-grid { grid-template-columns: minmax(0, 1fr); }
}

.ts-intro .ts-lead { max-width: 56ch; color: var(--ts-muted); font-size: clamp(1.12rem, 2vw, 1.26rem); }
#main-content .ts-intro-title { font-size: clamp(2.7rem, 5.5vw, 4.5rem); margin-bottom: 13px; }

#main-content .ts-article .ts-intro-title,
#main-content .ts-article .ts-quote h2 { margin: 0; padding: 0; }

#main-content .ts-article .ts-article-back {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--ts-red);
    font-weight: 700;
}

.ts-article-content { max-width: 880px; overflow-wrap: anywhere; }
.ts-article-content > * + * { margin-top: 1.2em; }
.ts-article-content > :where(p, ul, ol) { padding-bottom: 0; }
.ts-article-content img { border-radius: var(--ts-radius); }
.ts-article-content .wp-block-image img { height: auto; }

#main-content .ts-article .ts-quote h2 { font-size: clamp(1.8rem, 3vw, 2.65rem); }
#main-content .ts-article .ts-quote a.ts-button { color: #fff; }

/* Product pages use the shared card and button styles with wider content. */
.ts-article:has(.ts-product) .ts-intro { padding-block: clamp(28px, 4vw, 52px); }
.ts-article-content:has(> .ts-product) { max-width: var(--ts-width); }
.ts-product { display: grid; gap: clamp(32px, 5vw, 64px); font-size: clamp(1rem, 1.4vw, 1.125rem); }
.ts-product :is(h2, h3, p, figure, .wp-block-buttons) { margin: 0; padding: 0; }
.ts-product :is(.ts-product-copy, .ts-product-options) { display: grid; gap: 14px; align-content: start; }

.ts-product-split {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 5vw, 62px);
}

#main-content .ts-product h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.ts-product .ts-lead { color: var(--ts-muted); font-size: clamp(1.1rem, 2vw, 1.23rem); }
.ts-product .ts-product-photo { justify-self: center; width: min(100%, 280px); }
.ts-product .ts-product-photo-wide { width: 100%; }
.ts-product-photo img { display: block; width: 100%; }
.ts-product .ts-card-copy { padding: clamp(18px, 3vw, 26px); }
.ts-product-notes { padding: clamp(18px, 4vw, 34px); border-radius: var(--ts-radius); }
.ts-product .ts-product-notes p { margin-top: 8px; }
.ts-product-examples h2 { margin-bottom: 16px; }
.ts-product-examples img { display: block; }
.ts-product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(130px, 45%), 1fr));
    gap: 14px;
}
.ts-product-gallery figure {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 10px;
    background: var(--ts-surface);
    border-radius: var(--ts-radius);
}
.ts-product-gallery img { width: 100%; height: 100% !important; object-fit: contain; }

.ts-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(24px, 5vw, 56px);
}
.ts-contact .ts-product-copy .ts-button { justify-self: start; }
.ts-contact #contact-form { scroll-margin-top: 110px; }
#main-content .ts-contact a:is([href^="tel:"], [href^="mailto:"]) { color: var(--ts-red); text-decoration: underline; }

.ts-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
/* Contact Form 7 can wrap consecutive fields in a single paragraph. */
.ts-form-grid > p { display: contents; }
.ts-form-grid > p > br { display: none; }
.ts-form-grid .ts-form-wide { grid-column: 1 / -1; }
.ts-form-field { display: block; min-width: 0; font-weight: 700; }
.ts-form-field .wpcf7-form-control-wrap { display: block; margin-top: 4px; }
.ts-form-field :is(input, select, textarea) {
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    background: var(--ts-paper);
    color: var(--ts-ink);
    border: 1px solid #85818a;
    border-radius: 6px;
    font: 400 1rem / 1.4 var(--ts-body-font);
}
.ts-form-field textarea { resize: vertical; }
.ts-form-field input[type="file"] { padding-inline: 6px; }
.wpcf7 .ts-form-help { margin: 10px 0 0; color: var(--ts-muted); font-size: .92rem; }
.wpcf7 .ts-form-submit {
    margin-top: 14px;
    padding: 11px 18px;
    min-height: 48px;
    border: 0;
    border-radius: calc(var(--ts-radius) - 3px);
    background: var(--ts-red);
    color: #fff;
    font: 700 1rem / 1.25 var(--ts-body-font);
    cursor: pointer;
}
.wpcf7 .ts-form-submit:hover { background: var(--ts-red-hover); }

body:has(.ts-quote-dialog[open]) { overflow: hidden; }
.ts-quote-dialog {
    box-sizing: border-box;
    width: min(680px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    padding: clamp(16px, 4vw, 28px);
    border: 1px solid var(--ts-line);
    border-radius: var(--ts-radius);
    background: var(--ts-paper);
    color: var(--ts-ink);
    overflow: auto;
    overscroll-behavior: contain;
}
.ts-quote-dialog::backdrop { background: rgb(24 21 25 / 70%); }
.ts-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.ts-dialog-header h2 { font: 800 clamp(1.6rem, 4vw, 2.2rem) / 1.1 var(--ts-heading-font); color: var(--ts-ink); }
.ts-dialog-header p { margin: 0; padding: 0; color: var(--ts-muted); }
.ts-dialog-close {
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ts-line);
    border-radius: 6px;
    background: var(--ts-surface);
    color: var(--ts-ink);
    font-size: 1.6rem;
    cursor: pointer;
}

@media (max-width: 760px) {
    .ts-hero-grid, .ts-grid, .ts-product-split, .ts-contact-grid { grid-template-columns: minmax(0, 1fr); }
    .ts-hero-photo img { aspect-ratio: 16 / 10; }
    #main-header #mobile_menu .ts-nav-quote { padding-top: 9px; }
}

@media (max-width: 520px) {
    .ts-form-grid { grid-template-columns: minmax(0, 1fr); }
}
