/* Color Variables */
:root {
    --logo-blue: #97e0f5;
    --logo-blue-dark: #7bc8e3;
    --logo-blue-light: #b5e8f7;
}

/* Prevent horizontal overflow globally */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Main Content */
.main-content {
    padding: 30px;
    max-width: 100%;
    margin: 0 auto;
}

/* About Panel */
.about-panel {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.about-toggle {
    width: 100%;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border: 2px solid var(--logo-blue);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 24px;
    transition: all 0.3s ease;
}

.about-toggle:hover {
    background-color: var(--logo-blue-light);
}

.about-icon {
    margin-right: 10px;
}

.about-text {
    flex-grow: 1;
    text-align: left;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.about-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
    border: 2px solid var(--logo-blue);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 0 20px;
}

.about-content.active {
    /* max-height: 500px; */
    max-height: 100%;
    padding: 20px;
}

.about-content p {
    margin: 10px 0;
    font-size: 24px;
    line-height: 1.5;
}

.about-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.about-content li {
    font-size: 24px;
    line-height: 1.5;
    margin: 5px 0;
}

.about-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* Filter Container */
.filter-container {
    padding: 20px;
    text-align: center;
    background-image: linear-gradient(#57c592, lightgoldenrodyellow);
    margin-bottom: 20px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.admin-queries-hero {
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.admin-queries-hero button {
    font-family: inherit;
}

/* Grouped Search Options */
.search-groups-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.admin-queries-container {
    flex-wrap: wrap;
    justify-content: left;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.search-group {
    flex: 0 0 auto;
    margin-bottom: 15px;
}

.search-group:last-of-type {
    margin-right: 0;
    margin-bottom: 20px;
}

.group-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin: 0;
    text-align: left;
    padding: 0;
}

.filter-form {
    max-width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

.radio-group {
    display: flex;
    justify-content: left;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    padding: 5px 0;
    max-width: 100%;
    overflow-x: hidden;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: white;
    border: 2px solid var(--logo-blue);
    transition: all 0.2s ease;
    height: fit-content;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    text-decoration: none;
}

/* Group-specific background colors */
.search-group:nth-child(odd) .radio-label {
    background-color: lightcyan;
}

.search-group:nth-child(even) .radio-label {
    background-color: lightgoldenrodyellow;
}

.radio-label:hover {
    border-color: var(--logo-blue-dark);
    background-color: var(--logo-blue-light);
}

.radio-label.active,
.search-group:nth-child(1) .radio-label.active,
.search-group:nth-child(2) .radio-label.active,
.search-group:nth-child(3) .radio-label.active,
.search-group:nth-child(4) .radio-label.active,
.search-group:nth-child(5) .radio-label.active,
.search-group:nth-child(6) .radio-label.active,
.search-group:nth-child(7) .radio-label.active,
.search-group:nth-child(8) .radio-label.active {
    background-color: var(--logo-blue);
    color: white;
    border-color: var(--logo-blue-dark);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label input[type="radio"]:checked + .radio-text {
    color: inherit;
}

.radio-label.active .radio-text {
    color: white;
}

.radio-text {
    font-size: 18px;
    color: darkgreen;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.radio-text::first-letter {
    font-size: 2em;
    line-height: 1;
}

.filter-button {
    padding: 10px 24px;
    background-color: var(--logo-blue);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 24px;
    transition: background-color 0.2s ease;
}

.filter-button:hover {
    background-color: var(--logo-blue-dark);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumbnail-size, 200px), 1fr));
    gap: 1rem;
    /* padding: 1.5rem; */
}

.image-card {
    border: 1px solid var(--logo-blue);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.image-card:hover {
    transform: scale(1.05);
    border-color: var(--logo-blue-dark);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.image-card img {
    width: 100%;
    height: var(--thumbnail-size, 200px);
    object-fit: cover;
    background-color: #f8f9fa;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, height 0.3s ease;
    transform: scale(0.98);
    will-change: transform;
    position: relative;
    z-index: 2;
}

.image-card img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Update loading animation */
.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        #f8f9fa 0%,
        #e9ecef 50%,
        #f8f9fa 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    opacity: 0.8;
    z-index: 1;
    transition: height 0.3s ease;
}

.image-card.loaded::before {
    opacity: 0;
}

.image-card .title {
    padding: 10px;
    font-size: 21px;
    color: #333;
    position: relative;
    z-index: 2;
    background: white;
}

/* Image Selection Styles */
.image-selection {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.image-checkbox {
    display: none;
}

.checkbox-label {
    display: block;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--logo-blue);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkbox-label:hover {
    background-color: var(--logo-blue-light);
    border-color: var(--logo-blue-dark);
    transform: scale(1.1);
}

.image-checkbox:checked + .checkbox-label {
    background-color: var(--logo-blue);
    border-color: var(--logo-blue-dark);
}

.image-checkbox:checked + .checkbox-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.image-card[data-selectable="true"] {
    position: relative;
}

.image-card[data-selectable="true"]:hover .checkbox-label {
    opacity: 1;
}

.image-card[data-selectable="true"] .checkbox-label {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.image-card[data-selectable="true"]:hover .checkbox-label {
    opacity: 1;
}

.search-container {
    padding: 20px;
    text-align: center;
}

.search-input {
    padding: 10px;
    width: 100%;
    max-width: 300px;
    border: 1px solid var(--logo-blue);
    border-radius: 4px;
    margin-right: 10px;
    font-size: 24px;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--logo-blue-dark);
    box-shadow: 0 0 0 2px var(--logo-blue-light);
}

.search-button {
    padding: 10px 20px;
    background-color: var(--logo-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 24px;
}

.search-button:hover {
    background-color: var(--logo-blue-dark);
}

.error-message {
    color: #dc3545;
    text-align: center;
    padding: 20px;
    font-size: 24px;
}

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

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    height: 100%;
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image {
    height: 100%;
    max-width: 100%;
    /* max-height: 80vh; */
    object-fit: contain;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-image.loaded {
    opacity: 1;
}

.modal-title {
    color: white;
    margin: 15px 0;
    font-size: 27px;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--logo-blue);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.modal-nav button {
    background: rgba(151, 224, 245, 0.5);
    color: white;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 27px;
    border-radius: 4px;
}

.modal-nav button:hover {
    background: rgba(151, 224, 245, 0.8);
}

.thumbnail {
    width: var(--thumbnail-size, 200px);
    height: var(--thumbnail-size, 200px);
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.emoji {
    font-size: 2em;
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Size Control */
.size-control {
    margin-top: 1rem;
    padding: 0 1rem;
}

.size-control label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 24px;
}

.size-slider {
    width: 100%;
    max-width: 300px;
}

/* About Page */
.about-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.about-page h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.about-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 2px solid var(--logo-blue);
}

.about-section h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}

.about-section p {
    font-size: 24px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 20px;
}

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

.category-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--logo-blue);
}

.category-emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.category-card p {
    font-size: 18px;
    color: #495057;
    margin: 0;
}

.features-list {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.feature-item:hover {
    transform: translateX(5px);
    border-color: var(--logo-blue);
}

.feature-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

.feature-content p {
    font-size: 18px;
    color: #495057;
    margin: 0;
}

.gallery-title {
    text-align: left;
    margin: 20px 0;
    font-size: 2rem;
    color: #333;
} 

.subtitle {
    text-align: left;
    margin: 20px 0;
    font-size: 1.7rem;
    color: #333;
} 

@media (max-width: 768px) {

    .main-content {
        padding: 10px;
    }

    .search-groups-container {
        gap: 10px;
    }

    .radio-text {
        font-size: 12px;
    }

    .radio-text .label {
        display: none;
    }

    .radio-group {
        gap: 5px;
        justify-content: flex-start;
    }

    .radio-label {
        padding: 4px 8px;
        font-size: 12px;
    }

    .filter-container {
        padding: 10px;
    }
}