/* Custom Styles for Rehabilitasyon Merkezi Website */

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
}

/* Navbar Brand Spacing */
.navbar-brand {
    margin-right: 2rem !important;
}

@media (max-width: 991px) {
    .navbar-brand {
        margin-right: 1rem !important;
    }
}

/* Language Selector Styles */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 15px;
}

.language-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0;
    line-height: 1;
}

.language-btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    border-right: none;
    margin-right: 0;
}

.language-btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-left: 0;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.language-btn.active {
    background: rgba(255, 255, 255, 0.5) !important;
    font-weight: 700 !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

@media (max-width: 576px) {
    .language-selector {
        margin-left: 10px;
    }
    
    .language-btn {
        padding: 3px 8px;
        font-size: 12px;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.bg-primary {
    background-color: #007bff !important; /* Mavi ton */
}

.text-primary {
    color: #007bff !important;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

.hero {
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.5); /* Mavi overlay */
}

.hero .container {
    position: relative;
    z-index: 1;
}

.service-card, .blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover, .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(45, 126, 247, 0.10), 0 8px 20px rgba(45, 206, 137, 0.10);
}

/* Instagram Videos Grid (Homepage) */
.instagram-videos-container {
    /* 4x220 + gap sığacak genişlik (daha büyük thumbnail) */
    --ig-tile-w: 220px;
    --ig-gap: 20px;
    max-width: calc((var(--ig-tile-w) * 4) + (var(--ig-gap) * 3) + 80px) !important;
}

.instagram-videos-grid {
    display: grid;
    /* Sabit video kutuları: 4x220px */
    grid-template-columns: repeat(4, var(--ig-tile-w));
    gap: var(--ig-gap);
    justify-content: center; /* grid'i yatayda ortala */
    justify-items: center;
}

.instagram-video-card {
    position: relative;
    background: transparent;
    border-radius: 15px;
    overflow: hidden;
    width: var(--ig-tile-w);
    max-width: var(--ig-tile-w);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.video-wrapper {
    width: var(--ig-tile-w);
    max-width: var(--ig-tile-w);
    background: #000;
    position: relative;
    aspect-ratio: 9 / 16; /* reels formatı */
    overflow: hidden;
    border-radius: 15px;
}

.video-wrapper .mp4-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

.video-wrapper-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b0b0c 0%, #1a1a1c 100%);
}

.instagram-fallback-inner {
    text-align: center;
    padding: 20px;
}

.instagram-fallback-inner i {
    font-size: 38px;
    color: #bc1888;
    margin-bottom: 10px;
    display: block;
}

.instagram-video-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.instagram-video-card:hover .video-wrapper .mp4-video {
    filter: contrast(1.06) saturate(1.06);
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 2;
    background: radial-gradient(circle at center, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.05) 55%, rgba(0,0,0,0.0) 100%);
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}


.video-play {
    width: 66px;
    height: 66px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    transform: scale(0.96);
    transition: transform 0.18s ease;
}

.instagram-video-card:hover .video-overlay {
    opacity: 1;
}

.instagram-video-card:hover .video-play {
    transform: scale(1);
}

/* (Eski open-link stilleri kaldırıldı) */
.instagram-open-link {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.instagram-open-link:hover {
    background: rgba(0, 0, 0, 0.72);
}

.instagram-video-card:hover .instagram-open-link,
.instagram-open-link:focus {
    opacity: 1;
    transform: translateY(0);
}

.instagram-open-link:focus {
    outline: 2px solid rgba(0, 123, 255, 0.6);
    outline-offset: 2px;
}

/* Responsive: 4 → 2 → 1 */
@media (max-width: 992px) {
    .instagram-videos-container {
        --ig-tile-w: 200px;
        --ig-gap: 16px;
    }

    .instagram-videos-grid {
        grid-template-columns: repeat(2, var(--ig-tile-w));
    }
}

@media (max-width: 576px) {
    .instagram-videos-container {
        --ig-tile-w: 160px;
        --ig-gap: 14px;
    }

    .instagram-videos-grid {
        grid-template-columns: repeat(2, var(--ig-tile-w));
    }

    .instagram-open-text {
        display: none; /* mobilde ikon yeterli */
    }
}

@media (max-width: 420px) {
    .instagram-videos-container {
        --ig-tile-w: 220px;
        --ig-gap: 14px;
    }

    .instagram-videos-grid {
        /* çok küçük ekranlarda tekli */
        grid-template-columns: repeat(1, var(--ig-tile-w));
    }
}

@media (prefers-reduced-motion: reduce) {
    .instagram-video-card,
    .video-overlay,
    .video-play {
        transition: none !important;
        transform: none !important;
    }
}

/* Hizmet kartı açıklama: uzun metinlerde boyut bozulmasın */
.service-card .service-card-desc {
    min-height: 3.6em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333333;
}

/* Hizmet kartı görsel: oranlı boyut */
.service-card .service-card-img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

footer {
    background-color: #343a40;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Hero Slider Section */
.hero-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
}

.hero-slider-placeholder {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
}

.hero-slider-placeholder .carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#heroCarousel {
    width: 100%;
    height: 60vh;
    min-height: 400px;
}

.carousel-inner {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
}

.carousel-item {
    width: 100%;
    height: 100%;
    position: relative;
    transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
}

/* Slider resmi alanı tamamen doldurur, boşluk kalmaz */
.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Image optimization - object-fit for all images */
img {
    max-width: 100%;
    height: auto;
}

.card-img-top {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background-color: #f0f0f0;
}

/* Carousel Controls Styling */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

/* Carousel Indicators Styling */
.carousel-indicators {
    margin-bottom: 20px;
}

.carousel-indicators [type="button"] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators [type="button"].active {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

/* Responsive adjustments for slider */
@media (max-width: 768px) {
    #heroCarousel {
        height: 50vh;
        min-height: 300px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    .carousel-control-prev {
        left: 15px;
    }
    
    .carousel-control-next {
        right: 15px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 25px;
        height: 25px;
    }
    
    .carousel-indicators {
        margin-bottom: 15px;
    }
    
    .carousel-indicators [type="button"] {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }
}

@media (max-width: 576px) {
    #heroCarousel {
        height: 40vh;
        min-height: 250px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control-prev {
        left: 10px;
    }
    
    .carousel-control-next {
        right: 10px;
    }
}

/* Why Therapy Life Section */
#why-therapy {
    background-color: #ffffff;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

.heading-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #2dce89, transparent);
    max-width: 200px;
}

.section-heading h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2rem;
}

.feature-card {
    background-color: #ffffff;
    border: 1px solid rgba(45, 126, 247, 0.12);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(45, 126, 247, 0.10), 0 8px 20px rgba(45, 206, 137, 0.10);
    border-color: rgba(45, 206, 137, 0.6);
}

.feature-icon {
    color: #2dce89;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-icon:hover {
    color: #20c997;
    transform: translateY(-5px);
}

.branch-info-card,
.branch-hours-card {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.info-content h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.info-content p {
    color: #666;
    line-height: 1.6;
}

.info-content a {
    color: #28a745;
    transition: color 0.3s ease;
}

.info-content a:hover {
    color: #20c997;
}

.whatsapp-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.whatsapp-btn-branch {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn-branch:hover {
    background-color: #20ba5a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn-branch i {
    font-size: 1.3rem;
}

.hours-table {
    margin-top: 1rem;
}

.hours-table .table {
    margin-bottom: 0;
}

.hours-table .table td {
    padding: 1rem;
    border-color: #e9ecef;
    vertical-align: middle;
}

.hours-table .table tbody tr:hover {
    background-color: #f8f9fa;
}

.map-container-branch {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-container-branch iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsive adjustments for branch detail */
@media (max-width: 768px) {
    .branch-detail-hero {
        padding: 60px 0;
    }
    
    .branch-info-card,
    .branch-hours-card {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .whatsapp-btn-branch {
        width: 100%;
        justify-content: center;
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .map-container-branch {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .branch-detail-hero h1 {
        font-size: 2rem;
    }
    
    .branch-info-card,
    .branch-hours-card {
        padding: 1.5rem 1rem;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin: 0 auto;
    }
    
    .map-container-branch {
        height: 300px;
    }
}

/* Expert Team Section */
.expert-team-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.expert-team-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
    text-align: center;
}

.expert-card {
    background-color: #ffffff;
    border: 1px solid rgba(45, 126, 247, 0.12);
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.expert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 36px rgba(45, 126, 247, 0.10), 0 10px 26px rgba(45, 206, 137, 0.10);
    border-color: rgba(45, 206, 137, 0.6);
}

.expert-photo-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    background-color: #ffffff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.expert-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background-color: #f8f9fa;
}

.expert-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.expert-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.expert-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.expert-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.expert-social a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.expert-social .social-facebook {
    background-color: #1877f2;
    color: white;
}

.expert-social .social-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.expert-social .social-twitter {
    background-color: #1da1f2;
    color: white;
}

.expert-social .social-email {
    background-color: #ea4335;
    color: white;
}

.expert-social .social-whatsapp {
    background-color: #25d366;
    color: white;
}

.expert-social .social-youtube {
    background-color: #ff0000;
    color: white;
}

.expert-more-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.expert-more-btn:hover {
    background-color: #20c997;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* Responsive adjustments for expert team */
@media (max-width: 992px) {
    .expert-photo-container {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .expert-team-section {
        padding: 60px 0;
    }
    
    .expert-team-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .expert-photo-container {
        width: 160px;
        height: 160px;
    }
    
    .expert-name {
        font-size: 1.1rem;
    }
    
    .expert-title {
        font-size: 0.9rem;
    }
    
    .expert-social a {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .expert-team-title {
        font-size: 1.75rem;
    }
    
    .expert-card {
        padding: 1.5rem;
    }
    
    .expert-photo-container {
        width: 140px;
        height: 140px;
    }
    
    .expert-name {
        font-size: 1rem;
    }
    
    .expert-title {
        font-size: 0.85rem;
    }
    
    .expert-social {
        gap: 0.5rem;
    }
    
    .expert-social a {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}
/* ============================================
   ŞUBELER SAYFASI - OTOMATİK HOVER ANİMASYONU
   ============================================ */

/* Şube Kartları - Yumuşak Geçiş Animasyonları */
.branch-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

/* Hover Efekti - Performans Optimizasyonlu */
.branch-card:hover {
    transform: translateY(-5px) scale(1.01);
}

/* Chevron İkonu Animasyonu */
.branch-card .fa-chevron-down {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Detay Alanı - Başlangıç Durumu */
.branch-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s ease 0.1s,
                transform 0.4s ease 0.1s,
                margin-top 0.4s ease;
    will-change: max-height, opacity, transform;
}

/* Hover ile Otomatik Açılma - GPU Hızlandırmalı */
.branch-card:hover .branch-details {
    max-height: 1500px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 20px;
    padding-top: 20px;
}

/* Chevron Dönüş Animasyonu */
.branch-card:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* İç Elementler için Sıralı Animasyon */
.branch-card:hover .branch-details .info-item {
    animation: slideInUp 0.4s ease forwards;
}

.branch-card:hover .branch-details .info-item:nth-child(1) {
    animation-delay: 0.1s;
}

.branch-card:hover .branch-details .info-item:nth-child(2) {
    animation-delay: 0.2s;
}

.branch-card:hover .branch-details .info-item:nth-child(3) {
    animation-delay: 0.3s;
}

.branch-card:hover .branch-details .whatsapp-section {
    animation: slideInUp 0.4s ease forwards;
    animation-delay: 0.4s;
}

.branch-card:hover .branch-details .map-container {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 0.5s;
}

/* Keyframe Animasyonları */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Harita Container - Lazy Load İyileştirmesi */
.map-container {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* HR Çizgisi Stilizasyonu */
.branch-details hr {
    margin: 0 0 20px 0;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #28a745, transparent);
    opacity: 0;
    animation: expandWidth 0.6s ease forwards;
    animation-delay: 0.2s;
}

@keyframes expandWidth {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Responsive Optimizasyonlar */
@media (max-width: 768px) {
    .branch-card:hover .branch-details {
        max-height: 2000px;
    }
    
    /* Mobilde daha hızlı animasyon */
    .branch-details {
        transition-duration: 0.4s;
    }
}

/* Mobil Cihazlarda Performans İyileştirmesi */
@media (max-width: 576px) {
    .branch-card:hover {
        transform: translateY(-3px);
    }
    
    /* Animasyon sayısını azalt */
    .branch-card:hover .branch-details .info-item,
    .branch-card:hover .branch-details .whatsapp-section,
    .branch-card:hover .branch-details .map-container {
        animation: none;
        opacity: 1;
    }
}

/* Dokunmatik Ekranlar için Optimizasyon */
@media (hover: none) and (pointer: coarse) {
    .branch-card:active {
        transform: scale(0.98);
    }
}

/* Yüksek Performans Modu - Düşük Güç Modundaki Cihazlar */
@media (prefers-reduced-motion: reduce) {
    .branch-card,
    .branch-details,
    .fa-chevron-down {
        transition: none !important;
        animation: none !important;
    }
    
    .branch-card:hover .branch-details {
        transform: none;
    }
}

/* ============================================
   NAVBAR DROPDOWN HOVER MENU - OTOMATİK AÇILMA
   ============================================ */

/* Desktop: Hover ile Dropdown Menü Açılması */
@media (min-width: 992px) {
    /* Nav-item dropdown'u hover'da açılması */
    .navbar-nav .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        animation: dropdownSlideDown 0.3s ease-out forwards;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }
    
    /* Dropdown menü başlangıç durumu */
    .navbar-nav .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s, visibility 0.3s ease 0.2s;
        border: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
        margin-top: 0;
        padding-top: 0.5rem;
        pointer-events: none;
        min-width: 200px;
        z-index: 1050;
        position: relative;
    }
    
    /* Görünmez köprü: Ana başlık ile menü arasındaki boşluğu kapatan pseudo-element */
    .navbar-nav .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -10px;
        left: 0;
        right: 0;
        height: 10px;
        background: transparent;
    }
    
    /* Dropdown menü açıkken pointer events etkin */
    .navbar-nav .nav-item.dropdown:hover > .dropdown-menu {
        pointer-events: auto;
    }
    
    /* Dropdown toggle arrow icon'u */
    .navbar-nav .dropdown-toggle::after {
        transition: transform 0.3s ease;
    }
    
    /* Hover durumunda arrow dönüşü */
    .navbar-nav .nav-item.dropdown:hover > .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    /* Dropdown menu item'ları */
    .navbar-nav .dropdown-menu .dropdown-item {
        transition: all 0.2s ease;
        padding: 0.75rem 1.5rem;
        color: #333;
        font-weight: 500;
        border-left: 3px solid transparent;
    }
    
    /* Dropdown menu item hover */
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        background-color: #f8f9fa;
        color: #28a745;
        padding-left: 1.75rem;
        border-left-color: #28a745;
    }
    
    /* Dropdown menu item active durumu */
    .navbar-nav .dropdown-menu .dropdown-item.active {
        background-color: rgba(40, 167, 69, 0.1);
        color: #28a745;
        border-left-color: #28a745;
    }
    
    /* Tıklanabilir dropdown toggle link */
    .navbar-nav .dropdown-toggle {
        cursor: pointer;
    }
}

/* Slide Down Animasyonu */
@keyframes dropdownSlideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animasyonu Dropdown Items İçin */
@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobil Cihazlarda Deaktif Etme */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: none;
    }
    
    /* Bootstrap'in data-bs-toggle="dropdown" ile çalışması korunur */
    .navbar-nav .dropdown-menu.show {
        display: block !important;
    }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS - SAYFA AKIŞ
   ============================================ */

/* Scroll Reveal Başlangıç Durumu */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll Reveal Animasyon Tamamlandı */
[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Farklı Animasyon Tipları */

/* 1. Slide Down (Yukarıdan aşağıya kayma) */
[data-aos="slide-down"] {
    transform: translateY(-30px);
}

[data-aos="slide-down"].aos-animate {
    transform: translateY(0);
}

/* 2. Slide Up (Aşağıdan yukarıya kayma) */
[data-aos="slide-up"] {
    transform: translateY(30px);
}

[data-aos="slide-up"].aos-animate {
    transform: translateY(0);
}

/* 3. Fade In (Şeffaflık artması) */
[data-aos="fade-in"] {
    opacity: 0;
    transform: none;
}

[data-aos="fade-in"].aos-animate {
    opacity: 1;
    transform: none;
}

/* 4. Scale In (Büyüme) */
[data-aos="scale-in"] {
    transform: scale(0.9);
    opacity: 0;
}

[data-aos="scale-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/* 5. Zoom In (Yakınlaştırma) */
[data-aos="zoom-in"] {
    transform: scale(0.85);
    opacity: 0;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/* Section Başlıkları için Animasyon */
section > h2,
section > .section-heading,
section > .text-center > h2 {
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

section > h2[data-aos].aos-animate,
section > .section-heading[data-aos].aos-animate,
section > .text-center > h2[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Kart Animasyonları için Stagger Efekti */
[data-aos-delay="100"] {
    transition-delay: 0.1s;
}

[data-aos-delay="200"] {
    transition-delay: 0.2s;
}

[data-aos-delay="300"] {
    transition-delay: 0.3s;
}

[data-aos-delay="400"] {
    transition-delay: 0.4s;
}

[data-aos-delay="500"] {
    transition-delay: 0.5s;
}

[data-aos-delay="600"] {
    transition-delay: 0.6s;
}

/* ============================================
   GOOGLE MAPS LAZY LOADING PLACEHOLDER
   ============================================ */

/* Map Container Placeholder */
.map-container-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 300px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.map-container-placeholder.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-container-placeholder.map-loaded {
    background: none;
    display: block;
    min-height: auto;
}

/* Map Container Default */
.map-container {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* Branch Detail Map Container */
.map-container-branch {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.map-container-branch iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* Spinner Animasyonu */
.map-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(40, 167, 69, 0.2);
    border-top-color: #28a745;
    border-radius: 50%;
    animation: spinnerRotate 0.8s linear infinite;
}

@keyframes spinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

/* Placeholder İçerik */
.map-placeholder-content {
    text-align: center;
    opacity: 0.6;
}

.map-placeholder-content p {
    margin-top: 1rem;
    color: #666;
    font-size: 0.95rem;
}

/* Maps Yüklendi Animasyonu */
.map-container-placeholder.map-loading iframe,
.map-container-placeholder.map-loaded iframe {
    animation: mapFadeIn 0.5s ease-out;
}

@keyframes mapFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsif Animasyonlar */
@media (max-width: 768px) {
    [data-aos] {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    }
    
    [data-aos].aos-animate {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Mobil cihazlarda daha hızlı animasyon */
    [data-aos="slide-down"],
    [data-aos="slide-up"],
    [data-aos="scale-in"],
    [data-aos="zoom-in"] {
        transition-duration: 0.4s;
    }
}

/* Düşük Hareket Modu */
@media (prefers-reduced-motion: reduce) {
    [data-aos],
    [data-aos].aos-animate,
    .map-spinner,
    .map-container-placeholder.map-loaded iframe {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Top Bar ve Genel Stiller */
.top-bar {
    background-color: #28a745;
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    transition: opacity 0.3s;
}

.top-bar a:hover {
    opacity: 0.8;
}

.branches-hero {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 80px 0;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.whatsapp-btn:hover {
    background-color: #20ba5a;
    color: white;
    transform: scale(1.05);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Language Switcher Navbar Styles */
.language-switcher {
    margin-left: auto;
}

.language-switcher .nav-link {
    color: #333 !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.language-switcher .nav-link:hover {
    background-color: #f0f0f0;
    color: #28a745 !important;
}

.language-flag {
    font-size: 1.2rem;
    display: inline-block;
}

.language-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

.language-chevron {
    font-size: 0.75rem;
    color: #666;
    transition: transform 0.3s ease;
}

.language-switcher .dropdown-toggle::after {
    display: none;
}

.language-switcher .dropdown-toggle[aria-expanded="true"] .language-chevron {
    transform: rotate(180deg);
}

/* Language Dropdown Menu */
.language-dropdown {
    min-width: 180px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem !important;
    transition: all 0.2s ease;
    color: #333;
    font-weight: 500;
}

.language-option:hover {
    background-color: #f0f8ff;
    color: #28a745;
}

.language-option.active {
    background-color: #e8f5e9;
    color: #28a745;
    font-weight: 700;
}

.language-option .flag-icon {
    font-size: 1.25rem;
    min-width: 24px;
    text-align: center;
}

.language-option .lang-name {
    font-size: 0.95rem;
}

/* Mobile Language Switcher */
@media (max-width: 768px) {
    .language-label {
        display: none !important;
    }
    
    .language-switcher .nav-link {
        padding: 0.5rem 0.5rem !important;
    }
    
    .language-dropdown {
        min-width: 160px;
    }
    
    .language-option {
        padding: 0.6rem 0.8rem !important;
    }
}

/* RTL Support for Arabic */
html[lang="ar"] {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .language-switcher {
    margin-left: 0;
    margin-right: auto;
}

html[lang="ar"] .language-dropdown {
    left: auto;
    right: 0;
}

html[lang="ar"] .language-option {
    flex-direction: row-reverse;
}

html[lang="ar"] .flag-icon {
    margin-left: auto;
}

html[lang="ar"] body {
    text-align: right;
}

html[lang="ar"] .navbar-collapse {
    text-align: right;
}

/* WhatsApp Button - Basit Link Butonu */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #20ba5a;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
    transform: scale(1.1);
    color: white;
}

.whatsapp-float:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}

/* RTL (Arapça) modu - dil ar seçildiğinde body.rtl-mode uygulanır */
body.rtl-mode {
    direction: rtl;
    text-align: right;
}

body.rtl-mode .navbar-nav {
    flex-direction: row;
}

body.rtl-mode .language-selector {
    margin-left: 0;
    margin-right: 15px;
}

body.rtl-mode .navbar-brand {
    margin-right: 0;
    margin-left: 2rem;
}

body.rtl-mode .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

body.rtl-mode .ms-1,
body.rtl-mode .me-1 {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

body.rtl-mode .text-start {
    text-align: right !important;
}

body.rtl-mode .text-end {
    text-align: left !important;
}
/* Footer Styles */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
}

footer h4 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.footer-heading {
    border-bottom: 3px solid #28a745;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-about-text {
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-about-text p {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.6;
}

.footer-services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-services-list li {
    margin-bottom: 0.8rem;
}

.footer-link {
    transition: all 0.3s ease;
    text-decoration: none;
    padding-left: 15px;
    position: relative;
    display: inline-block;
}

.footer-link::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.footer-link:hover {
    color: #28a745 !important;
    padding-left: 25px;
}

footer .border-top {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-about-text {
        font-size: 0.9rem;
    }
    
    .footer-heading {
        font-size: 1.1rem;
    }
    
    footer h4 {
        margin-top: 1.5rem;
    }
    
    footer h4:first-child {
        margin-top: 0;
    }
}

/* ============================================
   ADVANCED MOBILE RESPONSIVE CSS
   ============================================ */

/* Mobile First Approach - Touch Friendly */
@media (max-width: 1024px) {
    /* Tüm butonlar touch-friendly olsun (minimum 48px x 48px) */
    .btn {
        min-height: 44px;
        padding: 10px 16px;
    }
    
    /* Navbar Hamburger Menu */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.5);
    }
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 768px) {
    /* Container padding */
    body {
        padding: 0 10px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* HTML font size azalt */
    html {
        font-size: 16px;
    }
    
    /* Heading responsive */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    /* Navbar dropdown */
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Forms responsive */
    input, textarea, select {
        font-size: 16px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Hero section */
    .hero, .service-hero, .branch-detail-hero {
        padding: 40px 0;
    }
    
    /* Section padding */
    section {
        padding: 40px 0;
    }
}

/* Mobile Small (480px - 768px) */
@media (max-width: 480px) {
    /* Remove excessive margins on mobile */
    .container {
        padding: 0 10px;
    }
    
    /* Hero height smaller on very small screens */
    .hero-slider, #heroCarousel {
        height: 35vh;
        min-height: 200px;
    }
    
    .carousel-image {
        height: 35vh;
    }
    
    /* Section padding minimal */
    section {
        padding: 30px 0;
    }
    
    /* Remove top/bottom margins */
    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.75rem;
    }
    
    /* Paragraph spacing */
    p {
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }
    
    /* Grid single column */
    .row > [class*='col-'] {
        margin-bottom: 1rem;
    }
    
    /* Button full width on mobile */
    .btn-block {
        width: 100%;
    }
    
    /* Modal size */
    .modal-dialog {
        margin-top: 0;
    }
}

/* Extra Small Phones (< 360px) */
@media (max-width: 360px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    /* Reduce padding everywhere */
    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .navbar-brand img {
        max-width: 60px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 35px;
        height: 35px;
    }
}

/* Landscape Orientation Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider, #heroCarousel {
        height: 60vh;
        min-height: 200px;
    }
    
    section {
        padding: 20px 0;
    }
    
    .carousel-indicators {
        margin-bottom: 10px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 35px;
        height: 35px;
    }
}

/* High DPI Screens (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for high DPI */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
    
    /* Thinner borders on high DPI */
    border, .card, .btn {
        border-width: 0.5px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .form-control, textarea, select {
        background-color: #2a2a2a;
        color: #e0e0e0;
        border-color: #3a3a3a;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    /* Remove hover effects, use active instead */
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    /* Disable hover states on touch devices */
    .card:hover {
        transform: none;
    }
}
/* === MOBİL VE PERFORMANS İYİLEŞTİRMELERİ (SONDAN EKLENENLER) === */

/* Yazı Boyutlarını Mobilde Dengele */
@media (max-width: 768px) {
    h1, .hero-slider h2 { font-size: 1.8rem !important; }
    h2, .section-heading h2 { font-size: 1.5rem !important; }
    p, .text-muted { font-size: 0.95rem !important; line-height: 1.6 !important; }
    
    /* Yanlardan taşmayı engelle */
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden;
    }
    
    /* Navbar Mobilde Daha Rahat Tıklansın */
    .navbar-toggler {
        padding: 10px;
        margin-right: 0;
    }
    
    /* Hizmet Kartları Mobilde Alt Alta Boşluklu */
    .service-card {
        margin-bottom: 20px;
    }
}

/* Görsel Optimizasyonu */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Alt boşluk sorununu çözer */
}

/* Gereksiz Yatay Scrollu Engelle */
body, html {
    overflow-x: hidden;
    width: 100%;
}

/* WhatsApp Butonunun Mobilde Menü Altında Kalmasını Engelle */
.whatsapp-float {
    z-index: 9999 !important;
    bottom: 20px;
    right: 20px;
}