* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    min-height: 100vh; /* Keep the min-height for full viewport height */
    /* Remove the flex layout that was causing issues on mobile */
    position: relative; /* This helps with absolute positioning of footer */
    margin: 0;
    padding-bottom: 60px; /* Add space for the footer */
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #d40000 0%, #b80000 100%);
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo span {
    font-weight: 400;
    color: #ffb3b3;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.2);
}

/* İlan Grid Styles */
.ilan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    margin-bottom: 0; /* Remove or reduce margin since footer isn't fixed */
}

/* İlan Card Styles */
.ilan-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px;
    border-radius: 6px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    position: relative;
}

.ilan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.image-container {
    position: relative;
    width: 100%;
    height: 140px;
    background-color: #f0f0f0;
    overflow: hidden;
}

.ilan-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
    transition: transform 0.3s ease;
}

.ilan-card:hover img {
    transform: scale(1.05);
}

.image-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: #999;
    font-size: 0.8rem;
}

.ilan-header {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: center; /* Center the header content */
}

.ilan-header h3 {
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Remove white-space: nowrap to allow wrapping if needed */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.7em; /* Ensure consistent height for titles */
}

.listing-number {
    font-size: 0.7rem;
    color: #999;
    background: none;
    padding: 0;
    display: block; /* Make it a block element so it can be centered */
}

.ilan-details {
    padding: 0.5rem 0.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the contents */
    text-align: center;
}

.location {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.price {
    color: #d40000;
    font-weight: 700;
    font-size: 1rem;
    margin: 0.3rem 0;
    text-align: center;
}

.property-info {
    display: flex;
    flex-direction: column; /* Change to column layout */
    align-items: center;
    width: 100%;
    gap: 0.4rem; /* Gap between rows */
    margin: 0.3rem 0;
}

.property-info-top {
    display: flex;
    justify-content: center;
    gap: 0.8rem; /* Gap between room count and area */
}

.property-info-bottom {
    display: flex;
    justify-content: center;
}

.property-info span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    background-color: #d40000;
    color: white;
    z-index: 2;
}

.description {
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Remove the flex styling from main */

/* Footer Styles */
footer {
    background: #000000;
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
    z-index: 1000;
    /* Position at the bottom without flex layout */
    position: absolute;
    bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ilan-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 1rem;
        gap: 1rem;
    }

    .property-info {
        grid-template-columns: 1fr;
    }
    
    /* Hide Hakkımızda link on mobile */
    nav ul li:nth-child(2) {
        display: none;
    }
    
    /* Footer styling update for mobile */
    footer {
        /* No need for display:none anymore since it will be at the bottom naturally */
        display: block;
    }
    
    /* Narrow the card width on mobile */
    .ilan-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    /* Center all specification items in detail view */
    .detail-specs span,
    .additional-specs span {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    
    /* Hide location icon on mobile */
    .location i.fa-map-marker-alt {
        display: none;
    }
    
    /* Hide location icon on mobile - both in card and detail view */
    .location i.fa-map-marker-alt,
    .detail-location i.fa-map-marker-alt {
        display: none;
    }
    
    /* Make location text bold on mobile */
    .detail-location {
        font-weight: bold;
    }
}

/* Hide listing number on mobile cards */
@media (max-width: 768px) {
    .listing-number {
        display: none;
    }
}

.no-listings-message {
    text-align: center;
    width: 100%;
    padding: 2rem;
    font-size: 1.2rem;
    color: #757575;
    grid-column: 1 / -1;
    margin: 2rem auto;
}

.listing-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.listing-detail-content {
    background: white;
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    border-radius: 8px;
    padding: 1.2rem;
    position: relative;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.close-detail {
    position: absolute;
    right: 0.8rem;
    top: 0.8rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.detail-header {
    margin-bottom: 1rem;
    text-align: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

.detail-price {
    font-size: 1.5rem;
    color: #d40000;
    font-weight: 600;
    display: inline-block;
    background-color: #fff5f5;
    padding: 0.3rem 1.2rem;
    border-radius: 4px;
    margin-top: 0.3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.price-share-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0.3rem;
}

.sharing-buttons {
    display: flex;
    gap: 8px;
    /* Remove margin-left to keep buttons closer to price */
}

.social-button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    background: #444; /* Default renk - link kopyalama butonu için */
    text-decoration: none; /* Remove underline from buttons */
}

.social-button i {
    font-size: 16px;
}

.social-button.whatsapp { 
    background: #25D366; 
    display: none; /* Hide by default (desktop) */
}
.social-button.facebook { background: #1877F2; }
.social-button.instagram { background: #E4405F; }
.social-button.tiktok { background: #000000; }

.social-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.detail-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
}

.detail-info {
    margin-top: 0.6rem;
    text-align: center; /* Center all text in detail info */
}

.detail-location {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.detail-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0.6rem 0;
    font-size: 0.85rem;
    justify-content: center; /* Center flexbox items */
}

.detail-specs span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-description {
    line-height: 1.6;
    color: #666;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.detail-description h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
    text-align: center;
}

.detail-description p {
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 150px;
    overflow-y: auto;
    text-align: center;
}

.detail-listing-number {
    font-size: 0.8rem;
    color: #777;
    display: block;
    margin-bottom: 0.4rem;
}

.additional-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0.6rem 0;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    justify-content: center; /* Center flexbox items */
}

.additional-specs span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #555;
}

@media (min-width: 768px) {
    .listing-detail-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
        align-items: start;
    }
    
    .detail-header {
        grid-column: 1 / -1;
    }
    
    .detail-image {
        height: 100%;
    }
    
    .detail-image img {
        height: 100%;
        max-height: 350px;
    }
}

@media (max-width: 576px) {
    .detail-specs, 
    .additional-specs {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .listing-detail-content {
        padding: 1rem;
    }
}

/* Gallery Styles */
.detail-gallery {
    position: relative;
    grid-column: 1;
}

.gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    height: 250px;
    background-color: #f0f0f0;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-main img:hover {
    transform: scale(1.03);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 5;
    transition: all 0.2s;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    z-index: 5;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.thumb {
    width: 60px;
    height: 45px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.thumb:hover {
    border-color: #ccc;
}

.thumb.active {
    border-color: #d40000;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    z-index: 2000; /* Ensure lightbox is above all other elements */
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Add this to center vertically */
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    padding: 20px;
}

#lightboxImg {
    max-width: 100%;
    max-height: 90vh; /* Allow image to take up most of the screen height */
    object-fit: contain;
    width: auto;
    height: auto;
    transition: transform 0.3s ease;
    margin: 0 auto; /* Add this to center horizontally */
}

.lightbox-caption {
    color: white;
    font-size: 1rem;
    margin-top: 15px;
    text-align: center;
    position: absolute;
    bottom: 20px;
    background: rgba(0,0,0,0.6);
    padding: 5px 15px;
    border-radius: 20px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1550;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    transition: all 0.2s;
}

.close-lightbox:hover {
    background: rgba(0,0,0,0.6);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1550;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: 20px;
}

/* Fix the CSS selector - it was missing a dot */
.lightbox-nav.next {
    right: 20px;
}

@media (max-width: 768px) {
    .gallery-main {
        height: 200px;
    }
    
    .thumb {
        width: 50px;
        height: 38px;
    }
    
    .lightbox-nav {
        width: 34px;
        height: 34px;
    }
    
    .lightbox-nav.prev {
        left: 10px;
    }
    
    .lightbox-nav.next {
        right: 10px;
    }
    
    /* Improve lightbox experience for mobile */
    #lightboxImg {
        max-width: 100%; /* Change from 90% to 100% for better sizing */
        max-height: 80vh;
        margin: 0 auto; /* Ensure image is centered */
        display: block; /* Add display block for proper centering */
    }
    
    .lightbox-content {
        padding: 10px; /* Reduce padding for more image space */
        box-sizing: border-box;
    }
}

/* Mobile Tab Bar Styles */
.mobile-tab-bar {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1010; /* Higher than footer */
    padding: 8px 0;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    width: 50%;
    padding: 8px 0;
    transition: all 0.2s;
}

.tab-item:hover, .tab-item:active {
    background-color: #f9f9f9;
}

.tab-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.tab-item:first-child i {
    color: #25D366; /* WhatsApp green */
}

.tab-item:last-child i {
    color: #d40000; /* App red color */
}

.tab-item span {
    font-size: 12px;
    font-weight: 500;
}

/* Adjust footer for mobile */
@media (max-width: 768px) {
    .mobile-tab-bar {
        display: flex;
        justify-content: space-around;
    }
    
    footer {
        display: none; /* Hide footer on mobile */
    }
}

/* Hide mobile tab bar when listing detail is open */
body:has(.listing-detail-overlay) .mobile-tab-bar {
    display: none !important;
}

/* For browsers that don't support :has selector (fallback) */
.listing-detail-overlay ~ .mobile-tab-bar {
    display: none !important;
}

/* About Us Page Styles */
.about-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 0; /* Remove margin since footer isn't fixed */
}

.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 600;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #d40000 0%, #b80000 100%);
    margin: 1rem auto;
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-gap: 2rem;
}

.about-section {
    margin-bottom: 1.5rem;
}

.about-section h2 {
    font-size: 1.4rem;
    color: #d40000;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-section h2 i {
    margin-right: 10px;
}

.about-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #444;
}

.values-list {
    list-style: none;
    padding: 0;
    margin-left: 0.5rem;
}

.values-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.values-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: #d40000;
    border-radius: 50%;
}

.contact-info {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.contact-info h2 {
    color: #d40000;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.4rem;
}

.contact-info h2 i {
    margin-right: 10px;
}

.contact-info p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: #d40000;
}

.contact-info a {
    color: #d40000;
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .about-container {
        padding: 1rem;
        margin: 1rem;
        margin-bottom: 100px;
    }
    
    .about-header h1 {
        font-size: 1.6rem;
    }
    
    .about-section h2 {
        font-size: 1.2rem;
    }
}

/* Mobile Navigation Menu */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    /* Hide desktop navigation and show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none; /* Hide by default */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #cc0000;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        gap: 0.5rem;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 0.8rem 1rem;
    }
    
    /* Improve touch targets */
    .gallery-nav, .lightbox-nav, .close-detail {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Better font sizing for mobile */
    .ilan-header h3 {
        font-size: 0.85rem;
    }
    
    .price {
        font-size: 0.95rem;
    }
    
    /* Fix the text overflow issues */
    .location {
        -webkit-line-clamp: 1;
        line-clamp: 1;
        max-width: 100%;
    }
    
    /* Adjust spacing for better mobile viewing */
    .ilan-grid {
        gap: 1.2rem;
        padding: 1rem 0.8rem;
    }
    
    /* Ensure buttons and links are finger-friendly */
    .tab-item {
        padding: 12px 0;
    }
    
    /* Center the logo on mobile */
    nav {
        position: relative;
        justify-content: center;
    }
    
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        z-index: 1;
        white-space: nowrap; /* Prevent text wrapping */
        font-size: 1.5rem; /* Slightly reduce font size if needed */
    }
    
    .mobile-menu-toggle {
        position: absolute;
        left: 1rem;
        z-index: 2;
    }
    
    /* Improve header for mobile */
    header {
        padding: 1.5rem 1rem; /* Increase vertical padding */
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .ilan-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .about-header h1 {
        font-size: 1.4rem;
    }
    
    .detail-price {
        font-size: 1.2rem;
    }
}

/* Detail owner section */
.detail-owner {
    margin-top: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
}

.detail-owner h3 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.detail-owner p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.detail-owner a {
    color: #d40000;
    text-decoration: none;
    font-weight: 500;
}

.detail-owner a:hover {
    text-decoration: underline;
}

/* Improved mobile styles for detail view */
@media (max-width: 768px) {
    /* Center everything in detail info for mobile */
    .detail-info {
        text-align: center;
    }
    
    .detail-specs, 
    .additional-specs {
        justify-content: center;
    }
    
    /* Hide owner info on mobile - can be accessed via mobile tab bar */
    .detail-owner {
        display: none;
    }
    
    /* Improve lightbox experience for mobile */
    #lightboxImg {
        max-width: 90%;
        max-height: 80vh;
    }
}

/* Panel Button Styles */
.panel-button a {
    background-color: #000;
    color: white;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.panel-button a:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Add space after lock icon */
.panel-button a i.fa-lock {
    margin-right: 8px; /* Increase space after the lock icon */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* Hide panel button on mobile */
    .panel-button {
        display: none !important;
    }
}

.social-share {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 1rem 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.social-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.social-button i {
    font-size: 20px;
}

.social-button.whatsapp {
    background: #25D366;
}

.social-button.facebook {
    background: #1877F2;
}

.social-button.instagram {
    background: #E4405F;
}

.social-button.tiktok {
    background: #000000;
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Eski paylaşım butonlarını kaldır */
.share-whatsapp, .share-menu, .listing-number-container {
    display: none;
}

/* Mobile grid layout - 2 items per row */
@media (max-width: 768px) {
    .ilan-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
        padding-bottom: 40px; /* Reduced from 80px to 40px (half the space) */
    }

    .ilan-card {
        min-height: 260px;
    }

    .image-container {
        height: 120px;
    }
}

/* Mobile detail view improvements */
@media (max-width: 768px) {
    .listing-detail-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: 1rem;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .listing-detail-overlay {
        padding: 0;
        background: white;
    }

    .detail-header {
        padding: 0.8rem 0;
    }

    .detail-gallery {
        margin: -1rem -1rem 0.5rem -1rem;
    }

    .gallery-main {
        border-radius: 0;
    }

    .price-share-container {
        flex-wrap: wrap;
        padding: 0.5rem 0;
        justify-content: center;
        align-items: center;
    }

    .detail-price {
        width: 100%;
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
        padding: 0.5rem;
        margin-bottom: 0;
        margin-right: 5px;
    }

    .social-button {
        width: 32px;
        height: 32px;
    }

    .social-button i {
        font-size: 14px;
    }

    .detail-specs, 
    .additional-specs {
        gap: 0.5rem;
        font-size: 0.8rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .detail-specs span, 
    .additional-specs span {
        background: #f8f8f8;
        padding: 0.4rem 0.8rem;
        border-radius: 4px;
        width: auto;
    }

    .close-detail {
        top: 0.5rem;
        right: 0.5rem;
        background: rgba(0,0,0,0.1);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .price-share-container {
        display: flex;
        flex-direction: row; /* Ensure row layout even on mobile */
        flex-wrap: nowrap; /* Prevent wrapping */
        justify-content: center;
        align-items: center;
        padding: 0.5rem 0;
        gap: 8px;
    }

    .detail-price {
        width: auto; /* Don't take full width */
        margin-bottom: 0;
        margin-right: 5px;
        font-size: 1.2rem;
        padding: 0.5rem 0.8rem; /* Reduce horizontal padding a bit */
    }

    .sharing-buttons {
        display: flex;
        gap: 6px; /* Reduce gap slightly for mobile */
        margin-left: 0;
    }

    .social-button {
        width: 36px;
        height: 36px;
    }

    .social-button i {
        font-size: 16px;
    }

    /* Show WhatsApp share button on mobile */
    .social-button.whatsapp {
        display: flex; /* Make visible on mobile */
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    .ilan-grid {
        gap: 8px;
        padding: 8px;
        padding-bottom: 35px; /* Reduced from 70px to 35px (half the space) */
    }

    .ilan-card {
        min-height: 240px;
    }

    .image-container {
        height: 100px;
    }

    .price {
        font-size: 0.85rem;
    }
}

/* Add at the end of your existing CSS file */

/* Pagination Controls */
.pagination-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
    width: 100%;
}

.pagination-info {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.load-more-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.load-more-btn:hover {
    background-color: #2980b9;
}

.load-more-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pagination-controls {
        margin: 20px 0;
    }
    
    .load-more-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    width: 100%;
    gap: 10px;
}

.pagination-info {
    display: none; /* Hide this since we're using number buttons */
}

.pagination-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #e9e9e9;
}

.pagination-btn.active {
    background-color: #d40000;
    color: white;
    border-color: #d40000;
}

.pagination-btn:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #ddd;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.pagination-ellipsis {
    align-self: flex-end;
    padding: 0 5px;
    color: #666;
}

@media (max-width: 768px) {
    .pagination-controls {
        margin: 20px 0 60px 0; /* Add bottom margin for mobile tab bar */
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .page-numbers {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .prev-btn {
        order: 2;
    }
    
    .next-btn {
        order: 3;
    }
}

/* Remove old load-more-btn styles as they're no longer needed */
.load-more-btn {
    display: none;
}

/* Pagination Controls - Updated */
.pagination-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
    width: 100%;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.pagination-status {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    text-align: center;
    position: relative;
}

.more-arrow {
    color: #d40000;
    animation: bounce 1.5s infinite;
    display: inline-block;
    margin-left: 5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #e9e9e9;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pagination-btn.active {
    background-color: #d40000;
    color: white;
    border-color: #d40000;
    font-weight: bold;
}

.pagination-btn:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #ddd;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.pagination-ellipsis {
    align-self: flex-end;
    padding: 0 5px;
    color: #666;
}

.pagination-more {
    color: #d40000;
    font-size: 16px;
    margin: 0 5px;
}

/* Style next button differently to make it stand out */
.next-btn {
    background-color: #d40000;
    color: white;
    border-color: #d40000;
    position: relative;
    font-weight: 500;
}

.next-btn:hover:not(:disabled) {
    background-color: #b80000;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(212, 0, 0, 0.25);
}

.next-btn:disabled {
    background-color: #f8d7d7;
    color: #999;
    border-color: #f8d7d7;
}

@media (max-width: 768px) {
    .pagination-controls {
        margin: 20px 0 80px 0; /* Increased bottom margin for mobile tab bar */
    }
    
    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .page-numbers {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }
    
    .prev-btn {
        order: 2;
    }
    
    .next-btn {
        order: 3;
    }
}

/* Remove old load-more-btn styles as they're no longer needed */
.load-more-btn {
    display: none;
}

/* Enhanced pagination indicators */
.more-listings-indicator {
    color: #d40000;
    font-weight: bold;
    display: inline-block;
    margin-left: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

/* Style next button differently to make it stand out even more */
.next-btn.has-more {
    background-color: #d40000;
    color: white;
    border-color: #d40000;
    position: relative;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(212, 0, 0, 0.4);
    animation: pulse-shadow 1.5s infinite;
}

@keyframes pulse-shadow {
    0% {
        box-shadow: 0 0 5px rgba(212, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 12px rgba(212, 0, 0, 0.7);
    }
    100% {
        box-shadow: 0 0 5px rgba(212, 0, 0, 0.4);
    }
}

.next-btn.has-more:hover:not(:disabled) {
    background-color: #b80000;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(212, 0, 0, 0.4);
}
