/* ================================================================
   Solid Medya — Layout Stability & Responsive UX (2026-06-27)
   Global düzen, taşma, hizalama ve dokunmatik hedef iyileştirmeleri
   ================================================================ */

/* ── Temel taşma koruması ── */
#smooth-wrapper,
#smooth-content,
main,
.tp-offcanvas-2-area,
.tp-offcanvas-2-wrapper {
    max-width: 100%;
}

.row {
    --bs-gutter-x: clamp(12px, 2.5vw, 24px);
}

.row > [class*="col-"] {
    min-width: 0;
}

.container,
.container-fluid,
[class*="container-"] {
    max-width: 100%;
}

/* ── Metin taşması ── */
h1, h2, h3, h4, h5, h6,
.tp-breadcrumb-title,
.video-title,
.news-card-title,
.news-card-excerpt,
.dgm-footer-widget-title,
.dgm-footer-about,
.hero-heading,
.hero-sub,
.sector-content h3,
.sector-content p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* ── Breadcrumb ── */
.tp-breadcrumb-content {
    max-width: 100%;
    padding-left: clamp(8px, 3vw, 15px);
    padding-right: clamp(8px, 3vw, 15px);
}

.tp-breadcrumb-title {
    font-size: clamp(1.35rem, 4.8vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.tp-breadcrumb-list,
.sm-seo-lead .tp-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 10px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.tp-breadcrumb-list li,
.sm-seo-lead .tp-breadcrumb-list li {
    max-width: 100%;
}

.tp-breadcrumb-list a,
.tp-breadcrumb-list span {
    display: inline-block;
    max-width: min(100%, 280px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

@media (max-width: 480px) {
    .tp-breadcrumb-list a,
    .tp-breadcrumb-list span {
        max-width: min(100%, 200px);
    }
}

/* ── Kart grid dengesi ── */
.news-grid-section .row,
#video-grid,
.row.news-cards-row,
.row.tp-portfolio-grid {
    align-items: stretch;
}

.news-card,
.video-card,
.tp-portfolio-item-single .video-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-content {
    flex: 1 1 auto;
}

.news-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Görseller ── */
img,
picture,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.news-card-image img,
.video-thumb img,
.tp-portfolio-item-single img {
    width: 100%;
    object-fit: cover;
}

body.page-haberler .haberler-card__figure img,
body.page-haberler .haberler-card__img {
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
}

/* ── Formlar ── */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select,
.form-control,
.tp-contact-us-form-wrapper input,
.tp-contact-us-form-wrapper textarea,
.tp-contact-us-form-wrapper select {
    max-width: 100%;
    min-height: 44px;
}

textarea,
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

label,
.form-label {
    display: block;
    margin-bottom: 6px;
}

/* ── Butonlar / dokunmatik hedefler ── */
.btn,
button:not(.mfp-close):not(.mfp-arrow):not(.sm-cookie-fab--mobile-stack),
.filter-btn,
.sector-link,
.header-icon-btn,
.master-nav-item,
.contact-social-btn {
    min-height: 44px;
}

a.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Modal / popup ── */
.mfp-container {
    padding-left: 12px;
    padding-right: 12px;
}

.mfp-content,
.mfp-iframe-holder .mfp-content {
    max-width: calc(100vw - 24px);
}

.mfp-close {
    top: max(12px, env(safe-area-inset-top, 12px)) !important;
    right: max(12px, env(safe-area-inset-right, 12px)) !important;
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
}

.mfp-iframe-scaler iframe {
    max-width: 100%;
}

/* ── Tablolar ── */
.tech-table,
table {
    max-width: 100%;
}

.sm-table-wrap,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* ── Footer mobil ── */
@media (max-width: 767px) {
    .dgm-footer-main-row {
        text-align: center;
    }

    .dgm-footer-menus-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 14px;
        margin-left: 0;
        margin-right: 0;
    }

    .dgm-footer-menus-row > .dgm-footer-menu-col {
        flex: none !important;
        width: auto !important;
        max-width: none !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .dgm-footer-menus-row > .dgm-footer-menu-col .dgm-footer-widget {
        text-align: left;
    }

    .dgm-footer-menus-row > .dgm-footer-menu-col--sidebar {
        display: none !important;
    }

    .dgm-footer-area {
        padding-top: 56px !important;
        padding-bottom: 28px !important;
    }

    .dgm-footer-main-row > [class*='col-'] {
        margin-bottom: 24px !important;
    }

    footer.pb-20 {
        padding-bottom: 0 !important;
    }

    footer > .dgm-footer-bg {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .tp-copyright-2-area,
    .tp-copyright-2-border {
        padding-bottom: 8px !important;
    }

    .dgm-footer-orbit-stage {
        height: 280px;
        max-width: min(100%, 320px);
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    .dgm-footer-orbit-social {
        transform: translate(-50%, -50%) scale(1);
    }

    .dgm-footer-logo-center img {
        width: 190px;
        max-width: 72vw;
    }

    .dgm-footer-orbit-social .social-size-sm { width: 32px; height: 32px; font-size: 13px; }
    .dgm-footer-orbit-social .social-size-md { width: 36px; height: 36px; font-size: 14px; }
    .dgm-footer-orbit-social .social-size-lg { width: 38px; height: 38px; font-size: 15px; }
    .dgm-footer-orbit-social .social-size-xl { width: 40px; height: 40px; font-size: 15px; }

    .social-orbit--1  { --ox: 0px;    --oy: -96px; }
    .social-orbit--2  { --ox: 78px;   --oy: -78px; }
    .social-orbit--3  { --ox: 124px;  --oy: -30px; }
    .social-orbit--4  { --ox: 124px;  --oy: 30px; }
    .social-orbit--5  { --ox: 78px;   --oy: 78px; }
    .social-orbit--6  { --ox: 0px;    --oy: 96px; }
    .social-orbit--7  { --ox: -78px;  --oy: 78px; }
    .social-orbit--8  { --ox: -124px; --oy: 30px; }
    .social-orbit--9  { --ox: -124px; --oy: -30px; }
    .social-orbit--10 { --ox: -78px;  --oy: -78px; }

    .dgm-footer-about {
        text-wrap: pretty;
        padding-left: 4px;
        padding-right: 4px;
    }

    .tp-copyright-2-area .row {
        text-align: center;
    }

    .tp-copyright-2-menu {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 12px;
    }
}

/* ── Mobil header: hamburger gizli, reels sağ üst ── */
@media (max-width: 767px) {
    .header-menu-fixed,
    body:not(.loading) .header-menu-fixed {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    #solid_reels_widget_v2 {
        top: max(14px, env(safe-area-inset-top, 0px)) !important;
        right: max(13px, env(safe-area-inset-right, 0px)) !important;
        z-index: 9999 !important;
    }

    body.header-is-scrolled #solid_reels_widget_v2 {
        top: max(12px, env(safe-area-inset-top, 0px)) !important;
        right: max(12px, env(safe-area-inset-right, 0px)) !important;
    }

    .header-logo-fixed img {
        max-width: 198px !important;
        width: min(198px, 54vw) !important;
    }

    .solid_reels_inner_v2 {
        width: 54px !important;
        height: 54px !important;
    }
}

/* ── Header küçük ekran ── */
@media (max-width: 374px) {
    .header-logo-fixed img {
        max-width: 188px;
        width: min(188px, 52vw);
    }

    #solid_reels_widget_v2 {
        top: max(12px, env(safe-area-inset-top, 0px)) !important;
        right: max(10px, env(safe-area-inset-right, 0px)) !important;
    }

    .solid_reels_inner_v2 {
        width: 52px !important;
        height: 52px !important;
    }
}

/* ── Offcanvas mobil ── */
@media (max-width: 767px) {
    .tp-offcanvas-2-area,
    .tp-offcanvas-2-wrapper,
    .tp-offcanvas-2-content {
        max-width: 100%;
        overflow-x: hidden;
    }

    .tp-offcanvas-2-menu ul li a {
        padding-top: 12px;
        padding-bottom: 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ── Video galeri filtre ── */
@media (max-width: 767px) {
    .gallery-filter-wrap {
        gap: 12px 16px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .filter-btn {
        font-size: 11px;
        letter-spacing: 1px;
        padding: 8px 4px;
        min-height: 44px;
    }

    .video-title {
        font-size: 16px;
    }

    .cat-badge {
        top: 12px;
        right: 12px;
        font-size: 10px;
        max-width: calc(100% - 24px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .play-icon-wrap {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
}

/* ── Ana sayfa intro taşma ── */
@media (max-width: 520px) {
    .home-seo-intro__heading-line,
    .home-seo-intro__heading-mark {
        white-space: normal;
    }

    .home-seo-intro__heading-sub {
        font-size: clamp(1.05rem, 4.5vw, 1.35rem);
    }
}

/* ── Pagination ── */
.pagination,
.tp-pagination,
.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
}

.pagination a,
.pagination span,
.page-numbers a,
.page-numbers span {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Z-index sabitleme (mobil nav üstünde modal) ── */
.mfp-wrap {
    z-index: 1000000 !important;
}

.mfp-bg {
    z-index: 999999 !important;
}

/* ── Layout shift azaltma ── */
.header-logo-fixed img,
.dgm-footer-logo-center img {
    aspect-ratio: auto;
}

/* ── Container hizalama — container-system.css ile tamamlanır ── */
main .tp-breadcrumb-area,
main .tp-contact-us-ptb,
main .tp-brand-inner-area,
main .tp-blog-list-ptb,
main .tp-portfolio-inner-ptb,
main .news-grid-section {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

[data-background] {
    background-size: cover;
    background-position: center;
}

/* ── Tablet dengesi ── */
@media (min-width: 768px) and (max-width: 1024px) {
    .container-1430,
    .container-1330,
    .container-1230 {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-heading {
        font-size: clamp(2.5rem, 6vw, 4.5rem);
    }
}
