/* Base and Common Styles */
:root {
    --primary-color: #4d94ff;
    /* A vibrant blue */
    --secondary-color: #0066cc;
    /* A deep, rich blue */
    --accent-color: #99ccff;
    /* A light blue for accents */
    --background-light: #f0f8ff;
    --background-dark: #e6f2ff;
    --text-color: #2c3e50;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-light);
    line-height: 1.6;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

/* Common elements */
h1 {
    font-size: 28px;
    margin-bottom: 10px;
    border-bottom: 2px solid #4d94ff;
    padding-bottom: 10px;
    display: inline-block;
}

h2 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

p {
    margin-bottom: 15px;
    line-height: 1.8;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

.page-header {
    border-bottom: 2px solid #4d94ff;
    color: #0066cc;
    text-align: center;
    padding: 25px 30px;
    margin: 20px auto;
    width: 100%;
}

.breadcrumb {
    font-size: 14px;
    color: #0066cc;
}

/* Gallery Specific Styles */
.gallery-content {
    max-width: 1300px;
    margin: 30px auto;
    padding: 0 25px;
}

.gallery-intro {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
    text-align: center;
}

.gallery-intro h2 {
    color: #0066cc;
    border-bottom: 2px solid #4d94ff;
    font-size: 28px;
}

.gallery-intro p {
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

.gallery-categories {
    margin-bottom: 40px;
}

.gallery-categories h2 {
    text-align: center;
    color: var(--secondary-color);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.filter-btn {
    background-color: var(--background-dark);
    border: none;
    padding: 12px 22px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease-in-out;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: white;
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
}

.gallery-overlay p {
    font-size: 15px;
    margin: 0;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.view-image {
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 20px;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.view-image:hover {
    transform: scale(1.15) rotate(5deg);
    background-color: var(--accent-color);
}

/* Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    border-radius: 8px;
}

.close-modal {
    color: white;
    font-size: 40px;
    font-weight: bold;
    position: absolute;
    top: 20px;
    right: 30px;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.image-caption {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px 25px;
    width: 100%;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

.image-caption h3 {
    margin: 0;
    color: white;
    font-size: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }

    .gallery-intro {
        padding: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
    }

    .filter-btn {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    .gallery-items {
        grid-template-columns: 1fr;
    }

    .gallery-image {
        height: 220px;
    }

    .close-modal {
        font-size: 32px;
        top: 10px;
        right: 15px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: #000;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image video {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.gallery-overlay p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.view-image {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    /* Ensure button is above media */
}

.gallery-item:hover .view-image {
    opacity: 1;
}

.view-image i {
    color: #333;
    font-size: 1.2em;
}

.media-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.youtube-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.youtube-thumbnail i {
    font-size: 60px;
    color: #ff0000;
    transition: transform 0.3s ease;
    z-index: 2;
    position: relative;
}

.youtube-thumbnail:hover i {
    transform: scale(1.1);
}

.youtube-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    z-index: 1;
}

.youtube-thumbnail:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    top: 50%;
    transform: translateY(-50%);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-60%);
        opacity: 0;
    }

    to {
        transform: translateY(-50%);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #ccc;
}

#modalImage {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

#modalVideo {
    width: 100%;
    height: 70vh;
    max-width: 1000px;
    display: block;
    margin: auto;
}

.image-caption {
    text-align: center;
    color: white;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 8px 8px;
    margin-top: -4px;
    /* Adjust spacing below media */
}

.image-caption h3 {
    margin: 0;
    font-size: 1.5em;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    max-width: 1000px;
    margin: auto;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.view-all-media {
    display: block;
    margin-bottom: 20px;
    background-color: #4d94ff;
    color: white;
    padding: 12px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.view-all-media:hover{
    background-color: #0066cc;
    color: white;
    box-shadow: 5px 5px 5px #99ccff;
}