@import url("nav.css");
@import url("footer.css");

* {
    margin: 0;
    padding: 0;
}

body::before {
    content: "pc";
    display: none;
}

@media (hover: none) and (pointer: coarse) {
    body::before {
        content: "mobil";
    }
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0 auto;
    background: white;
}

/* Google Ads Area */
.ads {
    margin: 0 auto;
    max-width: 1920px;
    max-height: 200px;
}

.google-ads-area {
    width: 100%;
    height: 100%;
}

/* Main Content */
.MAIN-content {
    background-color: whitesmoke;
}

.first-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content {
    max-width: 1920px;
    width: 100%;
    display: flex;
    justify-content: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/home-bg.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    max-height: 600px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero {
    margin: 50px;
}

/* Typewriter Slogan Stilleri */
.slogan {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    /* Yazı yazılırken sayfanın kaymasını (layout shift) engeller */
    width: 100%;
}

/* Yanıp sönen daktilo imleci */
.cursor {
    display: inline-block;
    margin-left: 4px;
    font-weight: 300;
    color: #3498db;
    /* Logo mavi tonun */
    animation: blink 0.8s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
    padding: 25px;
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #3284bc;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
    box-sizing: border-box;
}

.search-section {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.filter-bar-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mode-toggle-btn {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-toggle-btn:hover {
    background-color: #fff;
    color: #3284bc;
}

.text-search-input {
    flex: 1;
    min-width: 280px;
    padding-right: 15px !important;
}

.filter-bar p {
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    margin-right: 10px;
}

.filter-input {
    /* Minimum 110px, idealde %20 genişlik, maksimum 200px */
    width: clamp(110px, 20vw, 200px);
    flex: 1 1 auto;
    font-size: clamp(12px, 1.2vw, 14px);
    padding: 10px 8px;
    min-width: 110px;
    border: 2px solid #3284bc;
    border-radius: 8px;
    background-color: white;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-input:hover {
    border-color: #2563a0;
    box-shadow: 0 2px 8px rgba(50, 132, 188, 0.2);
}

.filter-input:focus {
    outline: none;
    border-color: #2563a0;
    box-shadow: 0 0 8px rgba(50, 132, 188, 0.4);
}

.filter-input:disabled {
    background-color: #e8e8e8;
    color: #999;
    cursor: not-allowed;
    border-color: #3284bc;
    opacity: 0.7;
}

.filter-button {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: bold;
    background-color: #3284bc;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-button:hover {
    background-color: #2563a0;
    box-shadow: 0 4px 12px rgba(50, 132, 188, 0.3);
}

.filter-button:active {
    transform: scale(0.98);
}

.Products {
    flex: 1;
    max-width: 1920px;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.products {
    margin: 5px;
    border: 3px solid #3284bc;
    background: #fff;
    border-radius: 15px;
    padding: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.products-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.Products h2 {
    font-weight: 500;
    font-size: 40px;
    padding-left: 2%;
    color: #3284bc;
}

.pubAd {
    margin-left: auto;
    padding-right: 2%;
    text-align: right;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.pubAd a {
    padding: 10px;
    border-radius: 15px;
    text-decoration: none;
    color: white;
    background-color: #3284bc;
}

.ultility {
    display: flex;
    gap: 20px;
    background: #00000016;
    padding: 10px;
    border: #3498db 2px solid;
    border-radius: 20px;
    max-width: 1920px;
    margin: auto;
    align-items: center;
    justify-content: space-between;
}

.ultility .tools {
    justify-content: flex-start;
    gap: 10px;
    display: flex;
    align-items: center;
}

.ultility .tools .filter,
.ultility .tools .sorter {
    display: flex;
    background-color: white;
    border: #3498db 2px solid;
    border-radius: 10px;
    cursor: pointer;
    padding: 5px;
    align-items: center;
    font-size: 24px;
    gap: 10px;
    color: #333;
}

.ultility .tools .filter img,
.ultility .tools .sorter img {
    width: 30px;
    height: 30px;
}

.ultility .tools2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ultility .tools2 .Sort {
    display: flex;
    gap: 10px;
}

.ultility .tools2 .Sort #sort-list {
    margin-right: 5px;
}

.ultility .search-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-color: white;
    max-height: 40px;
    height: 100%;
    max-width: 500px;
    width: 100%;
    border: #3498db 2px solid;
    border-radius: 15px;
    width: fit-content;
    padding: 3px 10px;
}

.ultility .search-bar input[type="text"] {
    border: none;
    font-size: 26px;
    max-height: 40px;
    outline: none;
}

.ultility .search-bar button.searchBtn {
    background-color: transparent;
    border: none;
    max-height: 35px;
    max-width: 35px;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.ultility .search-bar button.searchBtn img {
    width: 100%;
    height: 100%;
    color: #3498db;
}

.toggleView {
    border: none;
    cursor: pointer;
    background: none;
}

.toggleView img {
    width: 40px;
    height: 40px;
}

#products-hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, #3284bc 1%, #3498db 20%, #3498db 80%, #3284bc 99%);
    margin: 20px -10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.product404 {
    display: flex;
    justify-content: center;
    text-align: center;
    margin: 40px 0;
    font-size: xx-large;
    color: red;
}

/* ADVERTS CARD VIEW */
#products-list.grid-mode .product-card:hover {
    transform: translateY(-15px);
}

#products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    border-radius: 8px;
}

.product-card {
    background-color: #e8f4fc;
    border: 1px solid #3284bc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(50, 132, 188, 0.18);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 8px 22px rgba(50, 132, 188, 0.28);
}

.product-card .product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.product-card .product-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card .product-details,
.product-price {
    padding: 10px 15px;
}

.product-card h3 {
    font-size: 1em;
    color: #333;
    margin-top: 10px;
    margin-bottom: 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-card .location {
    font-size: 0.8em;
    color: #777;
    margin-bottom: 8px;
}

.product-card .price {
    font-size: 0.9em;
    color: #2E7D32;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-card .other-details {
    font-size: 0.75em;
    color: #555;
    margin-bottom: 5px;
}

/* ADVERTS LIST VIEW */
#products-list.list-mode .product-card:hover {
    transform: translateY(-3px);
}

#products-list.list-mode {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
}

.product-card.list-item {
    background-color: #e8f4fc;
    border: 1px solid #b8d9f0;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 14px rgba(50, 132, 188, 0.18);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease-in-out;
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex-wrap: nowrap;
}

.product-card.list-item:hover {
    background-color: #f0f0f0;
}

.product-card.list-item .product-image {
    float: left;
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 120px;
}

.product-card.list-item .product-details {
    font-size: larger;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    min-width: 0;
}

.product-card.list-item h3 {
    flex: 1;
    font-size: 1.1em;
    color: #333;
    margin: 0 0 5px 0;
}

.product-card.list-item .location {
    flex: 1;
    font-size: 0.85em;
    color: #777;
    margin-bottom: 5px;
}

#products-list.list-mode .product-price {
    align-items: flex-end;
    display: flex;
    text-align: right;
    font-size: x-large;
    padding-bottom: 0;
}

#products-list.list-mode .product-price p {
    margin-bottom: 0;
}

.product-card.list-item .other-details {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 0;
}

.mobile-only-link {
    display: none;
}

@media (min-width: 771px) and (max-width: 860px) {
    /* Başlık ve Buton Alanını Üst Üste Gelecek Şekilde Dikey Yap */

    .products-header .pubAd span {
        font-size: 20px;
        /* Metin boyutunu azıcık küçülterek alan kazan */
    }

    .products-header .pubAd a {
        padding: 5px 12px;
        font-size: 20px;
    }
}

/* Ekran 860px ve altına indiğinde */
@media (max-width: 771px) {

    /* Ana sayfadaki "Tüm İlanlar için İLANLAR" alanını gizle */
    .products-header .pubAd {
        display: none !important;
    }

    /* Burger menü içindeki "Tüm İlanlar" linkini göster */
    .mobile-only-link {
        display: block !important;
    }
}

@media (max-width:663px) {
    .filter-bar {
        gap: 0;
    }

    .filter-bar p {
        font-size: 25px;
    }

    /* --- GRID / KART GÖRÜNÜMÜ --- */
    /* Ekran genişliğine göre yan yana 2 kart sığacak şekilde grid sütunlarını küçültüyoruz */
    #products-list {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    /* Kart İçi Detaylar & Fontlar */
    .product-card .product-image {
        height: 110px;
        /* Görsel yüksekliği azaltıldı */
    }

    .product-card .product-details {
        padding: 8px;
    }

    .product-card h3 {
        font-size: 0.85em;
        margin-top: 2px;
        margin-bottom: 3px;
    }

    .product-card .location {
        font-size: 0.7em;
        margin-bottom: 4px;
    }

    .product-card .other-details {
        font-size: 0.65em;
        margin-bottom: 2px;
    }

    .product-price {
        padding-left: 8px;
        padding-right: 8px;
    }

    .product-price .price {
        font-size: 0.9em;
        margin-bottom: 6px;
    }


    /* --- LIST / LİSTE GÖRÜNÜMÜ --- */
    .product-card.list-item {
        padding: 8px;
        gap: 10px;
    }

    .product-card.list-item .product-image {
        width: 90px;
        height: 70px;
        min-width: 90px;
    }

    .product-card.list-item h3 {
        font-size: 0.9em;
    }

    .product-card.list-item .location,
    .product-card.list-item .other-details {
        font-size: 0.75em;
    }

    #products-list.list-mode .product-price {
        font-size: medium;
    }
}

/* Services Section - İlanlar kutusuyla birebir aynı dış yapı */
.services-section {
    max-width: 1920px;
    margin: 20px auto;
    padding: 0 5px;
}

.services-container {
    background: #ffffff;
    border: 3px solid #3284bc;
    margin: auto 5px;
    border-radius: 12px;
    /* İlanlar kutusuyla aynı radius */
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.services-header {
    text-align: center;
    margin-bottom: 20px;
}

.services-header h2 {
    color: #1a365d;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.services-header p {
    color: #3182ce;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

/* Masaüstü Varsayılan: Tek satırda 6 sütun (6x1) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.service-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    border-color: #3182ce;
}

.service-card i {
    font-size: 24px;
    color: #3182ce;
    margin-bottom: 10px;
    display: block;
}

.service-card h4 {
    color: #2d3748;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.service-card p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

/* Bottom Contact Bar */
.services-footer-bar {
    margin-top: 20px;
    background: linear-gradient(90deg, #3284bc, #3498db, #3284bc);
    color: #ffffff;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13.5px;
    font-weight: 500;
}

.services-footer-bar a {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid transparent;
}

.services-footer-bar a:hover {
    color: #3498db;
    background: #fff;
    border: 2px solid #fff;
    padding: 4px 10px;
    box-shadow: 0 0 5px #fff;
    transition: all 0.3s ease;
}

@media (max-width: 1920px) {
    .services-container,
    .products {
        border-radius: 5px;
    }

    .services-container {
        margin: auto 0px;
    }
}

/* Tablet & Orta Ekranlar: 3 sütun x 2 satır (3x2) */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Mobil Ekranlar: 2 sütun x 3 satır (2x3) */
@media (max-width: 768px) {
    .services-section {
        margin: 10px 5px;
        padding: 0;
    }

    .services-container {
        padding: 15px 10px;
    }

    .services-header h2 {
        font-size: 17px;
    }

    .services-header p {
        font-size: 12px;
    }

    /* Mobilde her zaman eşit 2 sütun */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .service-card {
        padding: 10px 6px;
        text-align: center;
    }

    .service-card i {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .service-card h4 {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .service-card p {
        font-size: 10.5px;
        line-height: 1.25;
    }

    .services-footer-bar {
        margin-top: 12px;
        padding: 10px 8px;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
    }

    .services-footer-bar span {
        font-size: 11.5px;
        text-align: center;
    }

    .services-footer-bar a {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        font-size: 12px;
        padding: 7px 0;
    }
}