/* ===================================================================
MOBİL UYUMLULUK — KAPSAMLI RESPONSIVE PATCH v3
Kapsam: Public + Admin + Member + Leader panelleri
NOT: Header/nav/footer/mobile-menu temel stilleri PublicLayout.razor.css
     içinde tanımlıdır. Bu dosya SADECE @media sorguları ve responsive
     overrides içerir.
   v3.0: Tek-kolon mobil fallback, zoom-resilient grid, editoryal detay, premium carousel
Breakpoints:
  xs  : ≤ 400px   (küçük telefon)
  sm  : ≤ 575px   (telefon)
  md  : ≤ 767px   (büyük telefon / küçük tablet)
  lg  : ≤ 991px   (tablet)
  xl  : ≤ 1199px  (küçük masaüstü)
  xxl : ≤ 1536px  (standart masaüstü)
=================================================================== */

/* ===========================================================
   A) GLOBAL — tüm ekranlarda geçerli temel düzeltmeler
   =========================================================== */
html {
    scroll-behavior: smooth;
    min-width: 320px;
}

body, #app {
    min-width: 320px;
    width: 100%;
}

/* Container sistemi — responsive padding-inline */
.rail-container,
.home-wide-container {
    max-width: 1580px;
    margin: 0 auto;
    padding-inline: clamp(1rem, 3vw, 1.5rem);
}

/* Responsive container helper — used across pages */
.container {
    max-width: min(100%, 1320px);
}

/* ===========================================================
   B) ≤ 1536px — standart masaüstü
   Rail max-height fluid-responsive.css aspect-ratio ile yönetilir.
   =========================================================== */
@media (max-width: 1536px) {
    .three-col-grid {
        gap: 1.25rem;
    }

    .home-wide-container {
        padding-inline: clamp(1rem, 2.5vw, 1.5rem);
    }
}

/* ===========================================================
   B2) ≤ 1440px — 100% zoom on 1440p monitors
   Rail layout fluid-responsive.css minmax ile yönetilir.
   =========================================================== */
@media (max-width: 1440px) {
    .featured-card .card-label-badge {
        font-size: .62rem;
        padding: .2rem .5rem;
    }
}

/* ===========================================================
   B3) ≤ 1280px — 100% zoom on standard laptop screens
   =========================================================== */
@media (max-width: 1280px) {
    .nav-desktop .nav-link {
        padding: .4rem .5rem;
        font-size: .82rem;
    }

    .header-social-icon {
        width: 28px;
        height: 28px;
        font-size: .85rem;
    }

    .ds-btn-primary {
        padding: .5rem .85rem;
        font-size: .85rem;
    }

    .three-col-grid {
        gap: 1rem;
    }

    .verse-band-quote {
        font-size: 1.1rem;
    }
}

/* ===========================================================
   C) ≤ 1199px — küçük masaüstü
   =========================================================== */
@media (max-width: 1199px) {
    .nav-desktop .nav-link {
        padding: .4rem .45rem;
        font-size: .8rem;
    }

    .header-social {
        gap: .15rem;
    }

    .header-social-icon {
        width: 28px;
        height: 28px;
        font-size: .85rem;
    }

    .kp-areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ===========================================================
   D) ≤ 991px — tablet
   =========================================================== */
@media (max-width: 991px) {
    /* Header */
    .nav-desktop {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-social {
        display: none;
    }

    .ds-btn span {
        display: none;
    }

    .ds-btn {
        padding: .55rem .75rem;
    }

    .logo-image {
        height: 40px;
    }

    /* Footer grid */
    .footer-top .row {
        gap: 1.5rem 0;
    }

    /* Home grid — fluid-responsive.css handles rail layout at 991px */

    /* Legacy home-top-layout fallback */
    .home-top-layout {
        grid-template-columns: 1fr !important;
        max-height: none !important;
        min-height: auto !important;
    }

    .home-right-hero {
        min-height: 280px !important;
        max-height: 360px !important;
        height: 300px !important;
    }

    /* Announcement band */
    .announcement-band-content {
        flex-direction: column;
        gap: .75rem;
    }

    .announcement-band-items {
        width: 100%;
    }

    /* Three col grid */
    .three-col-grid {
        grid-template-columns: 1fr !important;
    }

    .three-col-card.verse-card {
        grid-column: 1 !important;
    }

    /* Admin KPI */
    .admin-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Admin topbar */
    .admin-topbar {
        padding: 0 1rem;
        gap: .6rem;
    }

    .topbar-title {
        font-size: .9rem;
    }

    .chip-meta {
        display: none;
    }

    /* Admin sidebar overlay */
    .admin-shell.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 1040;
        animation: fadeIn .2s;
    }

    .admin-shell.sidebar-open .admin-sidebar {
        z-index: 1050;
    }

    .admin-nav-item {
        padding: .65rem 1rem;
        min-height: 44px;
    }

    /* Home sections padding */
    .kp-content-section {
        padding: 2.5rem 0;
    }

    /* About image */
    .about-image-placeholder {
        height: 320px !important;
    }

    /* Footer compact */
    .public-footer {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }
}

/* ===========================================================
   E) ≤ 767px — büyük telefon / küçük tablet
   =========================================================== */
@media (max-width: 767px) {
    /* Header */
    .logo-image {
        height: 36px;
    }

    .btn-login {
        display: none !important;
    }

    /* Rail right switches back to stacked on phone */
    .rail-right {
        flex-direction: column;
    }

    /* Admin topbar */
    .admin-topbar {
        height: auto;
        min-height: 52px;
        padding: .5rem .75rem;
        flex-wrap: wrap;
    }

    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .topbar-actions {
        margin-left: auto;
        gap: .4rem;
    }

    .chip-name,
    .chip-role {
        display: none;
    }

    .btn-admin-outline.btn-admin-sm .btn-label-text {
        display: none;
    }

    /* Admin content */
    .admin-content {
        padding: 1rem .75rem;
    }

    /* Admin page header */
    .admin-page-header {
        flex-direction: column;
        gap: .75rem;
        margin-bottom: 1rem;
    }

    .admin-page-header-info h2 {
        font-size: 1.2rem;
    }

    .admin-page-actions {
        flex-wrap: wrap;
        gap: .4rem;
    }

    /* Admin KPI */
    .admin-kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }

    .admin-kpi-card {
        padding: 1rem;
    }

    .admin-kpi-value {
        font-size: 1.25rem;
    }

    /* Admin table: card view */
    .admin-table thead {
        display: none;
    }

    .admin-table tbody tr {
        display: block;
        padding: .75rem;
        border-bottom: 1px solid rgba(0,0,0,.08);
        border-radius: .5rem;
        margin-bottom: .4rem;
        background: #fff;
    }

    .admin-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: .3rem 0;
        border-bottom: none;
        font-size: .84rem;
    }

    .admin-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .75rem;
        color: var(--text);
        opacity: .5;
        text-transform: uppercase;
        flex-shrink: 0;
        margin-right: .5rem;
    }

    /* premium-table same treatment */
    .premium-table thead {
        display: none;
    }

    .premium-table tbody tr {
        display: block;
        padding: .75rem;
        border-bottom: 1px solid rgba(0,0,0,.08);
        border-radius: .5rem;
        margin-bottom: .5rem;
    }

    .premium-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: .3rem 0;
        border-bottom: none;
        font-size: .84rem;
    }

    .premium-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .75rem;
        color: var(--color-text-muted, #6b7280);
        flex-shrink: 0;
        margin-right: .5rem;
    }

    /* Admin toolbar */
    .admin-premium-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
    }

    .premium-search-box {
        min-width: 0;
    }

    .premium-filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .premium-filter-group select {
        min-width: 0;
        width: 100%;
    }

    /* Modal: tam genişlik */
    .admin-modal-content {
        max-width: 100%;
        border-radius: .75rem .75rem 0 0;
        margin-bottom: 0;
    }

    .premium-modal-content {
        max-width: 100%;
        border-radius: .75rem .75rem 0 0;
        margin: auto 0 0;
    }

    /* Form row: tek kolon */
    .admin-form-row,
    .premium-form-row {
        grid-template-columns: 1fr;
    }

    /* News card */
    .news-card-item {
        flex-direction: column;
    }

    .news-card-img-wrap {
        flex: none;
        width: 100%;
    }

    .news-card-body {
        padding: .85rem;
    }

    .news-card-title {
        font-size: 1rem;
    }

    /* Three col list thumbnail min-height */
    .three-col-list-thumbnail {
        min-height: 160px;
    }

    /* Public sections padding */
    .kurumsal-page {
        padding: 1.5rem 0;
    }

    .board-page {
        padding: 1.5rem 0 1rem;
    }

    .board-title {
        font-size: 1.4rem;
    }

    /* Contact section */
    .contact-section {
        padding: 1.5rem 0;
    }

    /* Donate section */
    .donate-page {
        padding: 1.5rem 0 2rem;
    }

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

    /* About / detail */
    .detail-hero-title {
        font-size: clamp(1.2rem, 5vw, 1.65rem) !important;
    }

    .detail-article {
        padding: 1rem;
        border-radius: .65rem;
    }

    /* Ref detail layout: tek kolon — fluid-responsive.css'te flex ile yönetilir */
    .ref-detail-page .detail-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .ref-detail-page .lead-text,
    .ref-detail-page .lead-media,
    .ref-detail-page .lead-aside,
    .ref-detail-page .detail-body {
        grid-column: unset !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .ref-detail-page .lead-aside {
        position: static;
    }

    .ref-detail-page .ref-detail-container {
        width: calc(100% - 16px);
        padding: 12px 8px 20px;
    }

    /* Home wide container */
    .home-wide-container {
        padding: 0 .75rem;
    }

    /* Hero slider — fluid-responsive.css aspect-ratio handles sizing */

    /* Home three col */
    .home-three-col {
        margin-top: 0;
        padding: 1.5rem 0 2rem;
    }

    /* Footer */
    .footer-copyright {
        font-size: .76rem;
    }

    /* Verse band */
    .verse-band-quote {
        font-size: .9rem !important;
    }

    /* NelerYapiyoruz */
    .page-whatwedo .wwd-band {
        padding: 1.75rem 0;
    }

    .page-whatwedo .wwd-band-inner {
        padding: 0 .75rem;
    }

    /* Sponsors grid — TEK final kural */
    [data-scope="public"] .kp-sponsors-grid {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    /* Aside card feature — single col for safe mobile layout */
    .ref-detail-page .aside-card--feature {
        grid-template-columns: 1fr;
    }

    .ref-detail-page .aside-media {
        width: 100%;
        height: 180px;
    }

    /* featured-card media frame */
    .featured-card .media-frame {
        aspect-ratio: 16 / 9;
    }

    /* Sponsors grid — single col on phone for readability */
    [data-scope="public"] .kp-sponsors-grid {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    /* Members grid — single col for safer layout */
    .kp-members-grid {
        grid-template-columns: 1fr !important;
        gap: .75rem !important;
    }

    /* Scroll-padding for sticky header */
    html {
        scroll-padding-top: 60px;
    }

    /* Detail page two-col */
    .detail-two-col {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .detail-meta-card {
        grid-template-columns: 1fr !important;
    }

    /* Ref detail toprow */
    .ref-detail-page .detail-toprow {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .ref-detail-page .detail-breadcrumb {
        font-size: .72rem;
    }

    .ref-detail-page .detail-back-btn {
        font-size: .78rem;
        padding: 7px 10px;
    }

    /* About & Tarihce */
    .about-hero,
    .tarihce-hero {
        padding: 1.5rem 0 !important;
    }

    .tarihce-quote,
    .about-quote {
        padding: 1rem 1rem 1rem 1.25rem;
    }

    /* Biz kimiz section image */
    .about-image-placeholder {
        height: 280px !important;
    }

    /* KP areas grid — mobile: carousel takes over if JS loaded, else single-col fallback */
    .kp-areas-grid:not(.mcc-desktop-grid) {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    /* KP section subtitle */
    .kp-section-subtitle {
        font-size: .9rem;
    }

    .kp-section-title {
        font-size: clamp(1.25rem, 5vw, 1.6rem);
    }

    /* KP manifesto */
    .kp-manifesto p {
        font-size: .92rem;
    }
}

/* ===========================================================
   F) ≤ 575px — telefon
   =========================================================== */
@media (max-width: 575px) {
    /* Header */
    .header-content {
        padding: .5rem 0;
        gap: .5rem;
    }

    .logo-image {
        height: 32px;
    }

    /* Hamburger daha büyük dokunma alanı */
    .mobile-menu-toggle {
        padding: .55rem .65rem;
    }

    /* Bağış yap: sadece ikon */
    .ds-btn-primary {
        padding: .5rem .65rem;
    }

    .ds-btn-primary span {
        display: none !important;
    }

    /* Admin brand */
    .brand-name {
        font-size: .9rem;
    }

    .brand-sub {
        font-size: .68rem;
    }

    /* Admin content */
    .admin-content {
        padding: .75rem .5rem;
    }

    /* Admin KPI: tek kolon */
    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }

    .admin-kpi-value {
        font-size: 1.1rem;
    }

    /* Home hero — fluid-responsive.css aspect-ratio handles rail sizing */
    .home-right-hero {
        height: 220px !important;
        min-height: 220px !important;
    }

    /* Verse band */
    .home-verse-band {
        padding: 1.1rem 0;
    }

    .verse-band-quote {
        font-size: .85rem !important;
        padding: 0 .5rem;
    }

    /* Three col grid */
    .three-col-grid {
        padding: 0 .5rem;
        gap: .75rem;
    }

    .three-col-list {
        padding: .65rem .65rem .5rem;
    }

    .three-col-list-thumbnail {
        min-height: 150px;
    }

    /* News list card */
    .news-list-card {
        padding: .85rem;
        gap: .75rem;
    }

    .news-list-card-thumb {
        width: 100%;
        height: 180px;
    }

    .news-list-card-title {
        font-size: .95rem;
    }

    .news-list-card-summary {
        font-size: .85rem;
    }

    /* Detail cover */
    .detail-cover-wrap {
        height: 260px !important;
    }

    /* Donate */
    .amount-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .donate-submit-btn {
        font-size: 1rem;
        padding: .7rem 1rem;
    }

    /* Board card — single col for safe phone layout */
    .board-grid {
        grid-template-columns: 1fr;
        gap: .85rem;
    }

    .board-card-name {
        font-size: .85rem;
    }

    .board-card-body {
        padding: .6rem .75rem .85rem;
    }

    /* Contact form card */
    .contact-form-card {
        padding: 1.25rem;
    }

    /* Kurumsal item */
    .kurumsal-item {
        padding: 1.1rem;
    }

    /* Footer */
    .public-footer {
        padding: 1.75rem 0 1.25rem;
    }

    /* Modal: full screen */
    .admin-modal-content,
    .premium-modal-content {
        border-radius: 0;
        max-height: 100vh;
        margin: 0;
    }

    .admin-modal,
    .premium-modal {
        padding: 0;
        align-items: flex-end;
    }

    /* Admin brand */
    .admin-brand {
        padding: .85rem .75rem;
    }

    /* WhatWeDo */
    .page-whatwedo .wwd-hero {
        padding: 1.25rem 0 1rem;
    }

    .page-whatwedo .wwd-hero-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .page-whatwedo .wwd-hero-desc {
        font-size: .92rem;
    }

    /* Ref detail media */
    .ref-detail-page .ref-media {
        height: 240px !important;
    }

    /* Sponsor card — tek kolon, dar telefonda 2 kolon sığmaz */
    [data-scope="public"] .kp-sponsors-grid {
        grid-template-columns: 1fr;
    }

    /* Toast: full width */
    .admin-toast-container,
    .premium-toast-container {
        left: .5rem;
        right: .5rem;
        bottom: .75rem;
    }

    .admin-toast,
    .premium-toast {
        min-width: 0;
        width: 100%;
    }

    .contact-toast-container {
        left: .5rem;
        right: .5rem;
        top: .75rem;
    }

    .contact-toast {
        min-width: 0;
    }

    /* Rail container */
    .rail-container {
        padding-inline: 1rem;
    }

    /* Leader KPI */
    .leader-kpi {
        grid-template-columns: 1fr;
    }

    /* Pagination: kompakt */
    .admin-pagination,
    .premium-pagination {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }

    .admin-pagination-info,
    .premium-pagination-info {
        justify-content: center;
    }

    .admin-pagination-controls,
    .premium-pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Bulk bar */
    .admin-bulk-bar {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }

    .bulk-actions {
        justify-content: flex-end;
    }

    /* Row action menu */
    .row-action-menu {
        right: auto;
        left: 0;
    }

    /* KP areas grid — phone: single column (fallback when no carousel) */
    .kp-areas-grid:not(.mcc-desktop-grid) {
        grid-template-columns: 1fr;
        gap: .85rem;
    }

    /* Featured card badge */
    .featured-card .card-label-badge {
        font-size: .62rem;
        padding: .22rem .5rem;
    }

    /* Hover band */
    .hover-band {
        padding: .4rem .65rem;
    }

    .hover-band-title {
        font-size: .78rem;
    }

    .hover-band-text {
        font-size: .7rem;
        -webkit-line-clamp: 1;
        max-height: 1.5em;
    }
}

/* ===========================================================
   G) ≤ 400px — çok küçük telefon
   =========================================================== */
@media (max-width: 400px) {
    .logo-image {
        height: 28px;
    }

    .header-content {
        gap: .35rem;
    }

    .admin-kpi-grid {
        grid-template-columns: 1fr;
    }

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

    [data-scope="public"] .kp-sponsors-grid {
        grid-template-columns: 1fr;
    }

    .mobile-menu-content {
        width: 100%;
        max-width: 100%;
    }

    .footer-copyright {
        font-size: .72rem;
    }

    .verse-band-quote {
        font-size: .8rem !important;
    }

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

    /* WhatWeDo mobile: minimal spacing */
    .page-whatwedo .wwd-band-inner {
        padding: 0 .5rem;
    }
}

/* ===========================================================
   H) YATAY KAYDIRMAYI ÖNLE (global overflow fix)
   =========================================================== */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .public-layout {
        overflow-x: hidden;
    }

    .admin-shell {
        overflow-x: hidden;
    }

    .container,
    .container-fluid,
    .container-xl,
    .container-xxl {
        max-width: 100%;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .row {
        --bs-gutter-x: 1rem;
    }
}

@media (max-width: 575px) {
    .container,
    .container-fluid {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .row {
        --bs-gutter-x: .75rem;
    }
}

/* ===========================================================
   I) TOUCH DEVICE — dropdown & hover overrides
   =========================================================== */
@media (hover: none) and (max-width: 991px) {
    .nav-dropdown-menu {
        display: none !important;
    }
}

@media (hover: none) {
    .three-col-list-item:hover {
        transform: none;
        box-shadow: 0 6px 14px rgba(0,0,0,.05);
    }

    .news-list-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
    }

    .news-card-item:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(0,0,0,.06);
    }

    .three-col-list-item:active { transform: scale(.98); }
    .news-list-card:active { transform: scale(.98); }
    .news-card-item:active { transform: scale(.98); }
    .ds-btn:active { transform: scale(.97); }
    .btn-admin-primary:active { transform: scale(.97); }
    .btn-premium:active { transform: scale(.97); }
}

/* ===========================================================
   J) PRINT MEDIA
   =========================================================== */
@media print {
    .main-header,
    .mobile-menu,
    .admin-sidebar,
    .admin-topbar,
    .public-footer {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
    }

    .admin-content,
    .public-main {
        padding: 0 !important;
    }

    body {
        font-size: 12px;
    }
}

/* ===========================================================
   K) IPAD / LANDSCAPE TABLET
   =========================================================== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .home-top-layout {
        grid-template-columns: 55% 45% !important;
    }

    .home-right-hero {
        height: 280px !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .home-top-layout {
        grid-template-columns: 1fr !important;
    }

    .home-right-hero {
        height: 320px !important;
    }

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

/* ===========================================================
   L) GLOBAL FOCUS VISIBLE (accessibility)
   =========================================================== */
:focus-visible {
    outline: 2px solid var(--primary, #B23A2C);
    outline-offset: 2px;
}

/* ===========================================================
   M) NelerYapiyoruz — Mobile safety (white screen prevention)
   Root cause: home-page-enhancements.js scroll reveal system
   adds data-rv="hidden" to elements matching certain selectors.
   On NelerYapiyoruz, elements could remain hidden if the
   IntersectionObserver never fires (mobile viewport timing).
   Fix: Force all .page-whatwedo descendants to be always visible,
   and prevent data-rv from ever hiding them.
   v3.0: Izole edilmiş — visibility:visible !important, opacity:1 !important,
   transform:none !important ile scroll-reveal gizleme engellenir.
   data-rv attribute override'ları ve * wildcard ile ek koruma sağlanır
   =========================================================== */
.page-whatwedo,
.page-whatwedo .wwd-hero,
.page-whatwedo .wwd-hero-bg,
.page-whatwedo .wwd-hero-inner,
.page-whatwedo .wwd-band,
.page-whatwedo .wwd-band-inner,
.page-whatwedo .wwd-band-grid,
.page-whatwedo .wwd-visual,
.page-whatwedo .wwd-text,
.page-whatwedo section {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* wwd-band-grid needs grid not block */
.page-whatwedo .wwd-band-grid {
    display: grid !important;
}

/* wwd-band needs block display */
.page-whatwedo .wwd-band {
    display: block !important;
}

/* Ensure scroll-reveal never hides page-whatwedo content */
.page-whatwedo[data-rv],
.page-whatwedo [data-rv],
.page-whatwedo [data-rv="hidden"],
.page-whatwedo .wwd-band[data-rv="hidden"],
.page-whatwedo .wwd-hero[data-rv="hidden"],
.page-whatwedo .wwd-visual[data-rv="hidden"],
.page-whatwedo .wwd-text[data-rv="hidden"],
.page-whatwedo section[data-rv="hidden"] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Prevent any JS from applying hidden/collapse to whatwedo children */
.page-whatwedo * {
    visibility: visible;
}

/* ===========================================================
   N) AUTH PAGE — Mobile responsive
   =========================================================== */
@media (max-width: 575px) {
    .auth-page {
        padding: 1.5rem .75rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-submit-btn {
        padding: .65rem .85rem;
        font-size: .95rem;
    }

    .auth-secondary-btn {
        font-size: .88rem;
    }
}

/* ===========================================================
   O) MOBILE FIRST IMPRESSION — Premium mobile experience
   =========================================================== */
@media (max-width: 767px) {
    /* Smooth mobile hero sizing */
    .kp-hero {
        padding: 1.25rem 0 1rem !important;
        min-height: auto !important;
    }

    .kp-hero-h1 {
        font-size: clamp(1.8rem, 8vw, 2.8rem) !important;
        line-height: 1 !important;
        margin-bottom: .4rem !important;
    }

    .kp-hero-h2 {
        font-size: clamp(.85rem, 3.5vw, 1rem) !important;
        line-height: 1.5 !important;
    }

    /* Home sections */
    .kp-section-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem) !important;
    }

    .kp-section-subtitle {
        font-size: .88rem !important;
    }

    /* KP area cards — carousel override; single-col fallback if carousel fails */
    .kp-areas-grid:not(.mcc-desktop-grid) {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .kp-area-card {
        padding: 1rem !important;
        min-height: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .kp-area-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    .kp-area-title {
        font-size: .88rem !important;
    }

    .kp-area-text {
        font-size: .8rem !important;
    }

    /* Manifesto text */
    .kp-manifesto p {
        font-size: .9rem !important;
        line-height: 1.7 !important;
    }

    /* Touch-friendly buttons */
    .kp-cta-btn {
        min-height: 44px !important;
        font-size: .88rem !important;
    }

    /* KP member cards (board) — single col for safe phone layout */
    .kp-members-grid {
        grid-template-columns: 1fr !important;
        gap: .75rem !important;
    }

    .kp-member-card {
        border-radius: .65rem !important;
    }

    .kp-member-name {
        font-size: .85rem !important;
    }

    .kp-member-role {
        font-size: .75rem !important;
    }

    /* WWD page mobile */
    .page-whatwedo .wwd-hero {
        padding: 1.5rem 0 1.25rem !important;
    }

    .page-whatwedo .wwd-hero-title {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }

    .page-whatwedo .wwd-hero-desc {
        font-size: .88rem !important;
    }

    .page-whatwedo .wwd-hero-strip {
        font-size: .72rem !important;
        gap: .5rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .page-whatwedo .wwd-band-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .page-whatwedo .wwd-band-reverse {
        direction: ltr !important;
    }

    .page-whatwedo .wwd-visual {
        min-height: 200px !important;
        max-height: 240px !important;
    }

    .page-whatwedo .wwd-visual img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .page-whatwedo .wwd-title {
        font-size: 1.1rem !important;
    }

    .page-whatwedo .wwd-lead {
        font-size: .88rem !important;
    }

    .page-whatwedo .wwd-bullets li {
        font-size: .84rem !important;
    }

    .page-whatwedo .wwd-callout {
        padding: .75rem !important;
    }

    /* Image aspect ratio enforcement */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Balanced spacing */
    .public-section {
        padding: 2rem 0 !important;
    }
}

@media (max-width: 575px) {
    /* Phone-specific first impression */
    .kp-hero-h1 {
        font-size: clamp(1.6rem, 9vw, 2.2rem) !important;
    }

    .kp-areas-grid:not(.mcc-desktop-grid) {
        grid-template-columns: 1fr !important;
    }

    .kp-members-grid {
        grid-template-columns: 1fr !important;
        gap: .6rem !important;
    }

    .page-whatwedo .wwd-visual {
        min-height: 180px !important;
        max-height: 220px !important;
        border-radius: .65rem !important;
    }

    /* Haber kartları tek kolon */
    .news-card-item {
        flex-direction: column !important;
    }
    .news-card-img-wrap {
        flex: none !important;
        width: 100% !important;
    }
}

@media (max-width: 400px) {
    .kp-areas-grid:not(.mcc-desktop-grid) {
        grid-template-columns: 1fr !important;
    }

    .kp-members-grid {
        grid-template-columns: 1fr !important;
    }

    .page-whatwedo .wwd-visual {
        min-height: 160px !important;
    }
}

/* ===========================================================
   P) ROLE PAGES (Admin/Leader/Member) — Mobile responsive
   =========================================================== */
@media (max-width: 767px) {
    /* Sidebar responsive */
    .page {
        flex-direction: column !important;
    }

    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
    }

    .page main {
        width: 100% !important;
    }

    .content {
        padding: .75rem !important;
    }

    /* Leader KPI */
    .leader-kpi {
        grid-template-columns: 1fr !important;
        gap: .75rem !important;
    }

    /* Member dashboard cards */
    .member-dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

