/*
 * 50 Page dental imaging software.
 * Load order: content-style.css -> css/10-content-patterns.css -> css/15-woocommerce.css -> css/20-page-patterns.css -> css/20-support-pages.css -> style.css -> css/pages/50-page-*.css.
 * Purpose: Dental Imaging Software page-only section overrides loaded on page ID 2.
 * Related files: content-style.css holds tokens/base utilities; css/10-content-patterns.css holds reusable components.
 * Scope: these rules were moved from style.css and target .dmax-dis-* classes.
 */

:root {
    --dmax-color-success: #2e7d32;
}

/* Dental Imaging Software — S2 Feature Cards */
.dmax-dis-features-title {
    margin-bottom: 3.5rem;
}

.dmax-dis-features-grid .kt-row-column-wrap {
    /* gap: 3.5rem; */
}

.dmax-dis-feature-card {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 20px;
    height: 100%;
}

.dmax-dis-feature-icon {
    height: 3.8125rem;
    display: flex;
    align-items: center;
    margin-bottom: 1.875rem;
}

.dmax-dis-feature-icon i {
    font-size: 3.5rem;
    color: var(--global-palette3, #3cbce6);
}

.dmax-dis-feature-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.875rem;
    margin-bottom: 0.75rem;
}

.dmax-dis-feature-card p {
    margin-bottom: 0;
    font-size: 1rem;
}

@media (max-width: 767px) {
    .dmax-dis-features-grid .kt-row-column-wrap {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 479px) {
    .dmax-dis-features-grid .kt-row-column-wrap {
        grid-template-columns: 1fr;
    }
}

/* Dental Imaging Software — S3 Integration (bgImg pattern) */
.dmax-dis-integration-section {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.dmax-dis-integration-title {
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.3);
}

.dmax-dis-integration-copy {
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 0, 0, 0.2);
    max-width: 500px;
}

/* Button colors handled by per-block attrs (color + borderStyle on singlebtn) — works in both frontend AND editor */

/* Dental Imaging Software — S6 Already Have Imaging */
.dmax-dis-already-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Dental Imaging Software — S7 Comparison Table — mobile padding handled by column mobilePadding attr */

/* Comparison Table Green Check Icons */
.dmax-dis-compare-section .dmax-table-check,
.editor-styles-wrapper .dmax-dis-compare-section .dmax-table-check {
    color: var(--dmax-color-success, #2e7d32);
}

/* ============================================================
   Round-4 #63 items 9/10/11: hero fit within one viewport
   ============================================================ */

/* The hero screenshot (dentiview.png, natural 1439x1279) rendered 549px
   tall and pushed section 1 to ~1.3x viewport height, cutting the image
   at the fold and crowding the form column next to it. The row also
   center-aligned its columns, adding ~230px of dead space above the text
   stack. Top-align the columns and cap the image RELATIVE TO VIEWPORT
   HEIGHT: the text stack above the image ends ~570-580px down (varies a
   little with width), so a width-only 280px cap left the image 81-113px
   below the fold on 768/864px-tall laptops (2026-10-07 verification).
   clamp(170px, 100vh - 600px, 280px) keeps 280px on tall screens and
   shrinks the image on short ones so its bottom stays above the fold
   (logged-out: 768px vh → ~170px, bottom ~739px; 864px → ~264px, bottom
   ~842px). The 170px floor keeps the screenshot legible on very short
   viewports, where it may still cross the fold by design. */
@media (min-width: 992px) {
    /* Column fills to match the form column (owner request 2026-10-07):
       the inner column becomes a flex column pinned to the grid row's
       height (the form column is the tall one), fixed content keeps its
       natural size, and the screenshot GROWS into whatever vertical space
       is left — the left column's content bottom tracks the form bottom.
       Replaces the vh-based max-height clamp. */
    .kadence-columndisheroc1 .kt-inside-inner-col {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Button restored on desktop (was hidden). Needs (0,3,0): Kadence
       prints the block's own margin rule inline (kb-btns{uid}, 0-2-0)
       AFTER page stylesheets, so a 0-2-0 tie loses on order — the 32px
       kept winning. Owner bumps 8 → 16px now that the screenshot
       flex-fills the remaining space (2026-10-07 night). */
    .kadence-columndisheroc1 .wp-block-kadence-advancedbtn.kb-buttons-wrap {
        margin-bottom: 16px;
    }

    /* Eyebrow tracking: the global .dmax-eyebrow pattern runs 2px
       letter-spacing; production's hero lead-in uses normal tracking —
       page-scoped match (owner request). (0,4,0) via the inner-col hop:
       Kadence's inline typography rule for this heading is (0,3,0) and
       prints after page stylesheets, so a tie loses on order. */
    .kadence-columndisheroc1 .kt-inside-inner-col .dmax-eyebrow {
        /* !important: Kadence's generated heading typography keeps winning
           the cascade despite lower counted specificity (its selector list
           likely carries a higher-specificity variant); scoped + single
           declaration, so the escape hatch is contained. */
        letter-spacing: normal !important;
    }

    /* The flex item is the FIGURE (the img sits inside
       wp-block-kadence-image) — flex on the img itself does nothing. */
    .kadence-columndisheroc1 figure.wp-block-kadence-image {
        flex: 1 1 0;
        min-height: 0;
        margin: 0;
    }

    .kadence-columndisheroc1 figure.wp-block-kadence-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }
}

/* Hero vertical spacing is NATIVE now (owner call 2026-10-07): the dishero
   row lost its dmax-row class (which pulled the global clamp + first-child
   bump — two stacked CSS layers that caused the v1.0.41/v1.0.43 padding
   confusion) and carries explicit padding/tabletPadding/mobilePadding
   attrs in the block: 160 top clears the transparent header overlay
   (113px + utility row) at every device, 60/70 bottom. No page CSS
   padding overrides for this row anymore. The only remaining hero rules
   are the viewport-relative screenshot cap above and the consent/form-
   title styles below.
   NOTE: with dmax-row gone, the global two-column centering rule no
   longer matches this row — Kadence's default column stretch applies,
   which is what the old flex-start override wanted anyway. */

/* Consent checkbox labels smaller than field labels (owner request
   2026-10-07; production uses 16px here, owner prefers tighter). */
.page-id-2 .kb-row-layout-iddishero .gfield--type-consent .gfield_consent_label,
.page-id-2 .kb-row-layout-iddishero .gfield--type-consent .gfield_label {
    font-size: 13px;
    line-height: 1.4;
}

/* Round-3 review (2026-10-07): the removed gform title H2 is part of the
   production heading hierarchy (docs/SEO/production-heading-hierarchy.md
   #23) — restored as a compact explicit heading above the form. The
   gform description + required legend stay off (duplicative of the hero
   copy); keeping only the H2 costs ~50px instead of the 169px block. */
.dmax-dis-form-title,
.editor-styles-wrapper .dmax-dis-form-title {
    font-size: 26px;
    line-height: 1.3;
    margin: 0 0 14px;
}

/* ── Round-4 #63 hero squash + anchor fix (owner requests, 2026-10-07) ── */

/* Explore Features targets #dis-features; the features row now carries
   the Kadence anchor attr (renders id="dis-features") so the jump works
   like production. anchor-scroll.js applies the header-offset correction. */

/* Hero copy smaller (owner request) */
.kadence-columndisheroc1 .dmax-copy {
    font-size: 18px;
    line-height: 1.45;
}

/* Form description smaller — it duplicates the hero copy (owner request) */
.kadence-columndisheroc2 .gform_description {
    font-size: 12.5px;
    line-height: 1.4;
}

/* SMS consent line-height tighter + the two consent rows pulled closer
   (owner request: secondary text, keep it compact). Negative margin: the
   gform field list is a flex container, so adjacent margins ADD rather
   than collapse — a positive margin made the form TALLER (measured
   1030px); -6px pulls the rows together. */
.page-id-2 .kb-row-layout-iddishero .gfield--type-consent .gfield_consent_label {
    line-height: 1.25;
}

.page-id-2 .kb-row-layout-iddishero .gform_wrapper .gfield--type-consent {
    margin-top: -6px;
}

/* Button restored on desktop at ALL widths (2026-10-07 evening): with the
   screenshot flex-filling the leftover column space, the left column can
   no longer outgrow the form column, so the planned narrow-width hide
   became unnecessary. Mobile/tablet keep the button in flow as always. */

/* ── Hero fine-tuning (owner requests, 2026-10-07 evening) ── */

/* Title line-height 1.5 → 1.15: the two-line H2 had 61.5px lines on a
   41px font (theme h2 default); tightening pulls row 2 ~29px closer. */
.kadence-columndisheroc1 .kt-adv-headingdisherotitle {
    line-height: 1.15;
}

/* Hero copy one step smaller (18 → 17). */
.kadence-columndisheroc1 .dmax-copy {
    font-size: 17px;
}

/* Columns sit closer together (32 → 24). The 58/42 split itself is native
   (firstColumnWidth/secondColumnWidth attrs on the row). */
.page-id-2 .kb-row-layout-iddishero .kt-row-column-wrap {
    column-gap: 24px;
}

/* Form inputs 2-3px shorter: GF default 8px vertical padding → 6.5px. */
.page-id-2 .kb-row-layout-iddishero .gform_wrapper .gfield input[type="text"],
.page-id-2 .kb-row-layout-iddishero .gform_wrapper .gfield input[type="email"],
.page-id-2 .kb-row-layout-iddishero .gform_wrapper .gfield input[type="tel"],
.page-id-2 .kb-row-layout-iddishero .gform_wrapper .gfield select {
    padding-top: 6.5px;
    padding-bottom: 6.5px;
}

/* Owner requests (2026-10-07 night): on two-column desktop screens the
   form's chrome costs vertical space — the 20px wrapper padding is
   Gravity Forms' gravity-theme default (this page never renders the
   .survey_wrapper dark card; that class isn't on this form's markup),
   and the submit footer carries 16px bottom padding + an 8px submit
   bottom margin. All zeroed on >=992px; mobile keeps the airy defaults. */
@media (min-width: 992px) {
    .page-id-2 .kb-row-layout-iddishero .gform_wrapper {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 0;
    }

    .page-id-2 .kb-row-layout-iddishero .gform_wrapper .gform_footer,
    .page-id-2 .kb-row-layout-iddishero .gform_wrapper .gform_submit_button_container {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .page-id-2 .kb-row-layout-iddishero .gform_wrapper .gform_footer .gform_button,
    .page-id-2 .kb-row-layout-iddishero .gform_wrapper .gform_submit_button_container .gform_button {
        margin-bottom: 0;
    }
}

/* Form title left-aligned on desktop (owner request 2026-10-07 night);
   mobile keeps the centered look. */
@media (min-width: 992px) {
    .page-id-2 .kb-row-layout-iddishero .dmax-dis-form-title {
        /* !important for the same reason as the eyebrow: Kadence's inline
           heading rule keeps winning the cascade. */
        text-align: left !important;
    }
}
