/* Container */
.sa-archive .container,
.sa-single .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid Layout */
.sa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Cards */
.sa-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.sa-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.sa-card-content {
    padding: 20px;
}

.sa-card-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.sa-card-title a {
    text-decoration: none;
    color: #333;
}

.sa-card-title a:hover {
    color: #007cba;
}

.sa-card-excerpt {
    color: #666;
    line-height: 1.5;
}

/* Event Date Badge */
.sa-event-date {
    font-size: 0.85rem;
    color: #007cba;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Single Pages */
.sa-single-header {
    margin: 40px 0 20px;
}

.sa-single-image {
    margin-bottom: 20px;
}

.sa-single-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.sa-single-title {
    font-size: 2.5rem;
    margin: 20px 0;
}

.sa-single-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Event Details Box */
.sa-event-details {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.sa-event-detail {
    margin-bottom: 10px;
}

/* Pagination */
.sa-pagination {
    text-align: center;
    margin: 40px 0;
}

.sa-pagination a,
.sa-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
}

.sa-pagination .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Responsive */
@media (max-width: 768px) {
    .sa-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sa-single-title {
        font-size: 1.75rem;
    }
}

/* Event Archive View Switcher */
.view-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 0; /* Adjusted for container integration */
}

.view-btn {
    background: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1.5px solid transparent;
}

.view-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: invert(0.4);
    transition: filter 0.2s;
}

.view-btn.active {
    border-color: #ff833b;
    background: #fff4ed;
    box-shadow: 0 4px 12px rgba(255, 131, 59, 0.2);
}

.view-btn.active img {
    filter: invert(0) sepia(1) saturate(10) hue-rotate(320deg) brightness(1);
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* ========= CLASSIC VIEW (HORIZONTAL LAYOUT) ========= */
.classic-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.jmm-classic-event-overall-parent {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jmm-classic-event-overall-parent:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.15);
}

.jmm-classic-event-featured-image {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 1rem;
    overflow: hidden;
    background: #e9eef3;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.jmm-classic-event-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.jmm-classic-event-overall-parent:hover .jmm-classic-event-featured-image img {
    transform: scale(1.03);
}

.jmm-classic-event-day-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff4ed;
    border-radius: 1.8rem;
    width: 85px;
    padding: 0.8rem 0.2rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 131, 59, 0.2);
}

.event-day {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #ff833b;
    text-transform: uppercase;
}

.event-date {
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.2;
    color: #1e293b;
}

.jmm-classic-event-contents {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.event-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.event-description {
    font-size: 0.9rem;
    line-height: 1.45;
    color: #334155;
}

.event-datetime {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem;
}

.event-datetime span {
    font-weight: 600;
    color: #ff833b;
    background: #fff0e6;
    padding: 0.2rem 0.7rem;
    border-radius: 40px;
    font-size: 0.8rem;
}

.jmm-classic-event-view-details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    text-align: center;
    padding: 0.7rem 1.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 60px;
    background: white;
    color: #ff833b;
    border: 1.5px solid #ff833b;
    border-bottom-width: 3px;
    border-bottom-color: #1a202c;
    transition: all 0.25s ease-in-out;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.jmm-classic-event-view-details-button:hover {
    color: white;
    background: #4a6af1;
    border-color: #4a6af1;
    border-bottom-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(74, 106, 241, 0.25);
}

.jmm-classic-event-view-details-button .button-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url('../icons/arrow_forward_for_swipe.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(-30deg);
    transition: all 0.2s ease;
    filter: none;
}

.jmm-classic-event-view-details-button:hover .button-icon {
    transform: rotate(-30deg) translateX(2px);
    filter: brightness(0) invert(1);
}

@media (max-width: 750px) {
    .jmm-classic-event-overall-parent {
        flex-wrap: wrap;
    }
    .jmm-classic-event-view-details-button {
        white-space: normal;
    }
}

/* ========= GRID VIEW (card layout) ========= */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.grid-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.2);
}

.grid-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.grid-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-card:hover .grid-card-image img {
    transform: scale(1.03);
}

.grid-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: 60px;
    padding: 0.3rem 0.9rem;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 131, 59, 0.3);
}

.grid-badge .grid-day {
    color: #ff833b;
    text-transform: uppercase;
}

.grid-badge .grid-date {
    color: #1e293b;
}

.grid-card-content {
    padding: 1.2rem 1.2rem 20px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.grid-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

.grid-desc {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
}

.grid-datetime {
    font-size: 0.8rem;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem;
}

.grid-datetime span {
    background: #fff0e6;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ff833b;
}

.grid-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.55rem 1.3rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 60px;
    background: white;
    color: #ff833b;
    border: 1.5px solid #ff833b;
    border-bottom-width: 3px;
    border-bottom-color: #1a202c;
    transition: all 0.25s;
    cursor: pointer;
    margin-top: auto;
}

.grid-button:hover {
    color: white;
    background: #4a6af1;
    border-color: #4a6af1;
    border-bottom-color: transparent;
    transform: translateY(-2px);
}

.grid-button .button-icon {
    width: 16px;
    height: 16px;
    background-image: url('../icons/arrow_forward_for_swipe.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(-30deg);
    filter: none;
}

.grid-button:hover .button-icon {
    filter: brightness(0) invert(1);
    transform: rotate(-30deg) translateX(2px);
}

.hidden {
    display: none;
}

/* ========= PROJECT CARD VIEW ========= */
.jmm-projects-shortcode-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.jmm-project-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    background: #ffffff;
    border-radius: 1.75rem;
    padding: 0;
    padding-bottom: 20px;
    box-shadow: 0 25px 40px -14px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.jmm-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px -15px rgba(0, 0, 0, 0.28);
}

.jmm-project-card-featured-image {
    position: relative;
    width: 100%;
    height: 15.625rem; /* 250px */
    background: #1e293b;
    overflow: hidden;
    border-top-left-radius: 1.75rem;
    border-top-right-radius: 1.75rem;
}

.jmm-project-card-featured-image > a:not(.jmm-project-card-day-date) {
    display: block;
    width: 100%;
    height: 100%;
}

.jmm-project-card-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.jmm-project-card:hover .jmm-project-card-featured-image img {
    transform: scale(1.02);
}

.jmm-project-card-day-date {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(115deg, #ff833b 0%, #ff9f5c 100%);
    backdrop-filter: blur(2px);
    border-radius: 0.9375rem;
    padding: 0.65rem 1.8rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    border: none;
    z-index: 12;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.project-badge-text {
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: white;
    text-transform: capitalize;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
    text-decoration: none;
}

.jmm-project-card-day-date:hover {
    transform: scale(1.05);
    background: linear-gradient(115deg, #ff9f5c 0%, #ff833b 100%);
}

.jmm-project-card-contents {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0 1.5rem;
    margin-top: 0.5rem;
}

.project-title {
    font-size: 1.55rem;
    font-weight: 750;
    color: #0a0f1c;
    letter-spacing: -0.3px;
    line-height: 1.25;
    transition: color 0.2s ease;
    text-decoration: none;
    display: block;
}

.project-title:hover {
    color: #4a6af1;
}

.project-description {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #2c3e4f;
}

.jmm-project-card-view-details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    align-self: flex-start;
    margin-left: 1.5rem;
    margin-top: auto;
    padding: 0.7rem 1.4rem;
    font-weight: 620;
    font-size: 0.9rem;
    border-radius: 60px;
    background: white;
    color: #ff833b;
    border: 1.5px solid #ff833b;
    border-bottom-width: 3px;
    border-bottom-color: #1a202c;
    transition: all 0.25s ease-out;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.jmm-project-card-view-details-button:hover {
    color: white;
    background: #4a6af1;
    border-color: #4a6af1;
    border-bottom-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(74, 106, 241, 0.3);
}

.jmm-project-card-view-details-button .button-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url('../icons/arrow_forward_for_swipe.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(-30deg);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.jmm-project-card-view-details-button:hover .button-icon {
    transform: rotate(-30deg) translateX(3px);
    filter: brightness(0) invert(1);
}

@media (max-width: 500px) {
    .jmm-project-card {
        width: 100%;
    }
    .project-title {
        font-size: 1.35rem;
    }
    .jmm-project-card-day-date {
        top: 12px;
        right: 12px;
        padding: 0.5rem 1.4rem;
    }
    .project-badge-text {
        font-size: 0.85rem;
    }
}

/* ========= EVENTS ARCHIVE HEADER ========= */
.jmm-events-header {
    position: relative;
    text-align: center;
    color: #fff;
    overflow: hidden;
    min-height: 50vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #4f46e5, #7c3aed, #2563eb);
    background-size: 400% 400%;
    animation: jmm-gradient-animate 12s ease infinite;
}

@keyframes jmm-gradient-animate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.jmm-events-header .container {
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
}

.jmm-events-header h1 {
    font-size: clamp(3rem, 15vw, 8rem) !important;
    font-weight: 900 !important;
    letter-spacing: -0.05em !important;
    text-transform: uppercase !important;
    font-style: italic !important;
    margin: 0 !important;
    line-height: 1 !important;
    color: #ffffff !important;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3)) !important;
}

.jmm-events-header .breadcrumbs {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.jmm-shape-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.jmm-shape-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 64px;
    transform: rotateY(180deg);
}

.jmm-shape-divider .shape-fill {
    fill: #FFFFFF;
}

@media (min-width: 768px) {
    .jmm-shape-divider svg {
        height: 120px;
    }
}

/* Overlapping Controls Container */
.events-controls-container {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border: 1px solid #e5e7eb; 
    border-radius: 15px;      
    margin: -50px auto 3rem; /* Overlaps the slanted div */
    width: 90%;
    max-width: 1200px;
    padding: 0 40px;
    background-color: white;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 20;
}

.events-search-shortcode, 
.events-switch-toggle {
    font-weight: 500;
    color: #374151;
}

@media (max-width: 768px) {
    .events-controls-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 1rem;
        margin-top: -30px;
    }
}