/* ──────────────────────────────────────────────────────
   BÜTÜN SƏHİFƏLƏR — Ümumi stillər
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 1199px) {
    .page-scaler {
        transform: none !important;
        width: 100% !important;
        min-height: 100vh !important;
        position: relative; /* popup-lar buna görə yerləşir, body-ni uzatmır */
        overflow: hidden;   /* footer altındakı boşluğun qarşısını alır */
    }

    html, body {
        height: auto !important;
        overflow-x: hidden;
        overflow-anchor: none; /* Android scroll anchoring-i söndür — margin dəyişəndə scroll sürüşməsin */
    }
}


/* ──────────────────────────────────────────────────────
   BÜTÜN SƏHİFƏLƏR — .container
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {
    .container {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100vw !important;
        padding: 0 16px;
        box-sizing: border-box;
        flex-direction: column;
        overflow: hidden;
    }
}


/* ──────────────────────────────────────────────────────
   BÜTÜN SƏHİFƏLƏR — Header (partials/front/header.html.php)
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    section.header {
        height: 70px;
        z-index: 110; /* mobile-menu z-index:100-dən yuxarı — hamburger görünsün */
    }

    /* Android banner açıq olduqda header və menü aşağı düşür */
    body.android-banner-open section.header {
        top: 70px !important;
    }

    body.android-banner-open .mobile-menu {
        top: 140px !important;
        height: calc(100vh - 140px) !important;
    }

    body.android-banner-open section.search {
        margin-top: 140px !important;
    }

    section.header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 70px;
        padding: 0 16px;
    }

    section.header img.logo {
        width: 130px;
    }

    /* Desktop nav linkleri mobilda gizledilir,
       evezine hamburger menu acilir */
    section.header .right {
        display: none;
    }

    /* Dil seçicisi — header-də hamburger solunda */
    .header-lang-mobile {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        margin-right: 14px;
    }

    .header-lang-mobile a {
        color: white;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        padding: 4px 7px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.4);
        opacity: 0.7;
    }

    .header-lang-mobile a.active {
        opacity: 1;
        background: rgba(255,255,255,0.2);
        border-color: white;
    }

    /* front.css: div.header_spacer { height: 160px } */
    div.header_spacer {
        height: 70px;
    }
}

/* Hamburger icon — desktop-da gizli, yalniz mobilda gorunur. */
.header-hamburger {
    display: none;
}

@media screen and (max-width: 767px) {
    .header-hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        cursor: pointer;
        z-index: 101;
        flex-shrink: 0;
    }

    .header-hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
}

/* Mobile menu overlay — hamburger-e basilanda acilir. */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px; /* header hündürlüyü ilə uyğun */
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: #4370d8;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    overflow-y: auto;
}

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

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 16px 20px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* Daxil ol / Qeydiyyat düymələri mobile menuda */
.mobile-menu a.button-link {
    margin-top: 10px;
    border: 2px solid white;
    border-radius: 10px;
    width: calc(100% - 40px);
}

/* Desktop-da mobile menu və header dil seçicisi gizli qalir */
@media screen and (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
    .header-lang-mobile {
        display: none !important;
    }
}


/* ──────────────────────────────────────────────────────
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    section.show_content {
        margin-top: 70px !important;
        padding: 20px 0;
    }

    section.show_content .container {
        padding: 24px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        gap: 16px;
    }
}


/* ──────────────────────────────────────────────────────
   BÜTÜN SƏHİFƏLƏR — Footer (footer_dark.html.php / footer_light.html.php)
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    /* front.css: section.footer { height: 370px } */
    section.footer {
        height: auto !important;
        padding: 30px 0 20px;
    }

    section.footer .container {
        flex-direction: column;
        padding: 0 16px;
    }

    /* front.css: section.footer .items { flex-direction: row } */
    section.footer .items {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    /* front.css: section.footer .items .item { height: 200px } */
    section.footer .items .item {
        height: auto;
        max-width: 100%;
        font-size: 16px;
        gap: 12px;
    }

    /* front.css: section.footer .footer_logo { width: 316px } */
    section.footer .footer_logo {
        width: 160px;
        height: auto;
    }

    section.footer .items .item.apps {
        align-items: flex-start;
    }

    section.footer .items .item.apps .apps {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    section.footer .items .item.apps a {
        width: auto;
        height: auto;
    }

    section.footer .items .item.apps a img {
        width: 140px;
        height: auto;
    }

    section.footer hr {
        margin-top: 20px;
    }

    section.footer .copyright {
        font-size: 13px;
        text-align: center;
        padding: 10px 0;
        height: auto;
    }
}


/* ──────────────────────────────────────────────────────
   TripsPlan — trips_plan.html.php
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    section.trips_plan {
        margin-top: 70px !important;
        overflow-x: hidden;
    }

    section.trips_plan .search_box {
        height: auto !important;
        flex-direction: column;
        padding: 15px;
        gap: 12px;
        align-items: stretch;
    }

    section.trips_plan #from_stop_search,
    section.trips_plan #to_stop_search {
        width: 100%;
    }

    section.trips_plan .reverse {
        align-self: center;
    }

    section.trips_plan .btn_search {
        width: 100%;
        height: 50px;
        font-size: 18px;
    }

    section.trips_plan .results {
        width: 100% !important;
        box-sizing: border-box;
        gap: 16px;
    }

    section.trips_plan .results .result {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.trips_plan .result .header {
        height: auto;
        min-height: 56px;
        padding: 12px 52px 12px 15px;
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    section.trips_plan .result .header .btToggle {
        width: 44px;
        height: 100%;
        top: 0;
        right: 0;
        border-radius: 0 10px 10px 0;
    }

    section.trips_plan .result .header .btToggle::before {
        top: 50%;
        left: 50%;
        margin-top: -8px;
        margin-left: -6px;
    }

    section.trips_plan .result .routes {
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    section.trips_plan .result .routes .route {
        height: auto;
        padding: 12px 12px;
        gap: 8px;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
    }

    section.trips_plan .result .route .blue {
        display: none;
    }

    section.trips_plan .result .route > .time {
        flex: 1 1 0;
        min-width: 0;
        align-items: center;
        text-align: center;
    }

    section.trips_plan .result .route > .time > .time {
        font-size: 20px;
        white-space: nowrap;
    }

    section.trips_plan .result .route > .time > .stop {
        font-size: 11px;
        white-space: normal;
        word-break: break-word;
        text-align: center;
    }

    section.trips_plan .result .route .duration {
        flex: 0 0 auto;
    }

    section.trips_plan .result .route .duration .line {
        width: 24px;
    }

    section.trips_plan .result .route .duration .numbers {
        width: 72px;
        font-size: 10px;
        text-align: center;
    }
}


/* ──────────────────────────────────────────────────────
   FAQ — faq.html.php
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    section.faq {
        margin-top: 70px !important;
        margin-bottom: 30px;
    }

    section.faq .container {
        padding: 30px 16px;
        gap: 20px;
    }

    section.faq .caption {
        font-size: 24px;
    }

    section.faq .questions {
        padding: 20px 12px;
        gap: 12px;
    }

    section.faq .question {
        padding: 16px 50px 16px 16px;
    }

    section.faq .question .title {
        font-size: 16px;
    }

    section.faq .question .answer {
        font-size: 15px;
    }

    /* Toggle düyməsinin mövqeyi */
    section.faq .question .toggle {
        right: 12px;
        top: 16px;
        width: 30px;
        height: 20px;
    }
}


/* ──────────────────────────────────────────────────────
   PassengerLogin — login.html.php
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    section.login {
        justify-content: center;
        align-items: flex-start;
        background-position: center;
        min-height: 100vh;
        height: auto;
    }

    section.login .container {
        width: 100% !important;
        min-width: unset !important;
        margin-right: 0;
        background: #FFFFFFCC;
        min-height: 100vh;
    }

    section.login .login_form {
        width: 100%;
        padding: 40px 24px;
    }

    section.login .login_form .title {
        font-size: 28px;
    }
}


/* ──────────────────────────────────────────────────────
   Index — index.html.php
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    /* ── Hero / Search bölməsi ── */

    section.search {
        height: auto !important;
        min-height: 420px;
        margin-top: 70px !important;
        background-position: center;
    }

    section.search .caption {
        font-size: 24px;
        text-align: center;
        padding-top: 24px;
    }

    section.search .search_box {
        flex-direction: column;
        height: auto !important;
        padding: 16px;
        gap: 12px;
        align-items: stretch;
    }

    section.search .reverse {
        align-self: center;
    }

    section.search #from_stop_search,
    section.search #to_stop_search {
        width: 100%;
    }

    .filter_select .selected {
        width: 100%;
        box-sizing: border-box;
    }

    .filter_select:focus-within {
        position: relative;
        z-index: 15;
    }

    section.search .date {
        width: 100%;
        font-size: 16px;
        gap: 8px;
        padding: 0 10px;
    }

    section.search .date input {
        font-size: 16px;
        flex: 1 1 auto;
        min-width: 0;
    }


    section.search .date a {
        width: auto;
        flex-shrink: 0;
        font-size: 12px;
        padding: 0 8px;
        white-space: nowrap;
    }

    section.search .btn_search {
        width: 100%;
        height: 50px;
        font-size: 20px;
    }

    /* ── Map frame — mobil */
    .map_frame {
        top: 70px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        z-index: 115 !important;
    }

    #btn_map_close {
        top: 8px !important;
        right: 10px !important;
    }


    section.search .map {
        margin-top: 20px;
        margin-bottom: 30px;
    }

    section.search .map_button {
        width: auto;
        height: 44px;
        padding: 0 16px;
    }

    /* Mobilda "Xəritə" yazısı gizlədilir */
    section.search .map_button span {
        display: none;
    }

    section.search .map_button img {
        width: 37px;
    }


    /* ── Why Us bölməsi ── */

    section.why_us {
        height: auto !important;
        padding: 40px 0;
    }

    section.why_us div.caption {
        font-size: 28px;
    }

    section.why_us .items .item {
        width: calc(50% - 10px);
    }

    section.why_us .items .item a {
        width: 100%;
    }

    section.why_us .items .item .text {
        width: 100%;
        height: auto;
        padding: 16px;
    }

    section.why_us .items .item .item_caption {
        font-size: 16px;
        width: 100%;
        height: auto;
    }

    section.why_us .items .item .text span {
        font-size: 13px;
        width: 100%;
    }


    /* ── Stats bölməsi ── */

    section.stats {
        height: auto !important;
        padding: 40px 0;
        background-position: center;
    }

    section.stats .caption {
        font-size: 22px;
        gap: 15px;
    }

    section.stats .items .item {
        width: calc(50% - 10px);
        height: auto;
    }

    section.stats .items .item img {
        height: 60px;
    }

    section.stats .items .item .number {
        font-size: 22px;
        height: auto;
    }
}


/* ──────────────────────────────────────────────────────
   TicketSelect Search + Calendar — Tablet (768px – 1199px)
   ────────────────────────────────────────────────────── */
@media screen and (min-width: 768px) and (max-width: 1199px) {

    /* ── MyTickets ── */

    section.tickets {
        padding: 20px 0 40px;
        min-height: unset;
    }

    section.tickets .tab_headers .tab_head {
        width: auto;
        flex: 1 1 0;
        height: 50px;
        font-size: 16px;
    }

    .container {
        width: 100% !important;
        min-width: unset !important;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* ── Header ── */

    section.header {
        height: 90px;
    }

    section.header .container {
        height: 90px;
        padding: 0 20px;
    }

    section.header img.logo {
        width: 160px;
    }

    section.header a.link {
        font-size: 16px;
        height: 46px;
    }

    section.header a.button {
        font-size: 16px;
        width: 120px;
        height: 46px;
    }

    section.header .dropdown {
        font-size: 16px;
    }

    div.header_spacer {
        height: 90px;
    }

    /* ── Index — Search bölməsi ── */

    section.search {
        height: auto !important;
        min-height: 360px;
        margin-top: 90px !important;
        padding: 40px 0;
    }

    section.search .caption {
        font-size: 36px;
        width: 100%;
    }

    section.search .search_box {
        height: auto !important;
        padding: 16px 20px;
        gap: 12px;
        flex-wrap: wrap;
        align-items: center;
    }

    section.search #from_stop_search,
    section.search #to_stop_search {
        flex: 1 1 200px;
        width: auto;
        height: 46px;
    }

    .filter_select {
        display: flex;
        flex-direction: column;
        overflow: visible; /* overflow:hidden popup-u kəsirdi — absolute .popup görünmürdü */
    }

    .filter_select .selected {
        width: 100%;
        height: 100%;
        box-sizing: border-box;
    }

    section.search .date {
        flex: 1 1 200px;
        width: auto;
        height: 46px;
        font-size: 16px;
    }

    section.search .date input {
        font-size: 16px;
        height: 46px;
    }

    section.search .btn_search {
        flex: 0 0 auto;
        width: 160px;
        height: 46px;
        font-size: 18px;
    }

    section.search .map {
        margin-top: 30px;
    }

    /* ── Index — Why Us bölməsi ── */

    section.why_us {
        height: auto !important;
        padding: 40px 0;
    }

    section.why_us div.caption {
        font-size: 36px;
    }

    section.why_us .items .item {
        width: calc(50% - 10px);
    }

    section.why_us .items .item a {
        width: 100%;
    }

    section.why_us .items .item .text {
        width: 100%;
        height: auto;
        padding: 20px;
    }

    section.why_us .items .item .item_caption {
        font-size: 20px;
        width: 100%;
        height: auto;
    }

    section.why_us .items .item .text span {
        font-size: 16px;
        width: 100%;
    }

    /* ── Index — Stats bölməsi ── */

    section.stats {
        height: auto !important;
        padding: 40px 0;
    }

    section.stats .caption {
        font-size: 28px;
    }

    section.stats .items .item {
        width: calc(50% - 10px);
        height: auto;
        padding: 20px;
    }

    section.stats .items .item img {
        height: 70px;
    }

    section.stats .items .item .number {
        font-size: 28px;
        height: auto;
    }

    section.search.ticket_select {
        height: auto;
        min-height: unset !important;
        padding: 10px 0;
        margin-top: 90px !important;
    }

    section.search.ticket_select .search_box {
        height: auto !important;
        padding: 16px 24px;
        gap: 12px;
        flex-wrap: wrap;
        align-items: center;
    }

    section.search.ticket_select #from_stop_search,
    section.search.ticket_select #to_stop_search {
        flex: 1 1 200px;
        width: auto;
        height: 46px;
    }

    section.search.ticket_select .date {
        flex: 1 1 200px;
        width: auto;
        height: 46px;
        font-size: 16px;
        padding: 6px 12px;
        box-sizing: border-box;
    }

    section.search.ticket_select .date input {
        font-size: 16px;
        height: 100%;
        padding: 0 28px;
    }

    section.search.ticket_select .date a {
        font-size: 13px;
        width: auto;
        white-space: nowrap;
        padding: 0 8px;
        height: 100%;
    }

    section.search.ticket_select .btn_search {
        flex: 0 0 auto;
        width: 160px;
        height: 46px;
        font-size: 18px;
    }


    section.calendar.ticket_select {
        height: 130px;
    }

    section.calendar.ticket_select .container {
        gap: 16px;
    }

    section.calendar.ticket_select .date.d-3,
    section.calendar.ticket_select .date.d_3 {
        display: none;
    }

    section.calendar.ticket_select .date {
        width: 90px;
        height: 32px;
        font-size: 13px;
        border-radius: 8px;
    }

    section.calendar.ticket_select .date.d_0 {
        width: 130px;
        height: 44px;
        font-size: 18px;
    }

    section.calendar.ticket_select .left,
    section.calendar.ticket_select .right {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    section.calendar.ticket_select .left::before,
    section.calendar.ticket_select .right::before {
        width: 14px;
        height: 14px;
        top: 11px;
        left: 11px;
        border-width: 2px;
    }

    /* ── Result kartları ── */

    section.ticket_select .results {
        width: 100% !important;
        box-sizing: border-box;
        gap: 12px;
    }

    section.ticket_select .results .result {
        width: 100% !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    section.ticket_select .result .header {
        width: 100%; /* .result align-items:center — header content-width-ə daralmasın */
        height: auto;
        min-height: 140px;
    }

    section.ticket_select .result .header .trip_name {
        width: auto !important;
        flex: 1 1 0;
        min-width: 0;
        height: auto;
        padding: 20px 24px 10px 24px;
        box-sizing: border-box;
        gap: 12px;
    }

    section.ticket_select .result .header .price_button {
        width: 200px !important;
        flex: 0 0 200px;
        height: auto;
        min-height: 140px;
        gap: 8px;
    }

    section.ticket_select .result .header .price_button .price {
        font-size: 28px;
    }

    section.ticket_select .result .header .price_button .button {
        width: 100%;
        height: auto;
        gap: 6px;
    }

    section.ticket_select .result .header .price_button .button button.select_trip {
        width: 160px;
        height: 46px;
        font-size: 16px;
    }

    section.ticket_select .result .header .price_button .button .sub_place {
        width: 100%;
        height: auto;
        font-size: 13px;
        white-space: normal;
        text-align: center;
    }

    section.ticket_select .result .header .trip_name div.route {
        height: auto;
        gap: 8px;
    }

    section.ticket_select .result div.route > div > div:first-child {
        font-size: 22px;
        height: auto;
    }

    section.ticket_select .result div.route > div > div:last-child {
        font-size: 15px;
        height: auto;
    }

    section.ticket_select .result .header .trip_name .links a {
        font-size: 14px;
    }

    section.ticket_select .result .body {
        width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    section.ticket_select .result .ticket_select {
        flex-direction: row;
        width: 100%;
    }

    section.ticket_select .result .ticket_select .left {
        flex: 1 1 0;
        width: auto !important;
        height: auto;
        min-height: 400px;
        padding: 20px 24px;
        gap: 16px;
        box-sizing: border-box;
        min-width: 0;
    }

    section.ticket_select .result .ticket_select .left .bus_structure {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        height: auto;
        min-height: 200px;
    }

    section.ticket_select .result .ticket_select .left .bus_structure .bus_scheme {
        zoom: 0.8;
    }
    section.ticket_select .result .ticket_select .left .bus_dqn,
    section.ticket_select .result .ticket_select .left .bus_info {
        height: 48px;
        font-size: 15px;
    }

    section.ticket_select .result .ticket_select .right {
        flex: 0 0 260px;
        width: 260px !important;
        height: auto;
        min-height: 400px;
        padding: 20px 16px;
        box-sizing: border-box;
    }

    section.ticket_select .result .ticket_select .right .ticket_icons {
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .foreign_check {
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .foreign_check_row {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .foreign_check_row .foreign_check {
        width: auto;
    }

    section.ticket_select .result .ticket_select .right .custom_select_wrap {
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .info {
        width: 100%;
        font-size: 15px;
        height: auto;
    }

    section.ticket_select .result .ticket_select .right .input {
        width: 100%;
        box-sizing: border-box;
    }

    section.ticket_select .result .ticket_select .right .row {
        width: 100%;
    }

    section.ticket_select #loading_screen {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* ── Footer ── */

    section.footer {
        height: auto !important;
        padding: 30px 0 16px;
    }

    section.footer .items {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: flex-start;
    }

    section.footer .items .item {
        font-size: 16px;
        flex: 1 1 180px;
        max-width: none;
        height: auto;
        gap: 10px;
    }

    section.footer .footer_logo {
        width: 180px;
        height: auto;
    }

    section.footer .items .item.apps a {
        width: auto;
        height: auto;
    }

    section.footer .items .item.apps a img {
        width: 120px;
        height: auto;
    }

    section.footer .items .item.links {
        gap: 8px;
    }

    section.footer .items .item.links a {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    section.footer .items .item.links a img {
        width: 10px;
        height: auto;
        flex-shrink: 0;
    }

    section.footer .copyright {
        height: auto;
        font-size: 13px;
        text-align: center;
        padding: 10px 0;
    }

    /* ── TripsPlan — 768px–1199px ── */

    section.trips_plan {
        margin-top: 90px !important;
    }

    section.trips_plan .search_box {
        height: auto !important;
        padding: 16px 20px;
        gap: 12px;
        flex-wrap: wrap;
        align-items: center;
    }

    section.trips_plan #from_stop_search,
    section.trips_plan #to_stop_search {
        flex: 1 1 200px;
        width: auto;
        height: 46px;
    }

    section.trips_plan .btn_search {
        flex: 0 0 auto;
        width: 160px;
        height: 46px;
        font-size: 18px;
    }

    section.trips_plan .results {
        width: 100% !important;
        box-sizing: border-box;
        gap: 20px;
    }

    section.trips_plan .results .result {
        width: 100% !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    section.trips_plan .result .header {
        height: auto;
        min-height: 56px;
        padding: 12px 60px 12px 20px;
        font-size: 16px;
        flex-wrap: wrap;
        gap: 4px;
    }

    section.trips_plan .result .header .btToggle {
        width: 50px;
        height: 100%;
        top: 0;
        right: 0;
        border-radius: 0 10px 10px 0;
    }

    section.trips_plan .result .header .btToggle::before {
        top: 50%;
        left: 50%;
        margin-top: -6px;
        margin-left: -6px;
    }

    section.trips_plan .result .routes .route {
        height: auto;
        padding: 14px 20px;
        gap: 12px;
        box-sizing: border-box;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }

    section.trips_plan .result .route > .time > .time {
        font-size: 22px;
    }

    section.trips_plan .result .route > .time > .stop {
        font-size: 14px;
    }

    section.trips_plan .result .route .duration .line {
        width: 60px;
    }

    section.trips_plan .result .route .duration .numbers {
        width: 140px;
    }

    /* ── TicketSelect — Sefer Melumat footer (768px–1199px) ── */

    section.ticket_select .result .footer {
        padding: 20px 24px;
        box-sizing: border-box;
        width: 100%;
    }

    section.ticket_select .result .footer .trip_plan > .header {
        height: 46px;
        min-height: 46px;
        position: relative;
    }

    section.ticket_select .result .footer .trip_plan .header .title {
        font-size: 16px;
        padding: 0 56px 0 46px;
    }

    section.ticket_select .result .footer .trip_plan .header .btn_toggle {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }

    section.ticket_select .result .footer .trip_plan.active .header .btn_toggle {
        border-bottom-right-radius: 0;
    }

    section.ticket_select .result .footer .trip_plan.active .body {
        padding: 8px 0;
        gap: 0;
    }

    section.ticket_select .result .footer .trip_plan .body .line.header {
        min-height: 0;
        height: auto;
    }

    section.ticket_select .result .footer .trip_plan .body .line {
        padding: 6px 16px;
        gap: 6px;
        align-items: flex-start; /* mətn wraplandıqda sütunlar yuxarıdan hizalanır */
    }

    section.ticket_select .result .footer .trip_plan .body .line > div {
        font-size: 14px;
        min-width: 0;
        white-space: normal;        /* mətn wrap olsun */
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Vaxt sütunu */
    section.ticket_select .result .footer .trip_plan .body .line > div:first-child {
        width: 18%;
        flex-shrink: 0;
    }

    /* İstiqamət sütunu */
    section.ticket_select .result .footer .trip_plan .body .line > div:nth-child(2) {
        width: 48%;
    }

    /* Dayanacaq sütunu */
    section.ticket_select .result .footer .trip_plan .body .line > div:last-child {
        width: 34%;
    }

    /* Pin ikonu yeri */
    section.ticket_select .result .footer .trip_plan .body .line.main_route > div:last-child::before {
        left: -20px;
        width: 18px;
        height: 18px;
        background-size: contain; /*  SVG-nin böyük render olmasını önləyir */
        background-repeat: no-repeat;
    }
}

/* ──────────────────────────────────────────────────────
   TicketSelect — ticket_select.html.php
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    section.search.ticket_select,
    section.calendar.ticket_select,
    section.ticket_select {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* ── Search bölməsi ── */

    section.search.ticket_select {
        height: auto;
        min-height: 0 !important;
        padding: 15px 0 6px;
    }

    section.search.ticket_select .search_box {
        flex-direction: column;
        height: auto !important;
        padding: 15px;
        gap: 12px;
        align-items: stretch;
        box-sizing: border-box;
    }

    /* ── Calendar bölməsi ── */

    section.calendar.ticket_select {
        height: auto;
        min-height: auto;
        padding: 6px 0 14px;
    }

    section.calendar.ticket_select .container {
        gap: 5px;
        padding: 0 8px;
        box-sizing: border-box;
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: hidden;
    }

    /* Mobilda yalnız d-1, d_0, d_1 görünsün */
    section.calendar.ticket_select .date.d-3,
    section.calendar.ticket_select .date.d-2,
    section.calendar.ticket_select .date.d_2,
    section.calendar.ticket_select .date.d_3 {
        display: none;
    }

    section.calendar.ticket_select .date {
        width: 58px;
        height: 30px;
        font-size: 10px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    section.calendar.ticket_select .date.d_0 {
        width: 100px;
        height: 40px;
        font-size: 13px;
    }

    section.calendar.ticket_select .left,
    section.calendar.ticket_select .right {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    section.calendar.ticket_select .left::before,
    section.calendar.ticket_select .right::before {
        width: 11px;
        height: 11px;
        top: 8px;
        left: 8px;
        border-width: 2px;
    }


    /* ── Result kartları — header ── */

    section.ticket_select .result .header {
        flex-direction: column;
        height: auto;
        padding: 0;
        gap: 0;
        width: 100% !important;
    }

    section.ticket_select .result .header .trip_name {
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        padding: 15px;
        box-sizing: border-box;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    section.ticket_select .result .header .price_button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        height: auto;
        padding: 10px 15px 12px 15px;
        border-left: none;
        gap: 6px;
    }

    section.ticket_select .result .header .price_button .price {
        font-size: 24px;
        line-height: 1;
        width: 100%;
        text-align: center;
    }

    section.ticket_select .result .header .price_button .button .sub_place img {
        width: 16px;
        height: 16px;
        margin-bottom: 0;
        vertical-align: middle;
    }

    section.ticket_select .result .header .price_button .button {
        width: 100% !important;
        height: auto;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding-top: 0;
        box-sizing: border-box;
    }

    section.ticket_select .result .header .price_button .button button.select_trip {
        width: 100% !important;
        height: 40px;
        font-size: 13px;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    section.ticket_select .result .header .price_button .button .sub_place {
        width: 100%;
        font-size: 11px;
        white-space: normal;
        text-align: center;
        overflow: visible;
        line-height: 1.3;
        max-width: none;
    }

    section.ticket_select .result .header .trip_name .links {
        height: auto;
        flex-direction: column;
        /*align-items: flex-start; */ /* Sola yapışdır */
        align-items: center;
        gap: 4px;
    }

    section.ticket_select .result .header .trip_name .links div {
        width: auto;
        border: none;
    }

    section.ticket_select .result .header .trip_name .links a {
        font-size: 12px;
    }

    section.ticket_select .result .header .trip_name div.route {
        height: auto;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
        justify-content: flex-start;
    }

    section.ticket_select .result div.route > div {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 40%;
        text-wrap: wrap;
        overflow-wrap: break-word;
        word-break: break-word;
        align-items: center;
    }

    section.ticket_select .result div.route > div:nth-child(2n) {
        flex: 1 1 0;
        min-width: 60px;
        max-width: none;
        align-items: center;
    }

    section.ticket_select .result div.route > div.half {
        flex: 0 0 20px;
        min-width: 20px;
        max-width: 20px;
    }

    section.ticket_select .result div.route > div > div:first-child {
        font-size: 16px;
        height: auto;
        text-align: center;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        width: 100%;
    }

    section.ticket_select .result div.route > div > div:last-child {
        font-size: 12px;
        height: auto;
        text-align: center;
        white-space: normal;
        width: 100%;
    }

    section.ticket_select .result div.route > div:last-child > div:first-child {
        text-align: left;
    }
    section.ticket_select .result div.route > div:first-child > div:first-child {
        text-align: right;
    }

    section.ticket_select .results {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
        gap: 15px;
    }

    section.ticket_select .results .result {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    section.ticket_select #loading_screen {
        width: 100% !important;
        box-sizing: border-box;
    }


    /* ── Result body (avtobus + sərnişin formu) ── */

    section.ticket_select .result .body {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    section.ticket_select .result .ticket_select {
        flex-direction: column;
    }

    section.ticket_select .result .ticket_select .left {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        height: auto;
        padding: 15px;
        gap: 12px;
    }

    section.ticket_select .result .ticket_select .left .bus_structure {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        height: auto;
        min-height: 180px;
    }

    section.ticket_select .result .ticket_select .left .bus_structure .bus_scheme {
        zoom: 0.65;
    }
    section.ticket_select .result .ticket_select .left .bus_dqn,
    section.ticket_select .result .ticket_select .left .bus_info {
        height: 36px;
        font-size: 13px;
    }

    section.ticket_select .result .ticket_select .right {
        width: 100%;
        height: auto;
        padding: 15px;
        border-top: 1px solid #e0e0e0;
        box-sizing: border-box;
    }

    section.ticket_select .result .ticket_select .right .ticket_icons {
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .foreign_check {
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .foreign_check_row {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .foreign_check_row .foreign_check {
        width: auto;
    }

    section.ticket_select .result .ticket_select .right .custom_select_wrap {
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .custom_select_trigger {
        height: 46px;
        font-size: 15px;
    }

    section.ticket_select .result .ticket_select .right .custom_select_option {
        font-size: 15px;
        padding: 12px 16px;
    }

    section.ticket_select .result .ticket_select .right .info {
        width: 100%;
    }

    section.ticket_select .result .ticket_select .right .input {
        width: 100%;
        box-sizing: border-box;
    }

    section.ticket_select .result .ticket_select .right .row {
        width: 100%;
        flex-wrap: wrap;
    }

    section.ticket_select .result .ticket_select .right button {
        width: 100%;
    }

    /* Safari mobile — input/select öz default görünüşünü tətbiq edir, sıfırla */
    section.ticket_select .result .ticket_select .right .input input,
    section.ticket_select .result .ticket_select .right .input select {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
        background: transparent;
        font-size: 16px; /* iOS Safari < 16px olduqda avtomatik zoom edir */
        box-shadow: none;
        -webkit-box-shadow: none;
    }

    section.ticket_select .result .ticket_select .right .input select#saved_doc_select {
        width: 100%;
        height: 48px;
        border-radius: 10px;
        padding: 0 10px;
    }

    section.ticket_select .result .ticket_select .right .input select#vetandashliq {
        border-radius: 10px;
        padding: 0 10px;
    }


    /* ── Trip Plan (marşrut planı) ── */

    section.ticket_select .result .footer {
        padding: 12px 8px;
        box-sizing: border-box;
        width: 100%;
    }

    section.ticket_select .result .footer .trip_plan .header .title {
        font-size: 15px;
        padding: 0 40px 0 46px;
    }

    section.ticket_select .result .footer .trip_plan.active .body {
        padding: 15px 0;
        gap: 0;
    }

    section.ticket_select .result .footer .trip_plan .body .line {
        padding: 6px 10px;
        gap: 4px;
        align-items: flex-start; /* mətn wraplandıqda sütunlar yuxarıdan hizalanır */
    }

    section.ticket_select .result .footer .trip_plan .body .line > div {
        font-size: 12px;
        min-width: 0;
        white-space: normal;        /* mətn wrap olsun */
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Vaxt sütunu */
    section.ticket_select .result .footer .trip_plan .body .line > div:first-child {
        width: 20%;
        flex-shrink: 0;
    }

    /* İstiqamət sütunu */
    section.ticket_select .result .footer .trip_plan .body .line > div:nth-child(2) {
        width: 46%;
    }

    /* Dayanacaq sütunu */
    section.ticket_select .result .footer .trip_plan .body .line > div:last-child {
        width: 34%;
    }

    /* Pin ikonu yerini dəyiş */
    section.ticket_select .result .footer .trip_plan .body .line.main_route > div:last-child::before {
        left: -18px;
        width: 16px;
        height: 16px;
        background-size: contain; /*  SVG-nin böyük render olmasını önləyir */
        background-repeat: no-repeat;
    }


    /* ── Popuplar ── */

    /* Inner .popup mobil ucun tam genislik */
    .popup_alert .popup {
        width: calc(100vw - 32px) !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        height: auto !important;
        min-height: 240px;
        padding: 20px !important;
        box-sizing: border-box !important;
    }

    /* Outline z-index-i yükselt ki, hər şeyin üstündə görünsün */
    .popup_alert .outline {
        z-index: 998 !important;
    }

    /* Popup content outline-dan yuxarı */
    .popup_alert .popup {
        z-index: 999 !important;
    }

    #popup_qarabag .popup,
    #popup_fin .popup,
    #popup_fin4 .popup {
        width: calc(100vw - 32px) !important;
        height: auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        min-height: 240px;
    }

    #popup_blacklist .popup {
        width: 100%;
        height: auto;
        min-height: 0;
    }

    /* popup.text fixed genislik override */
    .popup_alert.doc .popup .text {
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .popup_alert.doc .popup .text .close_icon {
        right: 0 !important;
        top: 0 !important;
    }

    .popup_alert.doc .popup .text img {
        height: 140px;
        width: auto;
        max-width: 100%;
    }

    .popup_alert.doc .row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .popup_alert .popup .icon {
        width: 48px;
        height: 48px;
        font-size: 48px;
        line-height: 48px;
        flex-shrink: 0;
    }

    .popup_alert.success .popup .icon:after {
        width: 15px;
        height: 26px;
        border-bottom: 6px solid white;
        border-right: 6px solid white;
        top: 6px;
        left: 13px;
    }

    .popup_alert .popup .text {
        width: 100%;
        height: auto !important;
        overflow-wrap: break-word;
        word-break: break-word;
        font-size: 15px;
    }

    .popup_alert .popup .buttons {
        width: 100% !important;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .popup_alert button {
        width: 100% !important;
        height: 44px !important;
        font-size: 15px !important;
        box-sizing: border-box;
    }

    .popup_alert .ok_button,
    .popup_alert .confirm_button {
        width: 100%;
        box-sizing: border-box;
    }

}

@media screen and (max-width: 767px) {

    section.tickets {
        padding: 20px 0 40px;
    }

    section.tickets .container {
        overflow: visible;
    }

    section.tickets .tab_headers {
        gap: 8px;
        flex-wrap: nowrap;
        margin-bottom: 16px;
    }

    section.tickets .tab_headers .tab_head {
        flex: 1 1 0;
        width: auto;
        height: 44px;
        font-size: 13px;
        min-width: 0;
        padding: 0 8px;
        box-sizing: border-box;
        border-radius: 10px;
    }

    /* ── Cədvəl → Kart çevrilməsi ── */

    section.tickets .table table thead {
        display: none;
    }

    section.tickets .table table {
        border: none;
    }

    section.tickets .table table,
    section.tickets .table table tbody {
        display: block;
        width: 100%;
    }

    /* Hər sıra: ayrıca kart */
    section.tickets .table table tbody tr.line {
        display: flex;
        flex-direction: column;
        height: auto;
        background: white;
        border: 1.5px solid #d0dcf5;
        border-radius: 14px;
        margin-bottom: 12px;
        padding: 0;
        box-sizing: border-box;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(67, 112, 216, 0.08);
    }

    /* Bütün xanalar sıfırlanır */
    section.tickets .table table tbody td {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        border-bottom: 1px solid #eef2fb;
        padding: 9px 14px;
        font-size: 14px;
        color: #222;
        min-height: unset;
        box-sizing: border-box;
        gap: 8px;
    }

    section.tickets .table table tbody tr.line td:last-child {
        border-bottom: none;
    }

    section.tickets .table table tbody td::before {
        font-weight: 600;
        color: #4370D8;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 70px;
    }

    /* ── Ad Soyad — hər iki cədvəl üçün ── */
    /* Kart başlığı kimi göstərilir — mavi fon, ağ mətn */
    section.tickets .table table tbody td:nth-child(1) {
        background: #4370D8;
        color: white;
        font-size: 14px;
        font-weight: 600;
        padding: 10px 14px;
        border-bottom: none;
        justify-content: flex-start;
    }
    section.tickets .table table tbody td:nth-child(1)::before {
        content: none;
    }

    /* ── Marşrut — hər iki cədvəl üçün ── */
    section.tickets .table table tbody td.route {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 14px;
        background: #f7f9ff;
        border-bottom: 1px solid #eef2fb;
    }
    section.tickets .table table tbody td.route::before {
        content: none;
    }

    /* Marşrut daxili div */
    section.tickets .table table tbody td.route > div {
        text-wrap: wrap;
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 2px;
        flex-wrap: nowrap;
    }

    /* Şəhər adı */
    section.tickets .table table tbody td.route > div > div > div:first-child {
        font-size: 14px;
        font-weight: 600;
        color: #222;
    }

    /* Saat */
    section.tickets .table table tbody td.route > div > div > div:last-child {
        font-size: 11px;
        color: #4370D8;
    }

    /* Ox şəkli */
    section.tickets .table table tbody td.route > div > div img {
        width: 28px;
        height: auto;
    }

    /* ── Cari biletlər: trip_date (3-cü td) ── */
    .table[data-id="current"] table tbody td:nth-child(3)::before {
        content: "Tarix";
    }
    .table[data-id="current"] table tbody td:nth-child(3) {
        color: #333;
        font-weight: 500;
    }

    /* ── Cari biletlər: Yer (4-cü td) ── */
    .table[data-id="current"] table tbody td:nth-child(4)::before {
        content: "Yer";
    }

    /* ── Cari biletlər: Qiymət (5-ci td) ── */
    .table[data-id="current"] table tbody td:nth-child(5)::before {
        content: "Qiymət";
    }
    .table[data-id="current"] table tbody td:nth-child(5) {
        font-weight: 600;
        color: #222;
    }

    /* ── Cari biletlər: E-bilet PDF (6-cı td) ── */
    .table[data-id="current"] table tbody td:nth-child(6)::before {
        content: "E-bilet";
    }
    .table[data-id="current"] table tbody td:nth-child(6) {
        justify-content: space-between;
    }

    /* ── Cari biletlər: Qaytarma düyməsi (7-ci td) ── */
    .table[data-id="current"] table tbody td:nth-child(7) {
        padding: 10px 14px;
        justify-content: center;
        border-bottom: none;
        background: #fafbff;
    }
    .table[data-id="current"] table tbody td:nth-child(7)::before {
        content: none;
    }

    /* ── Tarixçə: Tarix (3-cü td) ── */
    .table[data-id="history"] table tbody td:nth-child(3)::before {
        content: "Tarix";
    }
    .table[data-id="history"] table tbody td:nth-child(3) {
        font-weight: 500;
        color: #333;
    }

    /* ── Tarixçə: Qayıdış tarixi (4-cü td) ── */
    .table[data-id="history"] table tbody td:nth-child(4)::before {
        content: "Qayıdış";
    }

    /* ── Tarixçə: Yer (5-ci td) ── */
    .table[data-id="history"] table tbody td:nth-child(5)::before {
        content: "Yer";
    }

    /* ── Tarixçə: Qiymət (6-cı td) ── */
    .table[data-id="history"] table tbody td:nth-child(6)::before {
        content: "Qiymət";
    }
    .table[data-id="history"] table tbody td:nth-child(6) {
        font-weight: 600;
        color: #222;
    }

    /* ── Tarixçə: Qaytarılan məbləğ (7-ci td) ── */
    .table[data-id="history"] table tbody td:nth-child(7)::before {
        content: "Qaytarılan";
    }

    /* ── Tarixçə: Status (8-ci td) ── */
    .table[data-id="history"] table tbody td:nth-child(8) {
        justify-content: center;
        border-bottom: none;
        background: #fafbff;
    }
    .table[data-id="history"] table tbody td:nth-child(8)::before {
        content: none;
    }

    /* ── Qaytarma düyməsi ── */
    section.tickets .table table tbody td a.bt-return {
        width: 100%;
        text-align: center;
        font-size: 13px;
        box-sizing: border-box;
    }

    /* ── Qaytarıldı statusu ── */
    section.tickets .table table span.returned {
        font-size: 13px;
        padding: 4px 14px;
    }

    /* ── PDF linki ── */
    section.tickets .table table tbody td a.pdf {
        margin: 0;
        width: 44px;
        height: 44px;
    }

    section.tickets .table table tbody td a.pdf img {
        width: 32px;
        height: 32px;
    }

}

/* front.css: .bi-circle div { font-size: 12px; width: 120px; left: calc(50% - 60px); top: -15px } */
/*.bi-circle div {*/
/*    font-size: 10px;*/
/*    width: 80px;*/
/*    left: calc(50% - 40px);*/
/*    top: -12px;*/
/*}*/

.bi-circle div {
    position: absolute;
    /* Sabit width (80px/120px) silindi */
    width: max-content; /* İçindəki yazı qədər genişlənir */
    min-width: 30px;    /* Çox kiçik olmasın deyə minimum ölçü */
    padding: 2px 8px;   /* Kənarlardan boşluq (dairəvi formanı qorumaq üçün) */

    font-size: 10px;
    color: #757575;
    background: white;
    border: 1px solid #757575;
    border-radius: 12px;
    text-align: center;
    z-index: 10;

    /* Ortalanma üçün yeni qayda */
    left: 50%;
    transform: translateX(-50%); /* Tam mərkəzə gətirir */
    top: -12px; /* Oxun üstündə dayanması üçün */
}


/* Android WEB BANNER*/
.custom-app-banner {
    display: none; /* JS ilə yalnız Android-də açılacaq */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #f1f1f1;
    border-bottom: 1px solid #ccc;
    z-index: 105; /* header z-index:110-dan aşağı — üst-üstə düşsə header qalib gəlir */
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.banner-close {
    font-size: 24px;
    color: #888;
    margin-right: 10px;
    cursor: pointer;
}

.app-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.app-info {
    flex: 1;
}

.app-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.app-author {
    font-size: 11px;
    color: #666;
}

.app-price {
    font-size: 10px;
    color: #999;
}

.app-get-btn {
    background: transparent;
    color: #4370d8;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ──────────────────────────────────────────────────────
   TicketSelect — Result Header (768px – 991px)
   ────────────────────────────────────────────────────── */
@media screen and (min-width: 768px) and (max-width: 991px) {

    /* ── Android banner açıq olduqda header aşağı düşsün ── */
    body.android-banner-open section.header {
        top: 70px !important;
    }

    body.android-banner-open .mobile-menu {
        top: 140px !important;
        height: calc(100vh - 140px) !important;
    }

    body.android-banner-open section.search {
        margin-top: 140px !important;
    }

    /* ── Header — dropdown + ikonlar ── */

    section.header .right {
        gap: 10px;
    }

    section.header a.link img {
        width: 44px;
        height: 44px;
    }

    section.header .dropdown .caption img {
        width: 40px !important;
        height: 40px !important;
    }

    section.header .dropdown .items {
        top: 90px;
    }

    section.ticket_select .result .header {
        width: 100%; /* .result align-items:center — header content-width-ə daralmasın */
        height: auto;
        min-height: 130px;
    }

    section.ticket_select .result .header .trip_name {
        flex: 7 1 0 !important;
        width: auto !important;
        min-width: 0;
        height: auto;
        padding: 16px 20px 10px 20px;
        box-sizing: border-box;
        gap: 10px;
    }

    section.ticket_select .result .header .price_button {
        flex: 3 0 0 !important;
        width: auto !important;
        height: auto;
        min-height: 130px;
        gap: 8px;
        padding: 12px;
        box-sizing: border-box;
    }

    section.ticket_select .result .header .price_button .price {
        font-size: 26px;
    }

    section.ticket_select .result .header .price_button .button {
        width: 100%;
        height: auto;
        gap: 6px;
    }

    section.ticket_select .result .header .price_button .button button.select_trip {
        width: 150px;
        height: 44px;
        font-size: 15px;
    }

    section.ticket_select .result .header .price_button .button .sub_place {
        width: 100%;
        height: auto;
        font-size: 12px;
        white-space: normal;
        text-align: center;
    }

    section.ticket_select .result .header .trip_name div.route {
        height: auto;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    section.ticket_select .result div.route > div {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 35%;
        align-items: flex-start;
        text-wrap: wrap;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    section.ticket_select .result div.route > div:nth-child(2n) {
        flex: 1 1 0;
        width: auto;
        min-width: 60px;
        max-width: none;
        align-items: center;
    }

    section.ticket_select .result div.route > div.half {
        flex: 0 0 24px;
        min-width: 24px;
        max-width: 24px;
    }

    section.ticket_select .result div.route > div > div:first-child {
        font-size: 20px;
        height: auto;
        width: 100%;
    }

    section.ticket_select .result div.route > div > div:last-child {
        font-size: 14px;
        height: auto;
        width: 100%;
    }

    section.ticket_select .result .header .trip_name .links a {
        font-size: 13px;
    }

    /* ── Popuplar ── */
    .popup_alert.doc .popup {
        width: calc(100vw - 40px) !important;
        height: auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        box-sizing: border-box !important;
    }

    .popup_alert.doc .popup .text {
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .popup_alert.doc .popup .text img {
        height: 180px;
        width: auto;
        max-width: 100%;
    }

    .popup_alert.doc .row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .popup_alert.doc .popup .text .close_icon {
        right: 0 !important;
    }

    .popup_alert .outline {
        z-index: 998 !important;
    }

    .popup_alert .popup {
        z-index: 999 !important;
    }
}

/* ──────────────────────────────────────────────────────
   TicketSelect — Result Header (992px – 1199px)
   ────────────────────────────────────────────────────── */
@media screen and (min-width: 992px) and (max-width: 1199px) {

    /* ── Android banner açıq olduqda header aşağı düşsün ── */
    body.android-banner-open section.header {
        top: 70px !important;
    }

    body.android-banner-open .mobile-menu {
        top: 140px !important;
        height: calc(100vh - 140px) !important;
    }

    body.android-banner-open section.search {
        margin-top: 140px !important;
    }

    /* ── Header — dropdown + ikonlar ── */

    section.header a.link img {
        width: 48px;
        height: 48px;
    }

    section.header .dropdown .caption img {
        width: 46px !important;
        height: 46px !important;
    }

    section.header .dropdown .items {
        top: 90px;
    }

    section.ticket_select .result .header {
        width: 100%; /* .result align-items:center — header content-width-ə daralmasın */
        height: auto;
        min-height: 160px;
    }

    section.ticket_select .result .header .trip_name {
        flex: 7 1 0 !important;
        width: auto !important;
        min-width: 0;
        height: auto;
        padding: 24px 32px 12px 32px;
        box-sizing: border-box;
        gap: 14px;
    }

    section.ticket_select .result .header .price_button {
        flex: 3 0 0 !important;
        width: auto !important;
        height: auto;
        min-height: 160px;
        gap: 10px;
        padding: 16px;
        box-sizing: border-box;
    }

    section.ticket_select .result .header .price_button .price {
        font-size: 32px;
    }

    section.ticket_select .result .header .price_button .button {
        width: 100%;
        height: auto;
        gap: 8px;
    }

    section.ticket_select .result .header .price_button .button button.select_trip {
        width: 180px;
        height: 52px;
        font-size: 18px;
    }

    section.ticket_select .result .header .price_button .button .sub_place {
        width: 100%;
        height: auto;
        font-size: 14px;
        white-space: normal;
        text-align: center;
    }

    section.ticket_select .result .header .trip_name div.route {
        height: auto;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    section.ticket_select .result div.route > div {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 35%;
        align-items: flex-start;
        text-wrap: wrap;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    section.ticket_select .result div.route > div:nth-child(2n) {
        flex: 1 1 0;
        width: auto;
        min-width: 80px;
        max-width: none;
        align-items: center;
    }

    section.ticket_select .result div.route > div.half {
        flex: 0 0 28px;
        min-width: 28px;
        max-width: 28px;
    }

    section.ticket_select .result div.route > div > div:first-child {
        font-size: 26px;
        height: auto;
        width: 100%;
    }

    section.ticket_select .result div.route > div > div:last-child {
        font-size: 18px;
        height: auto;
        width: 100%;
    }

    section.ticket_select .result .header .trip_name .links a {
        font-size: 15px;
    }

    /* ── Popuplar ── */
    .popup_alert.doc .popup {
        width: calc(100vw - 60px) !important;
        height: auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        box-sizing: border-box !important;
    }

    .popup_alert.doc .popup .text {
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .popup_alert.doc .popup .text img {
        height: 200px;
        width: auto;
        max-width: 100%;
    }

    .popup_alert.doc .row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .popup_alert.doc .popup .text .close_icon {
        right: 0 !important;
    }

    .popup_alert .outline {
        z-index: 998 !important;
    }

    .popup_alert .popup {
        z-index: 999 !important;
    }
}


/* ──────────────────────────────────────────────────────
   Feedback / Contacts — feedback.html.php
   ────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    section.contacts {
        margin-top: 70px !important;
        padding-bottom: 40px;
    }

    section.contacts .container {
        padding: 20px 0;
        overflow: visible;
        align-items: stretch;
    }

    /* form elementi tam genişlik tutsun */
    section.contacts .container form {
        width: 100%;
    }

    /* ── Tab düymələri ── */

    section.contacts .tab_headers {
        gap: 6px;
        height: auto;
        flex-wrap: nowrap;
        margin-bottom: 12px;
    }

    section.contacts .tab_headers .tab_head {
        flex: 1 1 0;
        width: auto;
        height: 44px;
        font-size: 12px;
        min-width: 0;
        padding: 0 6px;
        box-sizing: border-box;
        border-radius: 8px 8px 0 0;
    }

    /* ── Stansiyalar tab — axtarış ── */

    section.contacts .searchbar {
        width: 100%;
        box-sizing: border-box;
        /* icon üçün sol boşluq, sağda 0 — button flex ilə yapışır */
        padding: 0 0 0 40px;
        height: 44px;
        overflow: hidden;
    }

    section.contacts .searchbar::before {
        top: 50%;
        transform: translateY(-50%);
    }

    /* Input qalan bütün genişliyi tutur */
    section.contacts .searchbar input {
        flex: 1 1 0;
        min-width: 0;
        font-size: 14px;
        padding: 0 8px;
    }

    section.contacts .searchbar button {
        position: static;
        height: 44px;
        width: 76px;
        font-size: 12px;
        border-radius: 0 10px 10px 0;
        flex-shrink: 0;
    }

    /* ── Stansiyalar cədvəli → kart görünüşü ── */

    section.contacts .table {
        border-radius: 8px;
        overflow: hidden;
    }

    section.contacts .table table thead {
        display: none;
    }

    section.contacts .table table,
    section.contacts .table table tbody {
        display: block;
        width: 100%;
    }

    /* Hər stansiya ayrıca kart */
    section.contacts .table table tbody tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #d0dcf5;
        padding: 12px 14px;
        gap: 4px;
    }

    section.contacts .table table tbody tr:last-child {
        border-bottom: none;
    }

    section.contacts .table table td {
        height: auto;
        padding: 0;
        font-size: 13px;
        vertical-align: top;
    }

    /* Stansiya adı — bold, iri */
    section.contacts .table table td:first-child {
        font-size: 14px;
        font-weight: 700;
        color: #222;
        margin-bottom: 2px;
    }

    /* Telefon */
    section.contacts .table table td:nth-child(2) {
        color: #4370D8;
        font-size: 13px;
    }

    /* Ünvan */
    section.contacts .table table td:nth-child(3) {
        color: #555;
        font-size: 12px;
    }

    /* Xəritə düyməsi */
    section.contacts .table table td:nth-child(4) {
        padding-top: 4px;
    }

    section.contacts .table table div.map {
        width: 44px;
        height: 44px;
    }

    /* ── Rəy formu — başlıq ── */

    section.contacts .tab_content .header {
        height: auto;
        padding: 12px 14px;
        font-size: 15px;
    }

    section.contacts .tab_content .body {
        width: 100%;
        box-sizing: border-box;
        padding: 16px;
        gap: 16px;
    }

    section.contacts .tab_content .body .row {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    section.contacts .tab_content .body .row .item {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .item .caption {
        font-size: 14px;
        height: auto;
        margin-bottom: 4px;
    }

    section.contacts .tab_content .body .row .item .input {
        width: 100% !important;
        box-sizing: border-box;
        padding: 0 12px;
    }

    section.contacts .tab_content .body .row .item .input input {
        font-size: 15px;
    }

    section.contacts .tab_content .body .row .item .input textarea {
        height: 160px;
        font-size: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file {
        height: 150px;
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file .dropzone {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 12px;
        gap: 6px;
    }

    section.contacts .tab_content .body .row .input.file .dropzone > div {
        text-wrap: wrap;
        text-align: center;
        font-size: 12px;
    }

    section.contacts .tab_content .body .row .input.file .dropzone #filename {
        width: 100%;
        font-size: 11px;
        text-align: center;
    }

    section.contacts .tab_content .body .row .input.file .text_under {
        font-size: 10px;
        bottom: -16px;
    }

    section.contacts .tab_content .body .row .item .callcenter {
        font-size: 15px;
    }

    section.contacts .tab_content .body .row .item .button {
        justify-content: stretch;
        width: 100%;
    }

    section.contacts .tab_content .body .row .item button[name="btSend"] {
        width: 100% !important;
        height: 46px;
        font-size: 15px;
        box-sizing: border-box;
    }

}


/* ──────────────────────────────────────────────────────
   Feedback / Contacts — 768px – 991px (kiçik tablet)
   ────────────────────────────────────────────────────── */
@media screen and (min-width: 768px) and (max-width: 991px) {

    /* header bu ölçüdə 90px (768-1199 blokunda təyin edilib) */
    section.contacts {
        margin-top: 90px !important;
    }

    section.contacts .container {
        padding: 20px;
        box-sizing: border-box;
        align-items: stretch;
    }

    section.contacts .container form {
        width: 100%;
    }

    section.contacts .tab_headers {
        gap: 8px;
        height: auto;
    }

    section.contacts .tab_headers .tab_head {
        flex: 1 1 0;
        width: auto;
        height: 48px;
        font-size: 13px;
        padding: 0 10px;
        box-sizing: border-box;
    }

    section.contacts .searchbar {
        width: 100%;
        box-sizing: border-box;
        padding: 0 0 0 44px;
    }

    section.contacts .searchbar::before {
        top: 50%;
        transform: translateY(-50%);
    }

    section.contacts .searchbar button {
        position: static;
        width: 100px;
        border-radius: 0 10px 10px 0;
        flex-shrink: 0;
    }

    section.contacts .table table thead {
        display: none;
    }

    section.contacts .table table,
    section.contacts .table table tbody {
        display: block;
        width: 100%;
    }

    section.contacts .table table tbody tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #d0dcf5;
        padding: 12px 16px;
        gap: 4px;
    }

    section.contacts .table table tbody tr:last-child {
        border-bottom: none;
    }

    section.contacts .table table td {
        height: auto;
        padding: 0;
        font-size: 14px;
    }

    section.contacts .table table td:first-child {
        font-size: 15px;
        font-weight: 700;
    }

    section.contacts .table table td:nth-child(2) {
        color: #4370D8;
    }

    section.contacts .table table td:nth-child(3) {
        color: #555;
        font-size: 13px;
    }

    /* Rəy formu */
    section.contacts .tab_content .header {
        height: auto;
        padding: 14px 16px;
        font-size: 16px;
    }

    section.contacts .tab_content .body {
        width: 100%;
        box-sizing: border-box;
        padding: 20px 16px;
        gap: 16px;
    }

    section.contacts .tab_content .body .row {
        flex-direction: column;
        gap: 14px;
    }

    section.contacts .tab_content .body .row .item {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .item .input {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file .dropzone #filename {
        width: 100%;
    }

    section.contacts .tab_content .body .row .item button[name="btSend"] {
        width: 100% !important;
    }
}


/* ──────────────────────────────────────────────────────
   Feedback / Contacts — 992px – 1199px (böyük tablet)
   ────────────────────────────────────────────────────── */
@media screen and (min-width: 992px) and (max-width: 1199px) {

    section.contacts {
        margin-top: 90px !important;
    }

    section.contacts .container {
        padding: 24px 20px;
        box-sizing: border-box;
        align-items: stretch;
    }

    section.contacts .container form {
        width: 100%;
    }

    /* Tab düymələri — 500px × 2 = 1000px, container 992px — sıxışır */
    section.contacts .tab_headers .tab_head {
        width: auto;
        flex: 1 1 0;
        font-size: 16px;
        padding: 0 12px;
        box-sizing: border-box;
    }

    /* Searchbar */
    section.contacts .searchbar {
        width: 100%;
        box-sizing: border-box;
        padding: 0 0 0 44px;
    }

    section.contacts .searchbar::before {
        top: 50%;
        transform: translateY(-50%);
    }

    section.contacts .searchbar button {
        position: static;
        width: 120px;
        border-radius: 0 10px 10px 0;
        flex-shrink: 0;
    }

    /* Rəy formu body */
    section.contacts .tab_content .body {
        width: 100%;
        box-sizing: border-box;
        padding: 30px 24px;
    }

    section.contacts .tab_content .body .row .item {
        flex: 1 1 0;
        width: auto !important;
        min-width: 0;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .item .input {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file .dropzone #filename {
        width: 100%;
    }
}


/* ──────────────────────────────────────────────────────
   Feedback / Contacts — 1200px – 1399px
   ────────────────────────────────────────────────────── */
@media screen and (min-width: 1200px) and (max-width: 1399px) {

    section.contacts .container {
        width: 100% !important;
        min-width: unset !important;
        padding: 0 32px;
        box-sizing: border-box;
        align-items: stretch;
    }

    section.contacts .container form {
        width: 100%;
    }

    /* Tab düymələri */
    section.contacts .tab_headers .tab_head {
        width: auto;
        flex: 1 1 0;
        max-width: 420px;
        font-size: 18px;
        box-sizing: border-box;
    }

    /* Searchbar */
    section.contacts .searchbar {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    section.contacts .searchbar button {
        position: static;
        border-radius: 0 10px 10px 0;
        flex-shrink: 0;
    }

    /* Rəy formu */
    section.contacts .tab_content .body {
        width: 100%;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .item {
        flex: 1 1 0;
        width: auto !important;
        min-width: 0;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .item .input {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file {
        width: 100% !important;
        box-sizing: border-box;
    }

    section.contacts .tab_content .body .row .input.file .dropzone #filename {
        width: 100%;
    }
}

/* ========== USER DOCUMENTS — tablet (768–1199px) ========== */
@media screen and (min-width: 768px) and (max-width: 1199px) {

    section.user_documents {
        padding: 30px 0 40px;
    }

    section.user_documents .tab_headers .tab_head {
        height: 46px;
        font-size: 14px;
        padding: 0 20px;
    }

    section.user_documents .ud_table table thead tr {
        height: 50px;
    }

    section.user_documents .ud_table table th {
        font-size: 14px;
    }

    section.user_documents .ud_table table tbody tr {
        height: 65px;
    }

    section.user_documents .ud_table table tbody td {
        font-size: 14px;
    }
}

/* ========== USER DOCUMENTS — mobil (≤767px) ========== */
@media screen and (max-width: 767px) {

    section.user_documents {
        padding: 20px 0 40px;
    }

    section.user_documents .ud_top_row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    section.user_documents .tab_headers {
        width: 100%;
    }

    section.user_documents .tab_headers .tab_head {
        flex: 1 1 0;
        height: 42px;
        font-size: 12px;
        padding: 0 10px;
        letter-spacing: 0;
    }

    section.user_documents .ud_counter {
        font-size: 13px;
    }

    section.user_documents .ud_table {
        overflow-x: auto;
    }

    section.user_documents .ud_table table thead tr {
        height: 46px;
    }

    section.user_documents .ud_table table th {
        font-size: 12px;
        padding: 0 8px;
    }

    section.user_documents .ud_table table tbody tr {
        height: 60px;
    }

    section.user_documents .ud_table table tbody td {
        font-size: 13px;
        padding: 8px;
    }

    section.user_documents .ud_add_btn {
        font-size: 14px;
        margin-top: 16px;
    }

    section.user_documents .tab_headers .tab_head {
        font-size: 11px;
        padding: 0 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    section.user_documents .ud_form_btns {
        flex-wrap: wrap;
        gap: 10px;
    }

    section.user_documents .ud_foreign_check {
        width: 100%;
        order: -1;
        position: static;
    }

    section.user_documents .ud_btn_cancel,
    section.user_documents .ud_btn_save {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 0 12px !important;
        height: 44px;
    }

    section.user_documents .ud_captcha_wrap {
        width: 100%;
    }

    section.user_documents .ud_captcha_wrap input {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
    }

    section.user_documents .ud_btn_confirm {
        width: auto !important;
        padding: 0 16px !important;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* 404 Not Found */
    .not-found-code {
        font-size: 80px;
    }

    .not-found-heading {
        font-size: 22px;
    }

    .not-found-links {
        flex-direction: column;
        align-items: center;
    }

    .not-found-links .btn-primary,
    .not-found-links .btn-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}