/* =========================================================
   ORTAK TUR / ROTA KARTI
   Dosya: /assets/css/tur-card.css

   Ana sayfa, turlar, rotalar, kategori, arama,
   benzer turlar ve öneri alanları aynı kartı kullanır.
========================================================= */

.ks27-tour-card,
.ks27-tour-card * {
    box-sizing: border-box;
}

.ks27-tour-card {
    position: relative;
    display: flex;
    min-width: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(9, 37, 61, 0.09);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(12, 41, 66, 0.075);
    isolation: isolate;
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease;
}

/* =========================================================
   KART GÖRSELİ
========================================================= */

.ks27-tour-card__media {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: 220px;
    min-height: 220px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(31, 190, 211, 0.18),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #dce9ef 0%,
            #edf4f7 55%,
            #d9e8ed 100%
        );
    color: transparent;
    text-decoration: none;
}

.ks27-tour-card__image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    border: 0;
    object-fit: cover;
    object-position: center center;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(31, 190, 211, 0.18),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #dce9ef 0%,
            #edf4f7 55%,
            #d9e8ed 100%
        );
    transform: scale(1);
    transition: transform 0.45s ease;
}

.ks27-tour-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    background:
        radial-gradient(
            circle at 25% 25%,
            rgba(27, 187, 210, 0.25),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #dbe8ef,
            #f4f8fa
        );
}

/* Görselin alt kısmına okunabilirlik katmanı */
.ks27-tour-card__media::after {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(4, 30, 49, 0.38),
        rgba(4, 30, 49, 0)
    );
    content: "";
}

/* =========================================================
   KATEGORİ VE KAMPANYA ETİKETLERİ
========================================================= */

.ks27-tour-card__category,
.ks27-tour-card__campaign {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ks27-tour-card__category {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    background: rgba(7, 119, 142, 0.92);
    box-shadow: 0 8px 20px rgba(3, 28, 48, 0.22);
}

.ks27-tour-card__category span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ks27-tour-card__campaign {
    top: 12px;
    left: 12px;
    background: rgba(255, 99, 75, 0.95);
    box-shadow: 0 8px 20px rgba(255, 99, 75, 0.2);
}

/* =========================================================
   KART İÇERİĞİ
========================================================= */

.ks27-tour-card__body {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 22px;
}

.ks27-tour-card__copy {
    min-width: 0;
}

.ks27-tour-card__title {
    margin: 0;
    color: #10243a;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.ks27-tour-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ks27-tour-card__title a:hover,
.ks27-tour-card__title a:focus-visible {
    color: #087f96;
}

.ks27-tour-card__location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 9px 0 0;
    color: #0f879d;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.ks27-tour-card__location span {
    flex: 0 0 auto;
}

.ks27-tour-card__description {
    display: -webkit-box;
    min-height: 69px;
    margin: 13px 0 0;
    overflow: hidden;
    color: #66778a;
    font-size: 14px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* =========================================================
   ÖZELLİKLER
========================================================= */

.ks27-tour-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.ks27-tour-card__features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    color: #526579;
    background: #f3f7f9;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.ks27-tour-card__features i {
    color: #0c8197;
    font-style: normal;
}

/* =========================================================
   ALT ALAN
========================================================= */

.ks27-tour-card__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 20px;
}

.ks27-tour-card__price {
    min-width: 92px;
}

.ks27-tour-card__price small,
.ks27-tour-card__price del,
.ks27-tour-card__price strong {
    display: block;
}

.ks27-tour-card__price small {
    color: #8a97a6;
    font-size: 11px;
}

.ks27-tour-card__price del {
    margin-top: 3px;
    color: #9ca7b3;
    font-size: 12px;
}

.ks27-tour-card__price strong {
    margin-top: 3px;
    color: #10243a;
    font-size: 21px;
    line-height: 1.1;
}

.ks27-tour-card__actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.ks27-tour-card__detail,
.ks27-tour-card__whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 900;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.ks27-tour-card__detail {
    gap: 10px;
    padding: 0 15px;
    color: #ffffff;
    background: #ff664f;
    box-shadow: 0 9px 20px rgba(255, 102, 79, 0.2);
    font-size: 12px;
    white-space: nowrap;
}

.ks27-tour-card__detail span:last-child {
    font-size: 17px;
    line-height: 1;
}

.ks27-tour-card__whatsapp {
    width: 42px;
    flex: 0 0 42px;
    color: #ffffff;
    background: #18a96a;
}

/* Rota kartlarında fiyat olmadığı için buton sola yaslanır */
.ks27-tour-card--route .ks27-tour-card__bottom {
    justify-content: flex-start;
}

.ks27-tour-card--route .ks27-tour-card__actions {
    width: 100%;
}

.ks27-tour-card--route .ks27-tour-card__detail {
    width: auto;
}

/* =========================================================
   HOVER
========================================================= */

@media (hover: hover) and (pointer: fine) {
    .ks27-tour-card:hover {
        transform: translateY(-5px);
        border-color: rgba(11, 129, 151, 0.2);
        box-shadow: 0 24px 52px rgba(12, 41, 66, 0.12);
    }

    .ks27-tour-card:hover .ks27-tour-card__image {
        transform: scale(1.045);
    }

    .ks27-tour-card__detail:hover,
    .ks27-tour-card__detail:focus-visible {
        background: #f15540;
        box-shadow: 0 12px 25px rgba(255, 102, 79, 0.3);
        transform: translateY(-1px);
    }

    .ks27-tour-card__whatsapp:hover,
    .ks27-tour-card__whatsapp:focus-visible {
        background: #138c58;
        transform: translateY(-1px);
    }
}

/* =========================================================
   COMPACT VARYANT
   Detay sayfası benzer turlar ve dar alanlar
========================================================= */

.ks27-tour-card--compact .ks27-tour-card__media {
    height: 185px;
    min-height: 185px;
}

.ks27-tour-card--compact .ks27-tour-card__image,
.ks27-tour-card--compact .ks27-tour-card__placeholder {
    height: 185px;
    min-height: 185px;
    object-fit: cover;
}

.ks27-tour-card--compact .ks27-tour-card__body {
    padding: 17px;
}

.ks27-tour-card--compact .ks27-tour-card__title {
    font-size: 18px;
}

.ks27-tour-card--compact .ks27-tour-card__description,
.ks27-tour-card--compact .ks27-tour-card__features {
    display: none;
}

.ks27-tour-card--compact .ks27-tour-card__bottom {
    padding-top: 14px;
}

/* =========================================================
   MINI VARYANT
   Hero ve yatay öneri alanları
========================================================= */

.ks27-tour-card--mini {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    border-radius: 16px;
}

.ks27-tour-card--mini .ks27-tour-card__media {
    width: 100%;
    height: 100%;
    min-height: 112px;
}

.ks27-tour-card--mini .ks27-tour-card__image,
.ks27-tour-card--mini .ks27-tour-card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
    object-position: center;
}

.ks27-tour-card--mini .ks27-tour-card__category,
.ks27-tour-card--mini .ks27-tour-card__campaign,
.ks27-tour-card--mini .ks27-tour-card__description,
.ks27-tour-card--mini .ks27-tour-card__features,
.ks27-tour-card--mini .ks27-tour-card__price,
.ks27-tour-card--mini .ks27-tour-card__whatsapp {
    display: none;
}

.ks27-tour-card--mini .ks27-tour-card__body {
    padding: 16px;
}

.ks27-tour-card--mini .ks27-tour-card__title {
    font-size: 16px;
}

.ks27-tour-card--mini .ks27-tour-card__bottom {
    padding-top: 12px;
}

.ks27-tour-card--mini .ks27-tour-card__detail {
    min-height: 36px;
    padding: 0 12px;
}

/* =========================================================
   ESKİ SAYFA CSS KURALLARINI GEÇERSİZ KIL
========================================================= */

.tours-grid .ks27-tour-card__media,
.routes-grid .ks27-tour-card__media,
.rotalar-grid .ks27-tour-card__media,
.ks27-listing__grid .ks27-tour-card__media {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    aspect-ratio: auto !important;
}

.tours-grid .ks27-tour-card__image,
.routes-grid .ks27-tour-card__image,
.rotalar-grid .ks27-tour-card__image,
.ks27-listing__grid .ks27-tour-card__image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 220px !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
}

/* Eski rota kartı kurallarının yeni karta müdahalesini engeller */
.ks27-listing__grid .ks27-tour-card {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.ks27-listing__grid .ks27-tour-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.ks27-listing__grid .ks27-tour-card__bottom {
    margin-top: auto;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
    .ks27-tour-card__media,
    .ks27-tour-card__image,
    .ks27-tour-card__placeholder {
        height: 205px;
        min-height: 205px;
    }

    .ks27-listing__grid .ks27-tour-card__media {
        height: 205px !important;
        min-height: 205px !important;
    }

    .ks27-listing__grid .ks27-tour-card__image {
        min-height: 205px !important;
    }

    .ks27-tour-card__body {
        padding: 20px;
    }

    .ks27-tour-card__title {
        font-size: 20px;
    }
}

/* =========================================================
   MOBİL
========================================================= */

@media (max-width: 620px) {
    .ks27-tour-card {
        border-radius: 18px;
    }

    .ks27-tour-card__media,
    .ks27-tour-card__image,
    .ks27-tour-card__placeholder {
        height: 210px;
        min-height: 210px;
    }

    .ks27-listing__grid .ks27-tour-card__media {
        height: 210px !important;
        min-height: 210px !important;
    }

    .ks27-listing__grid .ks27-tour-card__image {
        min-height: 210px !important;
    }

    .ks27-tour-card__body {
        padding: 18px;
    }

    .ks27-tour-card__title {
        font-size: 20px;
    }

    .ks27-tour-card__description {
        min-height: 0;
        -webkit-line-clamp: 4;
    }

    .ks27-tour-card__bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .ks27-tour-card__actions,
    .ks27-tour-card__detail {
        width: 100%;
    }

    .ks27-tour-card__detail {
        flex: 1 1 auto;
    }

    .ks27-tour-card--route .ks27-tour-card__detail {
        width: 100%;
    }

    .ks27-tour-card--mini {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .ks27-tour-card--mini .ks27-tour-card__media,
    .ks27-tour-card--mini .ks27-tour-card__image,
    .ks27-tour-card--mini .ks27-tour-card__placeholder {
        height: 100%;
        min-height: 105px;
    }
}
/* Tarih bazlı kontenjan durumu */
.ks27-tour-card__availability{
    font-weight:800;
}
.ks27-tour-card__availability--available{
    color:#047857;
    background:#ecfdf5!important;
}
.ks27-tour-card__availability--full{
    color:#b42318;
    background:#fff1f2!important;
}
.ks27-tour-card__availability--no_date{
    color:#92400e;
    background:#fffbeb!important;
}
.ks27-tour-card__availability-badge{
    position:absolute;
    z-index:4;
    top:14px;
    left:14px;
    display:inline-flex;
    align-items:center;
    min-height:32px;
    padding:0 12px;
    border-radius:999px;
    color:#fff;
    font-size:12px;
    font-weight:900;
    box-shadow:0 10px 24px rgba(15,23,42,.22);
}
.ks27-tour-card__availability-badge--full{
    background:#dc2626;
}
.ks27-tour-card__availability-badge--no_date{
    background:#d97706;
}
.ks27-tour-card--availability-full .ks27-tour-card__image,
.ks27-tour-card--availability-no_date .ks27-tour-card__image{
    filter:saturate(.82) brightness(.9);
}
.ks27-tour-card--availability-full .ks27-tour-card__detail,
.ks27-tour-card--availability-no_date .ks27-tour-card__detail{
    background:#64748b;
    border-color:#64748b;
}
@media(max-width:767px){
    .ks27-tour-card__availability-badge{
        top:10px;
        left:10px;
        min-height:28px;
        padding-inline:10px;
        font-size:11px;
    }
}
