body {
    margin: 0;
    padding: 0;
    background-color: #1A1A1D;
    background-image: url('background.png'); /* Replace with your actual image path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100vw;
    overflow: hidden;
    font-family: 'Arial', sans-serif; /* Or any font you prefer; Arial used here for wide availability */
    color: white; /* White text */
    display: flex; /* Enable flexbox for centering */
    flex-direction: column; /* Align items vertically */
    align-items: center; /* Center horizontally */
    justify-content: flex-start; /* Align content to the top */
    height: 100vh; /* Full height for index.html */
}

.explore-body {
    height: auto; /* Allow the body to grow with content */
    overflow-y: auto; /* Enable vertical scrolling */
}

.top-nav {
    position: fixed; /* Keep the nav bar fixed at the top */
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 1; /* Ensure the nav bar is above other content */
}

.nav-button {
    background: none;
    border: 2px solid rgba(255,255,255, 0.8); /* White border with slight transparency */
    padding: 8px 16px; /* Slightly reduced padding */
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transitions */
}

.nav-button.active {
    background-color: white; /* Solid white background on active */
    color: black; /* Black text color when active */
    border-color: white; /* White border when active */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8); /* Glowing border on active */
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Subtle background on hover */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); /* Glowing border on hover */
}

.main-content {
    text-align: center; /* Center text within the div */
    margin-top: 100px; /* Adjust this value to ensure it is below the nav bar */
    flex: 1; /* Allow the main content to grow and fill the available space */
}

.title {
    font-size: 4em; /* Large title size */
    font-weight: bold; /* Bold text */
    margin-bottom: 0.5em; /* Reduced margin below the title */
}

.slogan {
    font-size: 1.2em; /* Slightly larger slogan */
    opacity: 0.8; /* Slightly transparent slogan */
}

.search-container {
    position: fixed; /* Keep search bar fixed */
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 600px;
    z-index: 1; /* Ensure search is above content */
}

.search-bar {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(255,255,255, 0.8);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.2); /* Slightly transparent black background */
    color: white;
    font-size: 16px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Keep this */
    gap: 20px;
    padding: 20px;
    margin-top: 150px; /* Adjust this value to ensure it is below the search bar */
    width: 90%;
}

.photo-card {
    display: flex;
    flex-direction: column; /* Stack image and face names vertically */
    justify-content: center;  /* Center the image horizontally within the card */
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transitions */
    position: relative; /* Position relative for absolute positioning of face names */
}

.photo-card img {
    width: 100%;
    height: 200px; /* Your fixed height */
    display: block; /* Prevent extra space below */
    object-fit: cover;
}

.photo-card .face-names {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
    color: white;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease; /* Smooth transition for opacity */
    pointer-events: none; /* Ensure the face names do not interfere with hover events */
}

.photo-card:hover {
    transform: translateY(-10px); /* Move the card up slightly */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8); /* Glowing border around the card on hover */
}

.photo-card:hover .face-names {
    opacity: 1; /* Show face names on hover */
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9); /* Black background with opacity */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Prevent background scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}
