/* =========================================================
   NMD Course Management – Frontend
   Scoped styles for plugin templates/shortcodes.
   ========================================================= */

.nmdcm-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.menu-dynamic .sub-menu {
    margin-top:0px;
    margin-left:0;
    width:450px !important;
    max-width:450px;
    top: 0 !important;
    left: 0 !important;
}
.menu-dynamic .sub-menu li {
    box-sizing:border-box;
}
.menu-dynamic .sub-menu li a {
    white-space: wrap;
}

/* Hero section (title + buttons left, image right) */
.nmdcm-hero {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: center;
    padding: 20px 0 30px;
}

.nmdcm-hero__title {
    margin: 0 0 20px;
    line-height: 1.15;
}

.nmdcm-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.nmdcm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    padding: 12px 20px;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
}

/* Ensure button text stays white even if theme overrides link colors */
.nmdcm-btn,
.nmdcm-btn:visited,
.nmdcm-btn:hover,
.nmdcm-btn:focus,
.nmdcm-btn:active {
    color: #fff !important;
}

.nmdcm-btn--primary,
.nmdcm-btn--secondary {
    background: #d61e1e;
    transition: all .3s;
}

.nmdcm-btn--primary:hover,
.nmdcm-btn--secondary:hover,
.nmdcm-btn--primary:focus,
.nmdcm-btn--secondary:focus {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 3px 3px rgba(0,0,0,0.2);
}

/* Hero image */
.nmdcm-hero__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f2f2f2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nmdcm-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nmdcm-course-summary {
    font-size: 14px;
    line-height: 1.5;
    padding: 5px 0 5px 20px;
    margin: 0 0 32px;
    border-left: 3px solid #ed1c24;
    max-width: 980px;
}

.nmdcm-course-summary p:last-child {
    margin-bottom: 0;
}

/* Main layout: content (left) + sidebar (right) */
.nmdcm-layout {
    display: grid;
    grid-template-columns: 75% 25%;
    gap: 30px;
    align-items: start;
}

/* Tablet: 70/30 */
@media (max-width: 1024px) {
    .nmdcm-hero {
        grid-template-columns: 1fr 320px;
    }
    .nmdcm-layout {
        grid-template-columns: 70% 30%;
    }
}

/* Mobile: stack */
@media (max-width: 767px) {
    .nmdcm-hero {
        grid-template-columns: 1fr;
    }
    .nmdcm-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Course Details
   ========================================================= */

.nmdcm-course-details {
    padding: 30px 0 10px;
}

.nmdcm-course-details__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nmdcm-course-details__title {
    margin-bottom: 30px;
}

.nmdcm-course-details__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 0 0 14px;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.nmdcm-course-details__icon {
    width: 34px;
    min-width: 34px;
    text-align: center;
    line-height: 1;
    margin-top: 4px;
    color: #d61e1e;
    font-size: 18px;
}

@media (max-width: 767px) {
    .nmdcm-course-details__icon {
        font-size: 16px;
        width: 28px;
        min-width: 28px;
    }
}

/* Course detail icons: use FA5 Free packs */
.nmdcm-course-details__icon i.fas,
.nmdcm-course-details__icon i.far,
.nmdcm-course-details__icon i.fab {
    font-family: "Font Awesome 5 Free" !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* solid */
.nmdcm-course-details__icon i.fas { font-weight: 900; }

/* regular */
.nmdcm-course-details__icon i.far { font-weight: 400 !important; }

/* brands */
.nmdcm-course-details__icon i.fab {
    font-family: "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

.nmdcm-course-details__label {
    font-weight: 700;
    color: inherit;
}

.nmdcm-course-details__text {
    color: inherit;
}

/* Booking iframe block */
.nmdcm-booking {
    margin: 24px 0 34px;
    padding: 18px;
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
}

.nmdcm-booking__title {
    margin: 0 0 12px;
    font-size: 1.2em;
}

.nmdcm-booking iframe {
    width: 100%;
    height: 500px;
    border: 0;
    overflow: hidden;
    display: block;
}

/* Sections */
.nmdcm-section {
    margin: 0 0 34px;
}

.nmdcm-section__title {
    margin: 0 0 12px;
}

/* Sidebar list */
.nmdcm-sidebar {
    position: sticky;
    top: 150px;
}

.nmdcm-sidebar__title {
    font-size: 20px;
    margin: 0 0 12px;
}

.nmdcm-sidebar__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nmdcm-sidebar__list li {
    margin: 0 0 10px;
    line-height: normal;
}

/* =========================================================
   Sidebar course list – normalize links
   ========================================================= */

.nmdcm-sidebar__list a {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    transition: all .3s;
}

/* Prevent theme hover colours */
.nmdcm-sidebar__list a:hover,
.nmdcm-sidebar__list a:focus {
    color:#d61e1e;
}

.nmdcm-sidebar__list a:visited {
    color:#000;
}

/* Active course */
.nmdcm-sidebar__list a[aria-current="page"] {
    font-weight: 700;
    color:#d61e1e;
}


/* Share block */
.nmdcm-share {
    margin: 30px 0 0;
}

.nmdcm-share__title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
}

.nmdcm-share__links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.nmdcm-share__btn {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f4f4f4;
    border: 1px solid #e6e6e6;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
}

.nmdcm-share__btn i {
    font-size: 22px;
    color: #d61e1e;
}

.nmdcm-share__btn:hover,
.nmdcm-share__btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    background: #fff;
}

/* =========================================================
   Admin notice spacing for NMDCM
   ========================================================= */

/* WordPress notice wrapper padding */
.notice .nmdcm-admin-notice__content {
    padding: 10px 12px;
}

.notice .nmdcm-admin-notice__content p {
    margin: .5em 0 0;
}

/* =========================================================
   Course tiles (shortcode)
   ========================================================= */

.nmdcm-tiles {
    margin: 40px 0;
}

.nmdcm-tiles__header {
    text-align: center;
    margin: 30px 0 22px;
}

.nmdcm-tiles__title {
    margin: 0;
}

/* Grid: fixed 4 columns desktop, 2 tablet, 1 mobile */
.nmdcm-tiles__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

/* Tablet: 2 cols */
@media (max-width: 1024px) {
    .nmdcm-tiles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile: 1 col */
@media (max-width: 767px) {
    .nmdcm-tiles__grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.nmdcm-tile {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nmdcm-tile__link {
    display: block;
    text-decoration: none;
    height: 100%;
}

/* Keep theme from recolouring link text */
.nmdcm-tile__link,
.nmdcm-tile__link:visited {
    color: inherit;
}

.nmdcm-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
    border-color: #dcdcdc;
}

/* Image */
.nmdcm-tile__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.nmdcm-tile__image--placeholder {
    background: #f2f2f2;
}

.nmdcm-tile__body {
    padding: 16px 16px 14px;
}

.nmdcm-tile__heading {
    margin: 0;
    line-height: 1.25;
    font-size: 18px;
}

/* Badges / pills */
.nmdcm-tile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.nmdcm-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid #e1e1e1;
    background: #f7f7f7;
    color: #333;
}

.nmdcm-hero__pills {
    margin-bottom:20px;
}

/* Elementor Icon Lists Legacy  */
.nmdcm-section__body .elementor-icon-list-items {
    margin-bottom:30px;
}
.nmdcm-section__body .elementor-widget .elementor-icon-list-item, .nmdcm-section__body .elementor-widget .elementor-icon-list-item a {
    align-items: flex-start;
    padding:5px 0;
}
.nmdcm-section__body .elementor-widget .elementor-icon-list-item i, .nmdcm-section__body .elementor-widget .elementor-icon-list-item a i {
    margin-top:5px;
    display:block;
    width:25px;
    color:#d61e1e;
    text-align: center;
}

/* TYPOGRAPHY */
.nmdcm-section__body h3 {
    font-size:18px;
    margin-bottom:10px;
}

/* =========================================================
   FAQs (accordion)
   ========================================================= */

.nmdcm-faqs {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.nmdcm-faq {
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.nmdcm-faq:hover {
    border-color: #dcdcdc;
    box-shadow: 0 10px 18px rgba(0,0,0,.06);
    transform: translateY(-1px);
}

/* Summary = clickable header */
.nmdcm-faq__q {
    list-style: none;            /* Firefox */
    cursor: pointer;
    padding: 16px 52px 16px 18px; /* space for icon on right */
    font-weight: 700;
    line-height: 1.25;
    position: relative;
}

/* Remove default marker (Chrome/Safari) */
.nmdcm-faq__q::-webkit-details-marker {
    display: none;
}

/* Custom + / - icon */
.nmdcm-faq__q::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #d61e1e;
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
}

/* When open, show minus and soften header */
.nmdcm-faq[open] .nmdcm-faq__q {
    background: #fafafa;
    border-bottom: 1px solid #eeeeee;
}

.nmdcm-faq[open] .nmdcm-faq__q::after {
    content: "–";
}

/* Answer panel */
.nmdcm-faq__a {
    padding: 14px 18px 18px;
    color: inherit;
}

/* Optional: make links inside answers match your accent */
.nmdcm-faq__a a {
    color: #d61e1e;
    text-decoration: underline;
}

/* Focus styles for keyboard users */
.nmdcm-faq__q:focus,
.nmdcm-faq__q:focus-visible {
    outline: 2px solid rgba(214, 30, 30, 0.35);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Smooth-ish open animation (works best in modern browsers) */
.nmdcm-faq__a {
    animation: nmdcmFaqIn .18s ease;
}
@keyframes nmdcmFaqIn {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}
