/**
 * 3MW Core Child Theme - Frontend Styles
 *
 * Client-specific customizations and style overrides
 * This file loads after the parent theme's frontend.min.css
 *
 * @package 3MW_Core_Child
 * @since 1.0.0
 */

/* ==========================================
   TABLE OF CONTENTS
   ========================================== */

/*
 * 1. VARIABLES
 * 2. MEGA MENUS
 * 3. TYPOGRAPHY OVERRIDES
 * 4. COMPONENT OVERRIDES
 * 5. STATISTICS ROW BLOCK CUSTOMIZATIONS
 * 6. PLATFORM BLOCK CUSTOMIZATIONS
 * 7. VIDEO SHOWCASE CUSTOMIZATIONS
 * 8. HORIZONTAL ACCORDION SLIDE CUSTOMIZATIONS
 * 9. DROPDOWN ACCORDION CUSTOMIZATIONS
 * 10. KEY METRICS CUSTOMIZATIONS
 * 11. TEAM MEMBER GRID CUSTOMIZATIONS
 * 12. TEMPLATE-SPECIFIC OVERRIDES
 * 13. CLIENT-SPECIFIC FEATURES
 * 14. RESPONSIVE OVERRIDES
 * 15. UTILITY CLASSES
 * 16. TABBED CONTENT BLOCK
 * 17. CALL-TO-ACTION BANNER BLOCK
 * 18. PRINT STYLES
 *
 * BLOCK STYLES MOVED TO INDIVIDUAL BLOCK DIRECTORIES:
 * - Multi-Column Boxed Content → blocks/multi-column-boxed-content/style.css
 * - Featured/Recent Posts → blocks/featured-recent-posts/style.css
 * - Testimonial → blocks/testimonial/style.css
 * - Prefooter CTA → blocks/prefooter-cta/style.css
 * - Hero (boxed container) → blocks/hero/style.css
 * - Icon & Text Grid → blocks/icon-text-box-grid/style.css
 * - Dropdown Accordion Rows → blocks/dropdown-accordion-rows/style.css
 * - Vertical Scrolling Cards → blocks/vertical-scrolling-cards/style.css
 *
 * NOTE: HubSpot form styles moved to frontend-hubspot.css
 */

/* ==========================================
   VARIABLES
   ========================================== */

:root {
    /* CLS fix: provide an initial --header-height so the hero
       min-height calc doesn't jump when JS sets the real value.
       86px matches the rendered header on mobile (375px viewport).
       JS in frontend.js will overwrite with the exact measured value. */
    --header-height: 86px;

    /* Grid System Override */
    --row-gap: 30px;

    /* Button Text Transform */
    --btn-text-transform: uppercase;

    /* Button Font Size - Bridge slug mismatch (theme.json uses "button", parent expects "custom-1") */
    --font-size-button: var(--wp--preset--font-size--button);

    /* Colors & Gradients - Managed via Full Site Editor (FSE) */

    /* Use FSE > Site Editor > Colors/Gradients to add custom colors and gradients */

    /* No need to define color/gradient variables here - FSE handles all color management */

    /* WordPress FSE Color Mapping - Simple names → WordPress preset format */
    --color-primary: var(--wp--preset--color--innovasea-blue);
    --color-secondary: var(--wp--preset--color--sea-green);
    --color-accent: var(--wp--preset--color--coral);
    --color-text-primary: var(--wp--preset--color--black);
    --color-text-secondary: var(--wp--preset--color--sea-green);
    --color-text-light: var(--color-white);
    --color-border: var(--wp--preset--color--teal);
    --color-border-light: var(--wp--preset--color--teal-10);
    --input-placeholder: var(--wp--preset--color--gray-dark);
    --color-heading: var(--wp--preset--color--blue);

    /* Dark Background Colors
     * Used when section has data-section-dark-bg="true"
     * For primary text: use --color-text-light directly
     * For borders: use --color-border-light directly */
    --color-dark-bg-text-secondary: rgb(255 255 255 / 80%);     /* Secondary/muted text on dark bg */
    --color-dark-bg-surface: rgb(255 255 255 / 10%);            /* Subtle surfaces on dark bg */
    --dark-bg-heading: var(--wp--preset--color--teal-10);

    /* Brand Color Variables */
    --sea-foam-20: #E0F3EB;
    --teal-10: var(--wp--preset--color--teal-10);

    /* Brand Gradients */
    --gradient-subtle-teal: linear-gradient(180deg, #FFFFFF 0%, #F7FDFD 54.81%, rgb(233 248 250 / 64%) 100%);

    /* H1 Typography Variables */
    --h1-line-height: 1.2; /* 120% */
    --h1-letter-spacing: 1.2px;

    /* Text Link with Arrow Variables */
    --link-arrow-color: #00393F; /* Sea Blue */
    --link-arrow-font-size: 18px;
    --link-arrow-font-weight: 700;
    --link-arrow-line-height: 1.3; /* 130% */
}

/* Dark Background Overrides
 * Override parent theme dark-bg variables for client brand colors */
.has-dark-bg,
[data-section-dark-bg="true"] {
    --dark-bg-heading: var(--wp--preset--color--teal-10);
    --dark-bg-link-hover: var(--wp--preset--color--teal-10);
}

body {
    color: var(--color-text-primary);
}

:focus-visible {
    outline: 1px dashed var(--color-accent);
    outline-offset: 2px;
}

/* ==========================================
   BUTTON CUSTOMIZATIONS
   ========================================== */

.announcement-bar .announcement-bar-cta:hover::before {
    background: var(--wp--preset--gradient--ocean-blue);
}

.breadcrumbs-list,
.breadcrumbs-list a {
    color: var(--color-heading);
}

.breadcrumbs-list .current {
    max-width: 650px;
}

.wp-block-separator {
    background-color: var(--color-border) !important;
}

.section-subtitle,
.section-subtitle p {
    color: inherit;
}

.btn {
    font-weight: 300;
}

/* Secondary buttons on blue backgrounds - white background with coral text, no border */
.has-blue-background-color .btn.btn-secondary {
    background-color: var(--color-white) !important;
    color: var(--wp--preset--color--coral) !important;
    border-color: var(--color-white) !important;
}

/* Maintain default hover state */
.has-blue-background-color .btn.btn-secondary:hover,
.has-blue-background-color .btn.btn-secondary:focus {
    background-color: var(--btn-secondary-hover-bg) !important;
    color: var(--btn-secondary-hover-text-color) !important;
    border-color: var(--btn-secondary-hover-border-color) !important;
}

/* ==========================================================================
   Divider Styles - Teal Squiggly Border
   ========================================================================== */

.divider {
    position: relative;
}

.divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: url('data:image/svg+xml;utf8,<svg width="1281" height="4" viewBox="0 0 1281 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1280.5 1.86318C1280.5 1.86463 1280.49 1.86608 1280.49 1.86752C1278.59 2.93603 1276.45 3.5 1274.29 3.5C1272.12 3.5 1269.99 2.93748 1268.09 1.87332C1268.09 1.87187 1268.08 1.86897 1268.08 1.86752C1264.88 0.065423 1261.06 0.065423 1257.86 1.86752L1257.85 1.87042V1.86752C1255.96 2.93603 1253.81 3.5 1251.65 3.5C1249.49 3.5 1247.34 2.93603 1245.44 1.86752C1245.44 1.86752 1245.44 1.86463 1245.44 1.86318C1242.24 0.0639734 1238.42 0.0654231 1235.22 1.86608C1235.22 1.86752 1235.22 1.86897 1235.21 1.87042C1233.32 2.93603 1231.17 3.49855 1229.02 3.49855C1226.85 3.49855 1224.71 2.93458 1222.81 1.86608C1219.61 0.0654231 1215.79 0.0639734 1212.59 1.86173C1212.59 1.86173 1212.59 1.86463 1212.59 1.86608C1210.69 2.93458 1208.54 3.49855 1206.38 3.49855C1204.22 3.49855 1202.08 2.93458 1200.18 1.86897L1200.17 1.86608C1196.98 0.0639731 1193.15 0.0639731 1189.95 1.86608L1189.95 1.86897C1188.05 2.93458 1185.91 3.49855 1183.75 3.49855C1181.59 3.49855 1179.44 2.93458 1177.54 1.86608C1174.35 0.0654231 1170.53 0.0639734 1167.33 1.86173C1167.33 1.86318 1167.32 1.86463 1167.32 1.86608C1165.42 2.93458 1163.28 3.49855 1161.12 3.49855C1158.95 3.49855 1156.81 2.93603 1154.92 1.87187C1154.92 1.87042 1154.91 1.86752 1154.91 1.86608C1151.71 0.0639731 1147.89 0.0639731 1144.69 1.86608L1144.68 1.86897L1144.66 1.86608C1142.77 2.93458 1140.62 3.49855 1138.46 3.49855C1136.3 3.49855 1134.15 2.93458 1132.25 1.86608C1132.25 1.86608 1132.25 1.86318 1132.25 1.86173C1129.05 0.0625235 1125.23 0.0639735 1122.03 1.86463C1122.03 1.86608 1122.02 1.86752 1122.02 1.86897C1120.13 2.93458 1117.98 3.4971 1115.82 3.4971C1113.66 3.4971 1111.52 2.93313 1109.62 1.86463C1106.42 0.0639735 1102.6 0.0625235 1099.4 1.86028C1099.4 1.86028 1099.4 1.86318 1099.4 1.86463C1097.5 2.93313 1095.35 3.4971 1093.19 3.4971C1091.03 3.4971 1088.88 2.93313 1086.99 1.86752L1086.98 1.86463C1083.78 0.0625235 1079.96 0.0625235 1076.76 1.86463L1076.76 1.86752C1074.86 2.93313 1072.72 3.4971 1070.56 3.4971C1068.39 3.4971 1066.25 2.93313 1064.35 1.86463C1061.15 0.0639735 1057.34 0.0625235 1054.14 1.86028C1054.13 1.86173 1054.13 1.86318 1054.13 1.86463C1052.23 2.93313 1050.09 3.4971 1047.92 3.4971C1045.76 3.4971 1043.62 2.93458 1041.73 1.87042C1041.72 1.86897 1041.72 1.86608 1041.72 1.86463C1038.52 0.0625235 1034.7 0.0625235 1031.5 1.86463L1031.49 1.86752V1.86463C1029.6 2.93313 1027.45 3.4971 1025.29 3.4971C1023.13 3.4971 1020.98 2.93313 1019.08 1.86463C1019.08 1.86463 1019.08 1.86173 1019.08 1.86028C1015.88 0.0610736 1012.06 0.0625236 1008.86 1.86318C1008.86 1.86463 1008.85 1.86608 1008.85 1.86752C1006.96 2.93313 1004.81 3.49565 1002.65 3.49565C1000.49 3.49565 998.345 2.93168 996.448 1.86318C993.25 0.0625236 989.431 0.0610738 986.233 1.85883C986.23 1.85883 986.228 1.86173 986.226 1.86318C984.329 2.93168 982.182 3.49565 980.019 3.49565C977.856 3.49565 975.714 2.93168 973.818 1.86608L973.813 1.86318C970.613 0.0610736 966.791 0.0610736 963.591 1.86318L963.586 1.86608C961.69 2.93168 959.547 3.49565 957.386 3.49565C955.223 3.49565 953.078 2.93168 951.18 1.86318C947.983 0.0625236 944.166 0.0610738 940.967 1.85883C940.964 1.86028 940.962 1.86173 940.959 1.86318C939.062 2.93168 936.916 3.49565 934.754 3.49565C932.592 3.49565 930.453 2.93313 928.557 1.86897C928.554 1.86752 928.55 1.86463 928.547 1.86318C925.348 0.0610736 921.527 0.0610736 918.327 1.86318L918.322 1.86608L918.275 1.86318C916.379 2.93168 914.232 3.49565 912.07 3.49565C909.908 3.49565 907.762 2.93168 905.865 1.86318C905.863 1.86318 905.861 1.86028 905.858 1.85883C902.66 0.0596239 898.841 0.0610738 895.643 1.86173C895.64 1.86318 895.637 1.86463 895.634 1.86608C893.739 2.93168 891.595 3.4942 889.436 3.4942C887.273 3.4942 885.128 2.93023 883.231 1.86173C880.033 0.0610738 876.214 0.059624 873.016 1.85738C873.013 1.85738 873.011 1.86028 873.009 1.86173C871.112 2.93023 868.965 3.4942 866.802 3.4942C864.639 3.4942 862.497 2.93023 860.601 1.86463L860.596 1.86173C857.396 0.0596238 853.574 0.0596238 850.374 1.86173L850.369 1.86463C848.473 2.93023 846.33 3.4942 844.17 3.4942C842.006 3.4942 839.861 2.93023 837.963 1.86173C834.766 0.0610738 830.949 0.059624 827.75 1.85738C827.747 1.85883 827.745 1.86028 827.742 1.86173C825.845 2.93023 823.699 3.4942 821.537 3.4942C819.375 3.4942 817.236 2.93168 815.34 1.86752C815.337 1.86608 815.333 1.86318 815.33 1.86173C812.131 0.0596238 808.31 0.0596238 805.11 1.86173L805.105 1.86463V1.86173C803.208 2.93023 801.062 3.4942 798.9 3.4942C796.738 3.4942 794.592 2.93023 792.695 1.86173C792.692 1.86173 792.691 1.85883 792.688 1.85738C789.489 0.0581742 785.671 0.0596239 782.472 1.86028C782.469 1.86173 782.467 1.86318 782.464 1.86463C780.568 2.93023 778.425 3.49275 776.266 3.49275C774.102 3.49275 771.958 2.92878 770.061 1.86028C766.862 0.0596239 763.044 0.0581742 759.845 1.85593C759.842 1.85593 759.841 1.85883 759.838 1.86028C757.941 2.92878 755.795 3.49275 753.632 3.49275C751.468 3.49275 749.326 2.92878 747.431 1.86318L747.425 1.86028C744.225 0.0581739 740.404 0.0581739 737.204 1.86028L737.198 1.86318C735.303 2.92878 733.159 3.49275 730.999 3.49275C728.836 3.49275 726.691 2.92878 724.793 1.86028C721.596 0.0596239 717.778 0.0581742 714.58 1.85593C714.577 1.85738 714.574 1.85883 714.571 1.86028C712.674 2.92878 710.528 3.49275 708.366 3.49275C706.204 3.49275 704.065 2.93023 702.17 1.86608C702.167 1.86463 702.163 1.86173 702.16 1.86028C698.96 0.0581739 695.14 0.0581739 691.94 1.86028L691.934 1.86318L691.913 1.86028C690.016 2.92878 687.87 3.49275 685.708 3.49275C683.546 3.49275 681.4 2.92878 679.503 1.86028C679.5 1.86028 679.499 1.85738 679.496 1.85593C676.298 0.0567243 672.479 0.0581742 669.28 1.85883C669.278 1.86028 669.275 1.86173 669.272 1.86318C667.377 2.92878 665.233 3.4913 663.074 3.4913C660.911 3.4913 658.766 2.92733 656.869 1.85883C653.671 0.0581742 649.852 0.0567243 646.653 1.85448C646.651 1.85448 646.649 1.85738 646.646 1.85883C644.75 2.92733 642.603 3.4913 640.44 3.4913C638.277 3.4913 636.135 2.92733 634.239 1.86173L634.234 1.85883C631.034 0.0567242 627.212 0.0567242 624.012 1.85883L624.007 1.86173C622.111 2.92733 619.968 3.4913 617.807 3.4913C615.644 3.4913 613.499 2.92733 611.601 1.85883C608.404 0.0581742 604.586 0.0567243 601.388 1.85448C601.385 1.85593 601.382 1.85738 601.38 1.85883C599.483 2.92733 597.336 3.4913 595.175 3.4913C593.013 3.4913 590.873 2.92878 588.978 1.86463C588.975 1.86318 588.971 1.86028 588.968 1.85883C585.768 0.0567242 581.948 0.0567242 578.748 1.85883L578.743 1.86173V1.85883C576.846 2.92733 574.7 3.4913 572.538 3.4913C570.376 3.4913 568.23 2.92733 566.333 1.85883C566.33 1.85883 566.328 1.85593 566.326 1.85448C563.127 0.0552744 559.308 0.0567244 556.11 1.85738C556.107 1.85883 556.104 1.86028 556.102 1.86173C554.206 2.92733 552.063 3.48985 549.904 3.48985C547.74 3.48985 545.595 2.92588 543.699 1.85738C540.5 0.0567244 536.681 0.0552747 533.483 1.85303C533.48 1.85303 533.479 1.85593 533.476 1.85738C531.579 2.92588 529.433 3.48985 527.27 3.48985C525.106 3.48985 522.964 2.92588 521.069 1.86028L521.063 1.85738C517.863 0.0552744 514.042 0.0552744 510.842 1.85738L510.836 1.86028C508.941 2.92588 506.797 3.48985 504.637 3.48985C502.474 3.48985 500.329 2.92588 498.43 1.85738C495.233 0.0567244 491.416 0.0552747 488.218 1.85303C488.215 1.85448 488.212 1.85593 488.209 1.85738C486.312 2.92588 484.166 3.48985 482.004 3.48985C479.842 3.48985 477.703 2.92733 475.808 1.86318C475.805 1.86173 475.801 1.85883 475.798 1.85738C472.598 0.0552744 468.778 0.0552744 465.578 1.85738L465.572 1.86028L465.614 1.85738C463.718 2.92588 461.571 3.48985 459.41 3.48985C457.248 3.48985 455.101 2.92588 453.205 1.85738C453.202 1.85738 453.2 1.85448 453.198 1.85303C449.999 0.0538248 446.18 0.0552746 442.982 1.85593C442.979 1.85738 442.976 1.85883 442.973 1.86028C441.078 2.92588 438.934 3.4884 436.775 3.4884C434.612 3.4884 432.467 2.92443 430.57 1.85593C427.372 0.0552746 423.553 0.0538248 420.355 1.85158C420.352 1.85158 420.351 1.85448 420.348 1.85593C418.451 2.92443 416.305 3.4884 414.141 3.4884C411.978 3.4884 409.836 2.92443 407.941 1.85883L407.935 1.85593C404.735 0.0538246 400.913 0.0538246 397.714 1.85593L397.708 1.85883C395.813 2.92443 393.669 3.4884 391.509 3.4884C389.345 3.4884 387.2 2.92443 385.302 1.85593C382.105 0.0552746 378.288 0.0538248 375.089 1.85158C375.087 1.85303 375.084 1.85448 375.081 1.85593C373.184 2.92443 371.038 3.4884 368.876 3.4884C366.714 3.4884 364.575 2.92588 362.679 1.86173C362.677 1.86028 362.672 1.85738 362.67 1.85593C359.47 0.0538246 355.649 0.0538246 352.45 1.85593L352.444 1.85883V1.85593C350.547 2.92443 348.401 3.4884 346.239 3.4884C344.077 3.4884 341.931 2.92443 340.034 1.85593C340.031 1.85593 340.03 1.85303 340.027 1.85158C336.829 0.052375 333.01 0.0538247 329.811 1.85448C329.809 1.85593 329.806 1.85738 329.803 1.85883C327.908 2.92443 325.764 3.48695 323.605 3.48695C321.442 3.48695 319.297 2.92298 317.4 1.85448C314.202 0.0538247 310.383 0.052375 307.184 1.85013C307.181 1.85013 307.18 1.85303 307.177 1.85448C305.28 2.92298 303.134 3.48695 300.971 3.48695C298.808 3.48695 296.665 2.92298 294.77 1.85738L294.764 1.85448C291.565 0.0523747 287.743 0.0523747 284.543 1.85448L284.537 1.85738C282.642 2.92298 280.499 3.48695 278.338 3.48695C276.175 3.48695 274.03 2.92298 272.132 1.85448C268.935 0.0538247 265.117 0.052375 261.919 1.85013C261.916 1.85158 261.913 1.85303 261.91 1.85448C260.014 2.92298 257.867 3.48695 255.705 3.48695C253.544 3.48695 251.404 2.92443 249.509 1.86028C249.506 1.85883 249.502 1.85593 249.499 1.85448C246.299 0.0523747 242.479 0.0523747 239.279 1.85448L239.274 1.85738L239.252 1.85448C237.356 2.92298 235.209 3.48695 233.047 3.48695C230.886 3.48695 228.739 2.92298 226.842 1.85448C226.84 1.85448 226.838 1.85158 226.835 1.85013C223.637 0.0509251 219.818 0.0523751 216.62 1.85303C216.617 1.85448 216.614 1.85593 216.611 1.85738C214.716 2.92298 212.572 3.4855 210.413 3.4855C208.25 3.4855 206.105 2.92153 204.208 1.85303C201.01 0.0523751 197.191 0.0509252 193.993 1.84868C193.99 1.84868 193.988 1.85158 193.986 1.85303C192.089 2.92153 189.942 3.4855 187.779 3.4855C185.616 3.4855 183.474 2.92153 181.578 1.85593L181.573 1.85303C178.373 0.0509251 174.551 0.0509251 171.351 1.85303L171.346 1.85593C169.451 2.92153 167.307 3.4855 165.147 3.4855C162.983 3.4855 160.838 2.92153 158.94 1.85303C155.743 0.0523751 151.926 0.0509252 148.727 1.84868C148.724 1.85013 148.722 1.85158 148.719 1.85303C146.822 2.92153 144.676 3.4855 142.514 3.4855C140.352 3.4855 138.213 2.92298 136.317 1.85883C136.314 1.85738 136.31 1.85448 136.307 1.85303C133.108 0.0509251 129.287 0.0509251 126.088 1.85303L126.082 1.85593V1.85303C124.185 2.92153 122.039 3.4855 119.877 3.4855C117.715 3.4855 115.569 2.92153 113.672 1.85303C113.669 1.85303 113.668 1.85013 113.665 1.84868C110.466 0.0494754 106.648 0.0509252 103.449 1.85158C103.446 1.85303 103.444 1.85448 103.441 1.85593C101.545 2.92153 99.4019 3.48405 97.2428 3.48405C95.0795 3.48405 92.9346 2.92008 91.0378 1.85158C87.8394 0.0509252 84.0205 0.0494755 80.8221 1.84723C80.8193 1.84723 80.8179 1.85013 80.8151 1.85158C78.9183 2.92008 76.772 3.48405 74.6087 3.48405C72.4454 3.48405 70.3033 2.92008 68.4079 1.85448L68.4023 1.85158C65.2025 0.0494752 61.3808 0.0494752 58.181 1.85158L58.1753 1.85448C56.28 2.92008 54.1365 3.48405 51.976 3.48405C49.8127 3.48405 47.6678 2.92008 45.7696 1.85158C42.5726 0.0509252 38.7552 0.0494755 35.5568 1.84723C35.5539 1.84868 35.5511 1.85013 35.5483 1.85158C33.6516 2.92008 31.5052 3.48405 29.3433 3.48405C27.1814 3.48405 25.0421 2.92153 23.1468 1.85738C23.144 1.85593 23.1397 1.85303 23.1369 1.85158C19.9371 0.0494752 16.1168 0.0494752 12.917 1.85158L12.9114 1.85448C11.016 2.92008 8.8725 3.48405 6.71063 3.48405C4.54875 3.48405 2.39675 2.94328 0.5 1.87477" stroke="%2323BECC" stroke-miterlimit="10" stroke-linecap="round"/></svg>');
    background-repeat: repeat-x;
    background-position: bottom left;
    background-size: auto 100%;
    pointer-events: none;
}

/* Mobile: Scale divider border down slightly */
@media (width <= 768px) {
    .divider::after {
        height: 3px;
    }
}

/* ==========================================
   STYLE GUIDE OVERRIDE
   Add bottom margin to accommodate footer wave
   ========================================== */

.style-guide-section--bottom {
    padding-bottom: 200px;
}

/* ==========================================
   FOOTER STYLING & WAVE CLEARANCE SYSTEM
   ========================================== */

/*
 * Footer Wave Clearance System
 *
 * The footer has a decorative wave (::before) that extends above it.
 * This system ensures content (like pagination) stays visible above the wave.
 *
 * Wave math:
 * - Wave height: 246px
 * - Wave top offset: 65px
 * - Wave extends above footer: 246px - 65px = 181px
 * - Footer margin-top: 75px
 * - Wave intrudes into content area: 181px - 75px = 106px
 *
 * Solution: Add padding-bottom to last blocks to clear the wave area.
 * For pages where background should extend under wave, add a background
 * to the last block via FSE or block settings.
 */
.footer {
    background-color: var(--wp--preset--color--teal);
    position: relative;
    z-index: 10;
    margin-top: 75px;
    color: var(--wp--preset--color--sea-blue);
}

/*
 * Last block padding to clear footer wave
 * Adds enough bottom padding so content stays above the wave decoration.
 *
 * Wave intrusion: 106px (181px wave - 75px footer margin)
 * Target clearance: ~130px total (comfortable visual gap)
 * Using !important to override inline styles from FSE block editor
 */
main > .entry-content > section:last-child,
main > .entry-content > div:last-child,
main > section:last-child,
main > div:last-child:not(.entry-content) {
    padding-bottom: 130px !important;
}

/* For blocks with section-padding-* classes, add extra for wave */
main > .entry-content > .section-padding-xl:last-child,
main > .entry-content > .section-padding-2xl:last-child,
main > .entry-content > .section-padding-3xl:last-child {
    padding-bottom: 150px !important;
}

/* Grid container needs padding for footer wave clearance when it's the last block.
 * Multiple selectors to handle different FSE template structures.
 * This applies to grids with pagination, no pagination, or navigation_style: none */
main > .entry-content > .dynamic-archive-grid-wrapper:last-child .grid-container,
main > section.dynamic-archive-grid-wrapper:last-child .grid-container,
.wp-site-blocks > .dynamic-archive-grid-wrapper:last-of-type .grid-container,
.dynamic-archive-grid-wrapper:last-child .grid-container {
    padding-bottom: 130px !important;
}

/* Load More button wrapper needs bottom spacing for footer wave clearance
 * The load-more-wrapper is rendered OUTSIDE the grid-container,
 * so it needs its own clearance rule when pagination is replaced by Load More.
 * Multiple selectors to handle different FSE template structures. */
main > .entry-content > .dynamic-archive-grid-wrapper:last-child .load-more-wrapper,
main > section.dynamic-archive-grid-wrapper:last-child .load-more-wrapper,
.wp-site-blocks > .dynamic-archive-grid-wrapper:last-of-type .load-more-wrapper,
.dynamic-archive-grid-wrapper:last-child .load-more-wrapper {
    margin-bottom: 130px;
}

.footer-bottom,
.footer-bottom div {
    gap: var(--space-sm);
    align-items: center;
}

/* Wave decoration at top of footer */
.footer::before {
    content: '';
    position: absolute;
    top: 65px;
    z-index: 1;
    left: 0;
    width: 100%;
    height: 246px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="246" viewBox="0 0 1440 246" fill="none"><path d="M0 246V41.0936C479.931 -101.259 960.069 183.446 1440 41.0936V245.881H0V246Z" fill="%2323BECC"/></svg>');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: cover;
    pointer-events: none;
    transform: translateY(-100%);
}

/* Adjust footer wave position at larger viewports
 * Progressive wave positioning to prevent gaps at large screens.
 * The wave SVG (1440px native) stretches with background-size: cover,
 * causing gaps at wider viewports. These breakpoints compensate by
 * moving the wave origin point upward as viewport width increases.
 *
 * Breakpoint progression:
 * - Default: top: 65px (standard desktop up to 1599px)
 * - 1600px+: top: 55px (large desktop)
 * - 1800px+: top: 45px (wide desktop)
 * - 2000px+: top: 30px (ultrawide)
 * - 2200px+: top: 15px (4K transition)
 * - 2400px+: top: 0 (4K/ultrawide monitors)
 */
@media (width >= 1600px) {
    .footer::before {
        top: 55px;
    }
}

@media (width >= 1800px) {
    .footer::before {
        top: 45px;
    }

    main > .entry-content > .section-padding-xl:last-child,
    main > .entry-content > .section-padding-2xl:last-child,
    main > .entry-content > .section-padding-3xl:last-child {
        padding-bottom: 250px !important;
    }
}

@media (width >= 2000px) {
    .footer::before {
        top: 30px;
    }
}

@media (width >= 2200px) {
    .footer::before {
        top: 15px;
    }
}

@media (width >= 2400px) {
    .footer::before {
        top: 0;
    }
}

/* Remove footer container top padding */
.footer .container {
    padding-top: 0;
}

@media (width <= 768px) {
    .footer .container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Footer paragraph text - tighter line height */
.footer p {
    line-height: var(--line-height-normal);
}

/* Social link styling */
.footer .wp-block-social-links .wp-block-social-link.wp-social-link {
    padding: 11px !important;
    background-color: var(--wp--preset--color--blue) !important;
    border-radius: 100px !important;
}

.footer .copyright {
    gap: var(--space-sm);
    align-items: center;
}

/* 3MW Footer Logo - Child theme override with SVG
 * Uses !important to override gradient link reset rules
 */
.footer .web_logo {
    background: url('/wp-content/themes/3mw-core-child/assets/images/3MW-logo-mark.svg') no-repeat center !important;
    background-size: 100% !important;
    opacity: 1;
    margin-right: 0;
}

/* Footer navigation column titles */
.footer .classic-menu-navigation .column-title,
.footer-main .column-title a {
    color: var(--wp--preset--color--sea-blue);
    font-family: 'mozaic-geo-variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
    font-size: var(--wp--preset--font-size--h-6);
    font-style: normal;
    font-weight: var(--font-weight-light);
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}

.footer-main .column-title {
    margin-bottom: var(--wp--preset--spacing--md);
}

/* Footer column-title links - hover, active, focus states */
.footer-column .column-title a:hover,
.footer-column .column-title a:active,
.footer-column .column-title a:focus {
    text-decoration: underline;
}

/* Footer flexbox layout - column 1 left, columns 2-4 grouped right */
.footer-main.wp-block-columns {
    position: relative;
    z-index: 9;
    gap: var(--space-2xl) !important; /* Gap between columns 2-4 */
    align-items: start;
}

/* First column (logo/info) stays on left and takes full available space */
.footer-main.wp-block-columns > .wp-block-column:first-child {
    flex: 1 1 auto !important;
    padding-right: var(--space-2xl);
}

/* Columns 2-4: equal width, right-aligned, content-based sizing */
.footer-main.wp-block-columns > .wp-block-column:nth-child(2),
.footer-main.wp-block-columns > .wp-block-column:nth-child(3),
.footer-main.wp-block-columns > .wp-block-column:nth-child(4) {
    flex: 0 1 auto !important; /* Don't grow, can shrink, auto width */
    min-width: 150px; /* Minimum width for menu columns */
}

/* Second column - push to right, grouping columns 2-4 together */
.footer-main.wp-block-columns > .wp-block-column:nth-child(2) {
    margin-left: auto !important; /* Push columns 2-4 to the right */
}

@media (width >= 768px) and (width <= 1100px) {
    .footer {
        padding: var(--space-sm) var(--space-lg);
    }

    /* Enable wrapping so columns can stack, center columns */
    .footer-main.wp-block-columns {
        flex-wrap: wrap !important;
        justify-content: center !important;
        margin-bottom: var(--space-lg);
    }

    /* First column takes full width, forcing other columns to wrap to next row */
    .footer-main.wp-block-columns > .wp-block-column:first-child {
        flex-basis: 100% !important;
        max-width: 100%;
        margin-bottom: var(--space-lg);
    }

    /* Second column no longer needs margin-left auto on tablet */
    .footer-main.wp-block-columns > .wp-block-column:nth-child(2) {
        margin-left: 0 !important;
    }
}

/* Move first column up on desktop only (not tablet) */
@media (width > 1100px) {
    .footer-main > :first-child {
        position: relative;
        top: -100px;
    }
}

/* Menu columns - equal width and align content left */
.footer-main > :nth-child(2),
.footer-main > :nth-child(3),
.footer-main > :nth-child(4),
.footer-main > :nth-child(5) {
    flex: 1 1 0;
    min-width: 0;
    justify-self: start;
}

/* Copyright mark styling */
.copyright-mark {
    font-size: var(--font-size-small);
}

/* Legal links styling */
.legal-links nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.legal-links a {
    font-size: var(--font-size-small);
}

/* Override column-title styles in footer-bottom legal links */
.footer-bottom .legal-links .column-title {
    margin-bottom: 0;
    font-size: inherit;
    display: inline;
    line-height: var(--line-height-normal);
}

/* Privacy/Cookie policy links - white on hover for readability on dark footer */
.footer-bottom .classic-menu-navigation .column-title a:hover,
.footer-bottom .classic-menu-navigation .column-title a:focus {
    color: var(--color-white);
}

/* Ensure legal-links container aligns with other flex items */
.footer-bottom .legal-links {
    display: flex;
    align-items: center;
}

/* ==========================================
   HEADER LAYOUT
   ========================================== */

/* Header container - flex row layout */
.site-header > .header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

/* Logo and navigation left-aligned */
.custom-site-logo-wrapper,
.wp-block-site-logo {
    flex-shrink: 0;
}

/* Navigation fills remaining space */
.site-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Header buttons container - reorder search icon */
.header-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-left: calc(-1 * var(--space-sm));
    padding-left: var(--space-sm);
}

/* Move search icon to left of button and style */
.header-buttons .search-toggle-block {
    order: -1;
    display: flex;
    align-items: center;
    position: relative;
}

.header-buttons .search-toggle-block button {
    all: unset;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wp--preset--color--sea-green);
    transition: color var(--transition-base);
}

.header-buttons .search-toggle-block button svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    fill: currentcolor !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.header-buttons .search-toggle-block button:hover {
    color: var(--color-border);
}

/* ==========================================
   LOGIN DROPDOWN MENU
   ========================================== */

/* Contact box and login dropdown layout */
header .contact-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    overflow: visible;
}

/* Login dropdown wrapper */
.login-dropdown-wrapper {
    position: relative;
}

/* Login toggle button */
.login-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: transparent;
    border: none;
    line-height: 1em !important;
    color: var(--wp--preset--color--sea-green);
    font-family: 'mozaic-geo-variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: var(--font-weight-light);
    padding: var(--space-sm) 0;
    cursor: pointer;
    transition: color var(--transition-base);
    white-space: nowrap;
}

.login-toggle:hover,
.login-toggle:focus {
    color: var(--color-link);
}

/* Reduce login toggle font size at narrower desktop widths */
@media (width <= 1400px) {
    .login-toggle {
        font-size: 1.0625rem;
    }
}

/* Match navigation link responsive sizing */
@media (width <= 1100px) {
    .login-toggle {
        font-size: 0.9375rem;
    }
}

/* Dropdown caret SVG */
.login-toggle .dropdown-caret {
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

/* Rotate caret when dropdown is open */
.login-toggle[aria-expanded="true"] .dropdown-caret {
    transform: rotate(180deg);
}

/* Login dropdown menu - hidden by default */
.login-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    border: 4px solid transparent;
    border-image: var(--wp--preset--gradient--ocean-blue);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-image-slice: 1;
    border-image-source: var(--wp--preset--gradient--ocean-blue);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    z-index: 1000;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    overflow: hidden;
}

/* Show dropdown when toggle is active (click) or wrapper is hovered */
.login-toggle[aria-expanded="true"] + .login-dropdown-menu,
.login-dropdown-wrapper:hover .login-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Rotate caret on hover to match expanded state */
.login-dropdown-wrapper:hover .login-toggle .dropdown-caret {
    transform: rotate(180deg);
}

/* Hide column title wrapper in login menu */
.login-dropdown-menu .column-title {
    display: none;
}

/* Login menu links - match regular submenu styling */
.login-dropdown-menu .footer-links a {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    color: var(--color-heading);
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    font-size: 20px;
    font-weight: var(--font-weight-light);
    border-radius: var(--radius-button);
}

.login-dropdown-menu .footer-links a:hover,
.login-dropdown-menu .footer-links a:focus {
    background-color: var(--wp--preset--color--teal-10);
    color: var(--color-link);
}

/* Add padding to submenu list - match regular submenu container padding */
.login-dropdown-menu .footer-links ul {
    padding: var(--space-md) var(--space-sm);
    margin: 0;
    list-style: none;
}

/* Remove bottom margin on list items */
.login-dropdown-menu .footer-links li {
    margin-bottom: 0;
}

/* Divider to the right of login dropdown */
.contact-box .login-dropdown-wrapper::after {
    content: '';
    position: absolute;
    right: calc(-1 * var(--space-sm));
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 21px;
    background-color: var(--wp--preset--color--sea-green);
    opacity: 0.4;
}

/* Divider between Login and Search icon */
.header-buttons .search-toggle-block::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-sm) - 3.5px);
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 25px;
    background-color: var(--wp--preset--color--sea-green);
    opacity: 0.3;
}

/* ==========================================
   MEGA MENUS & NAVIGATION
   ========================================== */

/* Navigation menu typography and spacing */
.nav-menu {
    font-size: 20px;
}

.nav-menu--desktop {
    gap: var(--space-lg);
}

.nav-menu__item {
    padding-left: 0;
    padding-right: 0;
    padding-top: var(--space-sm) !important;
    padding-bottom: var(--space-sm) !important;
    margin-bottom: 0 !important;
}

a.nav-menu__link {
    color: var(--color-heading);
    font-weight: var(--font-weight-light);
    line-height: 1em;
}

a.nav-menu__link:hover,
a.nav-menu__link:focus {
    color: var(--color-link);
}

/* Submenu link hover states - highlight background */
.submenu__link {
    transition: background-color var(--transition-fast);
}

.submenu__link:hover {
    background-color: var(--wp--preset--color--teal-10);
}

/* ==========================================
   STANDARDIZE NAVIGATION UNDERLINE POSITIONS
   All navigation elements use consistent vertical alignment
   ========================================== */

.nav-menu__item::before {
    background: none;
}

/* Header CTA buttons - match nav item vertical alignment */
.header-cta-buttons a.header-link {
    padding-top: var(--space-sm) !important;
    padding-bottom: var(--space-sm) !important;
}

/* Search toggle button styling */
.header-buttons .search-toggle-block .wp-block-search__button {
    color: var(--wp--preset--color--sea-green);
}

.header-buttons .search-toggle-block .wp-block-search__button:hover,
.header-buttons .search-toggle-block .wp-block-search__button:focus,
.header-buttons .search-toggle-block .wp-block-search__button:active,
.header-buttons .search-toggle-block .search-icon:hover,
.header-buttons .search-toggle-block .search-icon:focus,
.header-buttons .search-toggle-block .search-icon:active {
    fill: var(--color-accent);
}

/* ==========================================
   SEARCH ACTIVE BLUR OVERLAY
   When the search bar is open, blur all header
   children except the search slide itself.
   ========================================== */
.header.search-active > *:not(.header-buttons) {
    filter: blur(3px);
    opacity: 0.4;
    pointer-events: none;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.header.search-active > .header-buttons > *:not(.search-toggle-block) {
    filter: blur(3px);
    opacity: 0.4;
    pointer-events: none;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Ensure smooth transition back when search closes */
.header > *,
.header > .header-buttons > * {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.submenu,
.login-dropdown-menu,
.mega-menu__content {
    border-width: 4px;
    border-style: solid;
    border-image: var(--wp--preset--gradient--ocean-blue);
    border-image-slice: 1;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    overflow: hidden;
    padding: var(--space-md) var(--space-sm);
}

.mega-section-title,
.mega-menu__link,
.mega-menu__highlight-title,
.submenu__link .mega-menu__link-title {
    color: var(--color-heading);
}

/* ==========================================
   TYPOGRAPHY OVERRIDES
   ========================================== */

/* Bold body text - ensure strong/b tags are visibly distinct from normal weight */
strong,
b {
    font-weight: var(--font-weight-semibold);
}

/* Balance H2 text wrapping for more even line lengths */
h2 {
    text-wrap: balance;
}

/* Pretty text wrapping for section descriptions - better line breaks */
.section-description p {
    text-wrap: pretty;
}

/* Pretty text wrapping for section subtitles - better line breaks */
.section-header-content .section-subtitle p {
    text-wrap: pretty;
    font-size: var(--font-size-body);
}

/* Default heading colors */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-heading);
}

/* Headings inherit text color in dark background sections */
[class*="bg-dark"] :is(h1, h2, h3, h4, h5, h6),
.dark-bg :is(h1, h2, h3, h4, h5, h6),
.has-text-color :is(h1, h2, h3, h4, h5, h6) {
    color: inherit;
}

/* List Styles - Unordered list bullet colors */
ul li::marker {
    color: var(--color-accent);
}

ul.wp-block-list li {
    margin-bottom: 8px;
}

/* Blockquote - styled like H4 with primary blue color */
blockquote {
    font-size: var(--font-size-h4);
    line-height: var(--line-height-heading);
    font-weight: 300;
    color: var(--color-primary);
    font-style: normal;
    margin: var(--space-lg) 0;
    padding-left: var(--space-xl);
    max-width: 100%;
    border-left: 4px solid;
    border-image-slice: 1;
    border-image-source: var(--gradient-blue-teal);
}


/* ==========================================
   COMPONENT OVERRIDES
   ========================================== */

/* Button Padding and Font Weight Override
 * Uses asymmetric vertical padding to visually center text
 * Font metrics (Poppins has taller ascenders than descenders) cause
 * mathematically-centered text to appear slightly high
 */
.btn,
.hs_submit .hs-button,
input[type="submit"],
button[type="submit"],
.wp-element-button,
.wp-block-button__link {
    padding: 12px 20px 10px;
    font-weight: var(--font-weight-light);
    line-height: 1em;
}

/* Select Dropdown Vertical Text Centering
 * Compensates for font metrics after weight remapping (2026-03-09).
 * Text appears too high - uses more top padding to push text down.
 */
body:not(.wp-admin) select,
.hs-form select {
    padding-top: 14px;
    padding-bottom: 10px;
}

/* Primary Button on Dark Backgrounds
 * Override primary button styling when placed on dark backgrounds
 * Uses coral/orange text with white background for contrast, no border
 * On hover, border matches the hover background color */
.has-dark-bg,
[data-section-dark-bg="true"],
[class*="bg-dark"],
.dark-bg {
    --btn-primary-bg: var(--color-white);
    --btn-primary-text-color: var(--color-accent);
    --btn-primary-border-color: var(--color-white);
    --btn-primary-hover-border-color: var(--btn-primary-hover-bg);
}

/* Badge Vertical Text Centering
 * Ensure text is visually centered within badges in archive grids
 * Uses asymmetric padding to compensate for font metrics (descenders/ascenders)
 * Similar approach to button padding adjustment
 */
.badge,
.badge-pill {
    padding: 8px 18px 6px;
}

/* Secondary badge - plain text, not pill
 * Primary badge already has pill styling; secondary should be text-only.
 */
.card-badge-secondary,
.badge.card-badge-secondary {
    border: none;
    border-radius: 0;
    background-color: transparent;
    padding: 0;
    color: var(--color-text-primary);
}

/* ==========================================================================
   Card Image Consistent Heights
   Override parent theme's dynamic-grid.css media query that sets height: 100%
   This ensures all card images maintain the same fixed height for visual consistency
   ========================================================================== */

.dynamic-archive-grid-wrapper .card-media {
    height: 270px;
}

/* Maintain aspect ratio on smaller screens where fixed height might clip too much */
@media (width <= 480px) {
    .dynamic-archive-grid-wrapper .card-media {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ==========================================================================
   404 Page Search - Styling and Mobile Fix
   ========================================================================== */

/* Global search input styling */
.wp-block-search__input {
    border-radius: var(--radius-card);
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-body);
    background: var(--color-white);
    line-height: var(--line-height-normal);
    box-shadow: var(--shadow-sm);
    outline: none;
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition-base);
}

/* 404 Page Search Form - Centered and Mobile responsive fix */
.error-404-page .search-hero__form {
    max-width: var(--max-width-content-md);
    width: 100%;
    margin-inline: auto;
}

.error-404-page .wp-block-search__inside-wrapper {
    display: flex;
    gap: var(--space-xs);
    align-items: stretch;
    width: 100%;
    justify-content: center;
}

/* Mobile: Stack search input and button vertically */
@media (width <= 768px) {
    .error-404-page .search-hero__form {
        max-width: calc(100% - var(--space-lg) * 2);
    }

    .error-404-page .wp-block-search__inside-wrapper {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .error-404-page .wp-block-search__input {
        width: 100%;
        min-width: 0;
    }

    .error-404-page .wp-block-search__button {
        width: 100%;
        justify-content: center;
    }
}

/* Taxonomy tags (archive-meta-tags) styled as primary badges */
.archive-meta-tags .badge.badge-pill {
    background: var(--wp--preset--gradient--ocean-blue);
}

.archive-meta-tags .badge.badge-pill:hover,
.archive-meta-tags .badge.badge-pill:focus {
    background: var(--color-primary);
}

sup {
    line-height: var(--line-height-tight);
}

/* NOTE: Multi-column boxed content styles moved to blocks/multi-column-boxed-content/style.css */

/* ==========================================
   STATISTICS ROW BLOCK CUSTOMIZATIONS
   ========================================== */

/* 1. Header title - black color and left aligned */
.statistics-row-header h2 {
    color: var(--wp--preset--color--black);
    text-align: left;
}

/* 2 & 5. Statistic item - teal 10 background, remove border, and set flex basis */
.statistics-grid .statistic-item {
    background-color: var(--wp--preset--color--teal-10);
    border: none !important;
    flex: 0 0 calc(33.33% - var(--space-lg));
    max-width: calc(33.33% - var(--space-lg));
}

/* 3. Statistic metric - 88px font size, center align, no min-height (stacked layout only) */
.statistics-row-block:not(.statistics-row-block--side-by-side) .statistics-grid .statistic-metric {
    font-size: 88px;
    text-align: center;
    min-height: 0;
    color: var(--color-heading);
}

.statistics-row-container .statistic-item .statistic-metric {
    color: var(--color-heading);
}

/* 4. Statistic text - h3 styling with light font weight and left aligned */
.statistics-grid span.statistic-text {
    font-size: var(--wp--preset--font-size--h-3);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-heading);
    text-align: left;
}

/* 5. Override plugin min-height - only apply when content exists, but maintain equal card heights */
.statistics-row-block:not(.statistics-row-block--side-by-side) .statistics-grid .statistic-item {
    display: flex;
    flex-direction: column;
}

.statistics-row-block:not(.statistics-row-block--side-by-side) .statistics-grid .statistic-text {
    flex: 1;
    min-height: 0;
}

.statistics-row-block:not(.statistics-row-block--side-by-side) .statistics-grid .statistic-text:not(:empty) {
    min-height: 4.5em;
}

/* Statistics grid - space items evenly and stretch to equal height */
.statistics-grid {
    align-items: stretch;
    justify-content: space-between;
}

/* ==========================================
   PLATFORM BLOCK CUSTOMIZATIONS
   ========================================== */

section:not(.has-text-color) .platform-description {
    color: var(--color-text-secondary);
}

/* NOTE: Featured/Recent Posts styles moved to blocks/featured-recent-posts/style.css */

/* ==========================================
   VIDEO SHOWCASE CUSTOMIZATIONS
   ========================================== */

/* Constrain video width for "Below Content" placement */
.video-placement-vidbelow .video-wrapper {
    max-width: 1062px !important;
}

.video-placement-vidleft .video-showcase-description,
.video-placement-vidright .video-showcase-description {
    text-wrap: balance;
}

/* ==========================================
   HORIZONTAL ACCORDION SLIDE CUSTOMIZATIONS
   ========================================== */

.horizontal-accordion-container {
    border: var(--border-width-thin) solid var(--color-border);
}

.accordion-panel:not(:last-child) {
    border-right: var(--border-width-thin) solid var(--color-border);
}

.panel-title-vertical {
    color: var(--color-heading);
}

@media (width <=1024px) {
    .accordion-panel:not(:last-child) {
        border-right: none;
        border-bottom: var(--border-width-thin) solid var(--color-border);
    }
}

@media (width <=991px) {
    .panel-content-right,
    .panel-slide-image {
        display: none;
    }
}

/* ==========================================
   DROPDOWN ACCORDION CUSTOMIZATIONS
   Block-specific styles moved to: blocks/dropdown-accordion-rows/style.css
   ========================================== */

/* Global accordion title override (applies to any accordion component) */
.accordion-title {
    font-size: var(--font-size-h6);
}

/* ==========================================
   MOBILE NAVIGATION ALIGNMENT (≤1024px)
   ========================================== */

@media (width <= 1024px) {
    .site-navigation {
        margin-right: 0;
    }

    .mobile-menu-toggle,
    .menu-toggle,
    .wp-block-navigation__responsive-container-open {
        margin-left: auto;
        margin-right: 0;
    }

    .wp-block-navigation__responsive-container {
        justify-content: flex-end;
    }

    /* Mobile menu items - consistent font weight
     * Ensures all menu items (top-level and submenu) have the same weight */
    .mobile-menu__link,
    .mobile-menu__toggle,
    .mobile-submenu__link {
        font-weight: var(--font-weight-light);
    }

    /* Mobile menu items - consistent spacing
     * Normalizes padding between top-level items and expanded submenus */
    .mobile-menu__link,
    .mobile-menu__toggle {
        padding: var(--space-md) 0;
    }

    .mobile-submenu {
        padding-bottom: 0;
    }

    .mobile-submenu__link {
        padding: var(--space-sm) 0;
    }

    /* Remove border-top from mobile menu search */
    .mobile-menu-search {
        border-top: none;
    }
}

/* ==========================================
   VERTICAL SCROLLING CARDS CUSTOMIZATIONS
   ========================================== */

/* ==========================================
   KEY METRICS CUSTOMIZATIONS
   ========================================== */

.key-metrics-container .metrics-grid,
.key-metrics-container .metrics-grid .metric-item {
    border-color: var(--color-border) !important;
}

.key-metrics-container .metrics-grid {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.key-metrics-container .metrics-grid .metric-item {
    border-left: 1px solid var(--color-primary);
}

.key-metrics-container .metrics-grid .metric-item:first-child {
    border-left: 0;
}

@media (width <=991px) {
    .key-metrics-container .metrics-grid,
    .key-metrics-container .metrics-grid .metric-item {
        border: 0 !important;
    }
}

/* NOTE: Testimonial styles moved to blocks/testimonial/style.css */

/* ==========================================
   TEAM MEMBER GRID CUSTOMIZATIONS
   ========================================== */

/* 1. Section header - remove max-width */
.team-member-grid-wrapper .section-header {
    max-width: none;
}

/* 3, 4, 5. Team member card - remove border, add padding, set background */
.team-member-card {
    box-shadow: none;
    border: none;
    background-color: var(--wp--preset--color--sea-foam-10);
    padding: var(--wp--preset--spacing--md);
}

/* 6. Team member name - h4 styling */
.team-member-name,
.team-member-card .team-member-name.h5,
.team-member-name.h5 {
    font-size: var(--wp--preset--font-size--h-4);
    line-height: var(--line-height-heading);
    color: var(--color-heading);
}

/* 7. Team member title - standard text size and sea blue color */
.team-member-title {
    font-size: var(--wp--preset--font-size--body);
    color: var(--wp--preset--color--sea-blue);
}

/* 8. Team member content - remove min-height and side/bottom padding */
.team-member-content {
    min-height: 0; /* Override plugin's min-height: 200px */
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
}

.grid-cols-4 .team-member-card .btn-arrow {
    font-size: 98%;
}


/* Card Customizations */

/* Uncomment to apply custom card styling that integrates with theme customization system */

/* .card {
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
} */

/* Navigation Customizations */

header {
    background-color: var(--color-white);
    border-bottom: 2px solid var(--wp--preset--color--teal-20);
}

/* ==========================================
   TEMPLATE-SPECIFIC OVERRIDES
   ========================================== */

.card-action,
.card-date {
    color: var(--color-text-primary);
}

.card-date-banner {
    color: var(--color-heading);
}

.card-date-banner .date-icon {
    display: block;
}

.card-action.btn-arrow svg { display: none; }

.card-date-banner::before,
.card-date-banner::after {
  display: none;
}

.dynamic-archive-filters { padding-top: 0; }

.dynamic-archive-filters .filter-buttons {
    justify-content: center;
}

.dynamic-archive-grid-wrapper article.card,
.dynamic-archive-grid-wrapper article .card-body {
    background: var(--wp--preset--color--teal-10);
    border: 1px solid var(--color-border-light);
}

.dynamic-archive-grid-wrapper article .card-image,
.dynamic-archive-grid-wrapper article .card-media img {
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.card--events .card-date-banner .date-icon {
    margin-top: -4px;
}

.card--events .card-date-banner .date-full,
.dynamic-archive-grid-wrapper .card__date {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-small);
}

.dynamic-archive-filters .filter-buttons button.filter-button {
    border: 2px solid var(--color-border);
    color: var(--color-heading);
    background: var(--color-white);
}

/* Active/Pressed state */
.dynamic-archive-filters .filter-button:hover,
.dynamic-archive-filters .filter-button:focus,
.dynamic-archive-filters .filter-button:hover:not([aria-pressed="true"], .active),
.dynamic-archive-filters .filter-buttons .filter-button[aria-pressed="true"],
.dynamic-archive-filters .filter-buttons .filter-button.active {
    background-color: var(--color-heading);
    color: var(--color-white);
    border-color: var(--color-heading);
}

/* NOTE: Prefooter CTA styles moved to blocks/prefooter-cta/style.css */

/* ==========================================
   CLIENT-SPECIFIC FEATURES
   ========================================== */

/* Custom components unique to this client */

/* .client-custom-banner {
    // Client-specific banner styles
} */

/* ==========================================
   RESPONSIVE OVERRIDES
   ========================================== */

/* Mobile Customizations */

@media (width <= 768px) {
    /* 1. Center hero title on mobile */
    .hero .hero-content h1,
    .hero .hero-content .hero-title {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* 2. Add spacing between stacked hero images */
    .hero .hero-images {
        gap: var(--space-lg);
    }

    /* 3. Stack image content bands - image always on bottom */
    .two-column-content,
    .two-column-alternating,
    .image-content-layout {
        display: flex !important;
        flex-direction: column !important;
    }

    .two-column-content .content-column,
    .two-column-content .image-column,
    .two-column-alternating .content-column,
    .two-column-alternating .image-column,
    .image-content-layout .layout-content-column,
    .image-content-layout .layout-image-column {
        width: 100% !important;
        order: unset !important;
    }

    .two-column-content .image-column,
    .two-column-alternating .image-column,
    .image-content-layout .layout-image-column {
        order: 2 !important;
    }

    .two-column-content .content-column,
    .two-column-alternating .content-column,
    .image-content-layout .layout-content-column {
        order: 1 !important;
    }

    /* Remove footer wave pseudo element and margin on mobile */
    .footer::before {
        display: none;
    }

    .footer {
        /* Use negative margin to fix subpixel rendering gap between last block and footer */
        margin-top: -2px;
    }

    /* Remove extra wave-clearance padding on mobile (wave is hidden)
     * Also remove margin-bottom to prevent white gap between last block and footer */
    main > .entry-content > section:last-child,
    main > .entry-content > div:last-child,
    main > section:last-child,
    main > div:last-child:not(.entry-content) {
        padding-bottom: var(--space-2xl) !important;
        margin-bottom: 0 !important;
    }

    main > .entry-content > .section-padding-xl:last-child,
    main > .entry-content > .section-padding-2xl:last-child,
    main > .entry-content > .section-padding-3xl:last-child {
        padding-bottom: var(--space-3xl) !important;
        margin-bottom: 0 !important;
    }

    .dynamic-archive-grid-wrapper:last-child .grid-container {
        padding-bottom: var(--space-3xl) !important;
    }

    /* Remove footer column custom sizing on mobile */
    .footer-main .wp-block-column.footer-column:first-child {
        flex-basis: auto;
        margin-right: 0;
    }

    /* Hide dividers on mobile */
    .legal-links .divider,
    .footer-bottom .divider {
        display: none;
    }

    /* Footer main - stack columns on mobile */
    .footer-main.wp-block-columns {
        display: flex !important;
        flex-flow: column !important;
        gap: var(--space-lg) !important;
    }

    /* Remove auto margin on second column for mobile */
    .footer-main.wp-block-columns > .wp-block-column:nth-child(2) {
        margin-left: 0 !important;
    }

    /* Footer columns - consistent spacing */
    .footer-main .footer-column {
        margin-bottom: 0;
    }

    /* Footer bottom - stack and center on mobile */
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }

    .footer-bottom > .wp-block-group {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0;
    }

    /* Copyright section - center on mobile */
    .footer .copyright {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Legal links - center on mobile */
    .legal-links nav {
        justify-content: center;
    }

    /* Social icons - horizontal row centered */
    .footer .footer-social {
        justify-content: center !important;
    }

    /* Stack and left-align section headers */
    .section-header.section-header--left,
    .featured-posts-carousel .section-header--left {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left;
    }

    .section-header.section-header--left .section-header__title,
    .featured-posts-carousel .section-header__title {
        width: 100%;
    }

    .section-header.section-header--left .section-header__cta,
    .featured-posts-carousel .section-header__cta {
        width: 100%;
    }

    /* Add side margins to recent posts block on mobile */
    .featured-recent-posts-wrapper {
        margin-left: var(--space-xl) !important;
        margin-right: var(--space-xl) !important;
    }
}

/* Featured recent posts - remove card background, border, and border radius */
.featured-recent-posts-wrapper .card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Featured recent posts - add border radius to card images */
.featured-recent-posts-wrapper .card-media {
    border-radius: var(--radius-card);
}

/* Featured recent posts - section header inline layout */
.featured-recent-posts-wrapper .section-header,
.featured-recent-posts-wrapper .section-header--left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-bottom: 0;
    margin-bottom: var(--space-lg);
}

.featured-recent-posts-wrapper .section-header__title {
    flex: 1 1 auto;
    margin: 0;
}

.featured-recent-posts-wrapper .section-header__cta {
    flex: 0 0 auto;
}

/* Featured recent posts - CTA text link styling */
.featured-recent-posts-wrapper .section-header__cta .text-link-arrow {
    color: var(--link-arrow-color);
}

/* Featured recent posts - hide category badge */
.featured-recent-posts-wrapper .badge.badge-pill {
    display: none;
}

/* Featured recent posts - card title styling */
.featured-recent-posts-wrapper .post-title,
.featured-recent-posts-wrapper .card-title {
    font-size: var(--font-size-h4);
    font-weight: 300;
}

/* Featured recent posts - hide card CTA */
.featured-recent-posts-wrapper .card-action,
.featured-recent-posts-wrapper .card-link {
    display: none;
}

/* Featured recent posts - remove hover animations */
.featured-recent-posts-wrapper .card,
.featured-recent-posts-wrapper .post-card {
    transform: none !important;
    transition: none !important;
    text-decoration: none;
}

.featured-recent-posts-wrapper .card:hover,
.featured-recent-posts-wrapper .post-card:hover {
    transform: none !important;
}

/* Featured recent posts - remove left/right padding on card body */
.featured-recent-posts-wrapper .card-body {
    padding-left: 0;
    padding-right: 0;
}

@media (width <= 768px) {
    /* Change all margins to padding on mobile */
    .featured-recent-posts-wrapper {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-top: var(--space-3xl);
        padding-bottom: var(--space-3xl);
        padding-left: var(--space-xl);
        padding-right: var(--space-xl);
    }

    /* Remove container padding on mobile */
    .featured-recent-posts-wrapper .container {
        padding: 0;
    }

    /* Stack section header on mobile */
    .featured-recent-posts-wrapper .section-header--left {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Reduce hero H1 size on mobile */
    .hero-content h1 {
        font-size: var(--font-size-h2);
    }
}

/* ==========================================
   GRID SYSTEM OVERRIDES
   ========================================== */

/**
 * Two Column Content Grid - Gap Override
 *
 * Override the large row-gap-2xl utility class gap for two-column content grids.
 * Use the CSS variable --row-gap instead for consistent spacing.
 */
.row.two-column-content__grid.row-gap-2xl {
    gap: var(--row-gap) !important;
}

/**
 * Two Column Content - Layout Fix
 *
 * section-padding-3xl adds padding-left/right to the section AND the inner
 * .container also has padding-left/right — resulting in 96px double-padding
 * on each side. Strip horizontal padding from the section so only the
 * .container's own padding and max-width control the inset.
 */
.two-column-content {
    padding-left: 0;
    padding-right: 0;
}

/**
 * Two Column Content Grid - Overflow & Containment Fix
 *
 * Prevents WYSIWYG content (tables, images, embeds) inside columns from
 * escaping the grid bounds, which causes horizontal scrollbars and makes
 * the block appear off-center / wider than its container.
 */
.two-column-content .row.two-column-content__grid {
    overflow: clip;
}

.two-column-content .row.two-column-content__grid > * {
    min-width: 0;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

/* Client-specific utility classes */

/* Text Link with Arrow - Reusable Component */
.text-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--link-arrow-color);
    font-family: "Mozaic GEO Variable", var(--font-family-body);
    font-size: var(--link-arrow-font-size);
    font-style: normal;
    font-weight: 300;
    line-height: var(--link-arrow-line-height);
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.text-link-arrow::after {
    content: "";
    display: inline-block;
    width: 23px;
    height: 19px;
    background-image: url("../../svg/arrow-right.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform var(--transition-base);
}

.text-link-arrow:hover,
.text-link-arrow:focus {
    opacity: 0.8;
}

.text-link-arrow:hover::after,
.text-link-arrow:focus::after {
    transform: translateX(4px);
}

/* Link Box Utility - Bold Primary Links with No Underline */
.link-box a {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
}

/* ==========================================
   ENTRANCE ANIMATIONS
   ========================================== */

/**
 * Simple Slide-Up Animation Utility
 *
 * Applies a fade-in with upward slide animation to any element.
 * Respects user motion preferences for accessibility.
 *
 * Usage: Add .animate-slide-up class to any block or element
 * Example: <div class="wp-block-group animate-slide-up">Content</div>
 *
 * Animation properties:
 * - Duration: 0.5s (standard for entrance animations)
 * - Easing: ease-out (natural deceleration)
 * - Distance: 20px upward movement
 * - Opacity: 0 to 1
 *
 * @since 1.0.8
 */

@keyframes slide-up-fade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slide-up-fade 0.5s ease-out;
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-slide-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/**
 * Preserve Block Padding Override
 *
 * Prevents flexible content area from removing padding on first/last child blocks.
 * Add this class via "Additional CSS class" in block settings when a block needs
 * to maintain its padding inside a flexible content area.
 *
 * Usage: Add class "preserve-block-padding" to any block
 */
.flexible-content-area-block .flexible-content-wrapper > .acf-block.preserve-block-padding:first-child,
.flexible-content-area-block .flexible-content-wrapper > :first-child .acf-block.preserve-block-padding {
    padding-top: var(--space-xl) !important;
}

.flexible-content-area-block .flexible-content-wrapper > .acf-block.preserve-block-padding:last-child,
.flexible-content-area-block .flexible-content-wrapper > :last-child .acf-block.preserve-block-padding {
    padding-bottom: var(--space-xl) !important;
}

/* Override plugin default gap (--space-xl) to reduce spacing between nested blocks */
.flexible-content-wrapper {
    gap: var(--space-lg);
}

/**
 * Flexible Content Area - Text Block Spacing Override
 *
 * The plugin's TEXT BLOCK SPACING rules use calc(-1 * var(--space-xl)) for negative margins,
 * but this child theme overrides the gap to var(--space-lg). Since --space-xl > --space-lg,
 * the plugin's negative margins are too aggressive and cause paragraphs to overlap.
 *
 * These rules recalculate the negative margins to use --space-lg instead of --space-xl,
 * ensuring proper spacing between consecutive text blocks.
 */

/* TIER 1: No gap - consecutive same-type elements use their natural margins */
.flexible-content-wrapper > :is(p, .wp-block-paragraph) + :is(p, .wp-block-paragraph),
.flexible-content-wrapper > :is(ul, ol, .wp-block-list) + :is(ul, ol, .wp-block-list),
.flexible-content-wrapper > :is(p, .wp-block-paragraph) + :is(ul, ol, .wp-block-list) {
    margin-top: calc(-1 * var(--space-lg));
}

/* TIER 2: Minimal gap (--space-xs) - tightly connected content */
.flexible-content-wrapper > :is(h1, h2, h3, h4, h5, h6, .wp-block-heading) + :is(
    p, .wp-block-paragraph,
    ul, ol, .wp-block-list,
    blockquote, .wp-block-quote, .wp-block-pullquote,
    .wp-block-post-content
),
.flexible-content-wrapper > :is(ul, ol, .wp-block-list) + :is(p, .wp-block-paragraph),
.flexible-content-wrapper > .wp-block-details + .wp-block-details {
    margin-top: calc(-1 * var(--space-lg) + var(--space-xs));
}

/* TIER 3: Small gap (--space-sm) - related content with slight separation */
.flexible-content-wrapper > :is(p, .wp-block-paragraph) + :is(
    blockquote, .wp-block-quote, .wp-block-pullquote,
    .wp-block-button, .wp-block-buttons,
    .wp-block-details,
    pre, .wp-block-code, .wp-block-preformatted,
    .wp-block-table
),
.flexible-content-wrapper > :is(blockquote, .wp-block-quote, .wp-block-pullquote) + :is(
    p, .wp-block-paragraph,
    ul, ol, .wp-block-list,
    .wp-block-button, .wp-block-buttons
),
.flexible-content-wrapper > :is(pre, .wp-block-code, .wp-block-preformatted) + :is(p, .wp-block-paragraph),
.flexible-content-wrapper > :is(ul, ol, .wp-block-list) + :is(blockquote, .wp-block-quote, .wp-block-pullquote, .wp-block-button, .wp-block-buttons) {
    margin-top: calc(-1 * var(--space-lg) + var(--space-sm));
}

/* TIER 4: Medium gap (--space-md) - section transitions */
.flexible-content-wrapper > :is(blockquote, .wp-block-quote, .wp-block-pullquote) + :is(h1, h2, h3, h4, h5, h6, .wp-block-heading),
.flexible-content-wrapper > :is(.wp-block-button, .wp-block-buttons) + :is(p, .wp-block-paragraph, ul, ol, .wp-block-list, h1, h2, h3, h4, h5, h6, .wp-block-heading),
.flexible-content-wrapper > :is(p, .wp-block-paragraph, ul, ol, .wp-block-list, blockquote, .wp-block-quote, .wp-block-pullquote, h1, h2, h3, h4, h5, h6, .wp-block-heading) + .wp-block-separator,
.flexible-content-wrapper > .wp-block-separator + :is(p, .wp-block-paragraph, ul, ol, .wp-block-list, h1, h2, h3, h4, h5, h6, .wp-block-heading),
.flexible-content-wrapper > .wp-block-table + :is(p, .wp-block-paragraph) {
    margin-top: calc(-1 * var(--space-lg) + var(--space-md));
}

/**
 * Flexible Content Area - Paragraph Balance
 *
 * Apply text-wrap: balance to paragraphs inside flexible content areas
 * for more visually even line lengths, especially on centered text.
 */
.flexible-content-wrapper > p {
    text-wrap: balance;
}

/**
 * Flexible Content Area - Columns Padding Override (Tablet/Mobile)
 *
 * Ensures consistent left/right padding on columns blocks within flexible
 * content areas on smaller screens. Overrides default WordPress block styling.
 */
@media (width <= 1024px) {
    .flexible-content-area-block .wp-block-columns {
        padding-left: var(--space-lg) !important;
        padding-right: var(--space-lg) !important;
    }
}

@media (width <= 768px) {
    .flexible-content-area-block .wp-block-columns {
        gap: 0 !important;
    }
}

/* NOTE: Hero block boxed container styles moved to blocks/hero/style.css */

/* NOTE: Icon & Text Grid styles moved to blocks/icon-text-box-grid/style.css */

/* ==========================================
   TABBED CONTENT BLOCK
   ========================================== */

/* 2. Separate tab navigation from tab panels + 3. Remove white background */
.tabbed-content .tab-navigation {
    margin-bottom: var(--wp--preset--spacing--lg);
    background: transparent;
    border: none; /* 8. Remove borders */
}

/* Dark Background Support
 * Tab buttons need light text when section has dark background
 * Tab navigation and panels have their own backgrounds, so only the
 * tab button text needs adaptation for the transparent navigation bar */
[data-section-dark-bg="true"] .tabbed-content .tab-button {
    color: var(--color-text-light);
}

[data-section-dark-bg="true"] .tabbed-content .tab-button:hover,
[data-section-dark-bg="true"] .tabbed-content .tab-button.active {
    color: var(--wp--preset--color--sea-foam-20);
}

[data-section-dark-bg="true"] .tabbed-content .tab-button:hover::after,
[data-section-dark-bg="true"] .tabbed-content .tab-button.active::after {
    background: var(--wp--preset--color--sea-foam-20);
}

/* Section header on dark backgrounds */
[data-section-dark-bg="true"] .tabbed-content .section-header .section-title,
[data-section-dark-bg="true"] .tabbed-content .section-header .section-subtitle {
    color: var(--color-text-light);
}

/* 4. Tab button styling - h5 with sea blue text + 5. Remove backgrounds */
.tabbed-content .tab-button {
    font-size: var(--wp--preset--font-size--h-5);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-heading);
    color: var(--wp--preset--color--sea-blue);
    position: relative;
    padding-bottom: calc(var(--wp--preset--spacing--lg) + 0.5rem); /* Extra space for underline */
    background: transparent; /* Remove all background colors */
    border: none; /* 8. Remove borders */
    border-right: none;
    border-bottom: none;
}

/* 4a. Animated underline on hover/active - fills from left */
.tabbed-content .tab-button::after {
    content: '';
    position: absolute;
    bottom: calc(var(--wp--preset--spacing--md) - 2px); /* Space from bottom of text */
    left: var(--wp--preset--spacing--xl);
    right: var(--wp--preset--spacing--xl);
    height: 2px;
    background-color: var(--wp--preset--color--sea-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tabbed-content .tab-button:hover::after,
.tabbed-content .tab-button.active::after {
    transform: scaleX(1);
}

.tabbed-content .tab-button:hover,
.tabbed-content .tab-button.active {
    background: transparent; /* Remove background on hover/active */
}

/* 7. Make image smaller - doesn't need to fill column */
.tabbed-content .tab-image {
    position: relative; /* Keep existing positioning for gradient */
    max-width: 400px;
    margin: 0 auto;
    height: auto; /* Remove height: 100% */
}

/* 6. Remove tab-image::before element */
.tabbed-content .tab-image::before {
    display: none; /* Remove gradient overlay */
}

.tabbed-content .tab-image-img {
    position: relative;
    z-index: 0;
}

/* 8. Remove borders from panels */
.tabbed-content .tab-panels,
.tabbed-content .tab-panel-content {
    border: none;
    border-radius: 14px;
}

/* ==========================================
   CALL-TO-ACTION BANNER BLOCK
   ========================================== */

/* ==========================================
   TIMELINE / OUR HISTORY BLOCK
   ========================================== */
.timeline-card {
    border-color: var(--color-border);
}

.timeline-description p strong {
    color: var(--color-primary);
}

/* ==========================================
   TWO-COLUMN CONTENT BLOCK
   ========================================== */

.two-column-content__content a {
    font-weight: 700;
    text-decoration: none;
}

/* ==========================================
   GUTENBERG OUTLINE BUTTON - GRADIENT BORDER
   ========================================== */

/*
 * Apply gradient border effect to Gutenberg Outline style buttons
 * Matches the secondary button gradient border implementation
 * Uses mask compositing technique for gradient borders
 *
 * Note: This overrides parent theme's outline button hover behavior
 * to properly work with gradient borders
 */

/* Button group gap */
.wp-block-buttons {
    gap: var(--space-sm);
}

/* Outline button style - Simple solid border matching theme btn-outline-dark */
.wp-block-button.is-style-outline .wp-element-button,
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-buttons .wp-block-button.is-style-outline .wp-element-button,
.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    color: var(--color-text-primary) !important;
    border: 2px solid var(--btn-secondary-border-color) !important;
    transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

/* Hover, focus, and active states - Fill background with dark border color */
.wp-block-button.is-style-outline .wp-element-button:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-element-button:focus,
.wp-block-button.is-style-outline .wp-block-button__link:focus,
.wp-block-button.is-style-outline .wp-element-button:active,
.wp-block-button.is-style-outline .wp-block-button__link:active,
.wp-block-buttons .wp-block-button.is-style-outline .wp-element-button:hover,
.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-buttons .wp-block-button.is-style-outline .wp-element-button:focus,
.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link:focus,
.wp-block-buttons .wp-block-button.is-style-outline .wp-element-button:active,
.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link:active {
    background-color: var(--btn-secondary-border-color) !important;
    border-color: var(--btn-secondary-border-color) !important;
    color: var(--color-white) !important;
}

/* ==========================================
   PAGINATION CUSTOMIZATIONS
   ========================================== */

/* Override parent theme pagination colors with gradient styling */

/* Pagination spacing inside grid-container - add margin for footer wave clearance */
.grid-container .pagination.archive-pagination {
    margin-bottom: var(--space-3xl);
}

/* All page number links - apply gradient */
.pagination a.page-numbers {
    border: none;
    background: var(--color-white);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.pagination a.page-numbers:not(.next, .prev) {
    background-image: var(--wp--preset--gradient--ocean-blue);
}

.pagination a.page-numbers,
.pagination span.page-numbers {
    border-radius: 6px;
}

/* Gradient border using pseudo-element mask technique (preserves border-radius) */
.pagination a.page-numbers::before {
    background: var(--wp--preset--gradient--ocean-blue);
    -webkit-mask:
        linear-gradient(#ffffff 0 0) content-box,
        linear-gradient(#ffffff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    border-radius: 6px;
}

/* Hover state for ALL links - gradient background with white text */
.pagination a.page-numbers:hover,
.pagination a.page-numbers:focus {
    background: var(--wp--preset--gradient--ocean-blue);
    color: var(--color-white);
    border-color: transparent;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
}

/* Current page - gradient background with white text */
.pagination a.page-numbers:hover,
.pagination a.page-numbers:focus,
.pagination .page-numbers.current {
    background: var(--wp--preset--gradient--ocean-blue);
    color: var(--color-white);
    border: 2px solid var(--color-white);
    border-color: var(--color-white);
}

.pagination .page-numbers.current {
    border-radius: 6px;
}

/* Disabled prev/next arrows - border color override */
.pagination .page-numbers.prev.disabled,
.pagination .page-numbers.next.disabled {
    border-color: var(--color-primary);
}

/* ==========================================
   LAST BLOCK BEFORE FOOTER
   ========================================== */

.post-meta__metadata {
    border-top: 1px solid #9386bf47;
    border-bottom: 1px solid #9386bf47;
    max-width: fit-content;
    padding: var(--space-sm) 0;
}

.archive-meta__date, .post-meta__author, .archive-meta__read-time, .post-meta__date, .post-meta__read-time {
    color: var(--color-text-tertiary);
}

.post-meta__metadata svg {
    color: var(--color-heading);
}

/* ==========================================
   SINGLE POST TEMPLATE - CONSTRAINED WIDTH
   ========================================== */

/* Single Post Content Bottom Spacing
 * Ensures flexible content area has consistent bottom margin on all single templates
 * Accounts for optional blocks (author, CTA) that may or may not be present
 * Provides predictable spacing from content to following sections */
.single .flexible-content-area-block {
    margin-bottom: var(--wp--preset--spacing--xl);
}

/* Allow blocks to break out to full/wide widths when explicitly set */
.single .wp-block-post-content .alignwide {
    max-width: var(--container-lg);
}

.single .wp-block-post-content .alignfull {
    max-width: 100%;
}

.wp-block-post-content img {
    border-radius: var(--radius-card);
}

/* In-content text links - use heading color for better visibility */
.wp-block-post-content p a,
.wp-block-post-content li a,
.entry-content p a,
.entry-content li a {
    color: var(--color-heading);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-normal);
}

.wp-block-post-content p a:hover,
.wp-block-post-content p a:focus,
.wp-block-post-content li a:hover,
.wp-block-post-content li a:focus,
.entry-content p a:hover,
.entry-content p a:focus,
.entry-content li a:hover,
.entry-content li a:focus {
    color: var(--color-primary);
}

/* Standalone arrow links in WYSIWYG blocks — reuses icb__link-list-link
   and icb__link-list-arrow classes from image-content-block.
   Overrides global in-content link styles (underline, hover color). */
.wp-block-post-content .wysiwyg-standalone-link a,
.wp-block-post-content .wysiwyg-standalone-link a:hover,
.wp-block-post-content .wysiwyg-standalone-link a:focus,
.entry-content .wysiwyg-standalone-link a,
.entry-content .wysiwyg-standalone-link a:hover,
.entry-content .wysiwyg-standalone-link a:focus {
    color: var(--link-arrow-color);
    text-decoration: none;
}

.single .post-meta {
    max-width: 1064px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

.single h1.post-meta__title {
    font-size: var(--font-size-h2);
}

.single .entry-content h2 {
    font-size: var(--font-size-h3);
}

.single .entry-content h3 {
    font-size: var(--font-size-h4);
}

.single .entry-content h4 {
    font-size: var(--font-size-h5);
}

.single .entry-content h5 {
    font-size: var(--font-size-h6);
}

.single .post-meta__excerpt {
    font-weight: var(--font-weight-bold);
    line-height: 1.4em;
}

/* Featured image within constrained container - break out to regular container width */
.single .post-meta__featured-image {
    /* Calculate the negative margin needed to expand from container-content (1064px) to container (1280px) Difference is 216px total, so 108px on each side */
    margin-left: -108px;
    margin-right: -108px;
    width: calc(100% + 216px);
    max-width: var(--max-width-content-2xl);
}

/* At tablet and smaller, account for container-content padding */
@media (width <=1280px) {
    .single .post-meta {
        padding-left: var(--space-xl);
        padding-right: var(--space-xl);
    }

    .single .post-meta__featured-image {
        /* Expand to full width minus container-content padding (--space-xl) */
        margin-left: calc(-1 * var(--space-xl));
        margin-right: calc(-1 * var(--space-xl));
        width: calc(100% + (2 * var(--space-xl)));
    }
}

@media (width <=768px) {
    .single .post-meta {
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }

    .single .post-meta__featured-image {
        /* Expand to full width minus container-content padding (--space-lg) */
        margin-left: calc(-1 * var(--space-lg));
        margin-right: calc(-1 * var(--space-lg));
        width: calc(100% + (2 * var(--space-lg)));
    }
}

@media (width <=480px) {
    .single .post-meta {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .single .post-meta__featured-image {
        /* Expand to full width minus container-content padding (--space-md) */
        margin-left: calc(-1 * var(--space-md));
        margin-right: calc(-1 * var(--space-md));
        width: calc(100% + (2 * var(--space-md)));
    }
}

/* ==========================================================================
   Mobile Spacing Reset - Prevents Oversized Block Spacing
   ========================================================================== */

/*
 * Automatically reduces block padding/margin on mobile viewports to prevent
 * horizontal overflow and cramped layouts. Uses !important to override
 * WordPress block editor inline styles.
 *
 * To disable for specific blocks, add class: no-mobile-spacing-reset
 */

@media (width <= 768px) {
    /* Target all block wrappers (excluding header and footer) */
    main .wp-block:not(.no-mobile-spacing-reset),
    main .wp-block-group:not(.no-mobile-spacing-reset),
    main .wp-block-cover:not(.no-mobile-spacing-reset),
    main .wp-block-columns:not(.no-mobile-spacing-reset),
    main .wp-block-column:not(.no-mobile-spacing-reset),
    main .acf-block-component:not(.no-mobile-spacing-reset),
    main [class*="wp-block-acf"]:not(.no-mobile-spacing-reset) {
        /* Vertical padding at xl spacing */
        padding-top: var(--space-xl) !important;
        padding-bottom: var(--space-xl) !important;

        /* Cap horizontal padding at 1rem (16px) */
        padding-left: min(var(--space-md), 1rem) !important;
        padding-right: min(var(--space-md), 1rem) !important;

        /* Cap vertical margins at 2rem (32px) */
        margin-top: min(var(--space-lg), 2rem) !important;
        margin-bottom: min(var(--space-lg), 2rem) !important;
    }

    /* Exceptions: Blocks that should maintain custom spacing on mobile */
    .hero-block,
    .full-width-banner,
    .no-mobile-spacing-reset {
        padding: unset !important;
        margin: unset !important;
    }

    /* Remove top margin on hero blocks specifically */
    main .wp-block-acf-hero,
    main [class*="wp-block-acf"].hero {
        margin-top: 0 !important;
    }
}

/* Very small phones (480px and below) - More aggressive reduction */
@media (width <= 480px) {
    main .wp-block:not(.no-mobile-spacing-reset),
    main .acf-block-component:not(.no-mobile-spacing-reset) {
        padding-top: min(var(--space-md), 1rem) !important;
        padding-bottom: min(var(--space-md), 1rem) !important;
        padding-left: min(var(--space-sm), 0.5rem) !important;
        padding-right: min(var(--space-sm), 0.5rem) !important;
    }
}

/* ==========================================================================
   Three Column Text - Mobile Spacing
   ========================================================================== */

/* Remove top/bottom margin and padding on mobile for three-column-text columns */
@media (width <= 768px) {
    .three-column-text .wp-block-columns .wp-block-column {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* ==========================================================================
   Video Showcase Block
   ========================================================================== */

/* Set video description text to standard text color when section has no text color set */
section:not(.has-text-color) .video-description {
    color: var(--color-text-primary);
}

/*
 * Fixes container overflow caused by excessive gap spacing on desktop.
 * Plugin uses gap: var(--space-3xl) (101-144px) which causes the
 * .row.video-showcase-content to overflow the 1280px container.
 * This override reduces the gap to var(--space-xl) (43-72px).
 */

/* Desktop: Reduce gap to prevent overflow */
@media (width > 1024px) {
    .video-placement-vidleft .video-showcase-content,
    .video-placement-vidright .video-showcase-content {
        column-gap: var(--space-lg); /* 43-72px instead of 101-144px */
        align-items: center; /* Vertically center content */
    }

    /* Set video column to 7 columns */
    .video-placement-vidleft .video-column,
    .video-placement-vidright .video-column {
        grid-column: span 6;
        align-self: center; /* Vertically center video with text column */
    }

    /* Set text content to 5 columns and vertically center */
    .video-placement-vidleft .video-text-content,
    .video-placement-vidright .video-text-content {
        grid-column: span 6;
        align-self: center;
    }

    /* Remove bottom margin from section header */
    .video-showcase-content .section-header {
        margin-bottom: 0;
    }
}

/* Custom play button overlay - use theme SVG asset */
.video-wrapper::before {
    background-image: url('/wp-content/themes/3mw-core-child/assets/svg/play-button.svg');
}

/* Tablet: Keep existing reduced gap (already correct in plugin) */
@media (width <= 1024px) {
    .video-placement-vidleft .video-showcase-content,
    .video-placement-vidright .video-showcase-content {
        gap: var(--space-lg); /* 16-32px - plugin already uses this */
    }
}

/**
 * Fix Video Showcase block positioning conflicts
 * The image-content-block sets .video-embed-container and .video-preview-image
 * to position: absolute, which breaks the Video Showcase block display.
 */

/* Fix iframe container positioning */
.video-showcase .video-embed-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lg);
}

.video-showcase .video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-card);
}

.video-placement-vidbelow .video-embed-container {
    max-height: 600px;
}

/* Fix preview image positioning */
.video-showcase .video-preview-image {
    position: relative;
}

/* Video note styling for below content placement */
.video-placement-vidbelow .video-note {
    color: var(--wp--preset--color--sea-blue);
    font-size: var(--font-size-h5);
}

/* Hero Subtitle Balance */
.hero-subtitle {
    text-wrap: balance;
}

/* ==========================================================================
   LOGO VISIBILITY CONTROL - Vertical Logo Swap System
   ========================================================================== */

/**
 * Logo swap system based on actual scrolling (not just sticky state).
 * - Desktop initially: Show vertical logo (even if header is sticky)
 * - Desktop after scroll: Show standard horizontal logo
 * - Mobile: Always show standard logo
 *
 * JavaScript (frontend-child.js) adds .has-scrolled class to body after user
 * scrolls >50px, which triggers the logo swap via CSS opacity crossfade.
 *
 * Both logos are stacked (position absolute) so the swap is a smooth
 * opacity crossfade with no layout shift.
 *
 * Parent theme's sticky header animation is disabled to prevent menu flicker.
 */

/* Disable sticky header animation on page load to prevent flicker */
header.wp-block-template-part.is-stuck {
    animation: none !important;
}

/* Desktop: Stack logos and crossfade */
@media (width > 768px) {
    /* Wrapper becomes positioning context sized by vertical logo */
    .custom-site-logo-wrapper {
        position: relative;
        overflow: hidden;
        max-height: 100px;
        transition: max-height 0.3s ease;
    }

    /* Both logos get transition */
    .custom-site-logo-wrapper img.custom-site-logo.logo-standard,
    .custom-site-logo-wrapper img.custom-site-logo.logo-vertical {
        transition: opacity 0.3s ease;
    }

    /* Standard logo: stacked on top, hidden by default */
    .custom-site-logo-wrapper img.custom-site-logo.logo-standard {
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        height: 52.5px;
        max-width: 225px;
        width: auto;
        opacity: 0;
        pointer-events: none;
    }

    /* Vertical logo: in-flow (sets wrapper size), visible by default */
    .custom-site-logo-wrapper img.custom-site-logo.logo-vertical {
        position: relative;
        height: auto !important; /* Override parent theme */
        max-height: 100px;
        width: auto;
        opacity: 1;
    }

    /* After scroll: crossfade to standard logo */
    body.has-scrolled .custom-site-logo-wrapper img.custom-site-logo.logo-standard {
        opacity: 1;
        pointer-events: auto;
    }

    body.has-scrolled .custom-site-logo-wrapper img.custom-site-logo.logo-vertical {
        opacity: 0;
        pointer-events: none;
    }

    /* Collapse wrapper height to match smaller standard logo after scroll */
    body.has-scrolled .custom-site-logo-wrapper {
        max-height: 52.5px;
        width: 100%;
        max-width: 225px;
    }

    /* Shrink header padding to match smaller logo after scroll */
    body.has-scrolled header .site-header .header {
        padding-top: var(--space-lg);
        padding-bottom: var(--space-lg);
        transition: padding 0.3s ease;
    }
}

/* Medium desktop: 1200px–1500px */
@media (1200px < width <= 1500px) {
    header .site-header .header {
        gap: var(--space-md);
    }

    .nav-menu--desktop {
        gap: var(--space-md);
    }

    header.wp-block-template-part.is-stuck .header-buttons {
        gap: var(--space-sm);
    }

    .custom-site-logo-wrapper img.custom-site-logo.logo-standard,
    body.has-scrolled .custom-site-logo-wrapper {
        max-width: 200px;
    }
}

/* Narrow desktop: 1024px–1200px */
@media (1024px < width <= 1200px) {
    header .site-header .header {
        gap: var(--space-sm);
    }

    .nav-menu--desktop {
        gap: var(--space-md);
    }

    header.wp-block-template-part.is-stuck .header-buttons {
        gap: var(--space-sm);
    }

    .custom-site-logo-wrapper img.custom-site-logo.logo-standard,
    body.has-scrolled .custom-site-logo-wrapper {
        max-width: 185px;
    }
}

/* Mobile (768px and below): Always show standard logo, hide vertical logo */
@media (width <= 768px) {
    .custom-site-logo-wrapper img.custom-site-logo.logo-standard {
        display: inline-block;
    }

    .custom-site-logo-wrapper img.custom-site-logo.logo-vertical {
        display: none;
    }
}

/* Mobile Heading Fix - Ensure H4, H5, H6 never appear smaller than body text
 * On iPhone landscape and narrow viewports, fluid typography can make
 * smaller headings appear too small. This sets minimum sizes and adjusts weight. */
@media (width <= 896px) {
    h4, .h4 {
        font-size: max(1.25rem, var(--font-size-h4)) !important;
        font-weight: 400 !important;
    }

    h5, .h5 {
        font-size: max(1.125rem, var(--font-size-h5)) !important;
        font-weight: 400 !important;
    }

    h6, .h6 {
        font-size: max(1rem, var(--font-size-h6)) !important;
        font-weight: 400 !important;
    }
}

/* Case Study Sidebar CTA - Dark gradient overlay for text legibility
 * Improves contrast for white text over background images */
.case-sidebar-cta-block {
    position: relative;
}

.case-sidebar-cta-block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgb(0 0 0 / 60%) 0%,
        rgb(0 0 0 / 40%) 50%,
        rgb(0 0 0 / 70%) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.case-sidebar-cta-block > * {
    position: relative;
    z-index: 2;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

/* Remove gap between children on mobile only */
@media (width <= 768px) {
    .no-mobile-gap {
        gap: 0 !important;
    }
}
