/* Mobil uygulama kabuğu + ana sayfa — Laravel mobile-app + home-mobile ile uyumlu (yeni yazım) */
:root {
    --app-primary: #003d7a;
    --app-primary-light: #0b5cad;
    --app-primary-glow: rgba(0, 61, 122, 0.35);
    --app-surface: #f4f7fb;
    --app-surface-2: #eef3f9;
    --app-text: #0f172a;
    --app-muted: #64748b;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
    margin: 0; padding: 0;
    height: 100%; min-height: 100%;
    height: 100dvh; min-height: 100dvh;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--app-surface); color: var(--app-text);
    -ms-overflow-style: none; scrollbar-width: none;
}
html { overflow: hidden; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
a { color: inherit; text-decoration: none; }

.app-shell {
    width: 100%; max-width: 100%; margin: 0 auto;
    min-height: 100dvh; height: 100dvh; max-height: 100dvh;
    overflow: hidden;
    display: flex; flex-direction: column;
    background:
        radial-gradient(120% 80% at 50% -20%, rgba(0, 61, 122, 0.07), transparent 55%),
        linear-gradient(180deg, var(--app-surface-2) 0%, var(--app-surface) 38%, #fafbfd 100%);
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: 0;
}
.app-main {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.app-main::-webkit-scrollbar { display: none; }
.app-main--with-bottom-nav {
    /* Sabit alt bar + yükselen logo için; fazlası gereksiz boş şerit bırakıyordu */
    padding-bottom: calc(96px + max(10px, env(safe-area-inset-bottom, 0px)));
}

.app-bottom-nav-wrap {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    padding: 0 12px max(10px, env(safe-area-inset-bottom, 0px));
    display: flex; justify-content: center; pointer-events: none;
}
.app-bottom-nav { pointer-events: auto; }
.app-bottom-nav {
    display: flex; align-items: flex-end; justify-content: space-around;
    width: 100%; min-height: 58px; padding: 10px 4px 12px;
    background: #fff; border-radius: 22px;
    box-shadow: 0 8px 32px rgba(0, 61, 122, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(0, 61, 122, 0.1); position: relative; overflow: visible;
}
.app-bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: var(--app-muted);
    font-size: clamp(10px, 2.85vw, 12px); font-weight: 600; line-height: 1.2;
    min-height: 48px; padding: 4px 3px 3px; text-align: center; min-width: 0;
}
.app-bottom-nav-item.is-active { color: var(--app-primary); }
.app-bottom-nav-item svg {
    flex-shrink: 0;
    width: clamp(20px, 5.5vw, 24px); height: clamp(20px, 5.5vw, 24px);
    stroke-linecap: round; stroke-linejoin: round;
}
/* Uzun etiketler (ör. E-Belediye) kesilmesin; 2 satıra kadar, ekrana göre punto */
.app-bottom-nav-item > span {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    text-align: center;
}
.app-bottom-nav-center {
    display: flex; align-items: center; justify-content: flex-end;
    width: 64px; min-height: 52px; margin: -22px 2px 0; position: relative; z-index: 2; align-self: flex-start;
}
.app-bottom-nav-logo-btn {
    width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 1px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 61, 122, 0.12), 0 10px 28px rgba(0, 61, 122, 0.2);
    display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden;
    padding: 0;
}
.app-bottom-nav-logo-btn.is-active {
    box-shadow: 0 0 0 2px var(--app-primary), 0 10px 28px rgba(0, 61, 122, 0.22);
}
.app-bottom-nav-logo-btn img { width: 100%; height: 100%; object-fit: contain; object-position: center; transform: scale(0.93); transform-origin: center; }
.app-bottom-nav-logo-fallback { font-size: 13px; font-weight: 800; color: var(--app-primary); }

/* Ana sayfa içi — scroll-container app-main'i doldurur; kartlar bitince alta 'boş kolon'
   görünmemesi için .quick-section kalan dikey alanı yayar (başkan bloğu kaldırılınca belirginleşti). */
.scroll-container {
    flex: 1 1 0;
    min-height: 0;
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
}
.mobile-hero-slider {
    position: relative; width: 100%; flex-shrink: 0;
    /* Geniş Android: yüzde yüksek; dar/kısa iPhone: aşağıdaki media ile küçülür */
    height: clamp(172px, min(34svh, 36dvh), 320px);
    overflow: hidden; border-radius: 0 0 32px 32px;
    box-shadow: 0 16px 48px rgba(0, 61, 122, 0.12);
}

/* Küçük yükseklik (iPhone SE, Safari çubukları, mini): hero küçülür — menü grid’i alt bardaki logo altında kalmaz */
@media (max-height: 720px) {
    .mobile-hero-slider {
        height: clamp(148px, 28svh, 268px);
    }
}
@media (max-height: 640px) {
    .mobile-hero-slider {
        height: clamp(128px, 26svh, 232px);
    }
}
.mobile-slider-container {
    position: relative; width: 100%; height: 100%; border-radius: 0 0 32px 32px; overflow: hidden;
}
.mobile-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 0 0 28px 28px; overflow: hidden;
    opacity: 0;
    transition: opacity 0.34s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}
.mobile-slide.active { opacity: 1; z-index: 1; }
.mobile-slide-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center; display: block;
}
.mobile-slide-video {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* İlk kare gelene kadar siyah flaş yerine nötr zemin; poster daha okunur */
    background: #0c1929;
    /* Tam ekran video + filter mobilde GPU’yu sürekli yorar → kaldırıldı; ton için overlay kullanılıyor. */
}
@media (max-width: 768px) {
    .mobile-slide {
        transition: opacity 0.22s ease-out;
        will-change: auto;
    }
}
.mobile-slide-fallback { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100%; }
.mobile-slide-overlay {
    position: absolute; inset: 0;
    /* Önceki koyu mavi katman görüntüyü soluk gösteriyordu; yazı okunabilirliği için hafif alt ton yeterli. */
    background: linear-gradient(
        180deg,
        rgba(0, 24, 48, 0.06) 0%,
        rgba(0, 18, 40, 0.1) 45%,
        rgba(0, 40, 80, 0.14) 100%
    );
    pointer-events: none;
}
/* Video: mümkün olduğunca doğal renk */
.mobile-slide--video .mobile-slide-overlay {
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 12, 28, 0.05) 55%,
        rgba(0, 30, 60, 0.12) 100%
    );
}
.mobile-slide-img:not(.mobile-slide-video) {
    filter: saturate(1.06) contrast(1.03);
}
.mobile-hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: stretch; justify-content: space-between;
    padding: 0; pointer-events: none;
}
.mobile-hero-overlay > * { pointer-events: auto; }
.mobile-hero-top {
    width: 100%; flex-shrink: 0;
    padding: max(6px, env(safe-area-inset-top, 0px)) 14px 0;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.mobile-hero-date {
    background: rgba(255,255,255,0.32); border-radius: 14px; padding: 8px 12px; color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
}
.mobile-date-day { font-size: clamp(13px, 3.8vw, 15px); font-weight: 700; }
.mobile-date-weekday { font-size: clamp(10px, 2.8vw, 11px); opacity: 0.9; margin-top: 1px; }
.mobile-hero-weather {
    background: rgba(255,255,255,0.32); border-radius: 14px; padding: 8px 12px; color: #fff; text-align: right;
    border: 1px solid rgba(255,255,255,0.35);
}
.mobile-weather-place { font-size: 10px; opacity: 0.9; margin-bottom: 2px; }
.mobile-weather-row { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.mobile-weather-temp { font-size: 16px; font-weight: 700; }
.mobile-weather-text { font-size: 10px; opacity: 0.9; }
.mobile-hero-search-form {
    flex-shrink: 0; width: auto; margin: 0 14px 14px; display: flex; align-items: center;
    background: rgba(255,255,255,0.3); border-radius: 22px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.mobile-hero-search-wrap { flex: 1; position: relative; min-height: 40px; display: flex; align-items: center; }
.mobile-hero-search-input {
    flex: 1; width: 100%; min-width: 0; padding: 10px 14px 10px 16px; border: none;
    background: transparent; color: #fff; font-size: clamp(12px, 3.4vw, 14px);
}
.mobile-hero-search-input:focus { outline: none; }
.mobile-hero-typewriter {
    position: absolute; left: 12px; right: 48px; top: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center; gap: 3px;
    color: rgba(255,255,255,0.95); font-size: clamp(11px, 3.2vw, 14px); pointer-events: none;
    text-align: center; line-height: 1.25;
}
.mobile-hero-typewriter-inner {
    min-width: 0; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mobile-hero-typewriter-caret {
    flex-shrink: 0; width: 2px; height: 1em; border-radius: 1px;
    background: rgba(255,255,255,0.92);
    animation: mobile-tw-caret 0.9s step-end infinite;
    align-self: center;
}
@keyframes mobile-tw-caret {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .mobile-hero-typewriter-caret { animation: none; opacity: 0.85; }
}
.mobile-hero-typewriter.hidden { opacity: 0; }
.mobile-hero-search-btn {
    width: 44px; height: 40px; border: none; background: transparent;
    color: rgba(255,255,255,0.95); cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}

.quick-section {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 14px 12px calc(22px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    overflow: visible;
    /* Kartların altındaki esnek boşluk tek renk yüzeyle dolar — shell zemini ile uyumlu */
    background: linear-gradient(180deg, transparent 0, var(--app-surface) 24px);
    border-radius: 0;
}
.quick-grid {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    /* Kalan dikey boşluğu satırlara yay — kartların altında boş şerit kalmasın */
    grid-auto-rows: minmax(72px, 1fr); gap: 10px;
    align-content: stretch;
}
.quick-card {
    background: #fff; border-radius: 16px; padding: 10px 6px 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(0, 61, 122, 0.07);
    border: 1px solid rgba(226, 232, 240, 0.95); min-width: 0; min-height: 72px; align-self: stretch;
    -webkit-tap-highlight-color: transparent; font: inherit; cursor: pointer; color: inherit;
}
.quick-card:active { transform: scale(0.97); }
.quick-icon svg { width: 32px; height: 32px; display: block; }
.quick-label {
    text-align: center; line-height: 1.28; font-weight: 600;
    font-size: clamp(11px, 3.15vw, 14px); color: #1e293b;
    max-width: 100%;
    display: block;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.quick-card--color-1 .quick-label { color: #334155; }

.desktop-switch-wrap {
    text-align: center;
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}
.desktop-switch-link {
    font-size: 13px; font-weight: 600; color: var(--app-primary);
    text-decoration: underline; text-underline-offset: 3px;
}

@media (max-width: 400px) {
    .mobile-hero-top { padding-left: 10px; padding-right: 10px; }
    .mobile-hero-search-form { margin-left: 10px; margin-right: 10px; }
    .quick-section { padding: 12px 10px calc(18px + env(safe-area-inset-bottom, 0px)); }
    .quick-grid { gap: 8px; grid-auto-rows: minmax(68px, 1fr); }
    .app-bottom-nav-item { font-size: clamp(9px, 2.75vw, 11px); }
}
