/* ==========================================================================
   Karaca Tadilat - Site Overrides
   Apex template (assets/apex/css/style.css) BAŞLICA stil kaynağıdır.
   Bu dosya yalnızca Apex'in karşılamadığı util sınıflarını tutar.
   ========================================================================== */

/* Erişilebilirlik: ekran-okuyucu ve içeriğe atla bağlantısı */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
    background: #FDA12B;
    color: #ffffff;
    padding: 8px 16px;
    z-index: 100;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

/* Apex spinner'ı tamamen devre dışı (FOUC etkisi yapıyordu) */
#spinner { display: none !important; }

/* Apex'in carousel-caption içindeki .animated.slideInDown elementleri sayfa
   açılışında 0.5s+ gecikmeyle başlıyor (sıçrama hissi). Caption metni hemen
   görünsün, slideInDown'u kısalt. */
.carousel-caption .animated.slideInDown {
    animation-duration: 0.4s;
    animation-delay: 0s;
}

/* Carousel caption'ı dikey ortalama yerine biraz yukarıdan başlat — uzun
   başlıklarda daha dengeli görünüyor. */
.carousel-caption {
    align-items: flex-start !important;
    padding-top: clamp(80px, 10vh, 140px);
}
@media (max-width: 991.98px) {
    .carousel-caption {
        padding-top: clamp(40px, 8vh, 90px);
    }
}

/* Caption içeriği için min-height: kısa başlıklı slide'lar uzun başlıklı
   slide'larla aynı vertical alanı kaplasın, geçişlerde "boş" hissi olmasın.
   Flex KULLANMIYORUZ — aksi halde içerideki <a> butonları full-width olur. */
.carousel-caption .container-xxl > .row > [class*="col-"] {
    min-height: clamp(280px, 38vh, 420px);
}

/* Display-2 başlıklar için tutarlı font ağırlığı (h1 vs p farkını bertaraf et) */
.carousel-caption .display-2 {
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

/* Carousel butonları her zaman doğal genişlikte kalsın (full-width olmasın) */
.carousel-caption .btn {
    display: inline-block;
    width: auto;
}

/* Apex sticky navbar başlangıç top:-100px — ilk render'da navbar kayıyordu.
   Sayfa yüklendiğinde tepede olsun, scroll'da kalın. JS scroll handler hala
   .shadow-sm ekliyor; biz sadece initial position'ı düzeltiyoruz. */
.navbar.sticky-top { top: 0 !important; }

/* `<header class="site-header">` wrapper'ı sticky context'i kırıyordu;
   display: contents ile DOM'da kalır ama layout/box oluşturmaz, böylece
   sticky-top içindeki nav doğrudan viewport'a yapışır. */
.site-header { display: contents; }

/* WhatsApp float butonu — kurumsal, yuvarlak, sol alt */
.wa-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 60;
    text-decoration: none;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
.wa-float i {
    font-size: 30px;
    line-height: 1;
    color: #fff;
}
.wa-float:hover {
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
}
.wa-float:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}
/* Pulsing halo */
.wa-float .wa-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    opacity: 0.55;
    animation: wa-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: -1;
}
@keyframes wa-ping {
    0%   { transform: scale(0.95); opacity: 0.55; }
    70%  { transform: scale(1.7);  opacity: 0;    }
    100% { transform: scale(1.7);  opacity: 0;    }
}
/* Mobil uyum */
@media (max-width: 575.98px) {
    .wa-float { width: 54px; height: 54px; bottom: 18px; left: 18px; }
    .wa-float i { font-size: 26px; }
}
@media (min-width: 992px) {
    .wa-mobile-only { display: none; }
}

/* Apex Owl arrows - sayfa içi konumlandırma */
.testimonial-carousel .owl-nav {
    margin-top: 24px;
}

/* Apex page-header için hafif iyileştirme - bg image override edilmediğinde */
.page-header {
    background-position: center center;
}

/* FAQ accordion: home.php ve faq.php'de kullanılıyor — Apex'te accordion zaten var,
   Bootstrap 5 .accordion stilleri çalışıyor. Burada sadece focus state'i daha
   görünür kıl. */
.accordion-button:not(.collapsed) {
    background-color: #FDA12B !important;
    color: #ffffff !important;
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(253, 161, 43, 0.25);
}

/* ==========================================================================
   Topbar — modern, dengeli, sağ-sol bilgi şeridi
   ========================================================================== */
.site-topbar {
    background: linear-gradient(90deg, #182333 0%, #1f2d42 100%);
    color: #cbd5e1;
    font-size: 13px;
    border-bottom: 3px solid #FDA12B;
    padding: 0 8px;
}
.site-topbar .topbar-info,
.site-topbar .topbar-cta {
    gap: 6px;
    flex-wrap: wrap;
}
.site-topbar .topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #cbd5e1;
    text-decoration: none;
    line-height: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    transition: color .15s ease;
    white-space: nowrap;
}
.site-topbar .topbar-info > .topbar-item:first-child {
    padding-left: 0;
}
.site-topbar .topbar-item-borderless {
    border-right: 0;
}
.site-topbar a.topbar-item:hover {
    color: #FDA12B;
}
.site-topbar .topbar-item i {
    font-size: 13px;
    color: #FDA12B;
    width: 16px;
    text-align: center;
}
.site-topbar .topbar-socials {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.site-topbar .topbar-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    color: #cbd5e1;
    border-radius: 50%;
    transition: all .15s ease;
}
.site-topbar .topbar-social:hover {
    background: #FDA12B;
    color: #fff;
    transform: translateY(-2px);
}
.site-topbar .topbar-social-wa:hover {
    background: #25d366;
}

/* ==========================================================================
   KepezWeb Credit (footer copyright)
   ========================================================================== */
.kepez-credit {
    font-size: 13px;
    line-height: 1;
}
.kepez-credit .kepez-link {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 4px 10px;
    background: rgba(253, 161, 43, 0.12);
    color: #FDA12B !important;
    border: 1px solid rgba(253, 161, 43, 0.35);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: all .2s ease;
    letter-spacing: .02em;
}
.kepez-credit .kepez-link:hover {
    background: #FDA12B;
    color: #fff !important;
    border-color: #FDA12B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 161, 43, 0.3);
}
.kepez-credit .kepez-link strong span {
    color: #fff;
    margin-left: 1px;
}
.kepez-credit .kepez-link:hover strong span {
    color: #182333;
}

/* ==========================================================================
   BeforeAfter Slider (project-detail.php)
   ========================================================================== */
.ba-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    user-select: none;
    cursor: ew-resize;
    aspect-ratio: 16 / 9;
    background: #000;
}
.ba-slider .ba-after,
.ba-slider .ba-before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.ba-slider .ba-before-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    will-change: clip-path;
}
.ba-slider .ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
    transform: translateX(-50%);
    cursor: ew-resize;
}
.ba-slider .ba-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FDA12B;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}
.ba-slider .ba-handle:hover::after { transform: translate(-50%, -50%) scale(1.1); }
.ba-slider .ba-handle::before {
    content: "\f0ec";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    font-size: 14px;
}
.ba-slider .ba-label {
    position: absolute;
    top: 14px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    backdrop-filter: blur(6px);
    z-index: 9;
}
.ba-slider .ba-label-before { left: 14px; }
.ba-slider .ba-label-after { right: 14px; }

/* ==========================================================================
   Cookie Consent banner
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    right: 16px;
    max-width: 380px;
    background: rgba(24, 35, 51, 0.97);
    color: #fff;
    border: 1px solid rgba(253, 161, 43, 0.3);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 70;
    animation: slideUp 0.4s ease-out;
}
.cookie-banner h6 { color: #FDA12B; margin: 0 0 6px; font-weight: 700; }
.cookie-banner p { font-size: 0.85rem; line-height: 1.5; margin: 0 0 10px; color: #cbd5e1; }
.cookie-banner a { color: #FDA12B; text-decoration: underline; }
.cookie-banner .cookie-actions { display: flex; gap: 8px; }
.cookie-banner button {
    flex: 1;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.cookie-banner .cookie-accept { background: #FDA12B; color: #fff; }
.cookie-banner .cookie-reject { background: rgba(255, 255, 255, 0.1); color: #fff; }
.cookie-banner button:hover { opacity: 0.85; }

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 575.98px) {
    .cookie-banner { left: 16px; right: 16px; max-width: none; bottom: 90px; }
}
