/* ═══════════════════════════════════════════════
   EFAST Ireland — Custom Styles
   Extracted from approved HTML templates
   ═══════════════════════════════════════════════ */

/* ── Base Body ── */
body {
    font-family: 'Inter', sans-serif;
    color: #4F4F4F;
    background-color: #FFFFFF;
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
}

/* ── Accreditations Logo Slider ── */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.logo-slider {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.logo-slider:hover {
    animation-play-state: paused;
}

/* ── Testimonials Slider ── */
@keyframes slide-testimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.testimonial-slider-track {
    display: flex;
    width: max-content;
    gap: 2rem;
    animation: slide-testimonials 30s linear infinite;
}

.testimonial-slider-track:hover {
    animation-play-state: paused;
}

/* ── Map Glow ── */
.map-glow {
    filter: drop-shadow(0 0 15px rgba(120, 119, 230, 0.4));
}

/* ── Marker Ripple ── */
@keyframes ripple {
    0% { transform: scale(3); opacity: 0.8; }
    100% { transform: scale(10); opacity: 0; }
}

.marker-ripple {
    animation: ripple 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ── Nav Link ── */
.nav-link {
    color: #000000;
    font-weight: 500;
    white-space: nowrap;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #01027a;
}

/* ── Footer Link ── */
.footer-link {
    color: #9CA3AF;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #FFFFFF;
}

/* ── Mega Menu List Item ── */
.mega-menu-list-item {
    font-size: 0.875rem;
    color: #4B5563;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.mega-menu-list-item::before {
    content: '•';
    margin-right: 0.5rem;
    color: #01027a;
    opacity: 0;
    transition: opacity 0.2s;
}

.mega-menu-list-item:hover {
    color: #01027a;
}

.mega-menu-list-item:hover::before {
    opacity: 1;
}

/* ── Toggle Switch ── */
.toggle-btn {
    position: relative;
    z-index: 10;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
    cursor: pointer;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-container {
    position: relative;
    background-color: #E5E7EB;
    padding: 0.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    width: 16rem;
    height: 2.75rem;
    isolation: isolate;
}

.toggle-slider {
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    width: calc(50% - 4px);
    background-color: #01027a;
    border-radius: 9999px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: -1;
    left: 4px;
}

.toggle-container[data-state="onsite"] .onsite-label { color: #ffffff; }
.toggle-container[data-state="onsite"] .online-label { color: #4f4f4f; }
.toggle-container[data-state="onsite"] .toggle-slider { left: 4px; }

.toggle-container[data-state="online"] .online-label { color: #ffffff; }
.toggle-container[data-state="online"] .onsite-label { color: #4f4f4f; }
.toggle-container[data-state="online"] .toggle-slider { left: calc(50% + 2px); }

/* ── Elementor Override: full-width shortcode sections ── */
.elementor-shortcode {
    width: 100%;
}

/* ── Remove default Elementor section padding for shortcode widgets ── */
.elementor-widget-shortcode {
    width: 100%;
}

/* ── Ensure shortcode sections break out of Elementor containers ── */
.efast-full-width-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* ═══════════════════════════════════════════════
   FOOTER — Responsive Grid Layout
   Mobile: 1 column stacked
   Tablet (768px+): 2 columns
   Desktop (1024px+): 12-column grid (3+2+2+3+2)
   ═══════════════════════════════════════════════ */

/* Mobile-first: single column stack */
.efast-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* Locations & online courses sub-grids: single column on mobile */
.efast-footer-locations-grid,
.efast-footer-online-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px 16px;
}

/* Copyright bar: stack on mobile */
.efast-footer-copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
    .efast-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Logo column spans full width on tablet */
    .efast-footer-col-logo {
        grid-column: 1 / -1;
    }

    .efast-footer-locations-grid,
    .efast-footer-online-grid {
        grid-template-columns: 1fr 1fr;
    }

    .efast-footer-copyright {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
    .efast-footer-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .efast-footer-col-logo {
        grid-column: span 3;
    }
    .efast-footer-col-explore {
        grid-column: span 2;
    }
    .efast-footer-col-onsite {
        grid-column: span 2;
    }
    .efast-footer-col-online {
        grid-column: span 3;
    }
    .efast-footer-col-contact {
        grid-column: span 2;
    }
}

/* ── Footer social icon hover ── */
.efast-footer a[href*="facebook"]:hover,
.efast-footer a[href*="linkedin"]:hover,
.efast-footer a[href*="instagram"]:hover {
    background: #01027a;
}

/* ── Footer copyright link hover ── */
.efast-footer-copyright a:hover {
    color: #FFFFFF;
}

/* ═══════════════════════════════════════════════
   HOMEPAGE — Section Styles
   ═══════════════════════════════════════════════ */

/* ── Hero Carousel Responsive ── */
#efast-hero-carousel { height: 600px; }
.efast-hero-content { max-width: 100%; }
@media (max-width: 767px) {
    #efast-hero-carousel { height: 500px; }
    .efast-hero-content { text-align: center; }
    .efast-hero-content p { margin-left: auto; margin-right: auto; }
    .efast-hero-content a { margin: 0 auto; }
}
@media (min-width: 768px) {
    .efast-hero-content { max-width: 60%; }
}

/* ── Pulse animation for hero badges ── */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── EMS Services Grid ── */
.efast-ems-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 768px) {
    .efast-ems-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .efast-ems-grid { grid-template-columns: repeat(3, 1fr); }
}
.efast-ems-card:hover img { transform: scale(1.1); }
.efast-ems-card:hover a { background: rgba(255,255,255,0.2) !important; }

/* ── Course Search Bar Responsive ── */
@media (min-width: 768px) {
    .efast-search-bar { flex-direction: row !important; align-items: stretch !important; }
    .efast-search-bar > div:first-child { width: auto !important; }
}

/* ── Course Cards Grid ── */
.efast-course-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 768px) {
    .efast-course-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .efast-course-grid { grid-template-columns: repeat(3, 1fr); }
}
.efast-course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #F3F4F6;
    transition: box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
}
.efast-course-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.efast-course-img-wrap {
    position: relative;
    height: 192px;
    overflow: hidden;
}
.efast-course-card:hover .efast-course-img-wrap img { transform: scale(1.05); }
.efast-course-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ── Why Choose Us Grid ── */
.efast-why-grid {
    display: flex;
    flex-direction: column;
    gap: 64px;
}
@media (min-width: 1024px) {
    .efast-why-grid { flex-direction: row; }
    .efast-why-grid > div:first-child { width: 50%; }
    .efast-why-grid > div:last-child { width: 50%; }
}

/* ── Stats Grid ── */
.efast-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.efast-stat-card {
    background: white;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.efast-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}
@media (max-width: 639px) {
    .efast-stats-grid { grid-template-columns: 1fr; }
    .efast-stat-card { margin-top: 0 !important; }
}

/* ── Coverage Map Grid ── */
.efast-coverage-grid {
    display: flex;
    flex-direction: column;
    gap: 64px;
}
@media (min-width: 1024px) {
    .efast-coverage-grid { flex-direction: row; align-items: center; }
    .efast-coverage-grid > div { width: 50%; }
}

/* ── Blog Grid ── */
.efast-blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 768px) {
    .efast-blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .efast-blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.efast-blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #F3F4F6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
}
.efast-blog-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.efast-blog-img-wrap {
    position: relative;
    height: 224px;
    overflow: hidden;
}
.efast-blog-card:hover .efast-blog-img-wrap img { transform: scale(1.05); }
.efast-blog-card:hover .efast-blog-title { color: #01027a; }

/* ── Elementor full-width reset ── */
.elementor-section.elementor-section-full_width > .elementor-container {
    max-width: 100% !important;
}
.elementor-widget-html {
    width: 100%;
}

/* ═══════════════════════════════════════════════
   SINGLE COURSE PAGE — Responsive Styles
   ═══════════════════════════════════════════════ */

/* ── Astra Theme Full-Width Override for Course Pages ── */
.single-efast_course .site-content > .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}
.single-efast_course .ast-row {
    display: block !important;
}
.single-efast_course #primary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.single-efast_course .site-main {
    display: block !important;
}
.single-efast_course .ast-article-single {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
.single-efast_course .entry-content {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}
.single-efast_course .entry-header,
.single-efast_course .post-navigation,
.single-efast_course .comments-area {
    display: none !important;
}

/* ── Why Choose Us Grid ── */
.efast-why-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
}
@media (min-width: 1024px) {
    .efast-why-grid {
        flex-direction: row;
        gap: 64px;
    }
    .efast-why-grid > div:first-child {
        flex: 1;
    }
    .efast-why-grid > .efast-stats-grid {
        flex: 1;
    }
}
.efast-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-content: start;
}
.efast-stat-card {
    background: white;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.efast-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
    border-color: rgba(1,2,122,0.2);
}
/* Stagger: offset even cards down */
.efast-stats-grid .efast-stat-card:nth-child(2),
.efast-stats-grid .efast-stat-card:nth-child(4) {
    margin-top: 32px;
}
@media (max-width: 639px) {
    .efast-stats-grid {
        grid-template-columns: 1fr !important;
    }
    .efast-stats-grid .efast-stat-card:nth-child(2),
    .efast-stats-grid .efast-stat-card:nth-child(4) {
        margin-top: 0;
    }
}

/* ── Hero Grid ── */
.efast-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
}
@media (min-width: 768px) {
    .efast-hero-grid {
        grid-template-columns: 1fr 1fr !important;
        text-align: left;
    }
    .efast-hero-grid > div:first-child {
        text-align: left;
        align-items: flex-start !important;
    }
    .efast-hero-left {
        text-align: left !important;
        align-items: flex-start !important;
    }
    .efast-hero-grid > div:first-child > div {
        justify-content: flex-start !important;
    }
    .efast-single-hero h1 {
        font-size: 56px !important;
        text-align: left !important;
    }
}
@media (min-width: 1024px) {
    .efast-single-hero h1 {
        font-size: 64px !important;
    }
    .efast-hero-grid > div:last-child {
        justify-content: flex-end !important;
    }
    .efast-floating-accred {
        left: -48px !important;
        bottom: -40px !important;
    }
}
@media (max-width: 767px) {
    .efast-single-hero {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }
    .efast-single-hero h1 {
        font-size: 36px !important;
    }
    .efast-hero-login-btn {
        width: 100%;
    }
    .efast-breadcrumb {
        justify-content: center !important;
    }
    .efast-hero-excerpt {
        text-align: center !important;
    }
    .efast-floating-accred {
        left: 16px !important;
        right: 16px !important;
        bottom: -20px !important;
        max-width: none !important;
        width: auto !important;
        box-sizing: border-box;
    }
}
@media (min-width: 768px) {
    .efast-hero-excerpt {
        text-align: left !important;
    }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .efast-floating-accred {
        left: 16px !important;
        bottom: -20px !important;
        max-width: 280px !important;
    }
}

/* ── Module Card Hover ── */
.efast-module-card:hover {
    border-color: #01027a !important;
}
@media (min-width: 768px) {
    .efast-module-card {
        flex-direction: row !important;
        align-items: center !important;
    }
    .efast-module-card > div:first-child {
        margin-bottom: 0 !important;
    }
    .efast-module-card > div:last-child {
        margin-left: auto;
    }
}

/* ── System Requirements Grid ── */
@media (max-width: 1023px) {
    .efast-sysreq-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}
@media (max-width: 639px) {
    .efast-sysreq-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Related Courses Grid ── */
@media (max-width: 1023px) {
    .efast-related-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}
@media (max-width: 639px) {
    .efast-related-grid {
        grid-template-columns: 1fr !important;
    }
}
.efast-related-card:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.efast-related-card:hover img {
    transform: scale(1.05);
}

/* ── About Section Responsive ── */
@media (min-width: 1024px) {
    .efast-about-flex {
        flex-direction: row !important;
    }
    .efast-about-img {
        width: 50%;
    }
    .efast-about-flex > div:last-child {
        width: 50%;
    }
    .efast-phecc-badge {
        display: block !important;
    }
}

/* ── Course Description Prose ── */
.efast-course-prose h2,
.efast-course-prose h3,
.efast-course-prose h4 {
    font-weight: 700;
    color: #000;
    margin-top: 32px;
    margin-bottom: 12px;
}
.efast-course-prose h3 {
    font-size: 24px;
}
.efast-course-prose p {
    margin-bottom: 16px;
}
.efast-course-prose ul,
.efast-course-prose ol {
    padding-left: 20px;
    margin-bottom: 16px;
}
.efast-course-prose li {
    margin-bottom: 8px;
}

/* ── Blog Cards ── */
.efast-blog-card:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.12) !important;
    transform: translateY(-4px);
}
.efast-blog-card:hover img {
    transform: scale(1.05);
}
.efast-blog-card:hover .efast-blog-card-overlay {
    opacity: 1 !important;
}
@media (max-width: 767px) {
    .efast-blog-grid {
        grid-template-columns: 1fr !important;
    }
    .efast-blog-viewall {
        display: none !important;
    }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .efast-blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ── Testimonial Ribbon ── */
@keyframes efast-slide-testimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.efast-testimonial-track {
    animation: efast-slide-testimonials 30s linear infinite;
}
.efast-testimonial-track:hover {
    animation-play-state: paused;
}
@media (max-width: 767px) {
    .efast-testimonial-track > div {
        width: 300px !important;
    }
}

/* ── Offline Course: Date Pill Radio Buttons ── */
.efast-date-pill input:checked + .efast-date-pill-label {
    background: #017EFF !important;
    border-color: #017EFF !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(1,126,255,0.3);
}
.efast-date-pill-label:hover {
    background: rgba(255,255,255,0.2) !important;
}
.efast-buy-now-btn:hover {
    background: rgba(1,126,255,0.9) !important;
}
@media (max-width: 767px) {
    .efast-date-pills {
        justify-content: center;
    }
    .efast-date-pill-label {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    .efast-buy-now-btn {
        max-width: 100% !important;
    }
}
