/* --- Visibility Toggles --- */
.sw-desktop-view {
    display: block;
}

.sw-mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .sw-desktop-view {
        display: none;
    }

    .sw-mobile-view {
        display: block;
    }
}

/* --- Desktop Styles (User Provided) --- */
.sw-desktop-view a {
    text-decoration: none;
}

.sw-desktop-view .slider-container {
    width: 100%;
    position: relative;
}

.sw-desktop-view .slider-page {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: var(--gap, 0);
    /* User had var(--gap) but didn't define it. Default to 0 or remove? Grid gap defaults to 0. */
    /* Wait, user CSS has gap: var(--gap); */
    gap: 0;
    /* Defaulting to 0 as variable is missing in snippet */
    opacity: 0;
    transition: opacity 0.5s ease;
    /* User had var(--fade-speed). Defaulting. */
}

.sw-desktop-view .slider-page.active {
    display: grid;
    opacity: 1;
}

.sw-desktop-view .card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0 20px;
}

.sw-desktop-view .card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.sw-desktop-view .card-text {
    padding: 26px 20px;
    color: white;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sw-desktop-view .angled-text {
    display: inline-block;
    transform: rotate(-5deg);
}

.sw-desktop-view .c1 {
    background: #EEAC45;
}

.sw-desktop-view .c2 {
    background: #0D57A6;
}

.sw-desktop-view .c3 {
    background: #972A7F;
}

.sw-desktop-view .c4 {
    background: #EEAC45;
}

.sw-desktop-view .c5 {
    background: #0D57A6;
}

.sw-desktop-view .c6 {
    background: #972A7F;
}

.sw-desktop-view .center-card {
    margin-top: 60px;
    margin-left: 20px;
    margin-right: 20px;
}

.sw-desktop-view .center-card .card-text {
    padding: 40px 25px;
    font-size: 28px;
    font-weight: 700;
}

/* Note: User had a media query here for slider-page grid-template-columns: 1fr. 
   We are handling <768px via the specific Mobile View, so we omit that fallback. */


/* --- Mobile Styles (User Provided) --- */
.sw-mobile-view .m-a {
    text-decoration: none;
}

.sw-mobile-view .m-slider-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    margin: 0 auto;
}

.sw-mobile-view .m-card {
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sw-mobile-view .m-card.m-active {
    display: flex;
    opacity: 1;
}

.sw-mobile-view .m-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.sw-mobile-view .m-card-text {
    padding: 40px 25px;
    color: white;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sw-mobile-view .m-angled-text {
    display: inline-block;
    transform: rotate(-5deg);
}

.sw-mobile-view .m-c1 {
    background: #EEAC45;
}

.sw-mobile-view .m-c2 {
    background: #0D57A6;
}

.sw-mobile-view .m-c3 {
    background: #972A7F;
}

.sw-mobile-view .m-c4 {
    background: #EEAC45;
}

.sw-mobile-view .m-c5 {
    background: #0D57A6;
}

.sw-mobile-view .m-c6 {
    background: #972A7F;
}

.sw-mobile-view .m-text-top {
    order: -1;
    /* This ensures text is top even if DOM order is different, 
       but we also adjusted DOM in shortcode. Safe to keep. */
}

@media (max-width: 768px) {
    .sw-mobile-view .m-card img {
        height: 600px;
    }

    .sw-mobile-view .m-card-text {
        padding: 30px 20px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .sw-mobile-view .m-card img {
        height: 400px;
    }

    .sw-mobile-view .m-card-text {
        padding: 25px 15px;
        font-size: 26px;
    }
}