/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    color: #d5d5d5;
}

.main-content {
    min-height: 100vh; /* ⬅️ ensures full height of viewport */
    width: 100%;
    background-image: url("../images/logo/background.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}


.main-content::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay (adjust opacity as needed) */
    z-index: -1; /* Keeps it behind other content */
}

/* Admin Dashboard Button */
.admin-tools {
    position: absolute;
    top: 7px;
    left: 15px;
}

.admin-button {
    background-color: #2c7c5e;
    color: white;
    border: none;
    padding: 5px 10px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s;
}

.admin-button:hover {
    background-color: #1e5a42;
    transform: scale(1.05);
}
.top-bar {
    display: flex;
    font-weight: bold;
    justify-content: flex-end;
    gap: 4px;
    padding: 10px 15px;
    background-color: #222;
    color: #fff;
    width: 100%;
}

.top-bar .top-link {
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    transition: color 0.3s ease-in-out;
}

.top-bar .top-link:hover {
    color: #4caf50;
}

.top-role {
    font-size: 0.85rem;
    color: #ffffff;
    text-align: right;
    width: 100%;
    padding-right: 15px;
}

.header {
    width: 100vw;
    max-width: 100%;
    background-color: #222;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-img {
    display: block;       /* optional but helps remove extra space below the image */
    width: 100%;/* let the image fill the width of its container/screen */
    max-width: none;
    height: auto;         /* keep aspect ratio intact */
    object-fit: cover;
}

.logo {
    display: flex;
    justify-content: center;
    overflow: hidden;
    align-items: center;
    width: 100%;
}


.tagline {
    font-size: 1rem;
    text-align: center;  /* Centers the text */
    padding: 5px 20px;  /* Adds spacing for better readability */
    color: #d5d5d5;  /* Ensures visibility */
    font-style: italic;
    display: inline-block;  /* Ensures it appears as a separate block */
}



/* Navigation Bar */
.navbar {
    width: 100%;
    background-color: black;
    padding: 0.5rem;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}


.nav-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    justify-content: center;
    padding: 0 10px;
    list-style: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    font-size: clamp(0.75rem, 2.5vw, 1rem);
    text-decoration: none;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.3s ease-in-out;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: max-content;
    white-space: nowrap;
}

.nav-text {
    display: block !important;
    font-size: clamp(0.7rem, 2vw, 0.95rem);
    margin: 2px;
}

.nav-list .active a {
    color: #4CAF50;
    font-weight: bold;
}

/* Main Content */
.main h2 {
    font-size: clamp(0.9rem, 2vw, 1.1rem);

}

.btn-green {
    background-color: #4caf50;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.btn-green:hover {
    background-color: #45a049;
}

/* Gallery Grid Container */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive Grid */
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}
/* Prevent stretching and fit images naturally */
.gallery-grid div {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 200px; /* Ensure reasonable minimum height */
}

/* Ensure images fully fit */
.gallery-grid img {
    width: 100%;  /* Ensures full width */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px;
    object-fit: contain;  /* Ensures the entire image is visible */
}

/* Fixing stretched images */
.gallery-grid div img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover; /* Crop instead of stretching */
}

/* Hover Effect */
.gallery-grid div:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

/* Delete button styles */
.delete-form {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.delete-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.delete-button:hover {
    background-color: #c0392b;
}


.event-hero {
    position: relative;
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease-in;
    cursor: pointer;
}

.event-hero img.event-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    transition: transform 0.3s ease;
    border-radius: 12px;
}


/* 🔥 Full-size overlay background */
.event-overlay {
    position: absolute;
    inset: 0; /* shorthand for top:0; bottom:0; left:0; right:0 */
    background: rgba(0, 0, 0, 0.1); /* adjust to desired darkness */
    z-index: 1;
}

/* 🎯 Text on top of overlay */
.event-text {
    position: absolute;
    bottom: 10px;
    left: 15px;
    z-index: 2;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 14px;
    max-width: 85%;
}

.event-text h3 {
    margin: 0;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-family: Georgia, 'Times New Roman', serif;
}

.visibility-label {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #ffd;
}

.delete-event-button.top-right {
    position: absolute;
    top: 0;
    right: -5px;
    z-index: 3;
    border: none;
    background: none;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    transition: background-color 0.3s ease;
}

/* Clean Form Container */
.admin-form-container {
    display: none;
    position: relative;
    bottom: 100px;
    right: 30px;
    width: 320px;
    background: #2c3e50; /* Dark gray-blue */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: white;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    z-index: 10;
}

/* Form Title */
.form-title {
    font-weight: bold;
    margin-bottom: 15px;
}

/* Upload Forms */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Input Fields */
.upload-form input,
.upload-form select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: none;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    background: #ecf0f1;
    color: #333;
}

/* Buttons */
.btn-primary {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease-in-out;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-danger {
    background-color: #E74C3C;
    color: white;
    border: none;
    margin-top: 10px;
    padding: 10px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease-in-out;
}

.btn-danger:hover {
    background-color: #a82316;
}

/* Separator */
hr {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}


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

/* Ensure the image keeps its original size */
.lightbox-content {
    max-width: none; /* Remove any width restriction */
    max-height: none; /* Remove height restriction */
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

/* Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: #ccc;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.prev:hover, .next:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Event Widget Grid */
.events-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* grid-template-columns: repeat(5, 1fr); /* 💥 2 items per row */
    gap: 20px;
    padding: 5px;
    margin: 20px;
}


/* Event Widget (Clickable) */
.event-widget {
    background-color: #1c1c1c;
    color: #ecf0f1;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

}

/* Gallery Page */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.4s ease;
    object-fit: cover;
}

/* When image is fully loaded */
.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Back Button */
.btn-back {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin: 20px auto;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.btn-back:hover {
    background-color: #4caf50;
}

/* Admin Upload Widget */
.admin-widget {
    position: fixed;
    bottom: 40px;
    right: 25px;
    z-index: 9999;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    background-color: #28a745;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
}


.admin-widget:hover {
    background-color: #45a049;
    transform: scale(1.1);
}

/* Hidden Form Container */
.admin-form-container {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 300px;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: white;
}


.admin-message {
    position: relative;
    margin: 20px auto;
    max-width: 700px;
    padding: 10px 15px;
    border-radius: 10px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    font-weight: bold;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.5s ease;
}

.event-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px auto;
    width: 90%;
    max-width: 800px;
}

.searchbar{
    background-color: #1c1c1c;
    color: white;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

#search-bar {
    padding: 7px;
    width: 60%;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

#filter-options {
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);

    background-color: #1c1c1c; /* Sets dropdown background to black */
    color: white; /* Text color to white for readability */
    cursor: pointer;
}

/* Change color when dropdown is hovered */
#filter-options:hover {
    background-color: #222; /* Slightly lighter black */
}

/* Change dropdown arrow color */
#filter-options::-ms-expand {
    display: none;
}
#filter-options option {
    background-color: #1c1c1c;
    color: white;
}

.footer {
    text-align: center;
    padding: 10px;
    background-color: #222;
    color: #fff;
    font-size: 0.9rem;
}








