/*
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;
}

#main-header .et_menu_container.et_pb_row {
    max-width: 1200px;
    width: 90%;
    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;
}

#main-header #logo {
    max-width: 180px;
}

/* 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;
}

/* Focus visible ring (theme overrides via --focus-ring-outer, --focus-ring-inner) */
:focus-visible {
    outline: 2px solid var(--focus-ring-outer);
    box-shadow: 0 0 0 2px var(--focus-ring-inner);
    position: relative;
    z-index: 1;
}

/* Skip to main content: off-screen until focused (accessibility) */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
    padding: 0.75rem 1rem;
    background: var(--btn-primary-bg);
    color: var(--text-inverse);
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    position: fixed;
    left: 0;
    top: 0;
    outline: 3px solid var(--border-focus);
    outline-offset: 2px;
}

/* Video Play/Pause Controls (WCAG 2.2 AA Compliance) */
.fsm-video-control {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--video-control-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--video-control-shadow);
    pointer-events: auto !important;
}

.fsm-video-control-hover {
    opacity: 0;
    pointer-events: none;
}

.fsm-video-control-hover.fsm-video-control-visible,
.fsm-video-control-hover:focus {
    opacity: 1;
    pointer-events: auto;
}

.fsm-video-control:hover {
    background-color: var(--video-control-bg-hover);
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--video-control-shadow-hover);
}

.fsm-video-control:focus-visible {
    outline: 2px solid var(--video-control-focus);
    outline-offset: 2px;
}

.fsm-video-control i {
    color: var(--video-control-icon);
    font-size: 14px;
    line-height: 1;
}

/* Bottom-right positioning for video containers (consistent with project gallery) */
.portfolio-featured-video .fsm-video-control,
.gallery-hero .fsm-video-control,
.et-pb-background-video .fsm-video-control,
.et-pb-has-background-video .fsm-video-control,
.et_pb_video_box .fsm-video-control {
    top: auto;
    bottom: 1rem;
    right: 1rem;
}

/* Ensure video containers are positioned relative */
.portfolio-featured-video .et_pb_video_box,
.gallery-hero,
.et-pb-background-video {
    position: relative;
}

.et-pb-has-background-video {
    position: relative;
}

.et-pb-has-background-video .fsm-video-control {
    z-index: 99999 !important;
}

/* Global button shell — colors/typography in theme.css (beats Divi inline via !important) */
#page-container #main-content .et_pb_button {
    border-radius: var(--Buttons-Border-Radius, 0.75rem);
    text-align: center;
    font-style: normal;
    line-height: normal;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
        text-decoration 0.2s ease;
}

/* 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;

}
