/* =========================================================
   Aurex Cargo Aviation — AIRLINE PARTNERS (V4)
   Dùng cho 2 trang: /airline-partners (lưới ô logo)
   và /airline-partners/{slug} (trang chi tiết từng hãng).
   Phụ thuộc aurex-common.css (page-banner, section-*, container, btn, biến màu).
   ========================================================= */

/* Banner nền động: ảnh header upload trong admin (trang list = Airline Page,
   trang chi tiết = ảnh riêng của từng hãng), theo thiết bị.
   Không upload -> không có class .has-custom-bg -> giữ ảnh mặc định
   (.page-banner::before trong aurex-common.css). */
.page-banner.has-custom-bg::before { background-image: var(--banner-pc); }
@media (max-width: 991px) {
    .page-banner.has-custom-bg::before { background-image: var(--banner-tb, var(--banner-pc)); }
}
@media (max-width: 640px) {
    .page-banner.has-custom-bg::before { background-image: var(--banner-mb, var(--banner-pc)); }
}

/* Mô tả ngắn dưới <h1> banner khi admin soạn bằng tinymce (HTML).
   Dùng div thay <p> để không lồng thẻ; style kế thừa .page-banner p của aurex-common.css. */
.page-banner .banner-sub,
.page-banner .banner-sub p,
.page-banner .banner-sub li {
    max-width: 720px;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.7;
    margin: 0 auto;
    text-shadow: 0 1px 10px rgba(0,0,0,.45);
}

.page-banner .banner-sub p + p { margin-top: 8px; }
.page-banner .banner-sub ul,
.page-banner .banner-sub ol { list-style: none; padding: 0; }
.page-banner .banner-sub a { color: var(--gold); text-decoration: underline; }
.page-banner .banner-sub img { display: none; } /* ảnh dán nhầm trong mô tả ngắn -> không phá banner */

/* =========================================================
   1. TRANG LIST — lưới ô logo (chịu được ~30 hãng)
   ========================================================= */
.airline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
    margin-top: 26px;
}

.airline-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 168px;
    padding: 28px 20px;
    background: #fff;
    border: 1px solid var(--line);
    text-align: center;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.airline-card:hover {
    transform: translateY(-5px);
    border-color: rgba(4,95,128,.25);
    box-shadow: 0 18px 40px rgba(4,95,128,.16);
}

.airline-card .a-logo {
    max-height: 56px;
    max-width: 80%;
    object-fit: contain;
    display: block;
}

.airline-card .a-name {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: .5px;
    line-height: 1.3;
}

.airline-card .a-name small {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-top: 6px;
}

/* Có logo rồi thì ẩn hẳn phần chữ (tên/tagline) — tooltip title trên thẻ <a> vẫn hiện khi hover.
   Ẩn kiểu screen-reader-only để trình đọc màn hình / SEO vẫn đọc được tên hãng. */
.airline-card.has-logo .a-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Không còn chữ -> cho logo to hơn cho cân ô */
.airline-card.has-logo .a-logo {
    max-height: 76px;
    max-width: 86%;
}

.airline-empty {
    color: var(--gray);
    margin-top: 18px;
}

@media (max-width: 600px) {
    .airline-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
    .airline-card { min-height: 140px; padding: 22px 14px; }
    .airline-card .a-name { font-size: 17px; }
}

/* =========================================================
   2. TRANG CHI TIẾT — thân bài About (HTML từ admin)
   ========================================================= */
.airline-body p { color: var(--gray); line-height: 1.9; margin-bottom: 14px; }
.airline-body ul { margin: 0 0 14px 18px; color: var(--gray); line-height: 1.9; }

/* =========================================================
   3. FLIGHT NETWORK — style của map dùng chung nằm ở aurex-common.css
   ========================================================= */

/* =========================================================
   4. FLEET — bảng so sánh như trang cũ (nền xanh).
   Nhiều loại tàu bay -> cuộn ngang, cột nhãn bên trái ghim lại.
   ========================================================= */
.fleet-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 24px;
    -webkit-overflow-scrolling: touch;
}

.fleet-table {
    width: 100%;
    border-collapse: separate; /* separate: cột sticky không bị mất viền khi cuộn */
    border-spacing: 0;
    font-size: 14px;
}

.fleet-table th,
.fleet-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    text-align: left;
    white-space: nowrap;
}

.fleet-table thead th {
    font-family: 'Oswald', sans-serif;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    vertical-align: bottom;
}

.fleet-table thead th small {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    margin-top: 4px;
}

.fleet-table tbody td { color: rgba(255,255,255,.8); }

/* Cột nhãn ghim khi cuộn ngang. Nền = đúng màu section (đặc, không đổi tông)
   để cột không lộ ra là khối riêng, nhưng vẫn che được chữ trượt qua bên dưới. */
.fleet-table .fl-label {
    position: sticky;
    left: 0;
    z-index: 2;
    color: #fff;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    background: var(--blue);
    min-width: 130px;
}

.fleet-table thead .fl-label { z-index: 3; }

.fleet-note {
    margin-top: 14px;
    margin-bottom: 0;
    text-align: right;
    font-size: 13px;
    line-height: 1.5;
    font-style: italic;
    color: rgba(255,255,255,.7);
}

@media (max-width: 600px) {
    .fleet-table th, .fleet-table td { padding: 10px 12px; font-size: 13px; }
    .fleet-table .fl-label { min-width: 110px; }
    .fleet-note { font-size: 12px; }
}

/* =========================================================
   5. CARGO PRODUCTS — lưới icon
   ========================================================= */
.cargo-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.cargo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 26px 14px;
    background: #f7fafb;
    border: 1px solid var(--line);
    text-align: center;
    text-decoration: none;
    color: var(--ink);
}

.cargo-item .ci-ico {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: var(--gold);
    font-size: 20px;
    border-radius: 50%;
}

.cargo-item .ci-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--blue);
    line-height: 1.4;
}

.cargo-item.is-link { transition: transform .2s ease, box-shadow .2s ease; }
.cargo-item.is-link:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(4,95,128,.14); }

/* =========================================================
   6. FLIGHT SCHEDULE — dải CTA
   ========================================================= */
.airline-schedule .as-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.airline-schedule .as-text { flex: 1 1 420px; }
.airline-schedule .as-text .sec-title { margin-bottom: 8px; }
.airline-schedule .as-text .lead { margin: 0; color: var(--gray); }

/* =========================================================
   7. DOWNLOADS — Contact không dựng block riêng (dùng cta-band dẫn sang /contact)
   ========================================================= */
/* Dùng lại .dl-grid/.dl-btn + popup .dl-modal của aurex-downloads.css (view có nạp file đó),
   ở đây chỉ chỉnh khoảng cách cho hợp khối trong trang chi tiết hãng. */
.airline-support .dl-grid { margin-top: 26px; }

/* =========================================================
   8. ABOUT — cột phải: logo hãng + IATA + link website
   (không có logo lẫn ảnh -> view tự cho cột trái full 100%)
   ========================================================= */
.airline-about .airline-aside { text-align: center; }

.airline-about .aa-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    padding: 30px 26px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(4,95,128,.10);
}

.airline-about .aa-logo img {
    max-height: 110px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.airline-about .aa-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.airline-about .aa-iata,
.airline-about .aa-site {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--line);
}

.airline-about .aa-iata { background: #f7fafb; color: var(--blue); }

.airline-about .aa-site {
    color: var(--blue);
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.airline-about .aa-site:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--blue-deep);
}

.airline-about .aa-site i { font-size: 12px; }

@media (max-width: 767px) {
    .cargo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .airline-schedule .as-inner { flex-direction: column; align-items: flex-start; }
    .airline-about .airline-aside { margin-top: 26px; }
    .airline-about .aa-logo { min-height: 150px; padding: 22px 18px; }
    .airline-about .aa-logo img { max-height: 80px; }
}
