/* Explore page specific styles */
.main-content {
    padding: 1rem 2rem;
    max-width: none;
    margin: 0;
}

/* Back button */
.back-button {
    margin-bottom: 1rem;
}

.back-link {
    color: #374151;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #1f2937;
}

/* Page header */
.page-header {
    margin-bottom: 3rem;
}

.page-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #CD3735;
    margin: 0;
    font-family: 'DT Getai Grotesk Display', 'Archivo Black', sans-serif;
}

.tag-container {
    display: flex;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background-color: #fecaca;
    color: #dc2626;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #dc2626;
    color: white;
}

.page-description {
    color: #6b7280;
    line-height: 1.6;
    font-size: 1rem;
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

/* Gallery title specific styling to match button padding */
.gallery-header .section-title {
    margin-bottom: 0;
    padding: 0 0.25rem;
    line-height: 1;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.carousel-nav {
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-nav:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.carousel-container {
    display: flex;
    gap: 1rem;
    overflow: hidden;
    flex: 1;
    transition: transform 0.3s ease;
}

.carousel-item {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f0f0f0;
}

/* Gallery styles */
.gallery-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Base button styles for gallery */
.gallery-buttons .btn,
.gallery-buttons .btn-filter {
    height: 36px;
    padding: 0 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
}

.btn-filter {
    background: white;
    color: #FFCE7B;
    border-color: #FFCE7B;
}

.btn-filter:hover {
    background: #FFCE7B;
    color: white;
}

/* Filter dropdown styles */
.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 0.25rem;
}

.filter-menu.show {
    display: block;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.filter-option:hover {
    background: #f9fafb;
    border-radius: 0.25rem;
    padding: 0.5rem;
}

.filter-checkbox {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: #FFCE7B;
}

.filter-option label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: #d1d5db;
    border-radius: 0.75rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        padding: 1rem 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .carousel-item {
        width: 160px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .page-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-wrapper {
        padding: 1rem;
    }

    .carousel-item {
        width: 140px;
        height: 100px;
    }

    .carousel-nav {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .carousel-container {
        gap: 0.5rem;
    }

    .carousel-item {
        width: 120px;
        height: 90px;
    }
}

.modal {
    position: fixed;
    inset: 0;
    /* top:0; left:0; bottom:0; right:0 */
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    /* ensure it appears above everything */
}

/* starts hidden */
.hidden {
    display: none;
}

/* modal box */
.modal-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.2s ease-out;
}

/* close button */
.modal-close {
    position: absolute;
    top: -10px;
    right: 5px;
    font-size: 30px;
    cursor: pointer;
    color: #555;
}

.modal-close:hover {
    color: #000;
}

/* fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* modal image */
#modal-gif {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}