/*
 Theme Name: Scuba Academy Child
 Theme URI: https://scubaacademy.co.uk
 Description: Scuba Academy child theme for Divi
 Author: James Wilkinson
 Author URI: https://scubaacademy.co.uk
 Template: Divi
 Version: 1.0.0
*/

/* Admin bar fix */
#wpadminbar { z-index: 9999999 !important; }

/* Header scroll behaviour */
.et-l--header {
    transition: transform 0.25s ease-in-out;
    background: #ffffff !important;
    position: relative;
    z-index: 20000;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    opacity: 1 !important;
    pointer-events: auto;
    mix-blend-mode: normal;
}
body.sa-header-hidden .et-l--header { transform: translateY(-100%); }

/* Global overflow safety */
body { overflow-x: hidden; }
body, html { overflow-x: hidden; max-width: 100%; }
.et_header_style_left #et-top-navigation,
.et_header_style_left #et-top-navigation nav { max-width: 100%; }

/* Accordion icon tweaks */
.et_pb_accordion .et_pb_toggle.et_pb_toggle_open .et_pb_toggle_title:before {
    content: "\33" !important; font-family: 'ETmodules' !important;
    color: #053b45; font-weight: bold;
}
.et_pb_accordion .et_pb_toggle_title:after { content: "" !important; }

/* DSM CAROUSEL */
.dsm_card_carousel_child_img { aspect-ratio: 5 / 3 !important; object-fit: cover !important; width: 100% !important; height: auto !important; }
.dsm_card_carousel_child_0 { border-radius: 12px !important; overflow: hidden !important; }
.dsm_card_carousel .scuba-carousel {
    background-image: linear-gradient(90deg, #022b3a, #0d6d88, #022b3a) !important;
    background-size: 200% 100% !important;
    background-position: 0 0 !important;
    color: #FFFFFF !important; font-size: 18px !important;
    border-radius: 10px !important; padding: 8px 30px !important;
    text-transform: uppercase !important; border: none !important;
}
.dsm_card_carousel .scuba-carousel:hover { background-position: 100% 0 !important; }

/* Course Page Menu (original in flow) */
.course-page-menu {
    background: #ffffff !important;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 19000;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    opacity: 1 !important;
    pointer-events: auto;
    mix-blend-mode: normal;
}
.course-page-menu a {
    color: #022b3a;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 20px;
    margin: 4px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    background: linear-gradient(145deg, #ffffff, #f0f4f8);
    border: 2px solid #0d6d88;
    box-shadow: 0 3px 6px rgba(2, 43, 58, 0.15), inset 0 1px 0 rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.course-page-menu a:hover {
    background: linear-gradient(90deg, #022b3a, #0d6d88);
    color: #FFFFFF; border-color: #022b3a;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(2, 43, 58, 0.25);
}
.course-page-menu a.active {
    background: linear-gradient(90deg, #00A3FF, #4CC7FF);
    color: #FFFFFF; border-color: #00A3FF;
    box-shadow: 0 4px 10px rgba(0, 163, 255, 0.35);
}
@media (max-width: 767px) {
    .course-page-menu a { font-size: 13px; padding: 8px 14px; margin: 3px; }
}

/* Brand heading colour */
.divi_water_sport_heading h1,
.divi_water_sport_heading h2,
.divi_water_sport_heading h3 { color: #44546A !important; }

/* FOOTER STYLES */
#main-footer {
    background: linear-gradient(140deg, #022b3a 0%, #0d6d88 100%);
    color: #FFFFFF; padding: 60px 0 30px 0;
}
.footer-widget h4 {
    color: #00A2FF; font-size: 18px; font-weight: 600;
    margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px;
}
.footer-widget ul { list style: none; padding: 0; margin: 0; }
.footer-widget ul li { margin-bottom: 12px; }
.footer-widget a {
    color: #FFFFFF; text-decoration: none; transition: color 0.3s ease; font-size: 15px;
}
.footer-widget a:hover { color: #00A2FF; }
.protected-email, .protected-phone { unicode-bidi: bidi-override; direction: rtl; color: #FFFFFF; text-decoration: none; }
.protected-email:hover, .protected-phone:hover { color: #00A2FF; }
.footer-contact-info { line-height: 1.8; }
.footer-contact-info p { margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.footer-contact-info i { color: #00A2FF; font-size: 18px; min-width: 20px; }
.footer-social-icons { display: flex; gap: 15px; margin-top: 20px; }
.footer-social-icons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: rgba(255,255,255,0.1);
    border-radius: 50%; transition: all 0.3s ease;
}
.footer-social-icons a:hover { background: #00A2FF; transform: translateY(-3px); }
.footer-social-icons i { color: #FFFFFF; font-size: 18px; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px; padding-top: 25px; text-align: center;
    color: rgba(255, 255, 255, 0.7); font-size: 14px;
}
.footer-logo { max-width: 180px; margin-bottom: 20px; }
.footer-tagline { color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
@media (max-width: 767px) {
    #main-footer { padding: 40px 0 20px 0; }
    .footer-widget { margin-bottom: 30px; }
    .footer-social-icons { justify-content: center; }
}

/* Cloned page menu (hidden by default; slides in after main) */
.course-page-menu-clone {
    position: fixed;
    top: calc(var(--sa-header-height, 160px) + var(--sa-adminbar-offset, 0px) + 10px); /* slight gap under main */
    left: 0; right: 0; margin: 0 auto;
    width: auto; max-width: calc(100% - 40px);
    padding: 0;

    display: none;              /* hidden until shown */
    background: transparent !important;
    box-shadow: none;
    border-radius: 0;
    z-index: 30000 !important;
    pointer-events: none;
    isolation: isolate;
    mix-blend-mode: normal !important;
    filter: none !important;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;

    opacity: 0;
    transform: translateY(-14px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.course-page-menu-clone.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.course-page-menu-clone.is-hidden {
    /* retained for compatibility */
}

/* Fine-tune where the dropdown appears under COURSES */
#top-menu li ul.sub-menu {
    top: 100% !important;        /* stay under the menu bar */
    margin-top: 4px !important;  /* reduce space between menu and box */
    transform: none !important;
}
