/* Global frontend responsive düzenleri */

body.mobile-menu-open {
    overflow: hidden;
}

.header-main {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    z-index: 50;
}

.header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.site-logo {
    text-decoration: none;
    color: #111;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -1px;
    white-space: nowrap;
}

.site-logo .logo-red {
    color: #d71920;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-menu a {
    color: #111;
    text-decoration: none;
    font-weight: 900;
    font-size: 15px;
    white-space: nowrap;
}

.main-menu a:hover {
    color: #d71920;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon-link,
.header-icon-button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #111;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

.header-icon-link:hover,
.header-icon-button:hover {
    color: #d71920;
}

/* Servis dropdown */
.services-dropdown {
    position: relative;
}

.services-dropdown > button {
    border: 0;
    background: transparent;
    color: #111;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
}

.services-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    width: 210px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .2s ease;
    z-index: 80;
}

.services-dropdown:hover .services-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.services-dropdown-menu a {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* Search panel */
.mobile-search-panel {
    display: none;
    background: #f6f6f6;
    border-top: 1px solid #e5e5e5;
    padding: 14px 16px;
}

.mobile-search-panel.is-open {
    display: block;
}

.mobile-search-panel form {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.mobile-search-panel input {
    flex: 1;
    height: 42px;
    border: 1px solid #ddd;
    padding: 0 14px;
    font-size: 15px;
}

.mobile-search-panel button {
    width: 90px;
    height: 42px;
    border: 0;
    background: #d71920;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

/* Mobile menu */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
    z-index: 90;
}

.mobile-menu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    max-width: 88vw;
    height: 100vh;
    background: #fff;
    z-index: 100;
    transition: .25s ease;
    box-shadow: -8px 0 32px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
}

.mobile-menu-panel.is-open {
    right: 0;
}

.mobile-menu-head {
    height: 72px;
    padding: 0 18px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    color: #111;
    text-decoration: none;
    font-size: 26px;
    font-weight: 900;
}

.mobile-logo span:last-child {
    color: #d71920;
}

.mobile-menu-head button {
    width: 38px;
    height: 38px;
    border: 0;
    background: #111;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.mobile-menu-links {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1;
}

.mobile-menu-links a {
    display: block;
    color: #111;
    text-decoration: none;
    padding: 13px 0;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 800;
}

.mobile-menu-links a:hover {
    color: #d71920;
}

.mobile-menu-title {
    margin-top: 18px;
    padding: 10px 0;
    color: #d71920;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.mobile-socials {
    display: flex;
    gap: 10px;
    padding: 16px 18px;
    border-top: 1px solid #eee;
}

.mobile-socials a {
    width: 36px;
    height: 36px;
    background: #111;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.mobile-socials a:hover {
    background: #d71920;
}

/* Tablet */
@media (max-width: 1180px) {
    .main-menu {
        gap: 15px;
    }

    .main-menu a,
    .services-dropdown > button {
        font-size: 14px;
    }

    .site-logo {
        font-size: 30px;
    }
}

/* Mobil */
@media (max-width: 992px) {
    .topbar-inner {
        justify-content: center;
    }

    .topbar-left {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        justify-content: flex-start;
        padding: 0 4px;
    }

    .topbar-right {
        display: none;
    }

    .header-main-inner {
        height: 72px;
    }

    .main-menu {
        display: none;
    }

    .site-logo {
        font-size: 30px;
    }

    .header-icons {
        margin-left: auto;
    }
}

/* Küçük mobil */
@media (max-width: 640px) {
    .topbar {
        font-size: 12px;
    }

    .topbar-left a {
        font-size: 12px;
    }

    .header-main-inner {
        height: 64px;
    }

    .site-logo {
        font-size: 25px;
    }

    .header-icons {
        gap: 6px;
    }

    .header-icon-link,
    .header-icon-button {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .mobile-search-panel form {
        flex-direction: column;
    }

    .mobile-search-panel button {
        width: 100%;
    }
}

/* =========================================================
   HABERX GLOBAL MOBILE FIX
   Mobilde sayfanın sola sıkışmasını ve desktop grid taşmasını engeller
========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.page-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Mobilde tüm ana grid yapıları tek kolona düşsün */
@media (max-width: 992px) {
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    .page-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .home-page,
    .news-detail-page,
    .category-page,
    .author-page,
    .gallery-page,
    .video-page {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box;
    }

    .home-shell,
    .news-detail-shell,
    .category-shell,
    .author-page-shell {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    .home-layout,
    .home-content-layout,
    .news-detail-layout,
    .category-layout,
    .author-content-layout {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    .home-main,
    .category-main,
    .news-detail-card,
    .author-main-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .home-side-ad,
    .news-side-ad,
    .category-side-ad,
    .author-side-ad,
    .left-ad,
    .right-ad {
        display: none !important;
    }
}

/* Header mobil toparlama */
@media (max-width: 992px) {
    .topbar {
        width: 100%;
        overflow: hidden;
    }

    .topbar-inner {
        width: 100%;
        max-width: 100%;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .topbar-left {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start !important;
        gap: 12px;
        scrollbar-width: none;
    }

    .topbar-left::-webkit-scrollbar {
        display: none;
    }

    .header-main {
        width: 100%;
    }

    .header-main-inner {
        width: 100%;
        max-width: 100%;
        padding-left: 14px !important;
        padding-right: 14px !important;
        box-sizing: border-box;
    }

    .site-logo {
        font-size: 26px !important;
        max-width: 180px;
        overflow: hidden;
        white-space: nowrap;
    }

    .main-menu {
        display: none !important;
    }

    .header-icons {
        flex-shrink: 0;
    }
}

/* Ana sayfa slider mobil */
@media (max-width: 992px) {
    .hero-area,
    .main-slider,
    .headline-slider,
    .slider-area,
    .home-slider {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero-slide,
    .headline-slide,
    .slider-item {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-slide img,
    .headline-slide img,
    .slider-item img {
        width: 100% !important;
        height: 220px !important;
        object-fit: cover;
    }

    .hero-title,
    .headline-title,
    .slider-title {
        font-size: 18px !important;
        line-height: 1.25 !important;
    }
}

/* Ana sayfa haber kartları mobil */
@media (max-width: 992px) {
    .home-category-row,
    .home-section-grid,
    .category-news-grid,
    .home-news-grid,
    .gallery-grid,
    .video-grid,
    .related-news-grid,
    .category-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .home-news-card,
    .category-news-card,
    .related-news-card,
    .gallery-card,
    .video-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .home-news-card img,
    .category-news-card img,
    .related-news-card img,
    .gallery-card img,
    .video-card img {
        width: 100% !important;
        height: 190px !important;
        object-fit: cover;
    }

    .home-section-title,
    .category-header h1,
    .news-section-title h2 {
        font-size: 26px !important;
        line-height: 1.2 !important;
    }
}

/* Foto galeri / video galeri / yazarlar blokları mobil */
@media (max-width: 992px) {
    .home-gallery-section,
    .home-video-section,
    .home-authors-section,
    .photo-gallery-section,
    .video-gallery-section,
    .authors-section {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .home-gallery-inner,
    .home-video-inner,
    .home-authors-inner {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        box-sizing: border-box;
    }
}

/* Sidebarlar mobilde alta düzgün insin */
@media (max-width: 992px) {
    .news-sidebar,
    .category-sidebar,
    .author-sidebar,
    .home-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 22px !important;
    }

    .news-sidebar-block,
    .category-sidebar-block,
    .author-sidebar-block {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* Döviz bar mobilde yatay kaydırmalı olsun */
@media (max-width: 768px) {
    .market-bar,
    .currency-bar,
    .ticker-market,
    .finance-bar {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        scrollbar-width: none;
    }

    .market-bar::-webkit-scrollbar,
    .currency-bar::-webkit-scrollbar,
    .ticker-market::-webkit-scrollbar,
    .finance-bar::-webkit-scrollbar {
        display: none;
    }

    .market-bar-inner,
    .currency-bar-inner,
    .finance-bar-inner {
        min-width: max-content;
    }
}

/* En küçük ekran */
@media (max-width: 480px) {
    .site-logo {
        font-size: 23px !important;
        max-width: 155px;
    }

    .header-main-inner {
        height: 62px !important;
    }

    .header-icon-link,
    .header-icon-button {
        width: 28px !important;
        height: 28px !important;
        font-size: 17px !important;
    }

    .hero-slide img,
    .headline-slide img,
    .slider-item img {
        height: 190px !important;
    }

    .home-news-card img,
    .category-news-card img,
    .related-news-card img {
        height: 180px !important;
    }

    .news-detail-title {
        font-size: 26px !important;
    }

    .news-detail-summary {
        font-size: 17px !important;
    }

    .news-content,
    .author-post-body {
        font-size: 18px !important;
        line-height: 1.7 !important;
    }
}

.site-logo img {
    max-height: 58px;
    max-width: 230px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.mobile-logo img {
    max-height: 46px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .site-logo img {
        max-height: 44px;
        max-width: 165px;
    }
}

