/**
 * Tablet & mobil düzen — neo.css sonrası yüklenir (v1.2)
 */

/* ═══════════════════════════════════════════════════════════════
   ÜÇ KOLON — tablet/mobil: 2x2 eşit kart yüksekliği
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
    .neo-three-col .row.g-4 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 12px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
    }

    .neo-three-col .row.g-4 > [class*="col-"] {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .neo-three-col .row.g-4 > [class*="col-"] > .neo-card,
    .neo-three-col .row.g-4 > [class*="col-"] > a.neo-card {
        width: 100% !important;
        height: 100% !important;
        min-height: 188px;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
    }

    .neo-three-col .row.g-4 > [class*="col-"] > a.neo-card .neo-card-body,
    .neo-three-col .row.g-4 > [class*="col-"] > .neo-card .neo-card-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: 0;
    }

    .neo-three-col .neo-card-president .neo-card-body {
        justify-content: center !important;
        align-items: center !important;
        text-align: center;
    }

    .neo-three-col .neo-card-visual .neo-card-body,
    .neo-three-col .neo-card-mevzuat .neo-card-body-mevzuat {
        justify-content: flex-start !important;
    }

    .neo-three-col .neo-card-body h3 {
        flex-wrap: wrap;
    }

    .neo-three-col .neo-card-body p {
        flex: 1 1 auto;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .neo-three-col {
        padding: 1.25rem 0;
        overflow-x: clip;
    }

    .neo-three-col .container {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .neo-three-col .row.g-4 {
        gap: 14px;
    }

    .neo-three-col .row.g-4 > [class*="col-"] > .neo-card,
    .neo-three-col .row.g-4 > [class*="col-"] > a.neo-card {
        min-height: 200px;
    }

    .neo-three-col .neo-card-president .neo-president-avatar,
    .neo-three-col .neo-card-president .neo-avatar-lg,
    .neo-three-col .neo-card-president .neo-card-body.text-center img,
    section[data-section-code="three_col"] .neo-card-president .neo-president-avatar,
    section[data-section-code="three_col"] .neo-card-president .neo-avatar-lg,
    section[data-section-code="three_col"] .neo-card-president .neo-card-body.text-center img {
        width: 88px !important;
        height: 88px !important;
        min-width: 72px !important;
        min-height: 72px !important;
    }

    .neo-three-col .neo-card-president h3,
    section[data-section-code="three_col"] .neo-card-president h3 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        margin-top: 0.4rem !important;
    }

    .neo-three-col .neo-card-president small,
    section[data-section-code="three_col"] .neo-card-president small {
        font-size: 0.78rem !important;
    }

    .neo-three-col .neo-card-body h3 {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
    }

    .neo-three-col .neo-card-body p {
        font-size: 0.8rem !important;
        line-height: 1.45 !important;
    }

    .neo-three-col .neo-card h3,
    .neo-three-col .neo-card p,
    .neo-three-col .neo-card small {
        overflow-wrap: anywhere;
        word-break: break-word;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .neo-three-col .row.g-4 {
        gap: 10px;
    }

    .neo-three-col .row.g-4 > [class*="col-"] > .neo-card,
    .neo-three-col .row.g-4 > [class*="col-"] > a.neo-card {
        min-height: 175px;
        border-radius: 14px !important;
    }

    .neo-three-col .neo-card-president .neo-president-avatar,
    .neo-three-col .neo-card-president .neo-avatar-lg,
    .neo-three-col .neo-card-president .neo-card-body.text-center img,
    section[data-section-code="three_col"] .neo-card-president .neo-president-avatar,
    section[data-section-code="three_col"] .neo-card-president .neo-avatar-lg,
    section[data-section-code="three_col"] .neo-card-president .neo-card-body.text-center img {
        width: 72px !important;
        height: 72px !important;
        min-width: 72px !important;
        min-height: 72px !important;
    }

    .neo-three-col .neo-card-body h3 {
        font-size: 0.82rem !important;
        -webkit-line-clamp: 2;
    }

    .neo-three-col .neo-card-body p {
        font-size: 0.7rem !important;
        -webkit-line-clamp: 4;
    }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER — tek sıra (logo + 3 kolon), eski Bootstrap kurallarını geçersiz kılar
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
    .neo-footer {
        overflow-x: clip;
        max-width: 100vw;
    }
    .neo-footer > .container {
        padding-left: 14px;
        padding-right: 14px;
    }
    .neo-footer .neo-footer-grid {
        display: grid !important;
        grid-template-columns: minmax(88px, 115px) repeat(3, minmax(0, 1fr)) !important;
        gap: 0.55rem 0.7rem !important;
        align-items: start !important;
    }
    .neo-footer .neo-footer-col {
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        flex: none !important;
    }
    .neo-footer .neo-footer-col--brand {
        display: flex !important;
        align-items: flex-start !important;
    }
}

@media (max-width: 768px) {
    .neo-footer > .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    .neo-footer .neo-footer-grid {
        position: relative !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.35rem 0.45rem !important;
        padding: 1.1rem 0 0.75rem !important;
        min-height: 148px !important;
    }
    .neo-footer .neo-footer-col--brand {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: min(58vw, 210px) !important;
        z-index: 0 !important;
        pointer-events: none !important;
        padding: 0 !important;
        justify-content: center !important;
    }
    .neo-footer .neo-footer-logo-glow {
        display: block !important;
    }
    .neo-footer .neo-footer-logo {
        max-width: min(48vw, 170px) !important;
        width: 100% !important;
        margin: 0 auto !important;
        opacity: 0.38 !important;
        filter: brightness(0) invert(1)
            drop-shadow(0 0 22px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 40px rgba(196, 161, 77, 0.45)) !important;
    }
    .neo-footer .neo-footer-col:not(.neo-footer-col--brand) {
        position: relative !important;
        z-index: 2 !important;
    }
    .neo-footer h5 {
        font-size: 0.62rem !important;
        margin-bottom: 0.22rem !important;
    }
    .neo-footer .neo-links li,
    .neo-footer .neo-links a {
        font-size: 0.56rem !important;
        line-height: 1.28 !important;
        overflow-wrap: anywhere;
    }
    .neo-footer-bottom p {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
}

@media (max-width: 400px) {
    .neo-footer .neo-footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.25rem 0.32rem !important;
        min-height: 132px !important;
    }
    .neo-footer .neo-footer-logo { max-width: min(52vw, 150px) !important; opacity: 0.36 !important; }
    .neo-footer h5 { font-size: 0.56rem !important; }
    .neo-footer .neo-links li { font-size: 0.5rem !important; }
}

/* ═══════════════════════════════════════════════════════════════
   ÜST MENÜ — tablet aralıkları
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) and (max-width: 1199px) {
    body.neo-home {
        overflow-x: clip;
    }

    body.neo-home .neo-carousel-section,
    section.neo-carousel-section {
        margin-top: 88px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .premium-navbar {
        height: 88px !important;
        max-width: 100vw;
    }

    .nav-container {
        height: 88px !important;
        padding: 0 10px 0 0 !important;
        gap: 6px !important;
        justify-content: flex-start !important;
    }

    .premium-navbar .nav-brand img,
    .nav-logo-blue {
        height: 64px !important;
    }

    .nav-menu {
        position: fixed !important;
        top: 88px !important;
        right: -100vw !important;
        left: auto !important;
        width: min(360px, 92vw) !important;
        height: calc(100dvh - 88px) !important;
        background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%) !important;
        box-shadow: -14px 0 30px rgba(2, 6, 23, 0.24) !important;
        border-left: 1px solid #d9e4f7 !important;
        padding: 16px 14px 28px !important;
        z-index: 1020 !important;
        display: flex !important;
        flex-direction: column !important;
        transition: right 0.28s ease !important;
    }

    .nav-menu.active {
        right: 0 !important;
    }

    .nav-list {
        flex-direction: column !important;
        width: 100% !important;
    }

    .nav-link {
        width: 100% !important;
    }

    .premium-navbar .dropdown-menu {
        position: static !important;
        display: none !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid #e0e7ef !important;
        border-radius: 0 !important;
        background: #f8fafc !important;
        padding: 4px 0 4px 8px !important;
        margin: 4px 0 0 8px !important;
    }

    .nav-item.dropdown.active .dropdown-menu,
    .nav-item.dropdown.dropdown-open .dropdown-menu {
        display: block !important;
    }

    /* Dropdown olan nav-link'e chevron ekle */
    .nav-menu .nav-item.dropdown > .nav-link::after {
        content: '\f107';
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        margin-left: auto;
        transition: transform 0.2s ease;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    .nav-menu .nav-item.dropdown.dropdown-open > .nav-link::after {
        transform: rotate(180deg);
    }

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

    .online-services-btn {
        max-width: min(42vw, 200px) !important;
        font-size: 12px !important;
    }
}

@media (min-width: 1200px) and (max-width: 1366px) {
    body.neo-home .neo-carousel-section,
    section.neo-carousel-section {
        margin-top: 96px !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .premium-navbar,
    .nav-container {
        height: 96px !important;
    }

    .premium-navbar .nav-brand img,
    .nav-logo-blue {
        height: 72px !important;
    }

    .nav-link {
        padding: 10px 8px !important;
        font-size: 15px !important;
    }

    .online-services-btn {
        font-size: 15px !important;
        padding: 8px 14px !important;
    }

    .premium-navbar .nav-actions {
        margin-left: auto !important;
        padding-left: 10px !important;
        border-left: 1px solid rgba(226, 232, 240, 0.95) !important;
    }
}

/* Tablet (769–1024): neo.css mobil menü 84px — slider aynı hizada */
@media (min-width: 769px) and (max-width: 1024px) {
    body.neo-home .neo-carousel-section,
    section.neo-carousel-section,
    .neo-carousel-section {
        margin-top: 84px !important;
        padding-top: 0 !important;
    }

    body.neo-home .neo-carousel-section .container-fluid,
    section.neo-carousel-section .container-fluid,
    #neoCarousel,
    #neoCarousel .carousel-inner {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

@media (max-width: 768px) {
    body.neo-home .neo-carousel-section,
    section.neo-carousel-section,
    .neo-carousel-section {
        margin-top: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBİL ÜST MENÜ — yazı + dil + büyük logo, hamburger tam görünür
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    body {
        padding-top: 80px !important;
    }

    .premium-navbar {
        height: 80px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .nav-container {
        height: 80px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: max(8px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(8px, env(safe-area-inset-right, 0px)) !important;
        gap: 5px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .premium-navbar .nav-brand {
        flex: 0 1 auto !important;
        flex-grow: 0 !important;
        max-width: 42vw !important;
        min-width: 0 !important;
    }

    .premium-navbar .nav-brand img,
    .nav-logo-blue {
        height: 78px !important;
        max-height: 78px !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }

    .nav-lang-pill,
    .nav-lang-sep {
        display: none !important;
    }

    .nav-lang-more-btn {
        min-width: 38px !important;
        height: 38px !important;
        padding: 0 9px !important;
    }

    .nav-lang-more-icon i {
        font-size: 1rem !important;
    }

    .nav-search-field {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        border: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .nav-search-form {
        width: 38px !important;
        max-width: 38px !important;
        min-width: 38px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }

    .nav-search-submit {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
    }

    .nav-actions {
        flex: 0 0 auto !important;
        flex-shrink: 0 !important;
        gap: 4px !important;
        margin-left: auto !important;
        overflow: visible !important;
        align-items: center !important;
    }

    .nav-lang-switcher {
        display: inline-flex !important;
        gap: 0 !important;
        flex-shrink: 0 !important;
    }

    .nav-lang-more-btn {
        min-width: 38px !important;
        height: 38px !important;
        padding: 0 9px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border-color: rgba(255, 255, 255, 0.28) !important;
        color: #fff !important;
    }

    .nav-lang-more-icon i {
        font-size: 1rem !important;
    }

    .online-services-btn {
        width: auto !important;
        min-width: 0 !important;
        max-width: min(30vw, 92px) !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 0 7px !important;
        flex-shrink: 1 !important;
        gap: 0 !important;
    }

    .online-services-btn > i,
    .online-services-btn i.fa-th {
        display: none !important;
    }

    .online-services-btn .nav-svc-text {
        display: inline !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        text-align: center !important;
        font-weight: 700 !important;
    }


    .mobile-menu-toggle {
        display: flex !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .nav-menu {
        top: 80px !important;
        height: calc(100dvh - 80px) !important;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 76px !important;
    }

    .premium-navbar,
    .nav-container {
        height: 76px !important;
    }

    .premium-navbar .nav-brand img,
    .nav-logo-blue {
        height: 72px !important;
        max-height: 72px !important;
    }

    .online-services-btn {
        max-width: min(28vw, 84px) !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 6px !important;
    }

    .online-services-btn .nav-svc-text {
        font-size: 8.5px !important;
    }

    .nav-lang-more-btn {
        min-width: 36px !important;
        height: 36px !important;
    }

    .nav-search-form {
        width: 36px !important;
        max-width: 36px !important;
        min-width: 36px !important;
    }
    .nav-search-submit {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
    }

    .mobile-menu-toggle {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    .nav-menu {
        top: 76px !important;
        height: calc(100dvh - 76px) !important;
    }
}
