/* =====================================================
   ROOT ICON SYSTEM
===================================================== */

:root {
    --icon-box-size: 24px;
    --icon-radius: 7px;
    --icon-inner-size: 18px;
}

/* =====================================================
   GLOBAL WRAPPERS
===================================================== */

.content-wrapper {
    display: block !important;
}

.gallery-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
   SEARCH FORM
===================================================== */

.search-form {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-form input[type="text"],
.search-form select {
    height: 42px;
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 0 14px;
    background: #fff;
    transition: .3s ease;
}

.search-form input[type="text"]:focus,
.search-form select:focus {
    outline: none;
    border-color: rgba(145, 29, 29, 0.9);
    box-shadow: 0 0 6px rgba(145, 29, 29, 0.45);
}

.btn-search-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #093980;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 45px; /* Kare form factor daha modern durur */
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-search-reset:hover {
    background: rgba(145, 29, 29, 0.7); /* Temandaki kırmızı tonu */
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(-15deg); /* Hafif bir hareket */
}

/* Küçük ekranlarda butonların yan yana düzgün durması için */
.button-group {
    display: flex;
    gap: 10px;
}

@media (max-width: 992px) {
    .button-group {
        justify-content: stretch;
    }

    .btn-search-submit {
        flex: 1;
    }
}

/* =====================================================
   GRID SYSTEM
===================================================== */

.album-container,
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 30px 0;
}

/* =====================================================
   ALBUM CARD
===================================================== */

.album-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    transition: .3s ease;
    cursor: pointer;
    position: relative;
}

.album-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    filter: brightness(1.05);
}

.album-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.album-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s ease;
}

.album-card:hover .album-image-wrapper img {
    transform: scale(1.12);
}

.album-info {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.album-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.album-dates-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.album-media-count {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0d47a1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: transform .18s cubic-bezier(.4, 0, .2, 1), box-shadow .18s ease;
    will-change: transform;
}


.album-card:hover .album-media-count {
    transform: scale(1.18);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    background: linear-gradient(135deg, #911d1d, #0d47a1);
}


/* =====================================================
   MEDIA CARD
===================================================== */

.media-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    transition: .3s ease;
    position: relative;
}

.media-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.media-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.media-wrapper img,
.media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s ease;
}

.media-card:hover img,
.media-card:hover video {
    transform: scale(1.12);
}

.media-title {
    font-size: 15px;
    font-weight: 700;
    padding: 8px 12px 4px 12px;
    word-break: break-word;
}

/* =====================================================
   KEYWORDS
===================================================== */

.media-keywords-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 12px 8px 12px;
    gap: 6px;
    font-size: 13px;
}

.keyword-badge {
    background: linear-gradient(135deg, #911d1d, #0d47a1);
    color: #fff;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
}

.media-divider {
    width: 60%;
    height: 1px;
    margin: 6px auto 8px;
    background: linear-gradient(to right, transparent, #d2d2d2, transparent);
}

/* =====================================================
   ACTION BUTTONS
===================================================== */

.media-action-btn,
.album-download-btn,
.album-share-btn {
    position: absolute;
    top: 12px;
    width: var(--icon-box-size);
    height: var(--icon-box-size);
    border-radius: var(--icon-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    transition: .25s ease;
    z-index: 6;
}

.media-action-btn img,
.album-download-btn img,
.album-share-btn img {
    width: var(--icon-inner-size);
    height: var(--icon-inner-size);
    object-fit: contain;
    filter: invert(1);
}

.media-download-btn {
    right: 12px;
}

.media-share-btn {
    right: calc(12px + var(--icon-box-size) + 8px);
}

.album-download-btn {
    right: 12px;
}

.album-share-btn {
    right: calc(12px + var(--icon-box-size) + 8px);
}

.media-wrapper:hover .media-action-btn,
.album-card:hover .album-download-btn,
.album-card:hover .album-share-btn {
    opacity: 1;
    transform: none;
}

/* =====================================================
   HERO
===================================================== */

.album-hero-header {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 30px;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* İçeriği aşağı iter */
    background: #222;
}

.album-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Görseli kesmeden sığdırır */
    background-color: #d2d2d2;
    filter: brightness(0.6);
    z-index: 1;
}

.album-hero-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);

    /* BOZULMAYI DÜZELTEN ANA KISIM */
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Buton ve Başlığı tabana hizalar */
    gap: 20px;
}

.hero-left {
    flex-shrink: 0; /* Butonun daralmasını engeller */
}

.album-hero-title {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    text-align: right;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    line-height: 1.2;
    max-width: 70%; /* Butonun üzerine binmesini engeller */
}

/* "Albüme Dön" Butonu */
.btn-fed-hero {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #911d1d, #0d47a1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-fed-hero:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Mobil Düzenleme */
@media (max-width: 768px) {
    .album-hero-header {
        height: 300px;
    }

    .album-hero-content {
        flex-direction: column-reverse; /* Mobilde buton altta, başlık üstte */
        align-items: flex-start;
        padding: 20px;
    }

    .album-hero-title {
        text-align: left;
        font-size: 1.5rem;
        max-width: 100%;
    }
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {
    :root {
        --icon-box-size: 22px;
        --icon-inner-size: 16px;
    }

    .album-container,
    .media-gallery {
        grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 600px) {
    :root {
        --icon-box-size: 20px;
        --icon-inner-size: 14px;
    }

    .album-container,
    .media-gallery {
        grid-template-columns:1fr;
    }

    .media-action-btn,
    .album-download-btn,
    .album-share-btn {
        opacity: 1;
        transform: none;
        background: rgba(0, 0, 0, .55);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
    }
}
