@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #1253a4;
  --blue-dark: #0c3d7a;
  --blue-light:#e8f0fb;
  --blue-mid:  #2563eb;
  --gold:      #c9a84c;
  --gold-light:#fdf6e3;
  --white:     #ffffff;
  --bg:        #f7f9fc;
  --text:      #0f172a;
  --text2:     #475569;
  --text3:     #94a3b8;
  --border:    #e2e8f0;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(18,83,164,.08);
  --shadow-lg: 0 12px 48px rgba(18,83,164,.14);
  --nav-h:     72px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); line-height: 1.6; font-size: 15px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4 { font-family: 'Playfair Display', serif; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { color: var(--text2); }

/* ===== LAYOUT ===== */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 56px 0; }

/* ===== SECTION HEADER ===== */
.section-header { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-light); color: var(--blue);
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 6px 14px; border-radius: 20px;
  margin-bottom: 14px;
}
.section-tag::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.section-header h2 { margin-bottom: 14px; }
.section-header p  { max-width: 560px; margin: 0 auto; font-size: 15.5px; }
.divider {
  display: block; width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  border-radius: 2px; margin: 16px auto 0;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(18,83,164,.08);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(18,83,164,.12); }
.nav-inner {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.navbar .container {
  height: 100%;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 1; }
.nav-logo img { height: 44px; width: auto; }
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-text strong { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--blue-dark); line-height: 1.2; }
.nav-logo-text span   { font-size: 10.5px; color: var(--text2); letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 7px 14px; border-radius: 8px;
  color: var(--text2); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all .15s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: var(--blue-light); }

.nav-cta {
  display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end;
}
.nav-phone {
  display: flex; align-items: center; gap: 6px;
  color: var(--blue-dark); font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.nav-phone svg { color: var(--gold); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }

.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 16px 24px 20px; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 11px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 500; }
.mobile-menu a:last-child { border-bottom: none; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: 'Inter', sans-serif;
  text-decoration: none; border: none; cursor: pointer;
  transition: all .2s;
}
.btn-primary {
  background: var(--blue); color: var(--white);
  box-shadow: 0 4px 14px rgba(18,83,164,.3);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(18,83,164,.4); }
.btn-gold {
  background: var(--gold); color: var(--white);
  box-shadow: 0 4px 14px rgba(201,168,76,.35);
}
.btn-gold:hover { background: #b8943f; transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-white {
  background: var(--white); color: var(--blue); font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.btn-lg { padding: 15px 36px; font-size: 15px; border-radius: 10px; }

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* ===== BADGE ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.badge-blue   { background: var(--blue-light); color: var(--blue); }
.badge-gold   { background: var(--gold-light); color: #92690a; }
.badge-green  { background: #f0fdf4; color: #15803d; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: 'Inter', sans-serif; color: var(--text);
  background: var(--white); outline: none; transition: border-color .15s;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,83,164,.1); }
.form-control::placeholder { color: var(--text3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.req { color: #ef4444; }

/* ===== HERO ===== */
.hero {
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 80px;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, #3b7dd8 100%);
  position: relative; overflow: hidden;
  /* Phủ một lớp màu xanh đen mờ (opacity 85%) lên trên tấm ảnh để chữ và form vẫn nổi bật, không bị chìm vào nền */
  background-image: linear-gradient(rgba(18, 83, 164, 0.7), rgba(18, 83, 164, 0.95)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  /* Nếu muốn ảnh đứng im khi cuộn chuột (Hiệu ứng Parallax xịn xò), bỏ comment dòng dưới */
  background-attachment: fixed;
  padding: 80px 0; /* Hoặc giữ nguyên padding cũ của bạn */
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { display: grid; grid-template-columns: 1fr 420px; gap: 60px; align-items: center; position: relative; z-index: 1; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.15); color: rgba(255,255,255,.9); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 20px; margin-bottom: 20px; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { color: var(--white); margin-bottom: 18px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-desc { color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.7; margin-bottom: 32px; max-width: 520px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat-num { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--white); line-height: 1; }
.hero-stat-label { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 3px; }

/* ===== APPOINTMENT CARD IN HERO ===== */
.hero-card {
  background: var(--white); border-radius: 16px;
  padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.hero-card h3 { margin-bottom: 6px; color: var(--blue-dark); }
.hero-card > p { font-size: 13px; color: var(--text2); margin-bottom: 20px; }

/* ===== SERVICES GRID ===== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card { border-radius: 14px; padding: 28px; position: relative; overflow: hidden; }
.service-icon { width: 52px; height: 52px; background: var(--blue-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; }
.service-card h3 { font-size: 16px; margin-bottom: 8px; }
.service-card p { font-size: 13.5px; margin-bottom: 16px; }
.service-price { font-size: 13px; font-weight: 700; color: var(--blue); }

/* ===== WHY US ===== */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-item { text-align: center; }
.why-icon { width: 64px; height: 64px; background: var(--blue); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 16px; }
.why-item h3 { font-size: 15px; margin-bottom: 6px; }
.why-item p { font-size: 13px; }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: 20px; padding: 52px 60px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; position: relative; overflow: hidden;
}
.cta-banner::before { content: '🦷'; position: absolute; right: 180px; bottom: -10px; font-size: 120px; opacity: .06; }
.cta-banner h2 { color: var(--white); margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,.75); max-width: 480px; }
.cta-btns { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer { background: var(--blue-dark); color: rgba(255,255,255,.7); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 48px; }
.footer-brand { }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo img { height: 44px; filter: brightness(0) invert(1); }
.footer-logo-text strong { color: var(--white); font-family: 'Playfair Display', serif; font-size: 15px; }
.footer-logo-text span { display: block; font-size: 11px; color: rgba(255,255,255,.45); }
.footer-desc { font-size: 13.5px; line-height: 1.7; margin-bottom: 20px; max-width: 280px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social { width: 36px; height: 36px; background: rgba(255,255,255,.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); text-decoration: none; font-size: 16px; transition: background .15s; }
.footer-social:hover { background: var(--gold); color: var(--white); }
.footer h4 { color: var(--white); font-size: 14px; font-weight: 600; margin-bottom: 16px; font-family: 'Inter', sans-serif; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: rgba(255,255,255,.6); text-decoration: none; font-size: 13.5px; transition: color .15s; }
.footer-links a:hover { color: var(--gold); }
.footer-contact-item { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13.5px; }
.footer-contact-item svg { flex-shrink: 0; margin-top: 2px; color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; }

/* ===== FLOATING BUTTONS ===== */
.float-btns { position: fixed; bottom: 24px; right: 24px; z-index: 900; display: flex; flex-direction: column; gap: 10px; }
.float-btn {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; text-decoration: none; font-size: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); transition: transform .2s;
}
.float-btn:hover { transform: scale(1.1); }
.float-zalo { background: #0068ff; }
.float-phone { background: var(--gold); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(201,168,76,.5)} 50%{box-shadow:0 0 0 10px rgba(201,168,76,0)} }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 48px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  text-align: center; position: relative; overflow: hidden;
}
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.page-hero p  { color: rgba(255,255,255,.75); font-size: 15.5px; }
.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.breadcrumb a { color: rgba(255,255,255,.6); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: rgba(255,255,255,.35); }
.breadcrumb strong { color: var(--white); }

/* ===== PRICE TABLE ===== */
.price-table { width: 100%; border-collapse: collapse; }
.price-table th { background: var(--blue); color: var(--white); padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; }
.price-table th:last-child { text-align: right; }
.price-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.price-table td:last-child { text-align: right; font-weight: 600; color: var(--blue); white-space: nowrap; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:nth-child(even) td { background: var(--bg); }
.price-table tr:hover td { background: var(--blue-light); }

/* ===== BLOG CARDS ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { border-radius: 14px; overflow: hidden; }
.blog-img { height: 200px; background: var(--blue-light); position: relative; overflow: hidden; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.blog-card:hover .blog-img img { transform: scale(1.05); }
.blog-body { padding: 20px; }
.blog-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.blog-body h3 { font-size: 15.5px; margin-bottom: 8px; line-height: 1.4; }
.blog-body h3 a { color: var(--text); text-decoration: none; }
.blog-body h3 a:hover { color: var(--blue); }
.blog-body p { font-size: 13px; -webkit-line-clamp: 3; -webkit-box-orient: vertical; display: -webkit-box; overflow: hidden; }

/* ===== ALERT ===== */
.alert { padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; font-weight: 500; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card  { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .nav-links, .nav-phone { display: none; }
  .hamburger { display: flex; }
  .nav-logo-text { display: none; }
  .nav-logo img { height: 48px; }
  .hero { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 52px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .cta-banner { flex-direction: column; padding: 36px 28px; text-align: center; }
  .cta-btns { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
/* ========================================================
   LƯỚI RESPONSIVE CHO TRANG GIỚI THIỆU (MẶC ĐỊNH LÀ DESKTOP) 
   ======================================================== */
.about-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 60px; align-items: center; }
.about-stats  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.about-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Bảng giá */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.price-table { min-width: 650px; }


/* ========================================================
   ÉP LẠI GIAO DIỆN CHO MÀN HÌNH NHỎ (TABLET & MOBILE)
   ======================================================== */
/* Tablet (iPad) - Chuyển lưới 3 thành lưới 2 cho đỡ chật */
@media (max-width: 1024px) {
  .about-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Điện thoại (Mobile) - Ép tất cả thành 1 cột (trừ phần thống kê) */
@media (max-width: 768px) {
  .about-grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .about-grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .about-stats  { grid-template-columns: 1fr 1fr; gap: 12px; }
}
/* ===== BỐ CỤC CÓ SIDEBAR (ĐẶT HẸN, BLOG, BÀI VIẾT) ===== */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 350px; /* Máy tính: Nội dung chính + Cột bên phải 350px */
  gap: 40px;
  align-items: start;
}

/* Ép về 1 cột dọc trên màn hình Tablet và Điện thoại */
@media (max-width: 992px) {
  .sidebar-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Tùy chỉnh phần bố cục chung */
.dental-intro-card {
    display: flex;
    max-width: 1200px; /* Chiều rộng tối đa của thẻ */
    margin: 50px auto; /* Căn giữa màn hình */
    background-color: #ffffff; /* Màu nền trắng */
    border-radius: 15px; /* Bo góc của thẻ */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Bóng đổ nhẹ, tạo chiều sâu */
    overflow: hidden; /* Đảm bảo hình ảnh và văn bản không bị tràn */
}

/* Tùy chỉnh phần nội dung bên trái */
.left-content {
    flex: 1;
    padding: 40px; /* Khoảng cách đệm bên trong */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Căn giữa theo chiều dọc */
}

/* Tùy chỉnh phần hình ảnh bên phải */
.right-image {
    flex: 1; /* Chia đôi thẻ: văn bản và hình ảnh */
    display: flex;
}

/* Tùy chỉnh hình ảnh bên trong */
.clinic-exterior-image {
    width: 100%;
    height: 100%; /* Đảm bảo hình ảnh phủ hết thẻ */
    object-fit: cover; /* Giữ nguyên tỷ lệ, cắt bớt để phủ kín thẻ */
    transition: transform 0.3s ease; /* Hiệu ứng hover nhẹ */
}

/* Hiệu ứng khi di chuột qua hình ảnh */
.clinic-exterior-image:hover {
    transform: scale(1.02); /* Phóng to nhẹ khi di chuột */
}

/* Responsive cho thiết bị di động (nếu cần) */
@media (max-width: 768px) {
    .dental-intro-card {
        flex-direction: column; /* Chuyển sang bố cục dọc trên điện thoại */
    }
}