/* Theme overrides and additions on top of inline-archive.css */

/* WP Rocket / lazy-load compatibility shims
 * The archived CSS contains rules that hide content until WP Rocket's JS reveals it.
 * Since we don't install WP Rocket, override those rules to keep everything visible. */
[data-wpr-lazyrender],
[data-wpr-lazyrender="1"] {
    content-visibility: visible !important;
    contain-intrinsic-size: auto !important;
}
[data-lazy-src] {
    display: revert !important;
}
.rll-youtube-player {
    display: block !important;
}


/* Ensure CF7 forms inside the gform_wrapper container inherit the original Gravity Forms look.
 * The seeded contact page wraps the [contact-form-7] shortcode in <div class="gform_wrapper gravity-theme">,
 * so the original CSS in inline-archive.css continues to target .gform_* selectors. */
.gform_wrapper .wpcf7-form { display: block; }
.gform_wrapper .wpcf7-form-control-wrap { display: block; margin-bottom: 1rem; }
.gform_wrapper .wpcf7-form .wpcf7-not-valid-tip { color: #c00; font-size: 0.9em; }
.gform_wrapper .wpcf7 .wpcf7-response-output { padding: 1rem; border: 2px solid #d63638; margin-top: 1rem; }
.gform_wrapper .wpcf7 form.sent .wpcf7-response-output { border-color: #46b450; }

/* Hide Trustindex container until widget loads (avoids flash of empty space) */
.trustindex-widget:empty { min-height: 200px; }

/* ----- Home banner (hero) sizing fixes -----
 * The archived CSS makes `.home-banner` position:relative but doesn't size the inner <img>
 * (because the original site relied on WP Rocket + bootstrap to handle the responsive sizing).
 * Force the banner to span its container and the image to fill it as a hero background. */
.home-banner {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background-color: #061c4f;
    margin: 0;
}
.home-banner > img,
.home-banner > p img,
.home-banner img.wp-post-image,
.home-banner img.img-responsive {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0;
}
/* Stray <p> wrappers around hero img: keep them invisible */
.home-banner > p { margin: 0; padding: 0; line-height: 0; }
.home-banner > p:empty { display: none; }

/* ----- Section image sizing — make all content imgs responsive by default ----- */
.page-content img,
.upper-content-container img {
    max-width: 100%;
    height: auto;
}
/* Doctor / "Empowering Patients" / "Transparent Fees" — these are wrapped in <p> in the seeded content */
.page-content p img.size-full,
.page-content p img.wp-image-783,
.page-content p img.wp-image-784 {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* The original archive uses square card thumbnails — no border-radius override here. */

/* Spacing / utility helpers used across pages */
.top-60 { margin-top: 60px; }
.bottom-60 { margin-bottom: 60px; }
.bottom-40 { margin-bottom: 40px; }
.centerit { text-align: center; }

/* ============================ Payment Plans page ============================ */
.pp-page {
    padding: 70px 0 80px;
}
.pp-intro {
    max-width: 720px;
    margin: 0 auto 50px;
}
.pp-intro h2 {
    font-size: 36px;
    color: #061c4f;
    margin-bottom: 18px;
    line-height: 1.2;
}
.pp-intro p {
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

/* Cherry widget container — a centered card with subtle shadow.
 * Renders only Cherry's calculator + how-it-works + FAQ sections (no hero photo)
 * so the content stacks cleanly without empty side columns. */
.pp-widget-card {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 14px 50px rgba(6, 28, 79, 0.10), 0 3px 8px rgba(6, 28, 79, 0.05);
    padding: 44px 40px;
    border: 1px solid #eef0f4;
    position: relative;
    overflow: hidden;
}
/* Force every Cherry section to behave as a full-width block inside the card */
.pp-widget-card #calculator,
.pp-widget-card #howitworks,
.pp-widget-card #faq {
    width: 100%;
    max-width: 100%;
    position: relative;
}
/* Spacing between Cherry sections */
.pp-widget-card > div:not(:empty):not(:last-child) {
    margin-bottom: 32px;
}

/* CTA — sits at the bottom of the same card, separated by a hairline border */
.pp-cta {
    max-width: 640px;
    margin: 30px auto 0;
    padding-top: 30px;
    border-top: 1px solid #e8e9ee;
}
.pp-cta p {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .pp-page { padding: 40px 0; }
    .pp-widget-card { padding: 24px 18px; border-radius: 10px; }
    .pp-intro h2 { font-size: 28px; }
}

/* ================================================================
 * Fase 17 — Premium polish (hover, transitions, scroll animations)
 * All animations use transform/opacity for GPU acceleration.
 * Respect prefers-reduced-motion at the bottom of this section.
 * ================================================================ */

/* ---------- Global typography refinements ---------- */
html { scroll-behavior: smooth; }
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { letter-spacing: -0.01em; }

/* Text selection brand-colored */
::selection { background: #c49c46; color: #061c4f; }
::-moz-selection { background: #c49c46; color: #061c4f; }

/* ---------- Custom focus rings (accessibility + premium feel) ---------- */
:focus { outline: none; }
*:focus-visible {
    outline: 2px solid #c49c46;
    outline-offset: 3px;
    border-radius: 2px;
    transition: outline-offset .15s ease;
}
a:focus-visible, button:focus-visible { outline-offset: 4px; }

/* ---------- Buttons — hover lift + sheen ---------- */
.btn, .btn-primary, .gform_button, button[type=submit] {
    position: relative;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.2,.7,.3,1),
                box-shadow .25s cubic-bezier(.2,.7,.3,1),
                background-color .2s ease,
                color .2s ease,
                border-color .2s ease !important;
    will-change: transform;
}
@media (hover: hover) {
    .btn:hover, .btn-primary:hover, .gform_button:hover, button[type=submit]:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(6, 28, 79, .22), 0 3px 8px rgba(6, 28, 79, .10);
    }
}
.btn:active, .btn-primary:active, .gform_button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(6, 28, 79, .15);
}
/* Sheen sweep effect — subtle diagonal highlight on primary buttons */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.20) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left .6s cubic-bezier(.2,.7,.3,1);
    pointer-events: none;
}
@media (hover: hover) {
    .btn-primary:hover::before { left: 125%; }
}

/* ---------- Gold-underlined CTAs ("BOOK ONLINE", "VIEW ALL DENTAL SERVICES", etc.) ---------- */
/* These are anchor tags with a gold underline created via ::after on the original CSS */
.home-banner-callout a,
.extra-content-bar a:not(.btn) {
    transition: color .2s ease;
}

/* ---------- Cards — service / blog / doctor (hover lift + image zoom) ---------- */
.extra-content-bar .col-xs-12,
.blog-card-wrap,
.doctor-card,
.lower-callout-box {
    transition: transform .35s cubic-bezier(.2,.7,.3,1),
                box-shadow .35s cubic-bezier(.2,.7,.3,1);
    will-change: transform;
}
/* Image containers inside cards get overflow:hidden for the zoom effect */
.blog-card-wrap a.blog-card-image,
.extra-content-bar a img,
.extra-content-bar .col-xs-12 > a:has(img),
.extra-content-bar img {
    transition: transform .55s cubic-bezier(.2,.7,.3,1);
}
@media (hover: hover) {
    .blog-card-wrap:hover {
        transform: translateY(-6px);
    }
    .blog-card-wrap:hover img,
    .blog-card-wrap a:hover img {
        transform: scale(1.05);
    }
}

/* Blog title in card hovers gold */
.blog-card-title a, .blog-title a {
    transition: color .2s ease;
}
@media (hover: hover) {
    .blog-card-title a:hover, .blog-title a:hover {
        color: #c49c46;
    }
}

/* Read More arrow slides right on hover */
.moretag, a.moretag {
    display: inline-block;
    transition: color .2s ease;
}
.moretag i {
    display: inline-block;
    transition: transform .25s cubic-bezier(.2,.7,.3,1);
    margin-left: 4px;
}
@media (hover: hover) {
    .moretag:hover { color: #c49c46; }
    .moretag:hover i { transform: translateX(6px); }
}

/* ---------- Main navigation — underline animated from center ---------- */
#menu-main-menu > li > a {
    position: relative;
    transition: color .2s ease;
}
#menu-main-menu > li > a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #c49c46;
    transform: translateX(-50%);
    transition: width .25s cubic-bezier(.2,.7,.3,1);
    pointer-events: none;
}
@media (hover: hover) {
    #menu-main-menu > li > a:hover::after,
    #menu-main-menu > li.current-menu-item > a::after,
    #menu-main-menu > li.current-menu-ancestor > a::after {
        width: 80%;
    }
}
#menu-main-menu > li.current-menu-item > a::after,
#menu-main-menu > li.current-menu-ancestor > a::after { width: 80%; }

/* Dropdown menu fade-in (instead of instant display:block) */
.navbar .dropdown-menu {
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    transition: opacity .2s cubic-bezier(.2,.7,.3,1),
                transform .2s cubic-bezier(.2,.7,.3,1),
                visibility 0s linear .2s;
    pointer-events: none;
}
.navbar li.dropdown:hover > .dropdown-menu,
.navbar li.dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
    pointer-events: auto;
}

/* ---------- Header sticky shrink on scroll ---------- */
.header, .site-header {
    transition: box-shadow .3s ease, padding .3s ease;
}
.header.scrolled, .site-header.scrolled {
    box-shadow: 0 4px 18px rgba(6, 28, 79, .15);
}
.header.scrolled .top-bar,
.site-header.scrolled .top-bar {
    padding-top: 4px;
    padding-bottom: 4px;
    transition: padding .3s ease;
    font-size: 0.92em;
}

/* ---------- Scroll-triggered fade-in (driven by da-polish.js) ---------- */
[data-anim] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.2,.7,.3,1),
                transform .7s cubic-bezier(.2,.7,.3,1);
}
[data-anim].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Form fields — focus glow ---------- */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper textarea {
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.gform_wrapper input:focus,
.gform_wrapper textarea:focus {
    border-color: #c49c46;
    box-shadow: 0 0 0 3px rgba(196, 156, 70, .18);
    outline: none;
}

/* ---------- Side social rail — icon hover scale ---------- */
.side-social .footer-social-links li a {
    display: inline-block;
    transition: transform .25s cubic-bezier(.2,.7,.3,1), color .2s ease;
}
@media (hover: hover) {
    .side-social .footer-social-links li a:hover {
        transform: scale(1.18);
    }
}

/* ---------- Footer — link hover ---------- */
#menu-footer-menu li a,
#menu-courtesy-nav li a,
.f-address a,
.f-phone a {
    position: relative;
    transition: color .2s ease;
}
@media (hover: hover) {
    #menu-footer-menu li a:hover,
    #menu-courtesy-nav li a:hover,
    .f-address a:hover,
    .f-phone a:hover {
        color: #c49c46;
    }
}
.footer-social-links li a {
    transition: transform .25s cubic-bezier(.2,.7,.3,1), color .2s ease;
    display: inline-block;
}
@media (hover: hover) {
    .footer-social-links li a:hover { transform: translateY(-3px) scale(1.1); }
}

/* ---------- Trustindex reviews — fade in when injected ---------- */
.testimonial-bar [class*="ti-widget"],
.testimonial-bar [class*="trustindex"] {
    animation: da-fadein .6s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes da-fadein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Trustindex carousel — make prev/next arrows visible on dark blue ----------
 * Trustindex injects its own carousel controls. On a dark navy background the default
 * arrows blend in. Force them to gold circles with white arrows so they pop. */
.testimonial-bar [class*="ti-pre-button"],
.testimonial-bar [class*="ti-next-button"],
.testimonial-bar [class*="ti-prev"],
.testimonial-bar [class*="ti-next"],
.testimonial-bar [class*="slider-prev"],
.testimonial-bar [class*="slider-next"],
.testimonial-bar [class*="swiper-button"],
.testimonial-bar .ti-widget [class*="prev"],
.testimonial-bar .ti-widget [class*="next"] {
    background-color: #c49c46 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform .2s cubic-bezier(.2,.7,.3,1), background-color .2s ease !important;
}
.testimonial-bar [class*="ti-pre-button"]:hover,
.testimonial-bar [class*="ti-next-button"]:hover,
.testimonial-bar [class*="ti-prev"]:hover,
.testimonial-bar [class*="ti-next"]:hover,
.testimonial-bar [class*="slider-prev"]:hover,
.testimonial-bar [class*="slider-next"]:hover,
.testimonial-bar [class*="swiper-button"]:hover {
    background-color: #ffffff !important;
    color: #061c4f !important;
    transform: scale(1.08) !important;
}
/* Make the arrow icons inside the buttons white/contrast */
.testimonial-bar [class*="ti-pre-button"] svg,
.testimonial-bar [class*="ti-next-button"] svg,
.testimonial-bar [class*="ti-pre-button"]::before,
.testimonial-bar [class*="ti-next-button"]::before,
.testimonial-bar [class*="ti-pre-button"]::after,
.testimonial-bar [class*="ti-next-button"]::after,
.testimonial-bar [class*="swiper-button"]::after {
    fill: currentColor !important;
    color: inherit !important;
    font-size: 18px !important;
}
/* Pagination dots, if any */
.testimonial-bar [class*="swiper-pagination-bullet"],
.testimonial-bar [class*="ti-pagination"] [class*="bullet"] {
    background-color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1 !important;
}
.testimonial-bar [class*="swiper-pagination-bullet-active"],
.testimonial-bar [class*="ti-pagination"] [class*="bullet"][class*="active"] {
    background-color: #c49c46 !important;
}

/* ---------- Payment Plans page — Cherry widget card hover lift ---------- */
.pp-widget-card {
    transition: transform .4s cubic-bezier(.2,.7,.3,1), box-shadow .4s cubic-bezier(.2,.7,.3,1);
}
@media (hover: hover) {
    .pp-widget-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 22px 60px rgba(6, 28, 79, .14), 0 6px 14px rgba(6, 28, 79, .06);
    }
}

/* ================================================================
 * Fase 18 — Premium upgrades (TOP 6 package)
 * ================================================================ */

/* ---------- Skip-to-content link (accessibility) ---------- */
.da-skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: #061c4f;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 0 0 8px 8px;
    z-index: 99999;
    font-weight: 600;
    text-decoration: none;
    transition: top .2s ease;
}
.da-skip-link:focus { top: 0; }

/* ---------- A3: Ken Burns subtle pan/zoom on home hero ---------- */
.home-banner img.wp-post-image {
    animation: da-ken-burns 22s ease-in-out infinite alternate;
    transform-origin: center center;
    will-change: transform;
}
@keyframes da-ken-burns {
    0%   { transform: scale(1) translateY(0); }
    100% { transform: scale(1.06) translateY(-12px); }
}

/* ---------- A1: Floating Action Button ----------
 * Positioned bottom-LEFT to avoid colliding with the Cherry "Pay over time"
 * pill widget (which is always anchored bottom-right by Cherry's script). */
.da-fab {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9000;
    background: linear-gradient(135deg, #061c4f 0%, #0b2a6e 100%);
    color: #fff !important;
    text-decoration: none !important;
    height: 60px;
    padding: 0 24px 0 22px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 30px rgba(6, 28, 79, .35), 0 4px 10px rgba(6, 28, 79, .20);
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    visibility: hidden;
    transition: opacity .35s cubic-bezier(.2,.7,.3,1),
                transform .35s cubic-bezier(.2,.7,.3,1),
                box-shadow .25s ease,
                visibility 0s linear .35s;
    border: 2px solid rgba(196, 156, 70, 0.4);
}
.da-fab.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    transition-delay: 0s;
}
.da-fab i {
    font-size: 22px;
    color: #c49c46;
}
.da-fab .da-fab-label { white-space: nowrap; }
@media (hover: hover) {
    .da-fab:hover {
        box-shadow: 0 16px 40px rgba(6, 28, 79, .45), 0 6px 14px rgba(6, 28, 79, .25);
        transform: translateY(-3px) scale(1.02);
        border-color: rgba(196, 156, 70, 0.85);
    }
}
.da-fab:active { transform: translateY(0) scale(0.98); }

/* Pulse halo around FAB to draw attention */
.da-fab::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 33px;
    border: 2px solid rgba(196, 156, 70, 0.5);
    opacity: 0;
    animation: da-fab-pulse 2.6s ease-in-out infinite;
}
@keyframes da-fab-pulse {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.15); }
}

/* Hide FAB on mobile (replaced by bottom nav bar) */
@media (max-width: 768px) {
    .da-fab { display: none; }
}

/* ---------- C4: Mobile bottom nav bar ---------- */
.da-mobile-bottom-nav {
    display: none;
}
@media (max-width: 768px) {
    .da-mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 8500;
        background: rgba(6, 28, 79, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 24px rgba(6, 28, 79, .25);
    }
    .da-mbn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 4px;
        gap: 4px;
        color: #fff !important;
        text-decoration: none !important;
        font-family: Montserrat, sans-serif;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        transition: color .2s ease, transform .15s ease;
    }
    .da-mbn-item i {
        font-size: 22px;
        color: #c49c46;
        transition: transform .25s cubic-bezier(.2,.7,.3,1);
    }
    .da-mbn-item:active {
        transform: scale(0.95);
    }
    .da-mbn-item:active i {
        transform: scale(1.15);
    }
    .da-mbn-item--primary {
        background: #c49c46;
        border-radius: 12px;
        margin: 0 2px;
    }
    .da-mbn-item--primary i { color: #061c4f; }
    /* Add bottom padding to body so footer content isn't hidden under the bar */
    body { padding-bottom: 70px; }
}

/* ---------- B2: Image lightbox ---------- */
.da-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(6, 28, 79, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s cubic-bezier(.2,.7,.3,1),
                visibility 0s linear .3s;
}
.da-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}
.da-lightbox-img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.da-lightbox.is-open .da-lightbox-img { transform: scale(1); }

.da-lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(196, 156, 70, 0.6);
    color: #fff;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, transform .2s;
    padding: 0;
    padding-bottom: 4px;
}
.da-lightbox-close:hover {
    background: rgba(196, 156, 70, 0.4);
    border-color: #c49c46;
    transform: rotate(90deg);
}

/* ---------- Agency credit in footer ---------- */
.copyright-credit {
    margin-top: 6px !important;
    font-size: 12px;
    letter-spacing: 0.5px;
    opacity: 0.75;
}
.copyright-credit strong {
    color: #c49c46;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ---------- Reduced motion — respect user preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    [data-anim] {
        opacity: 1 !important;
        transform: none !important;
    }
    .home-banner img.wp-post-image {
        animation: none !important;
    }
    .da-fab::after {
        animation: none !important;
    }
}
