/*
Default install styles for the FSM Foundation
Version: 5.0.0
Description: Framework styles for FSM Foundation websites
Author: Full Spectrum Marketing
Author URI: http://www.fsm.agency

DEVELOPER NOTES:
- #page-container selector is intentionally used for scoping to override Divi
  and WordPress core styles, ensuring proper specificity.
- Utility classes (.flex, .grid, .left, .right) are framework utilities available
  for use across the website.
*/

body {
    /* Font Smoothing */
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;

    /* Base Typography */
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;

    /* Rendering */
    text-rendering: optimizeLegibility; 

    /* Modern Text Control */
    text-wrap: pretty;
    
    /* Touch optimization */
    touch-action: manipulation; 
}

/* Fix Divi Theme Builder Header */
.et-l--header #main-header {
    padding: 0;
    z-index: 99999;
}

/*
 * Sticky header — Divi TB often sets Absolute + left:50% + translateX(-50%).
 * Force Fixed full-bleed; also reset inset/transform (see theme.css for higher-specificity copy).
 */
.et-l--header #main-header,
#main-header.et_pb_section--absolute,
#main-header.et_pb_section--fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    inset: 0 0 auto 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    transform: none !important;
}

/* Clear WP admin bar when logged in (.admin-bar is on body) */
body.admin-bar .et-l--header #main-header,
body.admin-bar #main-header.et_pb_section--absolute,
body.admin-bar #main-header.et_pb_section--fixed {
    top: 32px !important;
    inset: 32px 0 auto 0 !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .et-l--header #main-header,
    body.admin-bar #main-header.et_pb_section--absolute,
    body.admin-bar #main-header.et_pb_section--fixed {
        top: 46px !important;
        inset: 46px 0 auto 0 !important;
    }
}

/* Header row — Figma Header 2791:866: full-bleed, 32px inset; vertical pad owned in theme.css */
#main-header .et_menu_container.et_pb_row {
    max-width: none;
    width: 100%;
    padding-left: var(--space-card-lg); /* 32px */
    padding-right: var(--space-card-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.et_pb_row.et_menu_container::after {
    display: none;
}

#main-header>.et_menu_container>.et_pb_column {
    width: auto !important;
    margin: auto 0;
}

/* Figma Header 2791:866 Main Lockup ≈ 254×60 */
#main-header #logo {
    max-width: 254px;
    width: 254px;
}

#main-header #logo svg {
    display: block;
    width: 100%;
    height: auto;
}

#page-container #top-header > .et_pb_row {
    width: 90%;
    gap: 0;
}

#page-container #main-header {
    margin-top: 0;
} 

#page-container {
    overflow: hidden;
}

/* Remove Divi Bottom Bar */
#footer-bottom {
    display: none !important;
}

/* Basic Gravity Forms */

#page-container .gform_wrapper input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=image]):not([type=file]),
#page-container .gform_wrapper textarea.textarea,
#page-container div.form_saved_message div.form_saved_message_emailform form input[type=text] {
    border: 1px solid rgba(0, 0, 0, .5);
    font-size: 1em;
    padding: 1em 1em;
    min-height: auto;
    max-height: none;
    background: rgba(255, 255, 255, .5);
    border-radius: 5px;
}

#page-container .gform_wrapper label {
    font-size: 1em;
    line-height: 1em;
}

.gform_wrapper input[type=text]:focus,
.gform_wrapper input[type=search]:focus,
.gform_wrapper input[type=radio]:focus,
.gform_wrapper input[type=tel]:focus,
.gform_wrapper input[type=time]:focus,
.gform_wrapper input[type=url]:focus,
.gform_wrapper input[type=week]:focus,
.gform_wrapper input[type=password]:focus,
.gform_wrapper input[type=checkbox]:focus,
.gform_wrapper input[type=color]:focus,
.gform_wrapper input[type=date]:focus,
.gform_wrapper input[type=datetime]:focus,
.gform_wrapper input[type=datetime-local]:focus,
.gform_wrapper input[type=email]:focus,
.gform_wrapper input[type=month]:focus,
.gform_wrapper input[type=number]:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, .2);
}

body #page-container .et_pb_button,
body #page-container .gform_button {
    cursor: pointer;
}

/* Button colors/structure live in theme.css (Figma Button set).
   Keep only cursor + a light transition here so core does not fight theme. */
#page-container #main-content .et_pb_button,
#page-container .primary-btn {
    text-align: center;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

#page-container .primary-btn:active {
    transform: translateY(1px);
}

/* Responsive font sizes */

.et_divi_theme h1,
.et_divi_theme h2,
.et_divi_theme h3,
.et_divi_theme h4,
.et_divi_theme h5,
.et_divi_theme h6 {
    padding-bottom: 0;
    margin-bottom: .5rem;
}

/* Fix blurb max-width issue */

#page-container .et_pb_blurb {
    max-width: 100%;
}


/* Side-By-Side */
.side-by-side {
    display: flex;
    justify-content: center;
    margin-top: 3vh;

    a:first-child {
        margin-right: 1vh !important;
    }
}


@media only screen and (max-width:980px) {
    .side-by-side {
        flex-direction: column;
    }

    .side-by-side a:first-child {
        margin-right: 0 !important;
        margin-bottom: 1vh !important;
    }
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.left {
    text-align: left;
    align-items: flex-start;
}

.right {
    text-align: right;
    align-items: flex-end;

}

#page-container .et_pb_blurb_content {
    max-width: unset;
}

/* Divi 5: lock Video module aspect so flex stretch does not distort the box.
   Portrait overrides: .video-lightbox--portrait (lightbox) or future .offset-videos. */
#page-container .et_pb_video {
    aspect-ratio: 16 / 9;
}

#page-container .et_pb_video.video-lightbox--portrait,
#page-container .et_pb_video.offset-videos,
#page-container .et_pb_video.offset-videos-left {
    aspect-ratio: 2 / 3;
}

/* Long unbroken strings (URLs) in content — scoped to main text only (not nav/buttons). */
#page-container #main-content .et_pb_text_inner,
#page-container #main-content .et_pb_post_content,
#page-container #main-content .entry-content {
    overflow-wrap: anywhere;
}

/* --- .mobile-slider (opt-in column/section/row/group → Swiper on small viewports) ---
 * Nav chrome is shared with industries: .card-carousel__nav / __prev / __next
 * (FA Sharp arrows below slides). See theme.css card-carousel block.
 */
.mobile-slider.swiper {
    overflow: hidden;
    width: 100%;
    gap: 0 !important;
    padding-bottom: 0;
    /* Same net arrow gap as industries without scroller shadow pad */
    --carousel-shadow-pad: 0px;
    --carousel-nav-gap: 1.5rem; /* 24px — matches --space-card-md */
}

/* Nav is a sibling of .mobile-slider (JS places it after the Swiper root).
 * Default: full --carousel-nav-gap below the track (safe when parent is block
 * or a column whose gap ≠ --vertical-gap). Homepage section-level sliders
 * subtract section gap in theme.css so net stays 24px.
 */
.mobile-slider + .card-carousel__nav {
    --carousel-shadow-pad: 0px;
    --carousel-nav-gap: 1.5rem;
    margin-top: var(--carousel-nav-gap);
}

.mobile-slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
    box-sizing: content-box;
}

/*
 * Divi flex columns (.et_flex_column_*) default to flex-shrink + % widths.
 * That shrinks slides while Swiper still translates by full container width —
 * content jumps off-screen. Lock slide flex so inline widths stick.
 * height:auto lets JS equalize via min-height; stretch cards fill the slide.
 */
.mobile-slider.swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    max-width: none;
    display: flex;
    flex-direction: column;
}

.mobile-slider.swiper .swiper-slide > .card,
.mobile-slider.swiper .swiper-slide.card {
    flex: 1 1 auto;
    box-sizing: border-box;
}

.mobile-slider .swiper-pagination {
    display: none !important;
}

/*
 * Shared industries nav chrome (also in theme.css). Kept here so Swiper’s
 * absolute side-arrow defaults never win if theme load order shifts.
 * Nav is a sibling of .mobile-slider (see mobile-slider.js ensureChrome).
 */
.mobile-slider > .card-carousel__nav,
.mobile-slider + .card-carousel__nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding-inline: 0.5rem;
    position: relative;
    z-index: 1;
}

/* In-swiper nav (fallback) still needs its own top gap */
.mobile-slider > .card-carousel__nav {
    margin-top: var(--carousel-nav-gap, 1.5rem);
}

.mobile-slider .card-carousel__prev,
.mobile-slider .card-carousel__next,
.mobile-slider + .card-carousel__nav .card-carousel__prev,
.mobile-slider + .card-carousel__nav .card-carousel__next {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--icon-default, #1c1c1c);
    cursor: pointer;
    width: 36px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
}

.mobile-slider .card-carousel__prev::before,
.mobile-slider + .card-carousel__nav .card-carousel__prev::before {
    content: "\f060";
    font-family: "Font Awesome 7 Sharp" !important;
    font-weight: 900;
    font-style: normal;
}

.mobile-slider .card-carousel__next::before,
.mobile-slider + .card-carousel__nav .card-carousel__next::before {
    content: "\f061";
    font-family: "Font Awesome 7 Sharp" !important;
    font-weight: 900;
    font-style: normal;
}

.mobile-slider .card-carousel__prev::after,
.mobile-slider .card-carousel__next::after,
.mobile-slider + .card-carousel__nav .card-carousel__prev::after,
.mobile-slider + .card-carousel__nav .card-carousel__next::after,
.mobile-slider > .swiper-button-prev,
.mobile-slider > .swiper-button-next {
    display: none !important;
}

.mobile-slider .swiper-button-prev::after,
.mobile-slider .swiper-button-next::after {
    display: none !important;
    content: none !important;
}

/* Inverse sections: light arrows — unless the slider sits on a light panel */
.section--inverse .mobile-slider .card-carousel__prev,
.section--inverse .mobile-slider .card-carousel__next,
.section--inverse .mobile-slider + .card-carousel__nav .card-carousel__prev,
.section--inverse .mobile-slider + .card-carousel__nav .card-carousel__next,
#capabilities .mobile-slider .card-carousel__prev,
#capabilities .mobile-slider .card-carousel__next,
#capabilities .mobile-slider + .card-carousel__nav .card-carousel__prev,
#capabilities .mobile-slider + .card-carousel__nav .card-carousel__next {
    color: var(--icon-on-dark, #fff);
}

.surface--panel .mobile-slider .card-carousel__prev,
.surface--panel .mobile-slider .card-carousel__next,
.surface--panel .mobile-slider + .card-carousel__nav .card-carousel__prev,
.surface--panel .mobile-slider + .card-carousel__nav .card-carousel__next {
    color: var(--icon-default, #1c1c1c) !important;
}

@media (min-width: 768px) {
    .mobile-slider.swiper {
        overflow: visible;
    }
}
