/* Force square aspect ratio for all card images */
.card img {
    aspect-ratio: 1/1 !important;
    object-fit: cover !important;
    width: 100% !important;
    height: auto !important;
}

/* Prevent cards from stretching when there are fewer items */
.cards {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    max-width: 100% !important;
}

.card {
    max-width: 400px !important;
}

/* Make logo rectangular */
.logo {
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px !important;
}

/* Fix glass container to be full width on detail pages */
.glass {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
}

/* PREMIUM VISUAL ENHANCEMENTS */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh !important;
    background: #f0f4ff !important;
    background-attachment: fixed !important;
    overflow-x: hidden;
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: blobFloat 20s infinite alternate;
}

body::before {
    background: radial-gradient(circle, rgba(10, 102, 208, 0.2) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

body::after {
    background: radial-gradient(circle, rgba(106, 119, 143, 0.15) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, 50px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 100px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

header {
    background: linear-gradient(135deg, #0a66d0 0%, #063c7b 30%, #0a66d0 70%, #063c7b 100%) !important;
    background-size: 400% 400% !important;
    animation: headerGradient 10s ease infinite !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

@keyframes headerGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glassmorphism Refinement */
.glass {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07) !important;
}

/* Card Improvements */
.card {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 25px rgba(10, 102, 208, 0.12) !important;
}

/* Fix background gradient to cover entire page */
html,
body {
    min-height: 100vh !important;
}

/* Force 3 columns for En Yeniler section on desktop */
@media (min-width: 900px) {
    .cards-fixed-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* FORCED 6-COLUMN GRID - PREVENTS GROWING WHEN FEWER THAN 6 */
.cards.cards-fixed-6 {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    grid-auto-flow: column;
    /* Keep items in one row */
}

.cards.cards-fixed-6 .card {
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}

.cards.cards-fixed-6 .body {
    padding: 6px !important;
}

.cards.cards-fixed-6 .body strong {
    font-size: 10px !important;
    line-height: 1.2 !important;
    height: 2.4em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 2px !important;
}

.cards.cards-fixed-6 .body p,
.cards.cards-fixed-6 .body .badge,
.cards.cards-fixed-6 .body br,
.cards.cards-fixed-6 .body div,
.cards.cards-fixed-6 .body .badge+br {
    display: none !important;
}

.cards.cards-fixed-6 .body a {
    font-size: 9px !important;
    padding: 0 !important;
    font-weight: bold !important;
    display: inline-block !important;
}

/* Mobile adjustments */
@media (max-width: 800px) {
    .cards.cards-fixed-6 {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-flow: row;
    }
}

/* LIGHTBOX GALLERY STYLES */
#lightbox-overlay {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: auto;
}

#lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    padding: 20px;
    cursor: pointer;
    user-select: none;
    transition: 0.3s;
    z-index: 10000;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #0a66d0;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

@media (max-width: 899px) {
    .cards.cards-fixed-6 {
        gap: 6px !important;
    }
}

@media (max-width: 480px) {
    .cards.cards-fixed-6 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}