:root {
  --white: #ffffff;
  --pink: #ff78d2;
  --blue: #8CA9FF;
  --text-dark: #333333;
  /* Đổi nền phụ thành màu trắng để giao diện phẳng và sạch hơn */
  --bg-light: #ffffff;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
}

p {
  color: #666;
}

.logo span {
  color: var(--blue);
}

.logo {
  display: flex;
  align-items: center;
  gap: 5px;
  /* Khoảng cách này giờ chỉ còn tác dụng giữa ảnh và cụm chữ */
  text-decoration: none;
}

/* Định dạng cho cụm chữ đi liền nhau */
.logo-text {
  font-size: 24px;
  font-weight: bold;
  color: var(--pink);
  /* Màu Hồng cho chữ Mai */
  display: flex;
  align-items: center;
}

/* Màu Hồng cho chữ Tâm bên trong */
.logo-text span {
  color: var(--pink);
}

.logo-img {
  height: 35px;
  width: auto;
  display: block;
}



/* --- 1. Sticky Header --- */
header {
  background: var(--white);
  /* Xóa box-shadow, thay bằng đường viền mỏng phẳng */
  border-bottom: 1px solid #f0f0f0;
  z-index: 1000;
  width: 100%;
}

#header-placeholder {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  max-width: 1200px;
  margin: auto;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--pink);
  text-decoration: none;
}



.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--pink);
}

.btn-book {
  background-color: var(--pink);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-book:hover {
  background-color: var(--blue);
}

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

.close-menu,
.overlay {
  display: none;
}

/* --- 2. Dropdown Menu (Desktop) --- */
.dropdown {
  position: relative;
}

.submenu {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--white);
  min-width: 250px;
  box-shadow: none;
  border-radius: 8px;
  list-style: none;
  padding: 15px;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}


/* Hỗ trợ rê chuột (hover) trên máy tính bàn / Laptop */
@media (hover: hover) {
  .dropdown:hover .submenu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
}

/* Hỗ trợ chạm (tap) để mở trên Tablet / iPad */
.dropdown.active-desktop .submenu {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}


.submenu li {
  width: 100%;
  margin-bottom: 4px;
}

.submenu li:last-child {
  margin-bottom: 0;
}

.submenu a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: var(--text-dark);
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.submenu a i {
  width: 24px;
  font-size: 1.1rem;
  margin-right: 12px;
  text-align: center;
  transition: transform 0.2s ease;
}

.icon-blue {
  color: var(--blue);
}

.icon-pink {
  color: var(--pink);
}

.submenu a:hover {
  background-color: #fafafa;
  color: var(--pink);
  transform: translateX(4px);
}

.submenu a:hover i {
  transform: scale(1.1);
}

/* --- 3. Các Sections & Elements (Giao diện phẳng) --- */
.hero {
  position: relative;
  background-image: url('images/anh-phong-kham.webp');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 20px;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.section {
  padding: 60px 5%;
  max-width: 1200px;
  margin: auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.team-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Thiết kế phẳng cho Card */
.team-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: none;
  /* Xóa bóng */
  text-align: center;
  width: 300px;
}

.team-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.team-card h3 {
  margin: 15px 0 5px;
}

.team-card p {
  color: var(--blue);
  font-weight: bold;
  margin-bottom: 20px;
}

.team-card.obgyn p {
  color: var(--pink);
}

/* Thiết kế phẳng cho Form */
.form-container,
.content-container {
  max-width: 600px;
  margin: auto;
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: none;
  /* Xóa bóng */
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}


/* --- Thiết kế phẳng và đồng bộ cho Form --- */
.form-group input,
.form-group select {
  width: 100%;
  display: block;
  /* Ép hiển thị thành khối để chiều dài đạt chuẩn 100% */
  padding: 12px;
  /* Tăng padding một chút để dễ thao tác trên điện thoại */
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  background-color: var(--white);
  /* Đổi màu nền thành trắng tinh */
  box-sizing: border-box;
  /* Bắt buộc mọi ô input/select phải có chiều dài bằng y hệt nhau */
  font-family: inherit;
  font-size: 16px;
  /* Bắt buộc 16px để ngăn iPhone tự động zoom lệch màn hình khi gõ */
  color: var(--text-dark);
  margin: 0;
}

/* Khử giao diện mặc định (màu xám, khối nổi) của Safari/Android */
.form-group select,
.form-group input[type="date"] {
  appearance: none;
  min-height: 46px;
  /* Ép chiều cao tối thiểu để bằng đúng ô nhập tên/số điện thoại */
}

/* Tạo lại mũi tên thả xuống tối giản cho ô Chọn Chuyên Khoa */
.form-group select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  padding-right: 40px;
  /* Đẩy chữ tránh đè lên mũi tên */
}


button.submit-btn {
  background: var(--pink);
  color: var(--white);
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  font-weight: 600;
}

button.submit-btn:hover {
  background: var(--blue);
}

table.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table.schedule-table th,
table.schedule-table td {
  padding: 12px;
  text-align: center;
}

table.schedule-table th {
  background-color: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.map-container {
  overflow: hidden;
  padding-bottom: 56.25%;
  position: relative;
  height: 0;
  margin-top: 20px;
  border-radius: 10px;
}

.map-container iframe {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
}

/* ========================
   SERVICE PAGES — shared
======================== */
.service-hero { padding: 50px 5%; text-align: center; }
.service-hero-icon { font-size: 3.5rem; margin-bottom: 15px; }
.service-hero h1 { font-size: 2rem; color: var(--text-dark); margin-bottom: 10px; }
.service-hero p { color: #666; max-width: 600px; margin: auto; font-size: 1.05rem; }
.service-block { max-width: 780px; margin: auto; }
.service-block h3 { font-size: 1.2rem; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.service-list { list-style: none; padding: 0; }
.service-list li { padding: 10px 0; border-bottom: 1px solid #f5f5f5; display: flex; align-items: flex-start; gap: 12px; line-height: 1.6; }
.service-list li:last-child { border-bottom: none; }
.info-box { border-radius: 0 8px 8px 0; padding: 18px 20px; margin: 30px 0; }
.info-box p { margin-bottom: 6px; color: #555; }
.info-box p:last-child { margin-bottom: 0; }
.cta-section { text-align: center; margin-top: 40px; padding: 30px; border-radius: 12px; }
.cta-section p { margin-bottom: 20px; color: #555; }
.cta-btn { display: inline-block; color: white; padding: 13px 35px; border-radius: 25px; text-decoration: none; font-weight: 700; font-size: 1rem; transition: background 0.3s; }
.divider { border: none; border-top: 1px solid #f0f0f0; margin: 35px 0; }
.benefit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.benefit-card { background: #f4f7ff; border-radius: 10px; padding: 18px; text-align: center; }
.benefit-card i { font-size: 1.8rem; color: var(--blue); margin-bottom: 10px; display: block; }
.benefit-card h4 { font-size: 0.95rem; color: var(--text-dark); margin-bottom: 5px; }
.benefit-card p { font-size: 0.88rem; color: #777; margin: 0; line-height: 1.5; }

/* ========================
   FOOTER
======================== */
.footer-main {
  background: #1e2030;
  padding: 52px 5% 36px;
  color: rgba(255, 255, 255, 0.65);
}

.footer-main p {
  color: rgba(255, 255, 255, 0.75);
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 52px;
  }
}

.footer-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pink);
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 14px;
}

.footer-brand-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 4px;
}

.footer-brand-desc {
  font-size: 0.85rem;
  line-height: 1.72;
  margin-bottom: 20px;
  max-width: 260px;
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}

.footer-social-btn:hover {
  background: var(--pink);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.87rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--pink);
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.87rem;
  line-height: 1.55;
}

.footer-contact-list li i {
  color: var(--pink);
  margin-top: 3px;
  width: 14px;
  flex-shrink: 0;
  font-size: 0.82rem;
}

.footer-bottom {
  background: #15162a;
  padding: 15px 5%;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--pink);
}


/* --- 4. Responsive & Mobile Menu --- */
@media (max-width: 900px) {

  .logo-img {
    display: none;
  }

  .menu-toggle {
    display: block;
    z-index: 1002;
  }

  .overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    padding: 20px;
    box-shadow: none;
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
    /* --- DÒNG CẦN THÊM VÀO ĐỂ BẬT CUỘN DỌC TRONG MENU --- */
  }

  .nav-links.active {
    right: 0;
  }

  .close-menu {
    display: block;
    align-self: flex-end;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-dark);
    margin-bottom: 20px;
    transition: color 0.3s;
  }

  .close-menu:hover,
  .nav-links a:hover {
    color: var(--pink);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    font-size: 1.1rem;
    padding: 10px 0;
    font-weight: 500;
  }


  .nav-links a.btn-book {
    text-align: center;
    border-bottom: none;
    margin-top: 10px;
    font-weight: 600;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .why-us,
  .quick-schedule {
    background: var(--white);
  }

  .dropdown:hover .submenu {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  /* --- SỬA HIỆU ỨNG ĐÓNG MỞ SUBMENU --- */
  .submenu {
    position: static;

    /* 2 DÒNG THÊM MỚI ĐỂ SỬA LỖI NHẢY MENU */
    transform: none !important;
    left: auto !important;

    display: block;
    visibility: visible;
    opacity: 1;
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    margin: 0;
    border: none;
    background-color: transparent;
    pointer-events: auto;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease-in-out;
  }

  .submenu.active {
    max-height: 400px;
    /* Đủ cao để chứa các mục khi mở */
    padding: 5px 0px;
    /* Có padding khi mở */
  }



  .submenu a {
    font-size: 1rem;
    padding: 12px 10px;
    color: #555;
    background: transparent;
    border: none;
  }

  .submenu a:hover {
    transform: none;
    background: transparent;
  }
}