/* === YS Tech custom styles === */

/* Phone CTA pill in primary nav */
.main-navigation .menu-cta-phone > a,
.header-menu-container .menu-cta-phone > a,
.menu-cta-phone > a {
    background: #00D4FF !important;
    color: #0A1F3F !important;
    padding: 0.55em 1.2em !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
    margin-left: 0.6em !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5em !important;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3) !important;
    line-height: 1 !important;
    border: 0 !important;
}

.menu-cta-phone > a::before {
    content: "";
    display: inline-block;
    width: 1.05em;
    height: 1.05em;
    background-color: currentColor;
    flex-shrink: 0;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") center/contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>") center/contain no-repeat;
}

.main-navigation .menu-cta-phone > a:hover,
.header-menu-container .menu-cta-phone > a:hover,
.menu-cta-phone > a:hover {
    background: #33DDFF !important;
    color: #0A1F3F !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.45) !important;
}

/* Slightly smaller pill on narrow viewports */
@media (max-width: 600px) {
    .menu-cta-phone > a {
        padding: 0.45em 0.95em !important;
        font-size: 0.92em !important;
    }
}

/* === Contact page method cards === */
.ystd-contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 32px 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 12px rgba(10, 31, 63, 0.04);
    height: 100%;
}

.ystd-contact-card .ystd-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #00D4FF;
    margin-bottom: 18px;
}

.ystd-contact-card .ystd-card-icon svg {
    display: block;
}

.ystd-contact-card .ystd-card-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #64748B;
    margin-bottom: 8px;
}

.ystd-contact-card .ystd-card-primary {
    font-size: 16px;
    font-weight: 700;
    color: #0A1F3F;
    line-height: 1.35;
    margin-bottom: 8px;
    word-break: break-word;
}

.ystd-contact-card .ystd-card-sub {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
    margin-top: auto;
}

.ystd-contact-card-link:hover,
.ystd-contact-card-link:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(10, 31, 63, 0.10);
    border-color: #00D4FF;
}

.ystd-contact-card-link:hover .ystd-card-primary,
.ystd-contact-card-link:focus .ystd-card-primary {
    color: #0A1F3F;
}

/* === Service overview cards (Services hub page) === */
.ystd-service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 30px 26px 28px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 12px rgba(10, 31, 63, 0.04);
    height: 100%;
    min-height: 280px;
}
.ystd-service-card:hover,
.ystd-service-card:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(10, 31, 63, 0.10);
    border-color: #00D4FF;
}
.ystd-service-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #00D4FF;
    color: #0A1F3F;
    margin-bottom: 18px;
    font-size: 24px;
    line-height: 1;
}
.ystd-service-card-icon .kt-info-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ystd-service-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #0A1F3F;
    margin: 0 0 6px;
    line-height: 1.2;
}
.ystd-service-card-tagline {
    font-size: 14px;
    font-weight: 600;
    color: #00D4FF;
    margin: 0 0 12px;
    line-height: 1.4;
}
.ystd-service-card-desc {
    font-size: 14px;
    color: #64748B;
    line-height: 1.55;
    margin: 0 0 18px;
    flex-grow: 1;
}
.ystd-service-card-link {
    font-size: 14px;
    font-weight: 700;
    color: #0A1F3F;
    margin-top: auto;
    transition: color 0.15s ease;
}
.ystd-service-card:hover .ystd-service-card-link,
.ystd-service-card:focus .ystd-service-card-link {
    color: #00D4FF;
}

/* === Page hero icon (large cyan circle at top of service detail pages) === */
.ystd-page-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: #00D4FF;
    color: #0A1F3F;
    margin: 0 auto 24px;
    font-size: 36px;
    line-height: 1;
}
.ystd-page-hero-icon .kt-info-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Small refinement: when "Call" button sits on a light bg (service page hero buttons),
   it needs dark navy text + outline rather than white-on-light */
.ystd-btn-call-light {
    color: #0A1F3F !important;
    border-color: #0A1F3F !important;
}
.ystd-btn-call-light:hover {
    background: #0A1F3F !important;
    color: #FFFFFF !important;
}

/* === Town cards (service-area overview) === */
.ystd-town-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 24px 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(10, 31, 63, 0.03);
    height: 100%;
    min-height: 130px;
}
.ystd-town-card:hover,
.ystd-town-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(10, 31, 63, 0.10);
    border-color: #00D4FF;
}
.ystd-town-card-name {
    font-size: 19px;
    font-weight: 700;
    color: #0A1F3F;
    margin-bottom: 6px;
    line-height: 1.2;
}
.ystd-town-card-distance {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 14px;
    font-style: italic;
}
.ystd-town-card-link {
    font-size: 13px;
    font-weight: 700;
    color: #00D4FF;
    margin-top: auto;
    transition: color 0.15s ease;
}
.ystd-town-card:hover .ystd-town-card-link,
.ystd-town-card:focus .ystd-town-card-link {
    color: #0A1F3F;
}

/* === Subtle in-text link inside non-link contexts (e.g. trust strip "Monmouth County, NJ") === */
.ystd-trust-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.ystd-trust-link:hover,
.ystd-trust-link:focus {
    color: #00D4FF;
    border-bottom-color: #00D4FF;
    border-bottom-style: solid;
}

/* ===========================================================================
   Mobile responsive overrides
   Kadence handles section/column collapse via per-block tablet/mobileLayout
   attributes (already set on every rowlayout we built). These rules tighten
   our custom card components and hero icons at narrow viewports.
   =========================================================================== */

/* Tablet (≤ 1024px): light tightening */
@media (max-width: 1024px) {
    .ystd-page-hero-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
}

/* Mobile (≤ 767px): collapse min-heights, reduce paddings */
@media (max-width: 767px) {
    .ystd-service-card {
        min-height: auto;
        padding: 26px 20px 22px;
    }
    .ystd-town-card {
        min-height: auto;
        padding: 22px 18px;
    }
    .ystd-contact-card {
        padding: 28px 18px;
    }

    /* Page hero icon — slightly smaller on phones */
    .ystd-page-hero-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
        margin-bottom: 18px;
    }

    /* Hero buttons: stack cleanly when wrapped on mobile.
       Kadence's old button block uses `display: block` with margin-right
       between buttons — when buttons wrap to multiple lines there's no
       vertical spacing. Force flex layout + gap to fix both axes. Zero out
       Kadence's inter-button margins. Suppress drop shadows since the cyan
       Book button's shadow visually bleeds onto the Call button below. */
    .wp-block-kadence-advancedbtn,
    .wp-block-kadence-advancedbtn.kt-btn-align-center,
    .wp-block-kadence-advancedbtn.kt-btns-wrap {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 22px !important;
    }
    .wp-block-kadence-advancedbtn .kt-btn-wrap,
    .wp-block-kadence-advancedbtn .kt-btn-wrap-0,
    .wp-block-kadence-advancedbtn .kt-btn-wrap-1 {
        margin: 0 !important;
    }
    .wp-block-kadence-advancedbtn .kt-btn-wrap .kt-button {
        box-shadow: none !important;
    }

    /* Trust strip cards (homepage) — slightly tighter spacing on small phones */
    [class*="trust"] .wp-block-kadence-advancedheading {
        word-break: break-word;
    }

    /* Hero typography scaling — Kadence advancedheading uses inline `font-size`
       from the desktop value, which doesn't auto-scale. Force smaller sizes
       on mobile so the H1s don't wrap to 4+ lines. */
    h1.wp-block-kadence-advancedheading {
        font-size: 32px !important;
        line-height: 1.2 !important;
    }
    h2.wp-block-kadence-advancedheading {
        font-size: 26px !important;
        line-height: 1.25 !important;
    }
}

/* Mobile drawer menu: current-page item is unreadable by default.
   Kadence sets it to `--global-palette-highlight` which we configured as navy
   (palette1) — same color as the drawer background. Override to cyan so the
   active item is a clear "you are here" indicator. */
.mobile-navigation ul li.current-menu-item > a,
.mobile-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrap,
.mobile-navigation ul li.current_page_item > a,
.mobile-navigation ul li.current-page-ancestor > a {
    color: #00D4FF !important;
    font-weight: 600;
}

/* ============================================================================
   Accessibility — visible focus states for keyboard navigation
   Tabbing through the page should always show a clear focus indicator.
   Kadence's default focus rings can be subtle or get overridden by other
   styles; this restores reliable, brand-consistent focus visibility.
   ============================================================================ */

/* Don't show focus ring on mouse click (modern browsers respect this) */
:focus:not(:focus-visible) {
    outline: none;
}

/* Visible focus ring on every interactive element when navigating with keyboard */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.kt-button:focus-visible,
.ystd-service-card:focus-visible,
.ystd-town-card:focus-visible,
.ystd-contact-card:focus-visible {
    outline: 3px solid #00D4FF !important;
    outline-offset: 3px !important;
    border-radius: 4px;
}

/* Cards that already have rounded corners — match radius on focus ring */
.ystd-service-card:focus-visible,
.ystd-town-card:focus-visible,
.ystd-contact-card:focus-visible {
    border-radius: 14px;
}

/* Buttons get the focus ring inside their existing pill border */
.kt-button:focus-visible,
.wp-block-kadence-advancedbtn .kt-button:focus-visible {
    outline: 3px solid #00D4FF !important;
    outline-offset: 3px !important;
}

/* Form inputs/selects: stronger visible focus state since the form is critical */
.ff-el-form-control:focus-visible,
.ff-el-form-control:focus,
input.ff-el-form-control:focus,
select.ff-el-form-control:focus,
textarea.ff-el-form-control:focus {
    outline: 3px solid #00D4FF !important;
    outline-offset: 1px !important;
    border-color: #00D4FF !important;
}

/* Skip-to-content link (if present from theme) — make it visible when focused */
.skip-link:focus,
.skip-link:focus-visible {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background: #0A1F3F !important;
    color: #FFFFFF !important;
    padding: 8px 16px !important;
    z-index: 99999 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
}

/* === Blog hub: category browse cards === */
.ystd-blog-cat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 26px 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 10px rgba(10, 31, 63, 0.04);
    height: 100%;
    min-height: 180px;
}
.ystd-blog-cat-card:hover,
.ystd-blog-cat-card:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(10, 31, 63, 0.10);
    border-color: #00D4FF;
}
.ystd-blog-cat-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0A1F3F;
    margin: 0 0 8px;
    line-height: 1.25;
}
.ystd-blog-cat-card-desc {
    font-size: 14px;
    color: #64748B;
    line-height: 1.55;
    margin: 0 0 18px;
    flex-grow: 1;
}
.ystd-blog-cat-card-link {
    font-size: 13px;
    font-weight: 700;
    color: #00D4FF;
    margin-top: auto;
    transition: color 0.15s ease;
}
.ystd-blog-cat-card:hover .ystd-blog-cat-card-link,
.ystd-blog-cat-card:focus .ystd-blog-cat-card-link {
    color: #0A1F3F;
}

/* === Latest-posts list styling on the blog hub === */
.ystd-blog-post-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.ystd-blog-post-list > li {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 14px !important;
    transition: border-color 0.15s ease, box-shadow 0.2s ease;
}
.ystd-blog-post-list > li:hover {
    border-color: #00D4FF;
    box-shadow: 0 6px 18px rgba(10, 31, 63, 0.06);
}
.ystd-blog-post-list > li > a {
    font-size: 19px;
    font-weight: 700;
    color: #0A1F3F !important;
    text-decoration: none;
    line-height: 1.3;
}
.ystd-blog-post-list > li > a:hover {
    color: #00D4FF !important;
}
.ystd-blog-post-list .wp-block-latest-posts__post-date {
    display: block;
    font-size: 13px;
    color: #64748B;
    margin-top: 6px;
    margin-bottom: 10px;
}
.ystd-blog-post-list .wp-block-latest-posts__post-excerpt {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* === "Back to Blog" link on single posts === */
.ystd-back-to-blog {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #00D4FF;
    text-decoration: none;
    margin-bottom: 8px;
    padding: 6px 0;
    transition: color 0.15s ease;
}
.ystd-back-to-blog:hover,
.ystd-back-to-blog:focus {
    color: #0A1F3F;
}

/* === Footer social/review icons (rendered above the footer copyright via wp_footer hook) ===
   Position fixed-bottom-bar style so it sits inside the footer visually but doesn't depend on
   the theme's specific footer structure. */
.ystd-footer-social {
    background: #0A1F3F;
    color: #94A3B8;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}
.ystd-footer-social-inner {
    max-width: 1290px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.ystd-footer-social-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #CBD5E1;
}
.ystd-footer-social-list {
    display: flex;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 10px;
}
.ystd-footer-social-list li {
    margin: 0 !important;
    list-style: none !important;
}
.ystd-footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.ystd-footer-social-icon:hover,
.ystd-footer-social-icon:focus-visible {
    background: #00D4FF;
    color: #0A1F3F;
    transform: translateY(-2px);
}
@media (max-width: 540px) {
    .ystd-footer-social-inner {
        gap: 12px;
    }
    .ystd-footer-social-label {
        flex-basis: 100%;
        text-align: center;
    }
}

/* Category badges shown below the "back to blog" link on single posts */
.ystd-post-categories {
    margin: 0 0 28px 0 !important;
    line-height: 1.8;
}
.ystd-post-cat-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #0A1F3F !important;
    background: #E2F8FE;
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none;
    margin-right: 6px;
    margin-bottom: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}
.ystd-post-cat-badge:hover,
.ystd-post-cat-badge:focus {
    background: #00D4FF;
    color: #0A1F3F !important;
}

/* === Remote Support page: pricing card === */
.ystd-rs-price-card {
    max-width: 460px;
    margin: 0 auto;
    background: #FFFFFF;
    border: 2px solid #00D4FF;
    border-radius: 18px;
    padding: 36px 32px 32px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(10, 31, 63, 0.10);
}
.ystd-rs-price-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #00D4FF;
    margin-bottom: 14px;
}
.ystd-rs-price-amount {
    font-size: 76px;
    font-weight: 700;
    color: #0A1F3F;
    line-height: 1;
    letter-spacing: -2px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
}
.ystd-rs-price-dollar {
    font-size: 40px;
    font-weight: 600;
    color: #0A1F3F;
    line-height: 1;
    margin-top: 10px;
}
.ystd-rs-price-unit {
    font-size: 16px;
    color: #64748B;
    margin-top: 6px;
    margin-bottom: 26px;
}
.ystd-rs-price-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left;
}
.ystd-rs-price-list li {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px !important;
}
.ystd-rs-price-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #00D4FF;
    font-weight: 700;
}

/* === Remote Support page: 4-step "How it works" list === */
.ystd-rs-step {
    /* layout already inline; this is for hover refinement only */
}
@media (max-width: 540px) {
    .ystd-rs-step {
        gap: 14px !important;
    }
    .ystd-rs-step-num {
        font-size: 28px !important;
        min-width: 36px !important;
    }
}
@media (max-width: 540px) {
    .ystd-rs-price-amount {
        font-size: 60px;
    }
    .ystd-rs-price-card {
        padding: 28px 22px;
    }
}

/* Very small phones (≤ 380px): force button stacking + slim padding */
@media (max-width: 380px) {
    .wp-block-kadence-advancedbtn .kt-btn-wrap {
        flex-basis: 100%;
        text-align: center;
    }
    .wp-block-kadence-advancedbtn .kt-btn-wrap .kt-button {
        display: inline-block;
    }
    .ystd-page-hero-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
        margin-bottom: 14px;
    }
}

