body {
    font-family: Arial, sans-serif;
    margin: 0px;
    background-color: lightgrey;
}

/* Custom Octo Slideshow Layout */
.custom-octo-slideshows {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.custom-octo-slideshows * {
    box-sizing: border-box;
}

.custom-slideshows-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

.custom-octo-slideshows .custom-slideshow-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: 15px;
    width: 100%;
    flex: 1; /* Each slideshow takes equal width */
}

.custom-octo-slideshows .custom-main-slideshow {
    grid-column: span 4;
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio - consistent across all devices */
    overflow: hidden;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 4px solid darkblue;
    touch-action: pan-y; /* Enable vertical scrolling but use horizontal swipes for slides */
}

.custom-octo-slideshows .custom-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.custom-octo-slideshows .custom-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    overflow: hidden;
    pointer-events: none;
}

.custom-octo-slideshows .custom-slide:first-child {
    opacity: 1;
    pointer-events: auto;
}

.custom-octo-slideshows .custom-slide-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

.custom-octo-slideshows .custom-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.custom-octo-slideshows .custom-text-box {
    grid-column: span 4;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.custom-octo-slideshows .custom-text-box-content {
    position: relative;
}

.custom-octo-slideshows .custom-text-item {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.custom-octo-slideshows .custom-text-item.active {
    display: block;
}

.custom-octo-slideshows .custom-text-item h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: bold;
}

.custom-octo-slideshows .custom-text-item p {
    margin: 0;
    color: #34495e;
    line-height: 1.5;
    font-size: 0.95em;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.custom-octo-slideshows .custom-navigation-controls {
    grid-column: span 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    z-index: 5;
}

.custom-octo-slideshows .custom-nav-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.custom-octo-slideshows .custom-nav-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: inherit;
    font-size: 14px;
}

.custom-octo-slideshows .custom-nav-button:hover {
    background: #2980b9;
}

.custom-octo-slideshows .custom-dots-container {
    display: flex;
    gap: 10px;
}

.custom-octo-slideshows .custom-dot {
    height: 15px;
    width: 15px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s;
}

.custom-octo-slideshows .custom-dot.custom-active {
    background-color: #3498db;
}

.custom-octo-slideshows .custom-slide-counter {
    font-family: inherit;
    font-size: 14px;
}

/* Swipe indicator - appears briefly when slideshow is first interacted with */
.custom-octo-slideshows .swipe-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.custom-octo-slideshows .swipe-indicator.show {
    opacity: 1;
    animation: fadeOutAfterDelay 2s forwards;
}

@keyframes fadeOutAfterDelay {
    0%, 50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive layout */
@media (max-width: 500px) {
    .custom-slideshows-row {
        flex-direction: column;
        gap: 30px;
    }

    .custom-octo-slideshows .custom-slideshow-container {
        width: 100%;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .custom-octo-slideshows {
        padding: 0 5px;
        margin: 10px auto;
        gap: 15px;
    }
    
    .custom-slideshows-row {
        gap: 15px;
    }
    
    .custom-octo-slideshows .custom-slideshow-container {
        gap: 10px;
    }
    
    .custom-octo-slideshows .custom-main-slideshow {
        /* Keep the same 16:9 aspect ratio as desktop */
        padding-bottom: 56.25%;
        border-width: 4px;
        border-radius: 25px;
    }
    
    /* Adjust navigation for mobile */
    .custom-octo-slideshows .custom-nav-button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .custom-octo-slideshows .custom-dot {
        height: 12px;
        width: 12px;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .custom-octo-slideshows {
        padding: 0 2px;
        margin: 5px auto;
    }
    
    /* Still maintain the same aspect ratio */
    .custom-octo-slideshows .custom-main-slideshow {
        padding-bottom: 56.25%;
    }
}
