/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #4a6fa5;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2c4a7c;
}

/* Header Styles */
header {
    background-color: #4a6fa5;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 5%;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.home-icon {
    font-size: 1.5rem;
    color: white;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.home-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.navbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.search-container {
    margin: 0;
    width: 100%;
    max-width: 500px;
}

.search-container form {
    display: flex;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) inset;
}

.search-container button {
    background-color: #2c4a7c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-container button:hover {
    background-color: #1c3258;
}

.telegram-link {
    margin: 0 15px;
}

.telegram-link a {
    display: inline-flex;
    align-items: center;
    background-color: #0088cc;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.telegram-link a i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.telegram-link a:hover {
    background-color: #0077b3;
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background-color: #4a6fa5;
    padding: 15px 5%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
    .navbar-center {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo p {
        display: none;
    }
    
    .telegram-link {
        display: none;
    }
    
    .navbar-right {
        justify-content: flex-end;
    }
}

/* Main Content Styles */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 5%;
}

/* Tab Navigation */
.tabs-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    margin-right: 5px;
    background-color: #f5f5f5;
    color: #333;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab:hover {
    background-color: #e0e0e0;
    color: #2c4a7c;
}

.tab.active {
    background-color: #4a6fa5;
    color: white;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

.gallery-info {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.gallery-info h2 {
    font-size: 1.5rem;
    color: #2c4a7c;
    margin-bottom: 10px;
}

.no-images {
    text-align: center;
    padding: 50px 0;
    color: #777;
}

/* Category Groups */
.category-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.category-group {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-group h3 {
    color: #2c4a7c;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f0f5ff;
    color: #2c4a7c;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-button:hover {
    background-color: #4a6fa5;
    color: white;
    transform: translateY(-2px);
}

/* More Options */
.more-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.option-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.option-card h3 {
    color: #2c4a7c;
    margin-bottom: 10px;
}

.option-card p {
    margin-bottom: 15px;
    color: #666;
}

.option-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: #4a6fa5;
    color: white;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.option-button:hover {
    background-color: #2c4a7c;
    transform: translateY(-2px);
}

.option-button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Image Grid Styles */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 15px;
}

/* Animation for image cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.image-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.image-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.image-container {
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

.image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-card:hover .image-container::after {
    opacity: 1;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.image-card:hover .image-container img {
    transform: scale(1.08);
}

.image-info {
    padding: 15px;
    background-color: white;
    transition: background-color 0.3s ease;
}

.image-card:hover .image-info {
    background-color: #f9f9f9;
}

.image-info .category {
    font-weight: 600;
    color: #2c4a7c;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.image-info .category::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4a6fa5;
    border-radius: 50%;
    margin-right: 8px;
}

.image-info .date {
    font-size: 0.85rem;
    color: #777;
}

.image-dimensions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.detail-image:hover .image-dimensions {
    opacity: 1;
}

@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        grid-gap: 20px;
    }
}

@media (min-width: 1200px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        grid-gap: 25px;
    }
}

/* Loading Image State */
.image-container img.loading {
    opacity: 0.5;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a, .pagination .ellipsis {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    background-color: white;
    color: #4a6fa5;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination a:hover {
    background-color: #4a6fa5;
    color: white;
}

.pagination a.active {
    background-color: #4a6fa5;
    color: white;
    font-weight: bold;
}

.pagination .ellipsis {
    background: none;
    box-shadow: none;
}

/* Detail Page Styles */
.detail-page {
    max-width: 1000px;
}

.back-link {
    margin-bottom: 20px;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.back-link a i {
    margin-right: 5px;
}

.detail-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.detail-image {
    max-height: 600px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    padding: 25px;
}

.detail-info h2 {
    color: #2c4a7c;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
}

.info-item .label {
    font-weight: 600;
    width: 120px;
    color: #555;
}

.download-button {
    margin: 25px 0 15px 0;
}

.download-button a {
    display: inline-flex;
    align-items: center;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.download-button {
    display: inline-block;
    background: linear-gradient(45deg, #4a6cf7, #7a49f7);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.2);
    text-align: center;
    margin: 15px 0;
}

.download-button i {
    margin-right: 8px;
    font-size: 1.1em;
}

.download-button:hover {
    background: linear-gradient(45deg, #3e5edf, #6337df);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(74, 108, 247, 0.4);
    color: white;
}

.image-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0 20px 0;
    padding: 10px 15px;
    background-color: #f5f7fa;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #555;
}

.image-stats p {
    display: flex;
    align-items: center;
    margin: 0;
}

.image-stats i {
    margin-right: 5px;
    color: #4a6fa5;
    font-size: 1.1em;
}

.share-links {
    margin: 20px 0;
}

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.share-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
}

.share-buttons .telegram {
    background-color: #0088cc;
}

.share-buttons .twitter {
    background-color: #1DA1F2;
}

.share-buttons .facebook {
    background-color: #4267B2;
}

.more-images {
    margin-top: 25px;
}

.more-images a {
    font-weight: 500;
}

/* Footer Styles */
footer {
    background-color: #333;
    color: #ddd;
    padding: 30px 5%;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content a {
    color: #9cbafb;
}

.footer-content a:hover {
    color: white;
}

/* Responsive Styles */
@media (min-width: 768px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
        min-width: 300px;
    }
    
    .search-container {
        flex: 1;
        margin: 0 20px;
    }
    
    .telegram-link {
        margin-top: 0;
    }
    
    .detail-container {
        flex-direction: row;
    }
    
    .detail-image {
        flex: 3;
        max-height: none;
    }
    
    .detail-info {
        flex: 2;
    }
}

@media (max-width: 767px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-gap: 15px;
    }
    
    .image-container {
        height: 150px;
    }
    
    .pagination a, .pagination .ellipsis {
        margin: 0 3px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .search-container form {
        flex-direction: column;
    }
    
    .search-container input,
    .search-container button {
        width: 100%;
        border-radius: 4px;
    }
    
    .search-container button {
        margin-top: 10px;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        grid-gap: 10px;
    }
    
    .image-container {
        height: 130px;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-item .label {
        width: 100%;
        margin-bottom: 5px;
    }
}
