/*
Theme Name: Divi Child - RGJJMN
Theme URI: https://rgjjmndev.fig1.com
Description: Child theme for Royce Gracie Jiu-Jitsu Academy Shakopee MN.
Author: Fig1 AI
Version: 1.0.0
Template: Divi
*/


/* ==========================================================================
   DIVI 5 BETA GAPS
   ========================================================================== */

.et_pb_button_module_wrapper {
    display: block !important;
}

a.et_pb_button {
    display: inline-block !important;
    width: auto !important;
}

.et-waypoint:not(.et_pb_counters),
.et_pb_section.et-waypoint,
.et_pb_row.et-waypoint,
.et_pb_column.et-waypoint,
.et_pb_module.et-waypoint {
    opacity: 1 !important;
}

.et_flex_module {
    display: block !important;
}

.et_pb_button_module_wrapper .et_flex_module {
    display: inline-block !important;
}


/* ==========================================================================
   GLOBAL TYPOGRAPHY
   ========================================================================== */

body,
body.et_divi_theme {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.et_pb_module h1, .et_pb_module h2, .et_pb_module h3,
.et_pb_module h4, .et_pb_module h5, .et_pb_module h6 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
}

h1, .et_pb_module h1 { font-size: 40px; margin-bottom: 20px; }
h2, .et_pb_module h2 { font-size: 32px; margin-bottom: 16px; }
h3, .et_pb_module h3 { font-size: 24px; margin-bottom: 12px; }
h4, .et_pb_module h4 { font-size: 20px; margin-bottom: 10px; color: #4b5563; font-weight: 600; }

p { margin-bottom: 16px; }

a { color: #2563eb; transition: color 0.2s ease; }
a:hover { color: #1a3a6b; }


/* ==========================================================================
   COLOR SYSTEM
   ========================================================================== */

/* Dark sections with white text */
.et_pb_bg_layout_dark,
.et_pb_bg_layout_dark h1,
.et_pb_bg_layout_dark h2,
.et_pb_bg_layout_dark h3,
.et_pb_bg_layout_dark h4,
.et_pb_bg_layout_dark p,
.et_pb_bg_layout_dark li {
    color: #ffffff;
}

.et_pb_bg_layout_dark a {
    color: #93c5fd;
}

.et_pb_bg_layout_dark a:hover {
    color: #ffffff;
}


/* ==========================================================================
   BUTTONS — Let Divi handle styling natively via module attributes
   ========================================================================== */


/* ==========================================================================
   HEADER STYLING
   ========================================================================== */

/* Main Divi header */
#main-header {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#logo {
    max-height: 60px !important;
}

/* Top nav text */
#top-header {
    background: #1a3a6b !important;
    color: #ffffff;
    font-size: 14px;
    padding: 6px 0;
}

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

/* Main nav links */
#top-menu li a {
    color: #1f2937 !important;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px !important;
    transition: color 0.2s ease;
}

#top-menu li a:hover,
#top-menu li.current-menu-item a {
    color: #2563eb !important;
}

/* Dropdown menus */
#top-menu li ul.sub-menu {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid #1a3a6b;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
}

#top-menu li ul.sub-menu li a {
    font-size: 13px !important;
    text-transform: none !important;
    padding: 8px 20px !important;
    color: #374151 !important;
}

#top-menu li ul.sub-menu li a:hover {
    color: #2563eb !important;
    background: #f3f4f6;
}

/* Mobile menu */
.mobile_menu_bar:before {
    color: #1a3a6b !important;
}

.et_mobile_menu {
    background: #ffffff !important;
    border-top: 3px solid #1a3a6b;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.et_mobile_menu li a {
    color: #1f2937 !important;
    font-weight: 600;
    padding: 12px 20px !important;
    border-bottom: 1px solid #f3f4f6;
}

.et_mobile_menu li a:hover {
    color: #2563eb !important;
    background: #f3f4f6;
}


/* ==========================================================================
   BLURB MODULES (Program Cards)
   ========================================================================== */

.et_pb_blurb {
    background: #ffffff;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.et_pb_blurb:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.et_pb_blurb .et_pb_main_blurb_image {
    margin-bottom: 0;
}

.et_pb_blurb .et_pb_main_blurb_image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.et_pb_blurb_content {
    padding: 20px;
}

.et_pb_blurb h4,
.et_pb_blurb .et_pb_module_header {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a3a6b !important;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.et_pb_blurb .et_pb_blurb_description {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
}

/* Blurb cards on light gray bg */
.et_pb_section[style*="background-color: #f3f4f6"] .et_pb_blurb,
.et_pb_section[style*="background-color:#f3f4f6"] .et_pb_blurb {
    background: #ffffff;
}


/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.et_pb_testimonial {
    background: #ffffff !important;
    border-radius: 8px;
    padding: 30px !important;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.et_pb_testimonial_portrait {
    border: 3px solid #1a3a6b !important;
    border-radius: 50% !important;
}

.et_pb_testimonial_description {
    color: #374151 !important;
}

.et_pb_testimonial_description p {
    font-style: italic;
    font-size: 16px;
    line-height: 1.7;
    color: #374151;
}

.et_pb_testimonial_author {
    font-weight: 700 !important;
    color: #1a3a6b !important;
}

.et_pb_testimonial_meta {
    color: #6b7280 !important;
}


/* ==========================================================================
   SCHEDULE TABLE
   ========================================================================== */

.rgjjmn-schedule,
.et_pb_text table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.rgjjmn-schedule th,
.et_pb_text table th {
    background: #1a3a6b;
    color: #ffffff;
    padding: 12px 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-align: center;
    border: 1px solid #15326b;
}

.rgjjmn-schedule td,
.et_pb_text table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    color: #374151;
    vertical-align: middle;
}

.rgjjmn-schedule tr:nth-child(even),
.et_pb_text table tr:nth-child(even) {
    background: #f9fafb;
}

.rgjjmn-schedule tr:hover,
.et_pb_text table tr:hover {
    background: #eff6ff;
}

.rgjjmn-schedule td:first-child,
.et_pb_text table td:first-child {
    font-weight: 600;
    color: #1f2937;
    background: #f3f4f6;
    white-space: nowrap;
    text-align: left;
    padding-left: 15px;
}

.rgjjmn-schedule td:empty {
    background: transparent;
}


/* ==========================================================================
   SECTIONS & LAYOUT
   ========================================================================== */

.et_pb_section {
    padding: 60px 0;
}

.et_pb_row {
    max-width: 1200px;
    padding: 0 20px;
}

/* Alternating section backgrounds */
.et_pb_section:nth-child(even) {
    /* Already handled by inline bg colors */
}

/* Divider module */
.et_pb_divider {
    margin: 20px auto !important;
}


/* ==========================================================================
   IMAGES
   ========================================================================== */

.et_pb_image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.et_pb_image {
    margin-bottom: 20px;
}


/* ==========================================================================
   LISTS
   ========================================================================== */

.et_pb_text ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.et_pb_text ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.et_pb_text ul li strong {
    color: #1a3a6b;
}

/* Lists on dark backgrounds */
.et_pb_bg_layout_dark .et_pb_text ul li,
.et_pb_bg_layout_dark .et_pb_text ul li strong {
    color: #e5e7eb;
}


/* ==========================================================================
   KICKSITE IFRAME
   ========================================================================== */

.et_pb_code_inner iframe {
    max-width: 100%;
    border: none;
    border-radius: 8px;
    background: #ffffff;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.et-l--footer .et_pb_section {
    padding: 50px 0;
}

.et-l--footer a {
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.et-l--footer a:hover {
    color: #ffffff !important;
}

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

.et-l--footer ul li {
    margin-bottom: 8px;
}

.et-l--footer h4 {
    color: #ffffff !important;
    font-size: 18px !important;
    margin-bottom: 15px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.et-l--footer p {
    margin-bottom: 12px;
}


/* ==========================================================================
   UTILITY BAR (above header)
   ========================================================================== */

.et-l--header .et_pb_section:first-child {
    padding: 8px 0 !important;
}

.et-l--header .et_pb_section:first-child p {
    margin: 0;
    font-size: 14px;
}


/* ==========================================================================
   CUSTOM HEADER NAV (replaces divi/header module which doesn't render in D5)
   ========================================================================== */

.rgjjmn-header-nav {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.rgjjmn-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rgjjmn-logo img {
    max-height: 60px;
    width: auto;
}

.rgjjmn-header-nav .rgjjmn-nav ul,
.rgjjmn-header-nav .rgjjmn-nav > ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 0 !important;
}

.rgjjmn-header-nav .rgjjmn-nav > ul > li {
    position: relative;
    list-style: none !important;
}

.rgjjmn-header-nav .rgjjmn-nav > ul > li > a {
    display: block !important;
    padding: 10px 14px !important;
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.rgjjmn-header-nav .rgjjmn-nav > ul > li > a:hover,
.rgjjmn-header-nav .rgjjmn-nav > ul > li.current > a {
    color: #2563eb !important;
}

/* Dropdown */
.rgjjmn-header-nav .rgjjmn-nav .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid #1a3a6b;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 8px 0 !important;
    min-width: 240px;
    z-index: 10000;
    list-style: none !important;
    margin: 0 !important;
    flex-direction: column !important;
}

.rgjjmn-header-nav .rgjjmn-nav .has-sub:hover > .sub-menu {
    display: block !important;
}

.rgjjmn-header-nav .rgjjmn-nav .sub-menu li {
    list-style: none !important;
}

.rgjjmn-header-nav .rgjjmn-nav .sub-menu li a {
    display: block !important;
    padding: 8px 20px !important;
    color: #374151 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s;
}

.rgjjmn-header-nav .rgjjmn-nav .sub-menu li a:hover {
    color: #2563eb !important;
    background: #f3f4f6;
}

/* Mobile toggle */
.rgjjmn-mobile-toggle {
    display: none;
    background: none;
    border: 2px solid #1a3a6b;
    border-radius: 4px;
    font-size: 24px;
    color: #1a3a6b;
    padding: 4px 10px;
    cursor: pointer;
}

/* Remove default Divi header if it leaks through */
#main-header { display: none !important; }
#page-container { padding-top: 0 !important; margin-top: 0 !important; }

/* Code module in header - remove default padding */
.et-l--header .et_pb_code_inner {
    padding: 0;
}
.et-l--header .et_pb_section:nth-child(2) {
    padding: 0 !important;
}


/* ==========================================================================
   PAGE HERO BANNERS
   ========================================================================== */

.et_pb_section:first-child {
    position: relative;
}


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

@media (max-width: 980px) {
    h1, .et_pb_module h1 { font-size: 32px; }
    h2, .et_pb_module h2 { font-size: 26px; }
    h3, .et_pb_module h3 { font-size: 20px; }

    .et_pb_row {
        padding: 0 20px;
    }

    .et_pb_section {
        padding: 40px 0;
    }

    /* Stack columns on tablet */
    .et_pb_column_1_2,
    .et_pb_column_1_3 {
        width: 100% !important;
        margin-bottom: 30px;
    }

    .et_pb_blurb .et_pb_main_blurb_image img {
        aspect-ratio: 1 / 1;
    }

    /* Schedule table scroll */
    .rgjjmn-schedule {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile nav */
    .rgjjmn-mobile-toggle {
        display: block;
    }
    .rgjjmn-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 3px solid #1a3a6b;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        z-index: 10000;
    }
    .rgjjmn-nav.open {
        display: block;
    }
    .rgjjmn-nav > ul {
        flex-direction: column;
    }
    .rgjjmn-nav > ul > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid #f3f4f6;
    }
    .rgjjmn-nav .sub-menu {
        position: static;
        border: none;
        border-top: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        min-width: auto;
        display: block;
        background: #f9fafb;
    }
    .rgjjmn-nav .sub-menu li a {
        padding-left: 40px;
    }
    .rgjjmn-header-inner {
        position: relative;
    }
}

@media (max-width: 767px) {
    h1, .et_pb_module h1 { font-size: 28px; }
    h2, .et_pb_module h2 { font-size: 22px; }

    .et_pb_section {
        padding: 30px 0;
    }

    .et_pb_button {
        font-size: 14px !important;
        padding: 10px 24px !important;
    }

    .et_pb_testimonial {
        padding: 20px !important;
    }

    .et_pb_blurb .et_pb_main_blurb_image img {
        aspect-ratio: 1 / 1;
    }

    /* Footer columns stack */
    .et-l--footer .et_pb_column_1_3 {
        width: 100% !important;
        margin-bottom: 30px;
    }

    /* Schedule table */
    .rgjjmn-schedule th,
    .rgjjmn-schedule td {
        font-size: 11px;
        padding: 6px 4px;
    }

    .et_pb_code_inner iframe {
        height: 600px !important;
    }
}

@media (max-width: 479px) {
    h1, .et_pb_module h1 { font-size: 24px; }
    h2, .et_pb_module h2 { font-size: 20px; }

    .et_pb_row {
        padding: 0 15px;
    }

    #logo {
        max-height: 45px !important;
    }
}
