/*
Theme Name: Fly88 CSKH Theme
Theme URI: https://fly88cskh.com
Author: Fly88 Dev Team
Author URI: https://fly88cskh.com
Description: Theme WordPress cho trang TRUNG TÂM DỊCH VỤ KHÁCH HÀNG (WordPress + PHP + Tailwind CSS + ACF)
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: fly88-cskh
*/
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Roboto:wght@400;500;700;800&display=swap");

/* Fallback styles (trong trường hợp chưa build Tailwind) */
html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, Arial, sans-serif;
}

/* Keep typography stable on blog/category/single pages */
body:not(.home):not(.front-page) {
  font-family: Inter, Arial, sans-serif;
}

body:not(.home):not(.front-page) .fly88-blog-prose,
body:not(.home):not(.front-page) .fly88-footer,
body:not(.home):not(.front-page) .fly88-footer * {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: normal;
  font-kerning: normal;
}

body:not(.home):not(.front-page) .fly88-footer h4 {
  line-height: 1.15;
}

/* Keep post cards readable without affecting article content headings */
body:not(.home):not(.front-page) article.post:not(.single),
body:not(.home):not(.front-page) article.type-post:not(.single) {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Ensure hero background extends below service categories even without rebuilding Tailwind */
@media (min-width: 1024px) {
  .fly88-hero-background {
    min-height: 740px;
  }
}

.fly88-pagination {
  display: flex;
  justify-content: center;
  width: 100%;
}

.fly88-pagination .nav-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
  margin-right: auto;
}

.fly88-pagination .page-numbers {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #9edcf8;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-family: Roboto, Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.fly88-pagination .page-numbers.current {
  background: #02a9dc;
  color: #fff;
  border-color: #02a9dc;
}

.fly88-pagination .page-numbers:hover {
  background: #f2fafe;
}

.fly88-blog-prose {
  color: #1e293b;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  font-size: clamp(18px, 1.05vw, 22px);
}

.fly88-blog-prose p {
  margin: 0 0 16px;
}

.fly88-blog-prose h1,
.fly88-blog-prose h2,
.fly88-blog-prose h3,
.fly88-blog-prose h4 {
  margin: 26px 0 12px;
  line-height: 1.3;
  color: #0f172a;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
}

.fly88-blog-prose h1 {
  text-align: center;
  font-size: clamp(34px, 3vw, 52px);
  color: #0f172a;
}

.fly88-blog-prose h2 {
  color: #02a9dc;
  font-size: clamp(28px, 2.35vw, 40px);
}

.fly88-blog-prose h3 {
  color: #02a9dc;
  font-size: clamp(24px, 1.9vw, 32px);
}

.fly88-blog-prose h4 {
  font-size: clamp(21px, 1.55vw, 28px);
}

/* Fallback for single post title when Tailwind utility classes are unavailable */
.single article.post > h1,
.single article.type-post > h1 {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(38px, 3.15vw, 56px);
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin: 4px 0 0;
}

.fly88-blog-prose img:not(.emoji):not(.wp-smiley) {
  display: block;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  margin-left: auto;
  margin-right: auto;
  border-radius: 12px;
}

.fly88-blog-prose img.emoji,
.fly88-blog-prose img.wp-smiley {
  display: inline !important;
  width: 1em !important;
  height: 1em !important;
  max-width: none !important;
  margin: 0 0.08em !important;
  vertical-align: -0.12em !important;
  border-radius: 0 !important;
}

.fly88-blog-prose figure,
.fly88-blog-prose .wp-caption,
.fly88-blog-prose .wp-block-image {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

.fly88-blog-prose figure img,
.fly88-blog-prose .wp-caption img,
.fly88-blog-prose .wp-block-image img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
}

.fly88-blog-prose a {
  color: #02a9dc;
}

.fly88-global-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  border: 1px solid rgba(0, 18, 45, 0.06);
  background: #fff;
  box-shadow: 0 4px 7.7px rgba(102, 139, 235, 0.13), 0 1px 0.1px rgba(2, 169, 220, 0.11),
    inset 0 2px 2.7px 2px #fff, inset 0 -1px 5.5px rgba(13, 153, 255, 0.2);
}

.fly88-global-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fly88-global-header__logo-link {
  display: inline-flex;
  align-items: center;
}

.fly88-global-header__logo {
  width: auto;
  height: 38px;
  object-fit: contain;
}

.fly88-global-header__brand {
  font-family: Roboto, Inter, Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #02a9dc;
}

.fly88-global-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.fly88-global-header__menu-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 10px;
  border: 1px solid #cde8f5;
  background: #eef8fd;
  cursor: pointer;
}

.fly88-global-header__menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #4b647a;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fly88-global-header__menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.fly88-global-header__menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.fly88-global-header__menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.fly88-global-mobile-menu {
  position: absolute;
  top: 100%;
  left: 10px;
  width: min(320px, calc(100vw - 20px));
  z-index: 60;
  border: 1px solid #d8edf8;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 10px 30px rgba(10, 60, 90, 0.12);
  background: #ffffff;
  padding: 12px 14px 14px;
}

.fly88-global-mobile-menu__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fly88-global-mobile-menu__link {
  font-family: Roboto, Inter, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #02a9dc;
  text-decoration: none;
  border: 1px solid #d7edf8;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  background: #f8fdff;
}

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

.fly88-global-header__nav {
  display: none;
  align-items: center;
  gap: clamp(10px, 1vw, 18px);
  margin-left: clamp(16px, 2vw, 28px);
  margin-right: 0;
}

.fly88-global-header__nav-link {
  font-family: Roboto, Inter, Arial, sans-serif;
  font-size: clamp(16px, 1.25vw, 22px);
  font-weight: 700;
  line-height: 1;
  color: #02a9dc;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.fly88-global-header__nav-link:hover {
  opacity: 0.8;
}

.fly88-global-header__btn {
  height: 34px;
  min-width: 92px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.fly88-global-header__btn--primary {
  background: #02a9dc;
  color: #fff;
}

.fly88-global-header__btn--secondary {
  border: 1px solid #bcc7d1;
  background: #e8f0f4;
  color: #5d6d81;
}

.fly88-global-footer {
  background: #dff2f9;
  border-top: 1px solid #bfeafa;
}

.fly88-global-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 24px;
}

.fly88-global-footer__socials {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.fly88-global-footer__social-link {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.fly88-global-footer__social-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.fly88-global-footer__copyright {
  margin: 12px 0 0;
  text-align: center;
  font-family: Roboto, Inter, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #111827;
}

@media (min-width: 1024px) {
  .fly88-global-header {
    height: 90px;
  }

  .fly88-global-header__menu-toggle,
  .fly88-global-mobile-menu {
    display: none !important;
  }

  .fly88-global-header__logo {
    height: 58px;
  }

  .fly88-global-header__btn {
    min-width: 106px;
    height: 38px;
    font-size: clamp(14px, 0.9vw, 17px);
    font-weight: 500;
    padding: 0 clamp(12px, 1vw, 18px);
  }

  .fly88-global-header__nav {
    display: inline-flex;
  }

  .fly88-global-header__nav-link {
    font-size: clamp(16px, 1.2vw, 22px);
  }

  .fly88-global-header__actions--desktop {
    margin-left: auto;
    gap: 8px;
  }
}

@media (max-width: 1023px) {
  .fly88-global-header__nav {
    display: none;
  }

  .fly88-global-header__inner {
    padding-left: 10px;
    padding-right: 10px;
    gap: 8px;
  }

  .fly88-global-header__logo {
    height: 48px;
  }

  .fly88-global-header__actions--desktop {
    display: inline-flex;
    margin-left: auto;
    gap: 6px;
    order: 3;
  }

  .fly88-global-header__actions--desktop .fly88-global-header__btn {
    min-width: 0;
    height: 34px;
    font-size: 14px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .fly88-global-header__menu-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    order: 1;
    margin-right: 8px;
  }

  .fly88-global-header__logo-link {
    order: 2;
  }
}

@media (max-width: 640px) {
  .fly88-global-header__actions--desktop .fly88-global-header__btn {
    height: 32px;
    font-size: 12px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (min-width: 1280px) {
  .fly88-global-header__inner {
    padding-left: 0;
    padding-right: 0;
  }
}
