﻿/* =======================
   Genel Ayarlar
======================= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-top: 0 !important;
    padding-top: 56px;
    padding-bottom: 80px; /* footer alanı için boşluk */
    overflow-x: hidden; /* yatay scroll engelle */
}

/* =======================
   Navbar
======================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

/* =======================
   Form & Button
======================= */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.custom-search .form-control {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}

.clear-btn {
    background-color: black !important;
    color: white !important;
    border-color: black !important;
    font-weight: bold;
}

    .clear-btn:hover {
        background-color: #333 !important;
    }

/* =======================
   Kart Genel
======================= */
.card {
    border: none;
    border-radius: 15px;
    min-height: 180px;
    background-size: cover;
    background-position: center;
    transition: transform .3s ease;
}

    .card:hover {
        transform: scale(1.05);
    }

/* =======================
   Kart Arka Planlar
======================= */
.card-bg-1 {
    background: linear-gradient(135deg, #1d2671, #c33764);
}

.card-bg-2 {
    background: linear-gradient(135deg, #134e5e, #71b280);
}

.card-bg-3 {
    background: linear-gradient(135deg, #283048, #859398);
}

.card-bg-4 {
    background: linear-gradient(135deg, #b31217, #e52d27);
}

.card-bg-5 {
    background: linear-gradient(135deg, #0f2027, #2c5364);
}

.card-bg-6 {
    background: linear-gradient(135deg, #42275a, #734b6d);
}

/* =======================
   Özel Arkaplan
======================= */
.special-bg {
    background-image: url('/resim/telefon3.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* =======================
   Footer
======================= */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: black;
    color: white;
    padding: 20px 0;
    z-index: 1020;
}

/* =======================
   Kart + PNG İkon
======================= */
.card-custom {
    position: relative;
    overflow: hidden;
}

    .card-custom .card-icon {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 120px;
        opacity: 0.95;
        z-index: 3;
        pointer-events: none;
        transition: transform 0.35s ease;
    }

    .card-custom:hover .card-icon {
        transform: scale(1.15) rotate(8deg);
    }

    .card-custom .card-body {
        position: relative;
        z-index: 4;
    }

    /* ============================
   HOVER: ARKADAN İKON ÇIKMA EFEKTİ
============================ */
    .card-custom::before {
        content: "";
        position: absolute;
        top: -20px;
        right: -20px;
        width: 160px;
        height: 160px;
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        opacity: 0;
        transform: scale(0.6);
        transition: all 0.45s ease;
        z-index: 1;
    }

.card-bg-1::before {
    background-image: url('/images/cards/telefon-rehber.png');
}

.card-bg-2::before {
    background-image: url('/images/cards/ulkelerin-telefon-kodlari.png');
}

.card-bg-3::before {
    background-image: url('/images/cards/turkiye.png');
}

.card-bg-4::before {
    background-image: url('/images/cards/acil.jpeg');
}

.card-bg-5::before {
    background-image: url('/images/cards/meslek.png');
}

.card-bg-6::before {
    background-image: url('/images/cards/ariza.png');
}

.card-custom:hover::before {
    opacity: 0.35;
    transform: scale(1);
}

/* =======================
   Desktop Alt Satırı Ortala
======================= */
@media (min-width: 992px) {
    .row-center-last {
        justify-content: center;
    }

        .row-center-last > [class*="col-"] {
            flex: 0 0 auto;
        }
}

/* =======================
   Paging
======================= */
#pagingWrapper .pagination {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-left: 0;
    margin-bottom: 0;
    justify-content: center;
}

#pagingWrapper .page-item {
    flex: 0 0 auto;
    margin: 0 2px;
}

#pagingWrapper .page-link {
    padding: 0.6rem 1rem;
    min-width: 50px;
    text-align: center;
    font-size: 0.95rem;
}

#pagingWrapper .page-item.active .page-link {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

#pagingWrapper .page-item.disabled .page-link {
    opacity: 0.6;
    pointer-events: none;
}

/* =======================
   Mobil Düzenlemeler
======================= */
@media (max-width: 768px) {

    /* Kart ikon mobil */
    .card-custom .card-icon {
        top: 50%;
        left: 50%;
        right: auto;
        width: 100px;
        transform: translate(-50%, -50%);
        opacity: 0.9;
    }

    .card-custom:hover .card-icon {
        transform: translate(-50%, -50%) scale(1.15) rotate(6deg);
    }

    /* Paging mobilde küçült ve yatay scroll */
    #pagingWrapper .page-link {
        padding: 0.42rem 0.63rem;
        min-width: 35px;
        font-size: 0.65rem;
    }

    #pagingWrapper .pagination {
        overflow-x: auto;
        white-space: nowrap;
    }

    #pagingWrapper .page-item {
        flex: 0 0 auto;
    }

    /* Navbar ve footer sabit, content scrollable */
    body {
        padding-bottom: 120px; /* footer + paging için boşluk */
    }

    .container > main {
        overflow-y: auto;
        max-height: calc(100vh - 56px - 80px); /* navbar + footer yüksekliği çıkarıldı */
    }
}
.sidebar {
    position: sticky;
    top: 80px;
    padding: 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #003366;
    color: #fff;
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all .2s ease;
}

    .sidebar-item img {
        width: 32px;
        height: 32px;
    }

    .sidebar-item:hover {
        background: #0059b3;
        transform: translateX(5px);
    }
.text-warning {
    color: orangered !important;
}

@media (max-width: 768px) {
    .special-bg {
        background-attachment: scroll;
        background-position: center center;
        /* 🔑 asıl çözüm */
        background-size: 100% auto;
        min-height: 100vh;
        width: 100%;
        overflow: hidden;
    }
}


/* =======================
   DESKTOP: Tek scroll, sidebar sabit (SON)
======================= */
@media (min-width: 768px) {

    /* html + body tamamen kilitlenir */
    html, body {
        height: 100%;
        overflow: hidden;
        padding: 0; /* 🔑 İKİNCİ SCROLL'U BİTİRİR */
    }

    /* Navbar sabit olduğu için body padding'i iptal */
    body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Sidebar */
    aside {
        position: fixed;
        top: 56px; /* navbar */
        left: 0;
        width: 300px; /* 🔑 DAHA SAĞA KAYMASI İÇİN */
        height: calc(100vh - 56px);
        overflow-y: auto;
        z-index: 1000;
    }

    /* Content */
    .content-wrapper {
        position: relative;
        margin-left: 300px; /* 🔑 */
        width: calc(100% - 300px); /* 🔑 */
        height: calc(100vh - 56px - 80px); /* navbar + footer */
        overflow-y: auto;
        overflow-x: hidden;
        padding: 20px;
        box-sizing: border-box;
    }
}


