/* Resources page: slider, sidebar layout, trigger warning */

/* Resources page - extend sidebar background to footer */
.page-template-page-resources .site-main {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Resources page lists use same prose list rules as rest of site */
/* ============================================
   Resources Slider
   ============================================ */
.resources-slider-wrapper {
    width: calc(100% + 40px);
    margin: 2rem -20px;
    position: relative;
    overflow: visible;
    border-radius: 12px;
    isolation: isolate;
}

.resources-slider {
    position: relative;
    width: 100%;
    min-height: 500px;
    overflow: hidden;
}

.resources-slide {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 500px;
    padding: 3rem 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    box-sizing: border-box;
    pointer-events: none;
    overflow: auto;
    max-height: none;
    -webkit-overflow-scrolling: touch;
    background-color: var(--bg-light);
    position: relative;
}

.resources-slide.active {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
}

.resources-slide.has-background {
    position: relative;
    color: #fff;
}

.resources-slide-bg {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #fff;
    z-index: 0;
}

.resources-slide.has-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
}

.resources-slide.has-background .resources-slide-inner,
.resources-slide.has-background .resources-slide-actions {
    position: relative;
    z-index: 1;
}

.resources-slide-content {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.resources-slide-inner {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.resources-slide .resources-slide-actions {
    position: absolute !important;
    right: 2rem;
    bottom: 2rem;
    top: auto !important;
    left: auto !important;
    margin-top: 0 !important;
    z-index: 2;
}

.resources-slide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.resources-slide-button:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.resources-slide-content iframe,
.resources-slide-content embed,
.resources-slide-content object {
    max-width: 100%;
    width: 100%;
    min-height: 400px;
    border: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.resources-slide-content {
    overflow: auto;
    max-height: 100%;
    -webkit-overflow-scrolling: touch;
}

.resources-slider-dots {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 0.875rem;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.resources-slider-dot {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.3) !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.3s ease;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-indent: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    overflow: hidden;
}

.resources-slider-dot:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.2);
}

.resources-slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

@media (max-width: 968px) {
    .resources-slider-wrapper {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
    }

    .resources-slide {
        padding: 2rem 1.5rem;
    }

    .resources-slide-inner {
        flex-direction: column;
    }

    .resources-slide-content iframe,
    .resources-slide-content embed,
    .resources-slide-content object {
        min-height: 300px;
    }
}
/* ============================================
   Page with Sidebar Layout
   ============================================ */
.page-with-sidebar-wrapper {
    display: flex;
    align-items: stretch;
    position: relative;
    width: 100%;
    min-height: calc(100vh - 200px);
}

.page-with-sidebar-wrapper .container {
    max-width: 1200px;
    padding-right: 3rem;
    padding-left: 20px;
    flex: 1;
    min-width: 0;
    margin-right: auto;
    padding-bottom: 3rem;
}

.content-area {
    min-width: 0; /* Prevents grid overflow */
}

/* Sidebar Styles */
.page-with-sidebar-wrapper .sidebar {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px 0 0 8px;
    position: relative;
    width: 300px;
    flex-shrink: 0;
    align-self: stretch;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-direction: column;
}

.page-with-sidebar-wrapper .sidebar::before {
    content: '';
    position: absolute;
    left: 0;
    top: calc(2.0625rem * 2 + 2.5rem * 1.3 + 1px);
    bottom: 0;
    width: 1px;
    background-color: #e4bc76;
}

/* Create a pseudo-element to extend the background to footer */
.page-template-page-resources .page-with-sidebar-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: -7rem; /* Extend past the main content to reach footer (accounting for footer margin) */
    width: 300px;
    background-color: var(--bg-light);
    z-index: -1;
    pointer-events: none;
}

.sidebar .widget {
    margin-bottom: -8rem;
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

.sidebar .widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    margin-top: 0;
    color: var(--text-dark);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar .widget p {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.sidebar .widget p:last-child {
    margin-bottom: 0;
}

.sidebar .widget > *:first-child {
    margin-top: 1.5rem;
}

.sidebar .widget > *:last-child {
    margin-bottom: 0;
}

.sidebar .widget ul {
    list-style-type: circle;
    padding-left: 1rem;
    margin: 0 0 0.25rem 0;
}

.sidebar .widget ul li {
    margin-bottom: 0;
    padding-bottom: 0;
    padding-left: 0;
}

.sidebar .widget ul li:last-child {
    margin-bottom: 0;
}

.sidebar .widget a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar .widget a:hover {
    color: #555;
    text-decoration: underline;
}

/* Responsive: Stack sidebar below content on smaller screens */
@media (max-width: 968px) {
    .page-with-sidebar-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .page-with-sidebar-wrapper::after {
        display: none;
    }

    .page-with-sidebar-wrapper .container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .page-with-sidebar-wrapper .sidebar {
        position: static;
        top: auto;
        width: 100%;
        border-radius: 8px;
        margin-top: 2rem;
        margin-left: 20px;
        margin-right: 20px;
        align-self: auto;
    }
}

/* ============================================
   Trigger Warning Overlay (Resources Page)
   ============================================ */
.trigger-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* When background image is present, reduce background-color opacity */
.trigger-warning-overlay.has-background-image {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Dark overlay for better text readability when image is present */
.trigger-warning-overlay.has-background-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.trigger-warning-content {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.trigger-warning-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trigger-warning-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
}

.trigger-warning-text p {
    margin-bottom: 1rem;
}

.trigger-warning-text p:last-child {
    margin-bottom: 0;
}

.trigger-warning-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.trigger-warning-button {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-align: center;
}

.trigger-warning-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.trigger-warning-button:active {
    transform: translateY(0);
}

.trigger-warning-button-home {
    background-color: #94a695;
}

.trigger-warning-button-home:hover {
    background-color: #7a8a7b;
    color: #fff;
}

body.trigger-warning-active {
    overflow: hidden;
}

@media (max-width: 768px) {
    .trigger-warning-content {
        padding: 2rem 1.5rem;
    }

    .trigger-warning-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .trigger-warning-text {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .trigger-warning-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .trigger-warning-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
}
