/*
Theme Name: SmartCare PT
Theme URI: https://smartcarepc.com/
Author: Smart Care PC
Description: WordPress port of the Smart Care Physical Therapy website (previously ASP.NET Core Razor Pages). On activation it creates the site pages, the main menu and the static front page.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: smartcare
*/

/* Styles carried over from the old _Layout.cshtml inline <style>. */
.tp-hero-title {
    font-size: 50px !important;
}

.ml-3 {
    margin-left: 10px;
}

.tp-fun-fact-icon-3 span {
    margin: 0 auto;
}

.loading-logo img {
    width: 100%;
    max-width: 320px;
    height: auto;
}

/* ------------------------------------------------------------------
 * Header: logo | menu | actions, symmetric side padding
 * (the template used different left/right paddings and a 12-column grid
 * that left the phone button floating mid-column)
 * ------------------------------------------------------------------ */
.tp-header-area.tp-header-space {
    padding-left: 60px;
    padding-right: 60px;
}

.tp-header-area.tp-header-space > .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.smartcare-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 100px;
}

.smartcare-header-logo {
    flex: 0 0 auto;
    line-height: 0;
}

.smartcare-header-logo img {
    width: 220px;
    max-width: 100%;
    height: auto;
}

.smartcare-header-menu {
    flex: 1 1 auto;
    min-width: 0;
}

.smartcare-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.smartcare-header-actions .tp-round-btn {
    white-space: nowrap;
}

.smartcare-header-actions .mobile-menu {
    display: flex;
    align-items: center;
}

/* Undo the template's absolute positioning (.tp-side-action) and the old
   custom.css "button { margin-top }" so the icon sits in the flex row. */
.smartcare-header-actions .hamburger-btn.tp-side-action {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 -10px 0 0; /* line the icon lines up with the padding edge */
    display: block;
}

.smartcare-header-actions .hamburger-btn span {
    left: 10px;
    width: 24px;
}

.smartcare-header-actions .hamburger-btn span:nth-child(1) { top: 12px; }
.smartcare-header-actions .hamburger-btn span:nth-child(2) { top: 21px; left: 50%; width: 14px; }
.smartcare-header-actions .hamburger-btn span:nth-child(3) { top: 30px; left: auto; right: 10px; }

@media (min-width: 1200px) and (max-width: 1399px) {
    .tp-header-area.tp-header-space {
        padding-left: 30px;
        padding-right: 30px;
    }

    .smartcare-header-logo img {
        width: 190px;
    }
}

@media (max-width: 1199px) {
    .tp-header-area.tp-header-space {
        padding: 14px 30px;
    }

    .smartcare-header-row {
        min-height: 0;
    }
}

@media (max-width: 767px) {
    .tp-header-area.tp-header-space {
        padding: 12px 16px;
    }

    .smartcare-header-logo img {
        width: 170px;
    }
}

/* WordPress admin bar pushes the sticky header down. */
.admin-bar .header__sticky.header-sticky {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .header__sticky.header-sticky {
        top: 46px;
    }
}

.tp-contact__form label.error {
    color: #ff6b6b;
    font-size: 14px;
}

.ajax-response.success {
    color: #95df00;
}

.ajax-response.error {
    color: #ff6b6b;
}

.tp-contact__input label:not(.error) {
    display: block;
    margin-bottom: 6px;
}

/* Keyboard focus that is visible on the dark and light sections. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #00c2b8;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------
 * Cards on the /condition/ and /treatment/ landing pages
 * ------------------------------------------------------------------ */
.smartcare-card {
    height: calc(100% - 30px);
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    background: #fff;
    border: 1px solid #e3e9f2;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(53, 30, 138, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smartcare-card:hover,
.smartcare-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(53, 30, 138, 0.12);
}

.smartcare-card__icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 16px;
}

.smartcare-card__title {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.smartcare-card__title a {
    color: #351E8A;
}

.smartcare-card__text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.smartcare-card__more {
    font-weight: 600;
    color: #1d8fe1;
}

.smartcare-card__more i {
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.smartcare-card:hover .smartcare-card__more i {
    transform: translateX(4px);
}

/* Home page condition cards that link to a page. */
.tp-service-item .service-title a.stretched-link {
    color: inherit;
}

.tp-service-item:has(a.stretched-link):hover {
    border-color: #1d8fe1;
}

/* ------------------------------------------------------------------
 * "Book a visit" call-to-action at the end of condition/treatment pages
 * ------------------------------------------------------------------ */
.smartcare-cta {
    background: linear-gradient(135deg, #351E8A 0%, #5b2a9d 100%);
    border-radius: 24px;
    padding: 40px;
    color: #fff;
}

.smartcare-cta h2 {
    color: #fff;
    font-size: 30px;
    margin-bottom: 10px;
}

.smartcare-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.smartcare-cta__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ------------------------------------------------------------------
 * Sticky call / book bar on phones and tablets
 * ------------------------------------------------------------------ */
.smartcare-mobile-bar {
    display: none;
}

@media (max-width: 1199px) {
    .smartcare-mobile-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    }

    .smartcare-mobile-bar a {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
        border-radius: 999px;
        font-weight: 700;
        font-size: 15px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .smartcare-mobile-bar__call {
        background: #00c2b8;
        color: #fff;
    }

    .smartcare-mobile-bar__book {
        background: #351E8A;
        color: #fff;
    }

    .smartcare-mobile-bar a:hover,
    .smartcare-mobile-bar a:focus {
        color: #fff;
        opacity: 0.92;
    }

    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    .back-to-top-wrapper.back-to-top-btn-show {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }
}

/* ------------------------------------------------------------------
 * Privacy notice
 * ------------------------------------------------------------------ */
#privacyModal {
    bottom: 20px;
    left: 20px;
    right: auto;
    height: auto;
    width: 380px;
    min-width: 0;
    max-width: calc(100% - 40px);
    background: transparent;
    z-index: 1000;
}

#privacyModal .modal-content {
    padding: 18px 20px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

#privacyModal h4 {
    font-size: 18px;
    margin-bottom: 6px;
}

#privacyModal p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

#privacyModal button {
    min-height: 44px;
    padding: 8px 18px;
    font-weight: 600;
}

@media (max-width: 1199px) {
    #privacyModal {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        bottom: calc(78px + env(safe-area-inset-bottom));
    }
}

/* ------------------------------------------------------------------
 * Phones
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
    /* The template's desktop spacing wastes a lot of screen on phones. */
    .pt-115, .pt-130 { padding-top: 56px; }
    .pb-115, .pb-130 { padding-bottom: 56px; }
    .pb-100 { padding-bottom: 48px; }
    .pt-100 { padding-top: 48px; }
    .pb-50 { padding-bottom: 28px; }
    .breadcrumb__area.pt-100 { padding-top: 40px; }
    .breadcrumb__area.pb-100 { padding-bottom: 40px; }
    .mb-55 { margin-bottom: 28px; }

    .tp-hero-title {
        font-size: 36px !important;
        line-height: 1.15;
    }

    .breadcrumb__title {
        font-size: 38px;
        margin-bottom: 10px;
    }

    .tp-section__title {
        font-size: 30px;
    }

    /* Home condition grid: two compact cards per row. */
    .tp-service-item {
        height: 100%;
        min-height: 130px;
        padding: 14px 8px;
    }

    .row.tp-gx-18 > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }

    .row.tp-gx-18 .tp-service-item.mb-30 {
        margin-bottom: 12px;
        height: calc(100% - 12px);
    }

    .tp-service-icon img {
        height: 64px;
    }

    .tp-service-content .service-title {
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 0;
    }

    .tp-contact__form.ml-80 {
        margin-left: 0;
    }

    .tp-contact__input input,
    .tp-contact__input textarea {
        font-size: 16px; /* stops iOS zooming into the field */
    }

    .tp-services-breadcrumb-faq .tp-section__title {
        font-size: 28px;
    }

    .smartcare-cta {
        padding: 28px 22px;
    }

    .smartcare-cta h2 {
        font-size: 24px;
    }

    .smartcare-cta__buttons a {
        flex: 1 1 100%;
        text-align: center;
    }

    /* Bigger tap targets in the footer and breadcrumbs. */
    .tp-footer-copyright-link-2 a {
        display: inline-block;
        padding: 10px 0;
        margin-right: 18px;
    }

    .tp-footer-copyright-link-2 a.ml-50 {
        margin-left: 0;
    }

    .breadcrumb__list a {
        display: inline-block;
        padding: 10px 0;
    }
}
