/* ================================================
   RESPONSIVE — Tablet & Mobile (overflow-safe)
================================================ */

:root {
    --section-y: 100px;
    --section-y-sm: 80px;
}

/* ── Global overflow guard ── */
html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: clip;
    min-width: 0;
}

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

main,
section,
article,
.container,
.container-fluid,
.row,
[class*="col-"] {
    min-width: 0;
}

/* CMS / blog içerik taşması */
.post-body,
.legal-content,
.scope-desc,
.ref-project-desc {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.post-body table,
.legal-content .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ortak section boşlukları (inline padding yerine) */
.site-section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.site-section--bottom-only {
    padding-top: 0;
    padding-bottom: var(--section-y);
}

.site-section--legal {
    padding-top: var(--section-y-sm);
    padding-bottom: calc(var(--section-y) + 20px);
}

/* Popup — 100vw kaymasını önle */
#venus-popup {
    width: min(780px, calc(100% - 2rem)) !important;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
}

#venus-popup img {
    max-height: min(570px, 55dvh) !important;
}

/* Swiper taşması */
.t-swiper,
.swiper {
    overflow: hidden;
    width: 100%;
}

/* ── Tablet (≤991px) ── */
@media (max-width: 991px) {
    :root {
        --section-y: 72px;
        --section-y-sm: 64px;
    }

    .hero-content {
        padding-left: 32px;
        padding-right: 32px;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }

    .page-hero {
        padding: calc(var(--nav-h) + 48px) 0 64px;
    }

    #about {
        padding: 88px 0;
    }

    #services,
    #references,
    #testimonials,
    #blog,
    #contact,
    #faq,
    #service-internal-links,
    #process,
    #advantages,
    #platforms,
    #packages {
        padding-top: 72px;
        padding-bottom: 72px;
    }

    .ref-project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin-top: 40px;
    }

    .scope-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 40px;
    }

    .about-feat-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 40px;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 20px;
        margin-top: 40px;
    }

    .process-grid::before {
        display: none;
    }

    .adv-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pkg-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin-left: auto;
        margin-right: auto;
    }

    .platform-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-top: 40px;
    }

    .insight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin-top: 40px;
    }

    .ref-stats-row {
        flex-wrap: wrap;
        margin-top: 32px;
    }

    .ref-stat-box {
        flex: 1 1 calc(50% - 1px);
        min-width: calc(50% - 1px);
    }

    .ref-stat-box:nth-child(2) {
        border-right: none;
    }

    .ref-stat-box:nth-child(odd):last-child {
        border-right: none;
    }

    .footer-top {
        padding-top: 56px;
        padding-bottom: 44px;
    }

    .page-cta-band {
        padding: 56px 0;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 32px;
    }

    .form-result-section {
        padding: 96px 0 72px;
        min-height: auto;
    }

    .fixed-cta {
        z-index: 850;
        pointer-events: none;
    }

    .fcta-btn {
        pointer-events: auto;
    }

    .contact-form-wrap,
    #newsletter-form {
        position: relative;
        z-index: 860;
        isolation: isolate;
    }

    .contact-form-wrap .btn-submit,
    #newsletter-form .btn-nl {
        min-height: 48px;
        touch-action: manipulation;
    }

    .contact-form-wrap .col-12:has(.btn-submit) {
        position: relative;
        z-index: 901;
    }

    .fixed-cta--hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none !important;
        transform: translateY(10px);
        transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    }
}

/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
    :root {
        --section-y: 56px;
        --section-y-sm: 48px;
        --fixed-cta-mobile-stack: 178px;
        --fixed-cta-form-clearance: calc(var(--fixed-cta-mobile-stack) + env(safe-area-inset-bottom, 0px));
    }

    .container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .nav-logo img {
        height: 28px;
    }

    /* Hero */
    #hero {
        min-height: 100svh;
        min-height: 100dvh;
    }

    .hero-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-title {
        font-size: clamp(32px, 9.5vw, 44px);
        margin-bottom: 18px;
    }

    .hero-sub {
        font-size: 15px;
    }

    .hero-bottom {
        margin-top: 28px;
        gap: 22px;
    }

    .hero-actions {
        flex-wrap: wrap;
        width: 100%;
        gap: 10px;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
        min-width: 0;
    }

    /* İç sayfa hero */
    .page-hero {
        padding: calc(var(--nav-h) + 32px) 0 48px;
    }

    .page-hero-title {
        font-size: clamp(28px, 8.5vw, 40px);
        margin-bottom: 16px;
    }

    .page-hero-sub {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .page-hero-actions {
        width: 100%;
    }

    .page-hero-actions .btn-primary,
    .page-hero-actions .btn-ghost {
        flex: 1 1 auto;
        justify-content: center;
    }

    .breadcrumb-inner {
        margin-bottom: 20px;
        gap: 6px;
    }

    #about {
        padding: 64px 0;
    }

    #services,
    #references,
    #testimonials,
    #blog,
    #contact,
    #faq,
    #service-internal-links,
    #process,
    #advantages,
    #platforms,
    #packages {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .sec-title {
        font-size: clamp(26px, 7vw, 34px);
        margin-bottom: 14px;
    }

    .sec-desc {
        font-size: 15px;
        max-width: none;
    }

    .ref-hd {
        margin-bottom: 36px;
    }

    /* Referanslar */
    .ref-filter-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-top: 28px;
        padding-bottom: 6px;
        margin-left: -4px;
        margin-right: -4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .ref-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .ref-filter-btn {
        flex-shrink: 0;
        padding: 8px 18px;
        font-size: 12.5px;
    }

    .insight-filter-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-top: 16px;
        padding-bottom: 6px;
    }

    .insight-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .insight-filter-btn {
        flex-shrink: 0;
        padding: 8px 18px;
        font-size: 12.5px;
    }

    .scroll-slogan-inner-wrap {
        padding: clamp(36px, 5vh, 56px) 0;
    }

    #scroll-slogan.scroll-slogan {
        min-height: 46vh;
        min-height: 46dvh;
    }

    .scroll-slogan-line {
        font-size: clamp(1.65rem, 7.2vw, 2.75rem);
        line-height: 1.24;
        white-space: normal;
        text-align: center;
    }

    .form-recaptcha-wrap .g-recaptcha {
        transform: scale(0.92);
    }

    .ref-project-grid {
        grid-template-columns: 1fr;
        margin-top: 28px;
    }

    .ref-stats-row {
        flex-direction: column;
        margin-top: 24px;
    }

    .ref-stat-box {
        flex: none;
        width: 100%;
        min-width: 0;
        border-right: none !important;
        border-bottom: 1px solid var(--border);
        padding: 20px 16px;
    }

    .ref-stat-box:last-child {
        border-bottom: none;
    }

    .ref-stat-n {
        font-size: 30px;
    }

    /* Gridler — tek sütun */
    .scope-grid,
    .about-feat-grid,
    .process-grid,
    .adv-grid,
    .insight-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 28px;
    }

    .platform-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-top: 28px;
    }

    .platform-item {
        padding: 20px 10px;
    }

    .platform-item i {
        font-size: 26px;
    }

    /* Kart / form */
    .scope-card,
    .about-feat,
    .adv-card {
        padding: 24px 20px;
    }

    .blog-body {
        padding: 20px 18px 22px;
    }

    .t-card {
        padding: 28px 22px;
    }

    .contact-form-wrap {
        padding: 28px 18px;
        padding-bottom: calc(28px + var(--fixed-cta-form-clearance));
        position: relative;
        z-index: 860;
        isolation: isolate;
    }

    .contact-form-wrap .btn-submit {
        min-height: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(24, 156, 217, 0.2);
    }

    .contact-form-wrap .col-12:has(.btn-submit) {
        position: relative;
        z-index: 901;
    }

    .faq-wrap .accordion-button {
        font-size: 14px;
        padding: 18px 16px;
    }

    .faq-wrap .accordion-body {
        padding: 0 16px 18px;
        font-size: 13.5px;
    }

    .service-link-grid,
    .service-link-grid--insights {
        grid-template-columns: 1fr;
    }

    /* CTA band */
    .page-cta-band {
        padding: 44px 0;
    }

    .page-cta-band .cta-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .page-cta-band .btn-primary,
    .page-cta-band .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    /* Blog detay */
    .post-hero {
        min-height: 320px;
        padding-bottom: 32px;
    }

    .post-hero-title {
        font-size: clamp(24px, 7vw, 32px);
    }

    .post-section {
        padding: 48px 0 36px;
    }

    .post-body h2 {
        font-size: 20px;
        margin-top: 36px;
    }

    .post-share {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Footer */
    .footer-top {
        padding-top: 48px;
        padding-bottom: 36px;
    }

    .footer-top-grid {
        gap: 32px;
    }

    .footer-menus {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-menu-col {
        min-width: 0;
        overflow: visible;
    }

    .footer-menu-col + .footer-menu-col {
        padding-top: 24px;
        border-top: 1px solid var(--border);
    }

    .f-col-title {
        margin-bottom: 14px;
    }

    .f-nav {
        gap: 12px;
    }

    .f-nav li a {
        display: block;
        line-height: 1.55;
        word-break: break-word;
        overflow-wrap: anywhere;
        padding: 2px 0;
    }

    .footer-newsletter {
        padding-top: 28px;
        border-top: 1px solid var(--border);
        padding-bottom: calc(32px + var(--fixed-cta-form-clearance));
    }

    #newsletter-form {
        position: relative;
        z-index: 860;
        isolation: isolate;
    }

    #newsletter-form .btn-nl {
        min-width: 48px;
        min-height: 48px;
        touch-action: manipulation;
    }

    .f-newsletter p {
        margin-bottom: 16px;
    }

    .f-nl-form {
        gap: 14px;
    }

    .f-nl-consent {
        gap: 10px;
        margin-top: 2px;
    }

    .f-nl-consent-chk {
        font-size: 12px;
        line-height: 1.5;
    }

    .form-consent-kvkk-row--footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .form-consent-kvkk-row--footer .f-nl-consent-chk {
        width: 100%;
    }

    .form-consent-kvkk-row--footer .form-kvkk-read-link {
        align-self: flex-start;
        margin-left: 21px;
        font-size: 12px;
    }

    .footer-bottom {
        padding: 20px 16px;
    }

    .f-tagline {
        max-width: none;
    }

    /* Sabit CTA — kayma önleme */
    .fixed-cta {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        gap: 8px;
        z-index: 850;
        pointer-events: none;
    }

    .fcta-btn {
        max-width: 50px !important;
        min-width: 50px !important;
        width: 50px;
        height: 50px;
        padding: 0 !important;
        justify-content: center;
        gap: 0 !important;
        pointer-events: auto;
    }

    .fcta-btn:hover {
        transform: none !important;
        max-width: 50px !important;
    }

    .fcta-btn .lbl {
        display: none !important;
    }

    .fcta-btn i {
        font-size: 20px;
    }

    /* Testimonials nav */
    #testimonials .swiper-nav-btns {
        margin-top: 8px;
    }

    .form-result-section {
        padding: 80px 0 56px;
    }

    .form-result-card {
        padding: 36px 20px;
    }

    .form-result-actions {
        flex-direction: column;
        width: 100%;
    }

    .form-result-actions .btn-primary,
    .form-result-actions .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .gmap-iframe {
        min-height: 260px;
    }

    .logo-cell {
        padding: 20px 12px;
        aspect-ratio: auto;
        min-height: 72px;
    }

    .logo-cell img {
        max-height: 40px;
        max-width: 100%;
    }

    #references .logo-cell img {
        max-height: 40px !important;
        max-width: 100% !important;
    }
}

/* ── Küçük telefon (≤575px) ── */
@media (max-width: 575px) {
    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        flex: 1 1 100%;
    }

    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .page-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-hero-actions .btn-primary,
    .page-hero-actions .btn-ghost {
        width: 100%;
    }

    .insight-card-body {
        padding: 18px 16px 20px;
    }

    .scroll-slogan-line {
        font-size: clamp(1.35rem, 8vw, 2rem);
    }

    #scroll-slogan.scroll-slogan {
        min-height: 42vh;
        min-height: 42dvh;
    }
}

/* ── Landscape telefon ── */
@media (max-width: 767px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: calc(var(--nav-h) + 24px) 0 32px;
    }

    .hero-stats {
        display: none;
    }
}
