/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #ecf0f1;
    --overlay-color: rgba(0, 0, 0, 0.7);
    --card-bg-color: rgba(255, 255, 255, 0.1);
    --card-hover-color: rgba(255, 255, 255, 0.2);
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Background */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: 1;
}

#bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/default-bg.jpg');
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 0.5s ease-out, background-image 1s ease-in-out;
    filter: blur(5px);
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    padding: 20px 0;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

nav ul li a:hover, nav ul li a.active {
    background-color: var(--secondary-color);
}

.admin-btn {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content */
main {
    padding: 40px 0;
    min-height: calc(100vh - 180px);
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.5s;
}

/* Gallery */
.filters {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 15px;
}

.filters select {
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.6);  /* Dark translucent background */
    color: var(--text-color);              /* Light text (#ecf0f1) */
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-speed);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.1); /* Subtle background for loading state */
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

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

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    transition: transform var(--transition-speed);
}

/* CHANGED HERE: No longer translates up by -5px */
.gallery-item:hover .gallery-item-info {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.gallery-item-location {
    font-size: 0.9rem;
    opacity: 0.8;
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Image container for lazy loading */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Loading placeholder */
.loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
    opacity: 0.8;
}

/* Animation for loading placeholder */
@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

/* Lazy loaded images */
.lazy-image, .lazy-video {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-image[src], .lazy-video[src] {
    opacity: 1;
}

/* Media View */
.media-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.media-content {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.media-content img, .media-content video {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background-color: black;
}

.media-info {
    padding: 20px;
}

.media-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.media-description {
    margin-bottom: 15px;
    line-height: 1.6;
}

.media-location {
    margin-bottom: 15px;
}

.media-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.media-tag {
    background-color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.back-to-gallery {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.back-to-gallery:hover {
    background-color: #2980b9;
}

/* About Page */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.profile-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.about-text h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.about-text p {
    margin-bottom: 15px;
}

/* Contact Page */
#contact .container {
    max-width: 800px;
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

#contact h2 {
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.5); /* You can choose a dark translucent background */
    color: var(--text-color);
}


textarea {
    min-height: 150px;
    resize: vertical;
}

button {
    padding: 12px 24px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

button:hover {
    background-color: #2980b9;
}

/* Login Page */
#login .container {
    max-width: 500px;
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

#login h2 {
    margin-bottom: 30px;
    text-align: center;
}

/* Admin Panel */
.admin-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

#manage-content {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.content-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.content-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.content-item-preview {
    height: 150px;
    overflow: hidden;
}

.content-item-preview img, .content-item-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-item-info {
    padding: 15px;
}

.content-item-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.content-item-actions button {
    flex: 1;
    padding: 8px;
    font-size: 0.9rem;
}

.delete-btn {
    background-color: #e74c3c;
}

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

#add-content-form {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 8px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.upload-preview {
    margin-top: 10px;
    max-height: 200px;
    overflow: hidden;
    border-radius: 4px;
}

.upload-preview img, .upload-preview video {
    max-width: 100%;
    max-height: 200px;
}

.hidden {
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--primary-color);
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--text-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Media Queries */
@media (max-width: 992px) {
    .media-container {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .profile-image {
        max-width: 400px;
        margin: 0 auto 20px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    header h1 {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 200px;
    }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Modal Container */
.edit-modal-container {
    background-color: #fff;
    color: #333;
    padding: 20px;
    border-radius: 5px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    max-height: 80vh; /* so the form doesn't overflow the screen */
}

/* Modal Form */
.edit-modal-form h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.edit-modal-form label {
    display: block;
    margin: 10px 0;
}

.edit-modal-form input[type="text"],
.edit-modal-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9); /* Nearly opaque white */
    color: #333;                                 /* Dark text for readability */
    font-size: 1rem;
}


.edit-modal-form button {
    margin-right: 10px;
    padding: 6px 12px;
    cursor: pointer;
}

.edit-modal-form button[type="submit"] {
    background-color: #007BFF;
    border: none;
    color: #fff;
    border-radius: 4px;
}

.edit-modal-form button[type="button"] {
    background-color: #ccc;
    border: none;
    color: #333;
    border-radius: 4px;
}

/* Admin Panel – About Section */
#about-admin {
    background-color: var(--card-bg-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
  }
  #about-admin .about-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
  }
  #about-admin .about-preview img {
    max-width: 100px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
  }
  
  /* Edit Modal Form for About Section */
  .edit-modal-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    background-color: rgba(255,255,255,0.9);
    color: #333;
    font-size: 1rem;
  }
  
/* About view on public page */
#about-content {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}
#about-content .profile-image {
    max-width: 150px;
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
}
#about-content .about-text {
    flex: 1;
    color: var(--text-color);
}
#about-content .about-text h2 {
    margin-bottom: 15px;
}

/* Add these styles to your style.css */

/* Button to regenerate thumbnails */
#regenerate-thumbnails-btn {
    background-color: #9b59b6;
    padding: 8px 16px;
    margin-right: 10px;
}

#regenerate-thumbnails-btn:hover {
    background-color: #8e44ad;
}

/* Video indicator in admin view */
.admin-video-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    padding: 3px 6px;
}

/* Fix for video containers in gallery */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}





