/* ====== GENEL RESET & TEMA ====== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --primary-color: #1E88E5;
    --dark-blue: #0D47A1;
    --hover-blue: #1565C0;
    --light-blue: #BBDEFB;
    --background-blue: #E3F2FD;
    --dark-bg: #0D47A1;
    --white: #FFFFFF;
}
body {
    background-color: var(--background-blue);
    color: var(--dark-blue);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    font-size: 16px;
    margin: 0;
    padding: 0 0 20px 0;
    overflow-x: hidden;
    min-height: 100vh;
    scroll-behavior: smooth;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-blue);
    margin: 18px 0 12px;
    font-weight: 700;
    line-height: 1.3;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInSection 0.6s ease-out forwards;
}
p {
    margin-bottom: 16px;
    color: var(--dark-blue);
}
@keyframes slideInSection {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ====== SMOOTH FADE EFEKTİ ====== */
.smooth-fade {
    transition: opacity 0.3s ease;
    opacity: 0;
}
.smooth-fade.show {
    opacity: 1;
}

/* ====== ANA MENÜ ====== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--dark-bg) !important;
    padding: 16px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    width: 100%;
    overflow: hidden;
    min-height: 60px;
}
.main-menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px;
    overflow: hidden;
}
.main-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
}
.main-menu li {
    flex: 0 0 auto;
}
.main-menu li a {
    color: var(--white);
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82em;
    transition: all 0.3s ease;
    display: block;
    min-width: 55px;
    text-align: center;
    white-space: nowrap;
    line-height: 1.3;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.main-menu li a:hover,
.main-menu li a.active,
.main-menu li a[aria-current="page"] {
    background: var(--primary-color) !important;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(30, 136, 229, 0.4);
    border-color: var(--hover-blue);
}
.main-menu li a:focus {
    outline: 2px solid var(--hover-blue);
    outline-offset: 1px;
}

/* ====== HERO BÖLÜMÜ ====== */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('img/hero-asmatavan.webp') center/cover no-repeat;
    padding: 70px 16px 60px;
    text-align: center;
    color: var(--white);
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}
.hero-section h1 {
    color: var(--white) !important;
    font-size: 2.3em;
    margin-bottom: 14px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.hero-section h1.orange-title {
    color: var(--light-blue) !important;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* CTA BUTONU - MOBİL DÜZELTME DAHİL */
.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: var(--white);
    font-weight: bold;
    padding: 16px 36px;
    border-radius: 35px;
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.5);
    transition: all 0.35s ease;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    min-height: 52px;
}
.cta-button:hover {
    background: linear-gradient(135deg, var(--dark-bg), var(--primary-color));
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(30, 136, 229, 0.6);
}

/* ====== MARKA LOGOLARI ŞERİDİ ====== */
.brand-logos-container {
    background: var(--background-blue);
    padding: 16px 0;
    border-radius: 16px;
    margin: 28px auto;
    max-width: 96%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    perspective: 1200px;
    will-change: transform;
}
.logo-track {
    display: flex;
    gap: 28px;
    padding: 0 14px;
    animation: scroll-smooth 24s linear infinite;
    width: max-content;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    transform-style: preserve-3d;
}
.logo-track img {
    height: 60px;
    width: 100px;
    object-fit: contain;
    padding: 6px;
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0) scale(1);
    will-change: transform;
}
.logo-track img:hover {
    transform: translateZ(30px) scale(1.15) rotateY(8deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    z-index: 10;
}
@keyframes scroll-smooth {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* ====== ARAMA KUTUSU ====== */
.search-container {
    position: relative;
    width: 90%;
    max-width: 400px;
    margin: 20px auto 30px auto;
    z-index: 10;
    border-radius: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
#district-search {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--dark-blue);
    border-radius: 25px;
    font-size: 1em;
    box-sizing: border-box;
    background-color: var(--white);
    color: var(--dark-blue);
}
#district-search:focus {
    outline: none;
    border-color: var(--hover-blue);
    box-shadow: 0 0 8px rgba(21, 101, 192, 0.5);
}
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border: 1px solid var(--dark-blue);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}
.autocomplete-results a {
    display: block;
    padding: 10px;
    color: var(--dark-blue);
    text-decoration: none;
    transition: background-color 0.2s;
}
.autocomplete-results a:hover {
    background-color: var(--background-blue);
}

/* ====== HİZMET KARTLARI ====== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1200px;
    margin: 48px auto 36px;
    padding: 0 20px;
}
.service-item {
    position: relative;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
}
.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.service-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    transition: transform 0.5s ease;
}
.service-item:hover img {
    transform: scale(1.15);
}
.service-item h3 {
    font-size: 1.3em;
    margin: 10px 0;
}
.service-item p {
    font-size: 0.95em;
    color: var(--dark-blue);
}

/* ====== İLÇE LİSTESİ ====== */
.district-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}
.district-list a {
    display: block;
    padding: 20px 16px;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.district-list a:hover {
    background: var(--hover-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* ====== KLONLANMIŞ FOTOĞRAF KARELERİ ====== */
#bottom-photo-showcase {
    max-width: 1200px;
    margin: 48px auto 36px;
    padding: 0 20px;
}
.photo-grid-cloned {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    padding: 0 20px;
}
.photo-item-cloned {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    background-color: var(--white);
    text-align: center;
}
.photo-item-cloned:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.photo-item-cloned img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    transition: transform 0.5s ease;
}
.photo-item-cloned:hover img {
    transform: scale(1.15);
}
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: var(--white);
    text-align: center;
    padding: 28px 16px 18px;
    font-size: 1.15rem;
    font-weight: 600;
    backdrop-filter: blur(3px);
}

/* ====== GERİ DÖN VE FOOTER ====== */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}
.back-link:hover {
    color: var(--hover-blue);
}
footer {
    background: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 28px 16px;
    font-size: 0.95rem;
    margin-top: 60px;
    border-top: 3px solid var(--primary-color);
    position: relative;
}
footer p {
    margin: 0;
    font-weight: 500;
    color: var(--white) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
footer a {
    color: var(--light-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}
footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ====== SCROLL TOP BUTONU ====== */
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}
.scroll-top-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(30, 136, 229, 0.6);
}
.scroll-top-btn::before {
    content: '↑';
    color: var(--white);
    font-size: 1.5em;
}

/* ====== SEO METNİ ====== */
#seo-content-section h2 {
    font-size: 2.2em;
    text-align: center;
    color: var(--dark-blue);
    margin-bottom: 36px;
    position: relative;
}
#seo-content-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 4px;
}
#seo-content-section p {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 16px;
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ====== İLÇE HİZMETLERİ ====== */
#district-services .district-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    margin: 20px auto;
}
#district-services .district-button {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    border-radius: 12px;
    border: 2px solid var(--dark-blue);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
#district-services .district-button:hover {
    background: var(--hover-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* ====== MOBİL UYUM (BUTON DÜZELTME DAHİL) ====== */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        padding: 0 0 10px 0;
    }
    .page-section {
        padding: 15px;
        margin: 10px auto;
    }
    header {
        padding: 14px 0;
        min-height: 56px;
    }
    .main-menu {
        padding: 0 6px;
    }
    .main-menu ul {
        gap: 5px;
    }
    .main-menu li a {
        font-size: 0.78em;
        padding: 6px 8px;
        min-width: 50px;
        border-radius: 6px;
    }
    .hero-section {
        padding: 65px 14px 50px;
        min-height: 45vh;
    }
    .hero-section h1 {
        font-size: 1.8em;
    }
    .hero-section h1.orange-title {
        font-size: 1.8em;
    }
    .search-container {
        width: 95%;
        margin: 15px auto 20px auto;
    }
    #district-search {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    .brand-logos-container {
        padding: 12px 0;
        margin: 20px auto;
        border-radius: 12px;
        perspective: 1000px;
    }
    .logo-track {
        gap: 20px;
        animation: scroll-smooth 28s linear infinite;
    }
    .logo-track img {
        width: 100px;
        height: 50px;
    }
    .services-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .service-item img {
        height: 260px;
        border-radius: 13px;
    }
    .photo-grid-cloned {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .photo-item-cloned {
        max-width: 100%;
        border-radius: 16px;
        border: 5px solid var(--white);
        padding: 3px;
    }
    .photo-item-cloned img {
        height: 260px;
        border-radius: 13px;
    }
    .photo-caption {
        padding: 22px 14px 16px;
        font-size: 1.05rem;
    }
    .district-list {
        grid-template-columns: 1fr;
    }
    .scroll-top-btn {
        bottom: 10px;
    }
    #seo-content-section h2 {
        font-size: 1.9em;
        text-align: center;
    }
    #seo-content-section h2::after {
        width: 60px;
        height: 3px;
    }
    #seo-content-section p {
        text-align: left;
    }
    #district-services .district-buttons {
        gap: 8px;
        max-width: 90%;
    }
    #district-services .district-button {
        padding: 10px 15px;
        font-size: 0.95em;
        max-width: 100%;
    }

    /* MOBİL CTA BUTONU DÜZELTMESİ */
    .cta-button {
        padding: 12px 20px !important;
        font-size: 1rem !important;
        border-radius: 30px !important;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        line-height: 1.4;
        max-width: 90%;
        margin: 0 auto;
        text-align: center;
        letter-spacing: -0.2px;
    }

    @media (max-width: 380px) {
        .cta-button {
            font-size: 0.95rem !important;
            padding: 10px 16px !important;
        }
    }
}

/* ====== MASAÜSTÜ ORTALAMA ====== */
@media (min-width: 769px) {
    .page-section,
    #home-content-wrapper,
    .services-grid,
    .photo-grid-cloned,
    .brand-logos-container {
        text-align: center !important;
    }
    .page-section p,
    #seo-content-section p,
    .services-grid p {
        max-width: 900px;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        padding: 0 20px;
    }
    .page-section h2,
    #seo-content-section h2 {
        text-align: center !important;
        width: 100%;
    }
    .page-section .cta-button,
    #home-content-wrapper .cta-button {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
}