/* Slide Overview Component - Reusable across all pages */

.slide-overview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.overview-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 50px;
    width: 95vw;
    height: 95vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f7f2eb;
}

.overview-header h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #5b4f3f;
    margin: 0;
}

.close-button {
    background: rgba(91, 79, 63, 0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(91, 79, 63, 0.2);
    transform: scale(1.1);
}

.close-button svg {
    width: 24px;
    height: 24px;
    color: #5b4f3f;
}

.slides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.slide-box {
    background: #ffffff;
    border: 3px solid #e5e5e5;
    border-radius: 20px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
}

.slide-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-color: #675946;
}

.slide-box.current {
    border-color: #675946;
    box-shadow: 0 8px 25px rgba(103, 89, 70, 0.3);
}

.slide-preview {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.slide-number {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ee6360, #f29a56);
    color: #fffcf8;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 15px;
    color: white;
}

.slide-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    margin: 0;
}

/* Comprehensive Responsive Slide Overview System */

/* Extra Large Desktop - 1600px+ */
@media (min-width: 1600px) {
    .overview-content {
        padding: 70px;
        max-width: 1800px;
        max-height: 1200px;
        border-radius: 32px;
    }
    
    .overview-header {
        margin-bottom: 60px;
        padding-bottom: 30px;
    }
    
    .overview-header h2 {
        font-size: 42px;
    }
    
    .close-button {
        width: 60px;
        height: 60px;
    }
    
    .close-button svg {
        width: 28px;
        height: 28px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 35px;
    }
    
    .slide-number {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: 20px;
        left: 20px;
    }
    
    .slide-overlay {
        padding: 20px;
    }
    
    .slide-title {
        font-size: 16px;
        line-height: 1.4;
    }
}

/* Large Desktop - 1400px to 1599px */
@media (max-width: 1599px) and (min-width: 1400px) {
    .overview-content {
        padding: 60px;
        border-radius: 28px;
    }
    
    .overview-header {
        margin-bottom: 50px;
        padding-bottom: 25px;
    }
    
    .overview-header h2 {
        font-size: 36px;
    }
    
    .close-button {
        width: 55px;
        height: 55px;
    }
    
    .close-button svg {
        width: 26px;
        height: 26px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 30px;
    }
    
    .slide-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
        top: 18px;
        left: 18px;
    }
    
    .slide-overlay {
        padding: 18px;
    }
    
    .slide-title {
        font-size: 14px;
    }
}

/* Standard Desktop - 1200px to 1399px */
@media (max-width: 1399px) and (min-width: 1200px) {
    .overview-content {
        padding: 50px;
        border-radius: 24px;
    }
    
    .overview-header h2 {
        font-size: 32px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .slide-number {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    .slide-title {
        font-size: 13px;
    }
}

/* Large Laptop - 1024px to 1199px */
@media (max-width: 1199px) and (min-width: 1024px) {
    .overview-content {
        padding: 40px;
        width: 96vw;
        height: 96vh;
    }
    
    .overview-header h2 {
        font-size: 28px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 22px;
    }
    
    .slide-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .slide-title {
        font-size: 12px;
    }
}

/* Landscape Mode - Tablets and Small Laptops */
@media (max-width: 1023px) and (orientation: landscape) and (min-height: 600px) {
    .overview-content {
        padding: 35px;
        width: 97vw;
        height: 97vh;
        border-radius: 20px;
    }
    
    .overview-header {
        margin-bottom: 30px;
        padding-bottom: 18px;
    }
    
    .overview-header h2 {
        font-size: 26px;
    }
    
    .close-button {
        width: 45px;
        height: 45px;
    }
    
    .close-button svg {
        width: 22px;
        height: 22px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 18px;
    }
    
    .slide-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
        top: 12px;
        left: 12px;
    }
    
    .slide-overlay {
        padding: 12px;
    }
    
    .slide-title {
        font-size: 11px;
    }
}

/* Portrait Tablets - 768px to 1023px */
@media (max-width: 1023px) and (min-width: 768px) and (orientation: portrait) {
    .overview-content {
        padding: 40px;
        width: 97vw;
        height: 97vh;
        border-radius: 22px;
    }
    
    .overview-header {
        margin-bottom: 35px;
        padding-bottom: 20px;
    }
    
    .overview-header h2 {
        font-size: 28px;
    }
    
    .close-button {
        width: 48px;
        height: 48px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .slide-number {
        width: 34px;
        height: 34px;
        font-size: 13px;
        top: 14px;
        left: 14px;
    }
    
    .slide-overlay {
        padding: 14px;
    }
    
    .slide-title {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* Large Mobile - 600px to 767px */
@media (max-width: 767px) and (min-width: 600px) {
    .overview-content {
        padding: 30px;
        width: 98vw;
        height: 98vh;
        border-radius: 18px;
    }
    
    .overview-header {
        margin-bottom: 30px;
        padding-bottom: 16px;
    }
    
    .overview-header h2 {
        font-size: 24px;
    }
    
    .close-button {
        width: 44px;
        height: 44px;
    }
    
    .close-button svg {
        width: 20px;
        height: 20px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .slide-number {
        width: 30px;
        height: 30px;
        font-size: 11px;
        top: 12px;
        left: 12px;
    }
    
    .slide-overlay {
        padding: 12px;
    }
    
    .slide-title {
        font-size: 11px;
        line-height: 1.2;
    }
}

/* Standard Mobile - 480px to 599px */
@media (max-width: 599px) and (min-width: 480px) {
    .overview-content {
        padding: 25px;
        width: 98vw;
        height: 98vh;
        border-radius: 16px;
    }
    
    .overview-header {
        margin-bottom: 25px;
        padding-bottom: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .overview-header h2 {
        font-size: 22px;
        margin-bottom: 0;
    }
    
    .close-button {
        width: 42px;
        height: 42px;
        align-self: flex-end;
        position: absolute;
        top: 25px;
        right: 25px;
    }
    
    .slides-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 14px;
    }
    
    .slide-box {
        border-radius: 14px;
        border-width: 2px;
    }
    
    .slide-box:hover {
        transform: translateY(-4px);
    }
    
    .slide-number {
        width: 28px;
        height: 28px;
        font-size: 10px;
        top: 10px;
        left: 10px;
    }
    
    .slide-overlay {
        padding: 10px;
    }
    
    .slide-title {
        font-size: 10px;
        line-height: 1.2;
    }
}

/* Small Mobile - 375px to 479px */
@media (max-width: 479px) and (min-width: 375px) {
    .overview-content {
        padding: 20px;
        width: 99vw;
        height: 99vh;
        border-radius: 14px;
    }
    
    .overview-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .overview-header h2 {
        font-size: 20px;
    }
    
    .close-button {
        width: 40px;
        height: 40px;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .close-button svg {
        width: 18px;
        height: 18px;
    }
    
    .slides-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .slide-box {
        border-radius: 12px;
        aspect-ratio: 16/10;
    }
    
    .slide-number {
        width: 26px;
        height: 26px;
        font-size: 9px;
        top: 8px;
        left: 8px;
    }
    
    .slide-overlay {
        padding: 8px;
    }
    
    .slide-title {
        font-size: 9px;
        line-height: 1.1;
    }
}

/* Extra Small Mobile - Under 375px */
@media (max-width: 374px) {
    .overview-content {
        padding: 15px;
        width: 99vw;
        height: 99vh;
        border-radius: 12px;
    }
    
    .overview-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .overview-header h2 {
        font-size: 18px;
    }
    
    .close-button {
        width: 36px;
        height: 36px;
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .close-button svg {
        width: 16px;
        height: 16px;
    }
    
    .slides-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .slide-box {
        border-radius: 10px;
        aspect-ratio: 16/10;
        border-width: 2px;
    }
    
    .slide-number {
        width: 24px;
        height: 24px;
        font-size: 8px;
        top: 6px;
        left: 6px;
    }
    
    .slide-overlay {
        padding: 6px;
    }
    
    .slide-title {
        font-size: 8px;
        line-height: 1.1;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .slide-overview {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .overview-content {
        border: 2px solid #000;
    }
    
    .slide-box {
        border-color: #000;
        border-width: 3px;
    }
    
    .slide-box:hover,
    .slide-box.current {
        border-color: #000;
        background: #f0f0f0;
    }
    
    .close-button {
        background: #000;
        color: #fff;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .close-button {
        min-width: 48px;
        min-height: 48px;
    }
    
    .slide-box:hover {
        transform: none;
    }
    
    .slide-box:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    .close-button:hover {
        transform: none;
    }
    
    .close-button:active {
        transform: scale(0.95);
        background: rgba(91, 79, 63, 0.3);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .slide-box {
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    
    .slide-box:hover {
        transform: none;
    }
    
    .close-button {
        transition: background-color 0.2s ease;
    }
    
    .close-button:hover {
        transform: none;
    }
}

/* Print styles - hide overlay */
@media print {
    .slide-overview {
        display: none !important;
    }
}