/* ============================================================
   Alfa Omega World - Mobile Fixes v1.0
   Tüm iç sayfalar + Slider + Grid uyum düzeltmeleri
   ============================================================ */

/* ── GLOBAL: yatay kaymayı engelle ── */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* ── Container mobilde padding ── */
.container {
    padding-left: 16px;
    padding-right: 16px;
}

/* ══════════════════════════════════════════════════════════
   HERO SLIDER — Mobil yükseklik ve overflow düzeltmesi
   ══════════════════════════════════════════════════════════ */
.ao-hero {
    min-height: 100svh;
    /* safe-area aware */
    min-height: 100vh;
    /* fallback */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.ao-slide--active {
    min-height: 100svh;
    min-height: 100vh;
    width: 100%;
}

/* Slider butonlarının mobilde gözükmesi */
.ao-nav {
    z-index: 10;
    pointer-events: all;
    touch-action: manipulation;
}

/* ══════════════════════════════════════════════════════════
   SAYFA HERO — İç sayfa banner
   ══════════════════════════════════════════════════════════ */
.page-hero {
    overflow: hidden;
    word-break: break-word;
}

.page-hero h1 {
    font-size: clamp(1.4rem, 5vw, 2.4rem);
    line-height: 1.2;
}

.page-hero p {
    font-size: clamp(.9rem, 3vw, 1.1rem);
}

.breadcrumb {
    flex-wrap: wrap;
    word-break: break-word;
}

/* ══════════════════════════════════════════════════════════
   GENEL SECTION PADDİNG
   ══════════════════════════════════════════════════════════ */
.section {
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   MASAÜSTÜ TABLET ≤ 1100px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    /* Banka sayfası sidebar */
    .bank-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════
   TABLET ≤ 900px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

    /* İletişim grid */
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    /* Blog sidebar */
    .blog-sidebar {
        grid-template-columns: 1fr !important;
    }

    /* Why bölümü */
    .why-grid {
        grid-template-columns: 1fr !important;
    }

    .why-image {
        order: -1;
    }

    /* Hizmet detay grid */
    [style*="grid-template-columns: 1fr 360px"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1fr 340px"],
    [style*="grid-template-columns: 1fr 320px"],
    [style*="grid-template-columns: 1fr 300px"],
    [style*="grid-template-columns: 3fr 1fr"],
    [style*="grid-template-columns: 2fr 360px"] {
        grid-template-columns: 1fr !important;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ══════════════════════════════════════════════════════════
   MOBİL ≤ 768px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── HERO SLIDER ── */
    .ao-hero {
        min-height: 85vh;
    }

    .ao-slide--active {
        min-height: 85vh;
    }

    .ao-slide .container {
        padding: 80px 16px 100px !important;
    }

    .ao-slide-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
        line-height: 1.2 !important;
    }

    .ao-slide-desc {
        font-size: .93rem !important;
        display: block !important;
        /* 480px'de gizlenecek */
    }

    .ao-slide-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ao-btn {
        text-align: center;
        justify-content: center;
    }

    .ao-trust-row {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    /* Slider ok butonları */
    .ao-nav {
        width: 40px !important;
        height: 40px !important;
        font-size: .85rem !important;
    }

    .ao-nav-prev {
        left: 10px !important;
    }

    .ao-nav-next {
        right: 10px !important;
    }

    /* ── HEADER ── */
    .header-top {
        display: none !important;
    }

    .header-main .container {
        height: auto !important;
        min-height: 60px;
        flex-wrap: nowrap;
        padding: 10px 16px;
    }

    .logo img {
        height: 42px !important;
    }

    /* ── SERVİSLER ── */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .service-card {
        text-align: left;
        display: grid;
        grid-template-columns: 60px 1fr;
        gap: 14px;
        align-items: start;
        padding: 18px !important;
    }

    .service-card .service-icon {
        margin: 0 !important;
        flex-shrink: 0;
    }

    .service-card .service-img {
        display: none;
        /* küçük ekranda görsel gizle */
    }

    /* ── STATS ── */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* ── LOKASYONLAR ── */
    .locations-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    /* ── BLOG ── */
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .blog-sidebar {
        grid-template-columns: 1fr !important;
    }

    /* ── GALERİ ── */
    .gallery-grid,
    .media-masonry {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .video-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── FOOTER ── */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .footer-top {
        padding: 40px 0 30px !important;
    }

    /* ── FORMLAR ── */
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-container {
        padding: 24px 16px !important;
        border-radius: 12px !important;
    }

    .quick-quote-form .form-row {
        flex-direction: column !important;
    }

    /* ── İÇ SAYFA SİDEBAR'LI LAYOUT ── */
    [style*="grid-template-columns: 1fr 340px"],
    [style*="grid-template-columns: 1fr 360px"],
    [style*="grid-template-columns: 1fr 320px"],
    [style*="grid-template-columns: 1fr 300px"],
    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 3fr 1fr"],
    [style*="grid-template-columns: 2fr 360px"],
    [style*="grid-template-columns:1fr 340px"],
    [style*="grid-template-columns:1fr 360px"],
    [style*="grid-template-columns:1fr 320px"],
    [style*="grid-template-columns:2fr 1fr"],
    [style*="grid-template-columns:3fr 1fr"] {
        display: block !important;
    }

    /* Sidebar'ı önce getir */
    aside[style*="sticky"] {
        position: static !important;
    }

    /* ── BANKA HESAP BİLGİLERİ SAYFASI ── */
    [style*="grid-template-columns:repeat(3,1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* ── HİZMET DETAY ── */
    .service-detail-grid,
    .location-detail-grid,
    .blog-detail-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── SSS ── */
    .faq-list {
        margin: 0 !important;
    }

    /* ── SECTION HEADER ── */
    .section-header h2 {
        font-size: clamp(1.4rem, 5vw, 2rem) !important;
    }

    .section {
        padding: 40px 0 !important;
    }

    /* ── CTA BANNER ── */
    .cta-banner {
        padding: 40px 0 !important;
    }

    .cta-content h2 {
        font-size: 1.6rem !important;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    /* ── TAŞIMA SAYFASI (why) ── */
    .why-content h2 {
        font-size: 1.6rem !important;
    }

    .why-image img {
        height: 250px !important;
    }

    /* ── BUTONLAR ── */
    .btn-lg {
        padding: 14px 24px !important;
        font-size: 1rem !important;
    }

    /* ── METREKÜp HESAPLAMA ── */
    .metrekup-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── İletişim harita ── */
    .contact-map-wrap iframe {
        height: 250px !important;
    }

    /* ── HAKKIMIZDA timeline ── */
    .timeline-item {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* ── GERİ DÖNME DÜĞMESI ── */
    .back-to-top {
        bottom: 16px !important;
        right: 16px !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* ── WhatsApp Float ── */
    .whatsapp-float {
        bottom: 70px !important;
        right: 14px !important;
        padding: 10px 14px !important;
        font-size: .88rem !important;
    }

    /* ── TABLE (banka veya genel) ── */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 480px;
    }
}

/* ══════════════════════════════════════════════════════════
   KÜÇÜK MOBİL ≤ 480px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* HERO */
    .ao-hero {
        min-height: 80vh;
    }

    .ao-slide--active {
        min-height: 80vh;
    }

    .ao-slide-desc {
        display: none !important;
    }

    .ao-trust-row {
        display: none !important;
    }

    /* Lokasyonlar — tam genişlik */
    .locations-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Galeri */
    .gallery-grid,
    .media-masonry {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Page hero font */
    .page-hero h1 {
        font-size: 1.4rem !important;
    }

    /* Banka kartları — tek sütun */
    [style*="grid-template-columns:repeat(3,1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"],
    [style*="grid-template-columns:repeat(2,1fr)"],
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* Hero buton */
    .hero-actions {
        flex-direction: column !important;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Section padding küçültme */
    .section {
        padding: 32px 0 !important;
    }

    /* Form container */
    .form-container {
        padding: 20px 14px !important;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 1.3rem !important;
    }
}

/* ══════════════════════════════════════════════════════════
   ÇOK KÜÇÜK ≤ 360px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ao-slide-title {
        font-size: 1.35rem !important;
    }

    .page-hero h1 {
        font-size: 1.2rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .ao-btn {
        padding: 10px 16px !important;
        font-size: .85rem !important;
    }
}

/* ══════════════════════════════════════════════════════════
   SLİDER: Inline aktif slide düzeltmesi
   (position:absolute olan slide'lar viewport'u doldurmayabilir)
   ══════════════════════════════════════════════════════════ */
.ao-hero {
    position: relative;
    display: block;
}

/* Sadece aktif slide'ın yüksekliği kullanılsın */
.ao-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
}

.ao-slide--active {
    position: relative;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════
   NAVİGASYON: Mobil menü kapatma butonu
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .main-nav {
        padding-top: 70px;
    }

    /* Mobil menüde "X" kapatma */
    .main-nav::before {
        display: none;
    }

    /* Dropdown açık olduğunda ok yönü değişsin */
    .has-dropdown.open>a i.fa-chevron-down {
        transform: rotate(180deg);
    }

    /* Header hamburger z-index güvencesi */
    .hamburger {
        z-index: 1002 !important;
        position: relative;
    }

    /* Header üstündeyken görünür olsun */
    .main-nav.open~.header-actions .hamburger,
    #hamburger {
        z-index: 1002 !important;
    }
}

/* ══════════════════════════════════════════════════════════
   İÇ SAYFA DETAYLAR — Hizmet, Lokasyon, Blog Detay
   ══════════════════════════════════════════════════════════ */

/* Ortak detay sayfa wrapper */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-layout aside {
        position: static !important;
    }
}

/* ══════════════════════════════════════════════════════════
   GALERI LİGHTBOX — Mobil
   ══════════════════════════════════════════════════════════ */
#lightboxOverlay {
    padding: 10px !important;
}

#lightboxImg {
    max-height: 85vh !important;
    max-width: 95vw !important;
}

/* ══════════════════════════════════════════════════════════
   HIZMET DETAY sayfası içindeki özellik kartları
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Inline grid olan kartlar için genel override */
    div[style*="display:grid"],
    div[style*="display: grid"] {
        /* Sadece belirli durumlar için — !important kullanmıyoruz; sayfa içi overridler çalışsın */
    }

    /* Tablet'te 3 sütun → 2 sütun */
    .feat-grid-3 {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Küçük ekranda her zaman tek sütun */
}

@media (max-width: 480px) {

    .feat-grid-3,
    .feat-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════
   PAGE HERO breadcrumb mobil düzeltme
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .breadcrumb {
        font-size: .78rem;
        gap: 4px;
    }

    .breadcrumb span {
        font-size: .75rem;
    }
}

/* ══════════════════════════════════════════════════════════
   BLOG KATEGORİ SAYFASI
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .blog-cat-grid {
        grid-template-columns: 1fr !important;
    }

    .blog-filter-tags {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* ══════════════════════════════════════════════════════════
   TEKLİF FORMU sayfası — mobil çoklu adım
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .quote-steps {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }

    .quote-step-label {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════
   SSS SAYFASI accordion
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .faq-question {
        font-size: .9rem !important;
        padding: 14px 16px !important;
    }
}

/* ══════════════════════════════════════════════════════════
   DEPOlAMA SAYFASI özellik grid
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .storage-features-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 480px) {
    .storage-features-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════
   BASINDA BİZ, BELGELERİMİZ, ONLINE KATALOG sayfaları
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    .press-grid,
    .cert-grid,
    .catalog-grid {
        grid-template-columns: 1fr !important;
    }

    .press-item,
    .cert-item {
        flex-direction: column !important;
        gap: 12px !important;
    }
}

/* ══════════════════════════════════════════════════════════
   BANKA HESAP BİLGİLERİ — Responsive grid override
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    /* Sağ sidebar aşağı in */
    section div[style*="grid-template-columns:1fr 340px"],
    section div[style*="grid-template-columns: 1fr 340px"] {
        grid-template-columns: 1fr !important;
    }

    /* Banka kartları 2 sütun */
    section div[style*="grid-template-columns:repeat(3,1fr)"],
    section div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {

    section div[style*="grid-template-columns:repeat(3,1fr)"],
    section div[style*="grid-template-columns: repeat(3, 1fr)"],
    section div[style*="grid-template-columns:repeat(2,1fr)"],
    section div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════════
   FOOTER geniş masaüstü (5 sütun düzeltme)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 24px !important;
    }

    /* İlk sütun (hakkında) tam satır */
    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-about {
        grid-column: auto;
    }

    .footer-bottom .container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
    }

    .footer-links {
        justify-content: center;
    }
}