/* Safe Choice PCC Theme - Site-Specific Overrides */
/* Base styles are in the shepherdsloft theme */

/* ============================================
   SAFECHOICEPCC SPECIFIC STYLES
   ============================================ */

/* Color Overrides */
body {
    background-color: #fff; /* Override shepherdsloft's #f5f3ee */
}

a {
    color: #2ea3f2; /* Safe Choice blue instead of shepherdsloft orange */
}

a:hover {
    text-decoration: none;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    color: #333; /* Override shepherdsloft's #093532 */
    font-weight: 500; /* Override shepherdsloft's weights */
}

h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

/* Image Overrides */
img {
    max-width: 537px; /* Site-specific max width */
}

.et_pb_image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    line-height: 0;
}

.et_pb_image .et_pb_image_wrap {
    display: inline-block;
    position: relative;
    max-width: 100%;
}

/* Layout Dark - Site Specific */
.layout_dark {
    background-color: #1e73be !important;
}

.layout_dark,
.layout_dark a,
.layout_dark h1,
.layout_dark h2,
.layout_dark h3,
.layout_dark h4,
.layout_dark .et_pb_blurb_container {
    color: #fff !important;
}

.layout_dark .et_pb_slide_description {
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.clearfix::after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
}

/* Page Container - Adjusted for dual header */
#page-container {
    padding-top: 134px; /* Top header (~68px) + Main header (66px) + spacing */
    margin-top: -1px;
}

/* Top Header - Unique to Safe Choice */
#top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #2EA3F2;
    font-size: 12px;
    line-height: 13px;
    z-index: 100000;
    color: #ffffff;
}

#top-header,
#top-header .container,
#top-header #et-info,
#top-header .et-social-icon a {
    line-height: 1em;
}

#top-header .container {
    padding-top: 0.75em;
    font-weight: 600;
}

#top-header a {
    color: #ffffff;
}

#et-secondary-menu {
    float: right;
}

#et-secondary-nav {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
}

#et-secondary-nav li {
    display: inline-block;
    margin-right: 15px;
    vertical-align: middle;
    position: relative;
    text-align: right;
}

#et-secondary-nav > li:last-child {
    margin-right: 0;
}

#et-secondary-nav a {
    padding-bottom: 0.75em;
    display: block;
    transition: opacity 0.4s ease-in-out;
}

#et-secondary-nav a:hover {
    opacity: 0.7;
}

/* Main Header - Override shepherdsloft positioning */
#main-header {
    line-height: 23px;
    font-weight: 500;
    background-color: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,.1);
    position: fixed;
    min-height: 66px;
    top: 0; /* Will be overridden by .et_fixed_nav.et_secondary_nav_enabled */
    width: 100%;
}

/* Position main header below top header when both are fixed */
.et_fixed_nav.et_secondary_nav_enabled #main-header {
    top: 68px; /* Position below top header */
}

/* Header container - flexbox layout for logo and navigation on one row */
#main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    _padding: 16.5px 0; /* Equal padding above and below (33px total / 2 = 16.5px) */
    min-height: 66px;
}

.logo_container {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
}

span.logo_helper {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    width: 0;
}

#logo {
    width: auto;
    transition: all 0.4s ease-in-out;
    margin: 0;
    max-height: 33px; /* Adjusted for padding */
    display: block;
    height: auto;
}

#et-top-navigation {
    display: flex;
    align-items: center;
    font-weight: 600;
    flex-shrink: 0;
}

#top-menu-nav {
    display: flex;
    align-items: center;
}

#top-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1em;
}

#top-menu li {
    display: inline-block;
    font-size: 14px;
    padding-right: 22px;
    position: relative;
    line-height: 1em;
}

#top-menu > li:last-child {
    padding-right: 0;
}

#top-menu a {
    color: rgba(0,0,0,0.6);
    text-decoration: none;
    display: block;
    position: relative;
    transition: opacity 0.4s ease-in-out, background-color 0.4s ease-in-out;
    line-height: 1em;
}

#top-menu-nav > ul > li > a:hover {
    opacity: 0.7;
}

#top-menu .menu-item-has-children > a:first-child {
    padding-right: 20px;
}

#top-menu .menu-item-has-children > a:first-child:after {
    content: "\f078"; /* Font Awesome chevron-down icon */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "Font Awesome", sans-serif;
    font-weight: 900;
    font-size: 10px;
    position: absolute;
    right: 0;
    top: 0;
}

/* Dropdown Menu */
.nav li ul {
    position: absolute;
    padding: 20px 0;
    z-index: 9999;
    width: 240px;
    background: #fff;
    visibility: hidden;
    opacity: 0;
    border-top: 3px solid #2ea3f2;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
    text-align: left;
    list-style: none;
}

.nav li:hover > ul,
.nav li.et-hover > ul {
    opacity: 1;
    visibility: visible;
}

.nav li li {
    padding: 0 20px;
    margin: 0;
    line-height: 2em;
}

.nav li li a {
    padding: 6px 20px;
    width: 200px;
    font-size: 14px;
}

.nav li li a:hover {
    background-color: rgba(0,0,0,.03);
    opacity: 0.7;
}

/* Mobile Menu - Override shepherdsloft */
#et_mobile_nav_menu {
    display: none;
    margin-left: 20px;
}

.mobile_menu_bar {
    position: relative;
    display: block;
    line-height: 0;
    cursor: pointer;
}

.mobile_menu_bar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile_menu_bar i {
    font-size: 20px;
    line-height: 1;
}

.mobile_nav {
    position: relative;
}

.mobile_nav .select_page {
    display: none;
}

.et_mobile_menu {
    position: absolute;
    left: 0;
    padding: 5%;
    background: #fff;
    width: 100%;
    visibility: visible;
    opacity: 1;
    display: none;
    z-index: 9999;
    border-top: 3px solid #2ea3f2;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
    -moz-box-shadow: 0 2px 5px rgba(0,0,0,.1);
    -webkit-box-shadow: 0 2px 5px rgba(0,0,0,.1);
}

.et_mobile_menu.open {
    display: block;
}

.et_mobile_menu li {
    list-style: none;
}

/* Mobile menu nested ul - must override .nav li ul styles */
#main-header .et_mobile_menu li ul,
.et_pb_fullwidth_menu .et_mobile_menu li ul,
.et_pb_menu .et_mobile_menu li ul {
    visibility: visible !important;
    display: block !important;
    padding-left: 10px;
    position: relative !important;
    opacity: 1 !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    margin-top: 0;
    margin-bottom: 0;
    list-style: none;
}

.et_mobile_menu li li {
    padding-left: 5%;
}

.et_mobile_menu li a {
    border-bottom: 1px solid rgba(0,0,0,.03);
    color: #666;
    padding: 10px 5%;
    display: block;
    text-decoration: none;
    -webkit-transition: opacity 0.2s ease-in-out, background-color 0.2s ease-in-out;
    transition: opacity 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.et_mobile_menu li a:hover,
.nav ul li a:hover {
    background-color: rgba(0,0,0,.03);
    opacity: 0.7;
}

.et_mobile_menu .menu-item-has-children > a {
    font-weight: 700;
    background-color: rgba(0,0,0,.03);
}

.et_mobile_menu li .menu-item-has-children > a {
    background-color: transparent;
    font-weight: 600;
}

/* Mobile menu - current page highlighting */
.et_mobile_menu .current-menu-item > a {
    color: #2EA3F2;
    font-weight: 600;
}

.et_mobile_menu .current-menu-item > a:hover {
    color: #2EA3F2;
    opacity: 0.8;
}

/* Mobile menu - Donate button styling */
.et_mobile_menu .menu-item-donate a {
    background-color: #2EA3F2;
    color: #fff;
    text-align: center;
    font-weight: 600;
    margin: 10px 5%;
    border-radius: 3px;
}

.et_mobile_menu .menu-item-donate a:hover {
    background-color: #1d8cd1;
    color: #fff;
    opacity: 1;
}

/* Main Content */
#main-content {
    background-color: #fff; /* Override shepherdsloft's #f5f3ee */
}

body:not(.et-tb) #main-content .container,
body:not(.et-tb-has-header) #main-content .container {
    padding-top: 58px;
}

/* Custom Grid Classes - Site Specific */
.grid {
    display: grid;
    align-items: center;
    grid-template-columns: repeat(auto-fit, minmax(30%, 1fr));
    gap: 1rem;
    width: 80%;
    max-width: 1080px;
    margin: auto;
}

.grid2 {
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 36.7%;
    gap: 1rem;
    width: 80%;
    max-width: 1080px;
    margin: auto;
}

.grid3 {
    display: grid;
    align-items: center;
    grid-template-columns: repeat(auto-fit, minmax(48%, 1fr));
    gap: 1rem;
    width: 80%;
    max-width: 1080px;
    margin: auto;
}

/* Section Override - Keep background image handling */
.et_pb_section {
    background-position: 50%;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Blurb - Site Specific (different from shepherdsloft) */
.et_pb_blurb_content {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    text-align: center;
    word-wrap: break-word;
    width: 100%;
}

.et_pb_blurb_container {
    text-align: left;
}

.et_pb_blurb_container h4 {
    font-size: 18px;
    padding-bottom: 10px;
    line-height: 1em;
    font-weight: 500;
}

.et_pb_blurb_container .et_ph_blurb_header a,
.et_pb_blurb_container h4 a {
    text-decoration: none;
    color: inherit;
}

/* Slider/Slides - Site Specific */
.slides .et_pb_container {
    display: table;
    table-layout: fixed;
    width: 100%;
}

.slide {
    height: 225px;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    background-color: #ffffff;
    text-align: center;
    list-style: none !important;
    width: 100%;
}

.et_pb_slider_container_inner,
.et_pb_slides .et_pb_slider_container_inner {
    display: table-cell;
    width: 100%;
    vertical-align: middle;
}

.et_pb_slide_description {
    text-align: center;
    padding: 16% 8%;
    width: auto;
    margin: auto;
}

.et_pb_slide_title {
    font-size: 26px;
    font-weight: 400;
}

.et_pb_slide_description .et_pb_slide_title {
    font-weight: 300;
    margin-top: 0;
    font-size: 26px;
    font-weight: 400;
}

/* Footer - Site Specific */
#main-footer {
    background-color: #222222; /* Override shepherdsloft's #0f393b */
}

/* Footer Widgets - Grid Layout (4 columns) */
#footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5.5%;
    padding: 6% 0 0;
    width: 80%;
    max-width: 1080px;
    margin: 0 auto;
}

.footer-widget {
    color: #fff;
}

.footer-widget h4,
.footer-widget .title {
    color: #2EA3F2; /* Safe Choice blue */
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.footer-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-widget li {
    padding-left: 14px;
    position: relative;
    margin-bottom: 0.5em;
}

.footer-widget li:before {
    border-radius: 3px;
    border-style: solid;
    border-width: 3px;
    content: "";
    left: 0;
    position: absolute;
    top: 9px;
    border-color: #2EA3F2;
}

.footer-widget a {
    color: #fff;
    text-decoration: none;
}

.footer-widget li a:hover {
    color: rgba(255,255,255,0.7);
}

/* Footer Bottom */
#footer-bottom {
    background-color: rgba(0,0,0,0.32);
    padding: 15px 0 5px;
    margin-top: 0;
}

#footer-bottom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#footer-info {
    text-align: left;
    color: #666;
    padding-bottom: 10px;
    font-size: 14px;
}

#footer-info a {
    font-weight: 700;
    color: #666;
    text-decoration: none;
    transition: all 0.4s ease-in-out;
}

#footer-info a:hover {
    opacity: 0.7;
}

.et-social-icons {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.et-social-icons li {
    display: inline-block;
}

.et-social-icon a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.4s ease-in-out;
    position: relative;
    text-align: center;
}

.et-social-icon a:hover {
    opacity: 0.7;
}

.et-social-icon span {
    display: none;
}

/* Social Icons - Font Awesome icon tags */
.et-social-icon a i {
    font-size: 24px;
    color: #666;
    transition: opacity 0.4s ease-in-out;
}

.et-social-icon a:hover i {
    opacity: 0.7;
}

/* Buttons - Site Specific */
.et_pb_button,
.et_pb_more_button {
    font-size: 20px;
    font-weight: 500;
    padding: 0.3em 1em;
    line-height: 1.7em;
    background-color: transparent;
    border: 2px solid;
    border-radius: 3px;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.et_pb_button:hover {
    border: 2px solid transparent;
    padding: 0.3em 2em 0.3em 0.7em;
    background-color: rgba(0,0,0,.05);
}

/* Community/Events - Site Specific */
.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.event-card {
    _border: 1px solid #e2e2e2;
    padding: 1.5rem;
    border-radius: 3px;
    transition: box-shadow 0.3s;
}

.event-card:hover {
    _box-shadow: 0 2px 5px rgba(0,0,0,.1);
}

.event-card-image {
    display: block;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
}

.event-card-image img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.event-date {
    color: #666;
    font-size: 0.9em;
    margin: 0.5em 0;
}

.event-location {
    color: #666;
    font-size: 0.9em;
    margin: 0.5em 0;
}

.event-excerpt {
    margin: 1em 0;
    color: #666;
}

.read-more {
    display: inline-block;
    margin-top: 1em;
    color: #2ea3f2;
    font-weight: 500;
}

.event-meta {
    background: #f5f5f5;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 3px;
}

.event-meta div {
    margin: 0.5rem 0;
}

/* Sidebar - Site Specific */
#sidebar {
    padding-bottom: 28px;
}

#sidebar .et_pb_widget {
    margin-bottom: 30px;
    width: 100%;
    float: none;
}

#sidebar ul {
    list-style: none;
}

.et_pb_widget {
    float: left;
    max-width: 100%;
    word-wrap: break-word;
}

.et_pb_widget ul li {
    margin-bottom: .5em;
}

.et_pb_widget a {
    text-decoration: none;
    color: #666;
}

@keyframes fadeInTop {
    0% {
        opacity: 0;
        transform: translateY(-60%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (min-width: 981px) {
    #main-content .container::before {
        content: "";
        position: absolute;
        top: 0;
        height: 100%;
        width: 1px;
        background-color: #e2e2e2;
    }

    .et_right_sidebar #main-content .container::before {
        right: 20.875% !important;
    }

    #left-area {
        float: left;
        padding-right: 5.5%;
        width: 79.125%;
        padding-bottom: 23px;
    }

    #sidebar {
        float: left;
        width: 20.875%;
    }

    .et_right_sidebar #sidebar {
        padding-left: 30px;
    }

    .map-sidebar {
        width: 36.7%;
    }

    /* Footer widgets grid is already set above */
}

@media (max-width: 980px) {
    #page-container {
        padding-top: 80px;
    }
    
    .et_fixed_nav.et_show_nav.et_secondary_nav_enabled #page-container {
        padding-top: 66px;
    }
    
    /* Hide desktop menu on mobile */
    #top-header,
    #top-menu-nav {
        display: none;
    }
    
    /* Show mobile menu toggle on mobile */
    #et_mobile_nav_menu {
        display: block;
        margin-left: 20px;
    }
    
    .mobile_nav .select_page {
        display: inline-block;
        color: #666;
        font-size: 14px;
        margin-right: 10px;
    }
    
    .mobile_menu_bar {
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        color: #2EA3F2;
    }
    
    .mobile_menu_bar:before {
        _font-size: 20px;
        color: #2EA3F2;
    }
    
    .mobile_nav {
        min-height: 40px;
        display: flex;
        align-items: center;
        position: relative;
    }
    
    /* Position mobile menu dropdown */
    .et_mobile_menu {
        top: 66px; /* Position below header */
        left: 0;
        right: 0;
    }
    
    /* Ensure mobile menu is visible when open */
    .et_mobile_menu.open {
        display: block;
    }
    
    #main-header {
        top: 0px;
    }

    #main-header .container {
        padding: 10px 0; /* Reduced padding on mobile */
        align-items: center;
    }
    
    #main-header {
        min-height: 66px;
    }
    
    #et-top-navigation {
        margin-right: 0;
    }
    
    .et_fixed_nav #main-header {
        position: absolute;
        top: auto;
    }

    .et_fixed_nav.et_secondary_nav_enabled #main-header {
        top: 0px;
    }
    
    .et_fixed_nav #top-header {
        position: absolute;
    }
    
    #logo {
        max-width: none;
        max-height: 50px;
        height: auto;
        width: auto;
    }
    
    .logo_container {
        flex: 0 0 auto;
        align-items: center;
    }

    #left-area {
        float: left;
        padding-right: 5.5%;
        width: 79.125%;
        padding-bottom: 23px;
    }

    #sidebar {
        float: left;
        width: 20.875%;
    }
    
    .grid,
    .grid2,
    .grid3 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Footer widgets - 2 columns on tablet */
    #footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 7.5%;
        padding: 8% 0;
    }
    
    #footer-widgets .footer-widget:nth-child(2n) {
        margin-right: 0;
    }
    
    #footer-bottom .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .et-social-icons {
        float: none;
        text-align: center;
        margin: 0 0 5px;
    }
    
    #footer-info {
        text-align: center;
    }
}

@media (max-width: 767px) {
    /* Footer widgets - 1 column on mobile */
    #footer-widgets {
        grid-template-columns: 1fr;
        gap: 9.5%;
        padding: 10% 0;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }

    .grid,
    .grid2,
    .grid3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
