body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1a3c, #4a2c6f);
    font-family: Arial, sans-serif;
    color: white;
    text-align: center;
}

a {
    color: black; /* Sets the default color for all links to black */
}

.container {
    position: relative;
    width: 80%;
}

.title {
    font-family: Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", monospace;
    font-weight: normal;
    font-size: 72px;
    text-transform: uppercase;
    margin: 20px 0;
    line-height: 1;
}

.title a {
    color: white;
    text-decoration: none;
}

.menu-bar {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    position: relative;
}

.menu-bar a {
    color: #FFE1AA;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.menu-bar a:hover {
    text-decoration: underline;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%; /* Start at the bottom of the menu bar */
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 0; /* Increased padding for better hover overlap */
    width: auto;
    box-sizing: border-box;
    z-index: 1;
    white-space: nowrap;
    opacity: 0; /* Start with opacity for transition */
    transition: opacity 0.2s ease-in-out; /* Smooth fade-in/out */
}

.dropdown a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    display: inline-block;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown a:hover {
    text-decoration: underline;
}

/* Show dropdown with opacity transition */
.menu-bar .dropdown-container:hover .dropdown {
    display: block;
    opacity: 1; /* Fully visible on hover */
}

/* Keep dropdown visible while hovering over it */
.menu-bar .dropdown-container .dropdown:hover {
    display: block;
    opacity: 1; /* Maintain visibility */
}

.dropdown-container {
    position: relative;
    display: inline-block;
}

.page-title {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: rgba(238,197,248,0.00);
    margin-bottom: 50px;
    font-size: 24px;
    text-transform: uppercase;
}

.boxes-container {
    margin-top: 20px;
}

.boxes {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px; /* Increased from 20px to 40px for more vertical space */
}

.box {
    width: 30%;
    height: 300px;
    border: 1px solid #FFE1AA;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.box-top {
    background-color: #ff00ff;
    padding: 5px; /* Reduced from 10px to tighten space around text */
    flex: 0 0 auto; /* Use content height instead of flex: 1 */
    min-height: 50px; /* Ensure enough space for text, adjust as needed */
    color: white;
    font-size: 14px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box-bottom {
    background-color: #fff;
    padding: 10px;
    flex: 1; /* Take remaining space, adjusted from flex: 2 */
    color: #1e1a3c;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box-bottom a {
    text-decoration: none;
}

.box-bottom img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-content img {
    width: 862px; /* Maintain aspect ratio of ADT_Scenario3.jpg (300/174 ≈ 1.724, so 500 × 1.724) */
    height: 500px; /* Match video min-height */
    object-fit: contain; /* Preserve aspect ratio for images with different dimensions */
    max-width: 80%; /* Ensure it fits within viewport */
    max-height: 80%; /* Ensure it fits within viewport */
}

.lightbox-content video {
    min-height: 500px; /* Retain existing video sizing */
    max-height: 80%; /* Prevent exceeding viewport height */
    max-width: 80%; /* Prevent exceeding viewport width */
    object-fit: contain;
}

.lightbox-caption {
    color: #FFE1AA;
    font-size: 18px;
    margin-top: 10px;
    text-align: center;
    max-width: 80%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #FFE1AA;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-prev, .lightbox-next {
    color: #FFE1AA;
    font-size: 40px;
    cursor: pointer;
    padding: 0 20px;
    user-select: none;
}

.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover {
    color: #FFFFFF;
}