/* Fotoğraf ve küçükler için kutu ayrımı */
.advert-photo-main {
    background: linear-gradient(135deg, #e3eafc 0%, #f8f9fa 100%);
    border-radius: 1.2rem;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.08);
    padding: 1.2rem 1rem 1rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #0d6efd22;
    min-height: 240px;
}

.advert-photo-main img {
    border-radius: 1rem;
    border: 2px solid #0d6efd55;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.08);
    background: #fff;
    max-height: 220px;
    max-width: 100%;
    object-fit: contain;
    cursor: pointer;
    /* tıklanabilirlik için */
    transition: box-shadow 0.2s, border-color 0.2s, opacity 0.2s, filter 0.2s;
}

.advert-photo-main img:hover {
    box-shadow: 0 0 0 4px #0d6efd55;
    border-color: #0d6efd;
    opacity: 0.95;
    filter: brightness(1.04);
}

.advert-photo-label {
    font-weight: 600;
    color: #212529;
    /* text-dark */
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
    font-size: 1.1rem;
}

.advert-photo-thumbs {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.06);
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    border: 2px solid #0d6efd22;
    overflow-x: auto;
    flex-wrap: wrap;
    /* çoklu satır için */
    row-gap: 0.5rem;
    /* satırlar arası boşluk */
    max-width: 350px;
    /* 4 x 54px + 3 x 0.5rem gap (24px) ≈ 230px */
}

.advert-photo-thumbs img {
    border-radius: 0.7rem;
    border: 2px solid #dee2e6;
    transition: box-shadow 0.2s, border-color 0.2s, opacity 0.2s;
    background: #f8f9fa;
    width: 54px;
    height: 54px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.7;
    filter: grayscale(0.7);
    flex: 0 0 auto;
    margin-bottom: 0;
}

.advert-photo-thumbs img.active,
.advert-photo-thumbs img:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px #0d6efd;
    opacity: 1;
    filter: none;
}

.gallery-modal-header-actions {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 30;
}

.fullscreen-btn {
    /* Bootstrap 5 button style */
    /* @extend .btn; */
    /* @extend .btn-light; */
    padding: 0.5rem 0.8rem;
    border-radius: 0.375rem;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    width: 44px;
    box-shadow: none;
    background: transparent !important;
    /* arka plan yok */
    color: #f8f9fa !important;
    /* text-light */
    border: none;
    transition: background 0.2s, color 0.2s, transform 0.18s cubic-bezier(.4, 0, .2, 1);
}

.fullscreen-btn:hover,
.fullscreen-btn:focus {
    background: rgba(255, 255, 255, 0.13) !important;
    color: #fff !important;
    outline: none;
    transform: scale(1.13);
    box-shadow: 0 2px 12px 0 rgba(13, 110, 253, 0.18);
}

.fullscreen-btn .bi {
    font-size: 1.5rem;
    margin: 0;
    vertical-align: middle;
}

/* Kapatma tuşu text-light */
.btn-close.btn-close-white,
.btn-close.text-light {
    background: transparent !important;
    color: #f8f9fa !important;
    border-radius: 0.375rem;
    opacity: 1;
    box-shadow: none;
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 1.7rem;
}

.btn-close.btn-close-white:hover,
.btn-close.btn-close-white:focus,
.btn-close.text-light:hover,
.btn-close.text-light:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    outline: none;
}

.gallery-thumbs-toggle {
    /* Bootstrap 5 button style */
    position: static;
    z-index: 1;
    border-radius: 1rem;
    padding: 0.3rem 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
    box-shadow: none;
    margin: 0;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
}

.gallery-thumbs-toggle:hover {
    background: #3f4349;
    color: #fff !important;
}

.gallery-thumbs-toggle:hover span,
.gallery-thumbs-toggle:focus span {
    color: #fff !important;
}

.gallery-thumbs-toggle .bi {
    font-size: 1.3rem;
    vertical-align: middle;
}

.modal-content.bg-dark {
    position: relative;
}

.gallery-photo-menu-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: auto;
    height: 0;
    display: flex;
    justify-content: center;
}

.gallery-thumbs-anim-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.gallery-thumbs-toggle {
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(.4, 0, .2, 1), bottom 0.4s cubic-bezier(.4, 0, .2, 1);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
    /* Kapalıyken daha aşağıda */
    z-index: 21;
    margin: 0;
}

.gallery-thumbs-toggle.move-up {
    bottom: 140px;
    /* Açıldığında yukarıda */
}

.gallery-thumbs-bar {
    pointer-events: auto;
    transition: max-height 0.4s cubic-bezier(.4, 0, .2, 1), opacity 0.4s cubic-bezier(.4, 0, .2, 1), padding 0.4s, transform 0.4s cubic-bezier(.4, 0, .2, 1);
    max-height: 0;
    opacity: 0;
    padding: 0 3rem;
    background: #222;
    border-radius: 2rem;
    box-shadow: 0 4px 24px rgba(13, 110, 253, 0.18);
    min-height: 0;
    margin-top: 0;
    transform: translateY(20px);
    width: 150%;
    max-width: 1200px;
    left: 50%;
    position: absolute;
    bottom: 0;
    transform: translate(-50%, 20px);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    gap: 1.2rem;
}

.gallery-thumbs-bar.show {
    max-height: 140px;
    opacity: 1;
    padding: 1.2rem 2rem;
    min-height: 110px;
    margin-top: 0.5rem;
    transform: translate(-50%, 0);
}

.gallery-thumbs-bar img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 1.2rem;
    border: 2px solid #e3eafc;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s, filter 0.2s;
    flex: 0 0 auto;
    filter: grayscale(0.7);
    opacity: 0.7;
    margin-bottom: 2px;
    box-shadow: none;
}

/* Aktif veya hover durumunda kalın mavi çerçeve ve belirginlik */
.gallery-thumbs-bar img.active,
.gallery-thumbs-bar img:hover {
    border: 4px solid #2196f3 !important;
    box-shadow: 0 0 0 4px #90caf955;
    opacity: 1;
    filter: none;
    z-index: 2;
}

.gallery-thumbs-bar img:focus {
    outline: 2px solid #0d6efd;
    box-shadow: 0 0 0 6px #0d6efd88;
    opacity: 1;
    filter: none;
}

.gallery-thumbs-bar img:not(:hover):not(.active) {
    box-shadow: none;
}

.gallery-thumbs-bar img {
    transition: box-shadow 0.2s, border-color 0.2s, opacity 0.2s, filter 0.2s;
}

.gallery-thumbs-bar img:hover {
    z-index: 2;
}

@media (max-width: 768px) {
    .advert-photo-main {
        min-height: 160px;
        padding: 0.7rem 0.5rem 0.5rem 0.5rem;
    }

    .advert-photo-main img {
        max-height: 140px;
    }

    .advert-photo-thumbs {
        padding: 0.5rem 0.5rem;
        max-width: 122px;
        /* 4 x 32px + 3 x 0.5rem gap (12px) = yaklaşık 122px */
    }

    .gallery-thumbs-bar,
    .gallery-thumbs-bar.show {
        width: 98%;
        padding: 0.7rem 0.5rem;
        min-height: 70px;
        max-height: 80px;
    }

    .gallery-thumbs-toggle {
        bottom: 10px;
    }

    .gallery-thumbs-toggle.move-up {
        bottom: 80px;
    }

    .gallery-thumbs-bar img {
        width: 60px;
        height: 60px;
        border-radius: 0.7rem;
    }
}

.advert-detail-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Ana kutu artık başlık + iki sütun şeklinde olacak */
.advert-main-section {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    /* başlık üstte, altına sütunlar */
    gap: 0;
    background: #f8f9fa;
    border-radius: 1.2rem;
    box-shadow: 0 2px 2px rgba(13, 110, 253, 0.07);
    padding: 2rem 1.5rem;
    border: 2px solid #e3eafc;
    align-items: stretch;
}

/* Başlık kutunun içinde ve üstte */
.advert-detail-title {
    border-bottom: 2px solid #eee;
    padding-bottom: 0.7rem;
    margin-bottom: 2rem;
    /* artırıldı, başlık ile içerik arası açıldı */
    font-size: 2rem;
    letter-spacing: 0.01em;
    width: 100%;
    /* tam satırı kaplasın */
    text-align: left;
    display: block;
    /* Kutunun içinde üstte sabit */
    margin-top: 0;
}

/* Fotoğraf ve bilgi sütunlarını yatayda yan yana tutacak yeni kapsayıcı */
.advert-main-cols {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    width: 100%;
    justify-content: space-between;
    /* ilan bilgisini sağa al */
}

/* Sütunlar için mevcut kodlar geçerli */
.advert-photo-col {
    min-width: 320px;
    max-width: 480px;
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid #e3eafc;
    padding-right: 1.5rem;
    align-items: center;
}

.advert-info-col {
    flex: 1 1 0;
    min-width: 320px;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-left: 1.5rem;
    align-items: flex-end;
    /* sağa hizala */
}

/* Responsive: 992px altında sütunlar alt alta gelsin ve sağ hizalama normale dönsün */
@media (max-width: 992px) {
    .advert-main-section {
        padding: 1rem 0.5rem;
    }

    .advert-main-cols {
        flex-direction: column;
        gap: 1.2rem;
        justify-content: flex-start;
        /* responsive'da sola hizala */
    }

    .advert-photo-col,
    .advert-info_col,
    .advisor-col {
        max-width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        border: none;
        padding: 0;
        margin: 0;
        align-items: stretch;
    }

    .advert-info-col {
        align-items: flex-start;
        /* responsive'da sola hizala */
        padding-left: 0;
    }

    .advisor-col {
        margin-left: 0;
        margin-top: 1rem;
        align-items: center;
    }
}

/* Advisor card styles */
.advisor-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: none;
    box-shadow: 0 2px 12px rgba(13, 110, 253, 0.13);
    background: linear-gradient(135deg, #e3eafc 0%, #d1e7dd 100%);
    border-radius: 1.2rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.advisor-card .card-header {
    background: linear-gradient(90deg, #0d6efd 60%, #6ea8fe 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.08rem;
    border-radius: 1.2rem 1.2rem 0 0;
    text-align: center;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #b6d4fe;
    width: 100%;
}

.advisor-card .card-header.bg-dark {
    background: #212529 !important;
    color: #fff !important;
}

.advisor-card .card-body {
    padding: 0.8rem 0.5rem 0.6rem 0.5rem;
    background: transparent;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.advisor-card .rounded-circle {
    border: 2px solid #0d6efd33;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.08);
}

.advisor-card .fw-bold {
    color: #0d6efd;
    font-size: 1.02rem;
}

.advisor-card .btn-outline-primary {
    border-radius: 1rem;
    font-size: 0.97rem;
    margin-top: 0.6rem;
    width: 100%;
}

.advisor-card .text-muted {
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .advisor-card {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .advisor-card .card-header {
        font-size: 1rem;
        padding: 0.5rem 0.2rem;
    }

    .advisor-card .card-body {
        padding: 0.6rem 0.2rem 0.5rem 0.2rem;
    }
}

.advert-detail-title {
    border-bottom: 2px solid #eee;
    padding-bottom: 0.7rem;
    margin-bottom: 2rem;
    /* artırıldı, başlık ile içerik arası açıldı */
    font-size: 2rem;
    letter-spacing: 0.01em;
    width: 100%;
    /* tam satırı kaplasın */
    text-align: left;
}

.advert-detail-table {
    margin-top: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: #9c9b9b;
    border: 2px solid #0d6efd;
    /* belirgin mavi border */
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.10);
}

.advert-detail-table th,
.advert-detail-table td {
    border: 1.5px solid #000000 !important;
    /* tüm kenarlara belirgin border */
}

.advert-detail-table th {
    background: #f8f9fa !important;
    font-weight: 500;
    font-size: 1.05rem;
    width: 120px;
    color: #444;
    border-right: 1.5px solid #000000 !important;
}

.advert-detail-table td {
    font-size: 1.08rem;
    background: #fff;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: none;
    color: #222;
    vertical-align: middle;
}

.advert-detail-table tr:last-child td {
    border-bottom: none;
}

/* Responsive için de borderlar korunsun */
@media (max-width: 576px) {
    .advert-detail-title {
        font-size: 1.3rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0.7rem;
    }

    .advert-detail-table th,
    .advert-detail-table td {
        font-size: 0.98rem;
        padding: 0.4em 0.5em;
        border: 1.5px solid #0d6efd !important;
    }
}

/* Küçük galeri barı ve diğer fotoğraflar butonu admin tarafında da kullanılabilir. */
.gallery-thumbs-bar-modal {
    justify-content: center !important;
    width: auto !important;
    max-width: 90vw;
    background: #222;
    border-radius: 2rem;
    box-shadow: 0 4px 24px rgba(13, 110, 253, 0.18);
    padding: 1.5rem 2rem 1.5rem 2rem;
    margin-bottom: 1.5rem;
    position: static !important;
    left: unset !important;
    bottom: unset !important;
    transform: none !important;
    gap: 2rem;
}

.gallery-thumbs-bar-modal img {
    width: 110px !important;
    height: 110px !important;
    border-radius: 1.5rem !important;
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .gallery-thumbs-bar-modal {
        padding: 0.7rem 0.5rem;
        gap: 1rem;
    }

    .gallery-thumbs-bar-modal img {
        width: 70px !important;
        height: 70px !important;
        border-radius: 1rem !important;
    }
}

.gallery-thumbs-toggle.btn-lg {
    font-size: 1.25rem;
    padding: 0.7rem 2.2rem;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.13);
}

.gallery-thumbs-menu-wrapper {
    width: 100%;
    justify-content: center;
    align-items: center;
    display: flex;
    transition: max-height 0.4s, opacity 0.4s;
    max-height: 180px;
    opacity: 1;
}

.gallery-thumbs-menu-wrapper[style*="display: none"] {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}

/* Kapatma tuşu (x) için efekt */
.close-gallery-btn {
    transition: background 0.2s, color 0.2s, transform 0.18s cubic-bezier(.4, 0, .2, 1);
    border-radius: 0.375rem;
}

.close-gallery-btn:hover,
.close-gallery-btn:focus {
    background: rgba(255, 255, 255, 0.13) !important;
    color: #fff !important;
    outline: none;
    transform: scale(1.13);
    box-shadow: 0 2px 2px 0 rgba(13, 110, 253, 0.18);
}