/*
Theme Name: Doctor Profile
Theme URI: https://bsthanhquoc.vn
Author: Nguyen Vu Thanh Quoc
Description: Personal OB-GYN Doctor Website (Updated Brand Colors 2026)
Version: 1.1
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* HỆ MÀU MỚI ĐỒNG BỘ 100% THEO LOGO */
  --blue:       #1cb3b8; /* Xanh lơ chủ đạo của logo */
  --blue-light: #f28b82; /* Hồng san hô nhấn điểm từ logo */
  --blue-pale:  #eefafb; /* Nền xanh lơ siêu nhạt dùng cho hover/active menu */
  --white:      #ffffff;
  --gray-light: #f5f7fa;
  --gray:       #9e9e9e;
  --text:       #212121;
  --text-mid:   #555555;
  --border:     #e0e0e0;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --radius:     8px;
  --max-w:      1120px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 16px; color: var(--text); line-height: 1.7; background: var(--white); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-light); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 20px 0; }
.section-title { font-size: 2rem; font-weight: 700; color: var(--blue); text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--text-mid); margin-bottom: 20px; font-size: 1.05rem; }
.divider { width: 60px; height: 4px; background: var(--blue); border-radius: 2px; margin: 0 auto 40px; }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 8px 24px; border-radius: var(--radius); font-weight: 600; font-size: 1rem; cursor: pointer; transition: all .2s; border: 2px solid transparent; }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-light); color: var(--white); border-color: var(--blue-light); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--blue); }

/* ===== HEADER ===== */
#site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.site-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 44px; height: 44px; background: var(--blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 1.4rem; flex-shrink: 0; }
.logo-text { font-size: 1.05rem; font-weight: 700; color: var(--blue); line-height: 1.3; }
.logo-text span { display: block; font-size: .8rem; font-weight: 400; color: var(--text-mid); }

/* Nav (Tinh chỉnh chống tràn, ép chữ thẳng hàng) */
.site-nav ul { display: flex; gap: 6px; align-items: center; }
.site-nav ul li { white-space: nowrap; } /* Đảm bảo mục dài như Tiền sản & Hiếm muộn không bao giờ bị rớt dòng đơn lẻ */
.site-nav a { padding: 8px 14px; border-radius: var(--radius); color: var(--text); font-weight: 500; transition: all .2s; }
.site-nav a:hover, .site-nav a.active { color: var(--blue) !important; background: var(--blue-pale) !important; }
.nav-cta { background: var(--blue) !important; color: var(--white) !important; }
.nav-cta:hover { background: var(--blue-light) !important; }

/* Hamburger */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: all .3s; }

/* ===== HERO (Đã chuyển sang dải màu gradient Teal cao cấp) ===== */
.hero { background: linear-gradient(135deg, #105963 0%, #1cb3b8 100%); color: var(--white); padding: 20px 0; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.hero-badge { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: var(--white); padding: 6px 18px; border-radius: 20px; font-size: .875rem; margin-bottom: 20px; }
.hero-name { font-size: 2.2rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.hero-title { font-size: 1.25rem; color: rgba(255,255,255,.85); margin-bottom: 20px; }
.hero-bio { font-size: 1.2rem; color: rgba(255,255,255,.8); line-height: 2.0; margin-bottom: 32px; max-width: 600px;text-align: justify; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 24px; text-align: center; }
.stat-number { font-size: 2.2rem; font-weight: 800; }
.stat-label { font-size: .875rem; color: rgba(255,255,255,.8); margin-top: 4px; }

/* ===== ABOUT SECTION ===== */
.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: start; }
.about-card { background: var(--blue-pale); border-radius: 12px; padding: 36px; text-align: center; position: sticky; top: 90px; }
.about-avatar { width: 160px; height: 160px; background: var(--blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 3rem; margin: 0 auto 20px; }
.about-name { font-size: 1.3rem; font-weight: 700; color: var(--blue); }
.about-role { color: var(--text-mid); font-size: .9rem; margin: 6px 0 16px; }
.about-contact-list { text-align: left; font-size: .9rem; color: var(--text-mid); }
.about-contact-list li { padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 8px; }
.about-contact-list li:last-child { border-bottom: none; }
.about-content h3 { font-size: 1.3rem; font-weight: 700; color: var(--blue); margin: 32px 0 12px; }
.about-content h3:first-child { margin-top: 0; }
.about-content p { color: var(--text-mid); line-height: 1.9; margin-bottom: 12px; }
.expertise-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.expertise-item { display: flex; align-items: flex-start; gap: 8px; color: var(--text-mid); font-size: .95rem; }
.expertise-item::before { content: '✓'; color: var(--blue); font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.skills-list { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 15px;justify-content:space-between;}
.skill-tag { display: inline-flex; align-items: center; justify-content: center; background-color: #eefafb; color: #1cb3b8; padding: 8px 16px; border-radius: 20px;  font-size: 0.8rem; font-weight: 500; white-space: nowrap; transition: all 0.3s ease;}

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item::before { content: ''; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; background: var(--blue); border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--blue); }
.timeline-date { font-size: .8rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 6px; }
.timeline-role { font-size: 1rem; font-weight: 700; color: var(--text); }
.timeline-place { font-size: 1.0rem; color: var(--text-mid); }

/* ===== EDUCATION ===== */
.edu-list { display: flex; flex-direction: column; gap: 16px; }
.edu-item { background: var(--gray-light); border-radius: var(--radius); padding: 16px 20px; border-left: 4px solid var(--blue); }
.edu-degree { font-weight: 600; color: var(--text); }
.edu-school { font-size: .9rem; color: var(--text-mid); margin-top: 4px; }

/* ===== CERTIFICATIONS ===== */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cert-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: flex-start; gap: 12px; transition: box-shadow .2s; }
.cert-item:hover { box-shadow: var(--shadow); }
.cert-icon { width: 36px; height: 36px; background: var(--blue-pale); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--blue); flex-shrink: 0; font-size: 1rem; }
.cert-text { font-size: .9rem; color: var(--text-mid); line-height: 1.5; }

/* ===== SERVICES ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.service-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 36px 28px; transition: all .3s; text-align: center; }
.service-card:hover { box-shadow: 0 8px 32px rgba(28,179,184,.15); transform: translateY(-4px); border-color: var(--blue-light); }
.service-icon { width: 70px; height: 70px; background: var(--blue-pale); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 2rem; }
.service-title { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.service-desc { color: var(--text-mid); font-size: .95rem; line-height: 1.7; }

/* ===== BLOG (ĐÃ HỢP NHẤT VÀ TỐI ƯU CHIỀU CAO) ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.blog-card { display: flex; flex-direction: column; height: 100%; background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all .3s; }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.blog-thumb { height: 200px; background: linear-gradient(135deg, var(--blue) 0%, #4bc9ce 100%); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: rgba(255,255,255,.5); overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-thumb img { transform: scale(1.05); }
.blog-body { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.blog-cat { align-self: flex-start; background: var(--blue-pale); color: var(--blue); padding: 3px 12px; border-radius: 12px; font-size: .8rem; font-weight: 600; margin-bottom: 10px; }
.blog-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; line-height: 1.5; }
.blog-title a { color: inherit; }
.blog-title a:hover { color: var(--blue); }
.blog-intro { font-size: .9rem; color: var(--text-mid); line-height: 1.7; margin-bottom: 16px; flex-grow: 1; text-align: justify; }
.blog-meta { font-size: .8rem; color: var(--gray); display: flex; align-items: center; gap: 6px; }
.read-more { font-size: .875rem; color: var(--blue); font-weight: 600; margin-top: auto; }
.read-more:hover { text-decoration: underline; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 60px; }
.contact-info-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-icon { width: 46px; height: 46px; background: var(--blue-pale); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 1.2rem; flex-shrink: 0; }
.contact-info-label { font-size: .8rem; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.contact-info-value { font-weight: 600; color: var(--text); }
.contact-info-value a { color: var(--text); }
.contact-info-value a:hover { color: var(--blue); }

/* Form */
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; color: var(--text); font-family: inherit; transition: border-color .2s; background: var(--white); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(28,179,184,.1); }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .8rem; color: var(--gray); text-align: center; margin-top: 12px; }

/* Working hours */
.hours-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.hours-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.hours-table td:last-child { text-align: right; color: var(--blue); font-weight: 600; }

/* ===== CTA BANNER ===== */
.cta-banner { background: linear-gradient(135deg, #0d2137, var(--blue)); color: var(--white); padding: 72px 0; text-align: center; }
.cta-banner h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta-banner p { font-size: 1.1rem; color: rgba(255,255,255,.85); margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ===== FOOTER ===== */
#site-footer { background: #0d2137; color: rgba(255,255,255,.75); padding: 20px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 56px; margin-bottom: 48px; }
.footer-brand .logo-text { color: #1cb3b8; }
.footer-brand .logo-text span { color: #ea6b56; }
.footer-desc { font-size: .9rem; margin-top: 16px; line-height: 1.8;text-align: justify; }
.footer-heading { font-size: 1rem; font-weight: 700; color: #1cb3b8; margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .9rem; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .9rem; color: rgba(255,255,255,.65); }
.footer-contact a { color: rgba(255,255,255,.65); }
.footer-contact a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: rgba(255,255,255,.45); }
/* Chỉ tác động vào logo nằm trong Footer (nơi ta đã đặt class footer-logo-icon) */
.footer-logo-icon { width: auto !important; height: auto !important; background: transparent !important; /* Loại bỏ màu nền xanh */ border-radius: 0 !important;       /* Loại bỏ bo tròn */ display: block !important;}
/* Đảm bảo ảnh trong footer hiển thị đúng kích thước mong muốn */
.footer-logo-icon img {display: block; width: 50px; /* Bác sĩ có thể thay đổi số này để phóng to/thu nhỏ logo */height: auto;}

/* ===== BREADCRUMB ===== */
.page-hero { background: linear-gradient(135deg, #105963 0%, #1cb3b8 100%); color: var(--white); padding: 50px 0 30px 0; text-align: center; }
.page-hero h1 { font-size: 2.2rem; font-weight: 800; }
.page-hero p { margin-top: 8px; color: rgba(255,255,255,.8); }

/* ===== NOTICES ===== */
.notice { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 16px; font-size: .9rem; }
.notice-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.notice-error { background: #ffebee; color: #c62828; border-left: 4px solid #f44336; }

/* ===== SECTION LABEL ===== */
.section-label { display: block; font-weight: 600; color: var(--blue); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }

/* ===== FUNFACTS BAND ===== */
.funfacts { background: var(--blue-pale); padding: 10px 0; }
.funfacts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.funfact { position: relative; padding: 20px 16px 20px 124px; min-height: 100px; display: flex; flex-direction: column; justify-content: center; }
.funfact-icon { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 100px; height: 100px; background: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; box-shadow: 0 4px 24px rgba(28,179,184,.12); }
.funfact-num { font-size: 2.6rem; font-weight: 800; color: var(--blue); line-height: 1; }
.funfact-lbl { font-size: .875rem; font-weight: 600; color: var(--text-mid); margin-top: 6px; line-height: 1.4; }

/* ===== SERVICE BOX ===== */
.service-box-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 24px; background: var(--white); border-radius: 12px; border: 1px solid var(--border); text-align: center; transition: all .3s; }
.service-box:hover { box-shadow: 0 8px 32px rgba(28,179,184,.13); transform: translateY(-5px); border-color: var(--blue); }
.service-box .s-icon { width: 80px; height: 80px; background: var(--blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; flex-shrink: 0; transition: background .2s; }
.service-box:hover .s-icon { background: var(--blue-light); }
.service-box h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.service-box p { color: var(--text-mid); font-size: .875rem; line-height: 1.7; flex: 1; }
.link-btn { color: var(--blue); font-weight: 600; font-size: .875rem; display: inline-flex; align-items: center; gap: 4px; transition: gap .2s, color .2s; }
.link-btn:hover { gap: 10px; color: var(--blue-light); }
.link-btn-arrow { font-size: 1rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-bio { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-items: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .expertise-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .funfacts-grid { grid-template-columns: repeat(2, 1fr); }
  .service-box-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 52px 0; }
  .section-title { font-size: 1.6rem; }
  .hero-name { font-size: 2rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--white); padding: 16px 20px; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .menu-toggle { display: block; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .funfacts-grid { grid-template-columns: 1fr; }
  .funfact { padding-left: 116px; }
  .service-box-grid { grid-template-columns: 1fr; }
  .footer-grid {grid-template-columns: 1fr 1fr !important; gap: 30px !important;}
  .footer-brand {grid-column: 1 / -1;}
  .footer-contact li {word-break: break-word;}
  /* --- FIX LỖI ÉP DẸT CHỨNG CHỈ TRÊN ĐIỆN THOẠI --- */
  .cert-grid {grid-template-columns: 1fr !important; gap: 15px !important;}
  .unified-logo .logo-text {font-size: 0.85rem !important; white-space: nowrap !important;}
}

/* ==========================================================================
   TỐI ƯU GIAO DIỆN ĐIỆN THOẠI - CHỈ ÁP DỤNG RIÊNG CHO KHU VỰC HERO
   ========================================================================== */
@media (max-width: 768px) {
    /* Đã gắn thêm .hero lên trước để khóa chặt phạm vi ảnh hưởng */
  .hero .hero-inner {display: flex !important;flex-direction: column-reverse; gap: 30px; padding: 20px 0;}
  .hero .hero-image {width: 100%; max-width: 280px; margin: 0 auto;  }
  .hero .hero-text {text-align: center;}
  .hero .hero-actions {justify-content: center; flex-wrap: wrap; gap: 10px;}
}

/* --- CSS TRANG TIỀN SẢN & HIẾM MUỘN --- */
.pagination .page-numbers {display: inline-block; padding: 8px 16px; margin: 0 4px; border: 1px solid #10abaf; color: #105963; text-decoration: none; border-radius: 4px; font-weight: 500; transition: 0.3s;}
  .pagination .page-numbers.current,
  .pagination .page-numbers:hover {background-color: #10abaf; color: white;}


/* --- CSS NHẬT KÝ BÁC SĨ TRANG CHỦ (PAGE-HOME) --- */
  .diary-slider::-webkit-scrollbar { display: none; }
  .diary-slider { -ms-overflow-style: none; scrollbar-width: none; }

  .polaroid-card { background: white; padding: 15px 15px 30px 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: all 0.3s ease; width: 280px; border: 1px solid #eee;}
  .polaroid-card:nth-child(odd) { transform: rotate(-2deg); }
  .polaroid-card:nth-child(even) { transform: rotate(2deg); }
  .polaroid-card:hover { transform: rotate(0deg) scale(1.05); z-index: 10; box-shadow: 0 15px 45px rgba(16, 89, 99, 0.15);}
  .polaroid-inner img {width: 100%; height: 250px; object-fit: cover; margin-bottom: 15px;}
  .polaroid-caption {font-family: 'Dancing Script', cursive; font-size: 1.2rem;color: var(--deep-teal); text-align: center;}
  .diary-nav-btn { width: 45px; height: 45px; border-radius: 50%; border: none; background: #e0f2f1; color: #105963; font-size: 18px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.05);}
  .diary-nav-btn:hover { background: #10abaf; color: white; transform: scale(1.1);}

  /* ===== HIỆU ỨNG NỀN CHUYỂN MÀU MỘNG MƠ CHO NHẬT KÝ ===== */
.doctor-diary {
  /* Khai báo 4 dải màu pastel nhạt xen kẽ */
  background: linear-gradient(-45deg, #eefafb, #c4ecee, #fad4d1, #fcf0c2, #bce6e4);
  background-size: 400% 400%;
  animation: dreamBackground 12s ease infinite;
  
  /* Thêm viền bóng đổ hắt nhẹ vào trong để tạo chiều sâu 3D cho cả khối */
  box-shadow: inset 0 10px 20px rgba(0,0,0,0.02), inset 0 -10px 20px rgba(0,0,0,0.02);
}

/* Lệnh chạy animation chuyển màu chầm chậm lặp lại liên tục */
@keyframes dreamBackground {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

  /* CẤU TRÚC LƯỚI ALBUM */
  .diary-album-grid {display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px; justify-items: center;}

  /* PHONG CÁCH POLAROID */
  .polaroid-item {transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);}
  .polaroid-wrapper { background: white; padding: 15px 15px 35px 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); border: 1px solid #eee; width: 280px; position: relative;}
  .polaroid-wrapper img { width: 100%; height: 280px; object-fit: cover; display: block; margin-bottom: 20px;}
  .polaroid-text { font-family: 'Dancing Script', cursive;  font-size: 1.3rem; color: #105963; text-align: center; line-height: 1.2;}

  /* HIỆU ỨNG NGHIÊNG NGẪU NHIÊN (Giống ảnh thật xếp trên bàn) */
  .polaroid-item:nth-child(4n+1) { transform: rotate(-3deg); }
  .polaroid-item:nth-child(4n+2) { transform: rotate(2deg); }
  .polaroid-item:nth-child(4n+3) { transform: rotate(-1.5deg); }
  .polaroid-item:nth-child(4n) { transform: rotate(2.5deg); }

  /* KHI DI CHUỘT VÀO: Ảnh đứng thẳng và nổi lên */
  .polaroid-item:hover {transform: rotate(0deg) scale(1.08); z-index: 10;}
  .polaroid-item:hover .polaroid-wrapper { box-shadow: 0 15px 45px rgba(28, 179, 184, 0.2); border-color: #1cb3b8; }

  /* CSS PHÂN TRANG ĐỒNG BỘ */
  .pagination .page-numbers { display: inline-block; padding: 10px 20px; margin: 0 5px; background: #fff; border: 1px solid #eee; color: #105963; text-decoration: none; border-radius: 30px; font-weight: 600; box-shadow: 0 2px 5px rgba(0,0,0,0.05);}
  .pagination .page-numbers.current,
  .pagination .page-numbers:hover { background: #1cb3b8; color: #fff; border-color: #1cb3b8;}


  /* ===== HIỆU ỨNG LOGO CHUYỂN MÀU HỢP NHẤT ===== */
.unified-logo { display: flex;  align-items: center;  gap: 10px;  text-decoration: none; transition: transform 0.3s ease;}
/* Hiệu ứng nẩy nhẹ cả khối lên khi di chuột vào */
.unified-logo:hover { transform: scale(1.02);}
/* 1. Hoạt ảnh nhịp thở cho hình ảnh Logo */
.unified-logo .logo-img { height: 60px; animation: logoHue 6s ease-in-out infinite;}
/* 2. Dải lụa màu chạy qua toàn bộ khối chữ */
.unified-logo .logo-text {
    font-weight: bold; font-size: 1.15rem; line-height: 1.4; padding-bottom: 2px;
    /* Dùng màu thương hiệu đậm để nổi bật trên nền trắng */
    background: linear-gradient(-45deg, #1cb3b8, #f28b82, #1cb3b8, #f28b82);background-size: 300% 300%;animation: dreamText 6s ease infinite;
    /* Lệnh cắt nền theo hình dáng chữ */
    background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;display: block; 
}
/* Ép dòng chữ Sản phụ khoa nằm ngoan ngoãn trong dải màu chung */
.unified-logo .logo-text span { display: block; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px;}

/* --- Khai báo chuyển động --- */
@keyframes dreamText { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; }}
@keyframes logoHue {
  	0% { filter: hue-rotate(0deg) drop-shadow(0 0 0 rgba(0,0,0,0)); }
  	50% { filter: hue-rotate(15deg) drop-shadow(0 4px 8px rgba(28,179,184,0.15)); }
 	100% { filter: hue-rotate(0deg) drop-shadow(0 0 0 rgba(0,0,0,0)); }
}

  .smart-actions {display: flex; gap: 15px; width: 100%; margin-top: 25px;}
  .smart-btn {display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.3); color: #ffffff; padding: 12px 5px; border-radius: 16px; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: all 0.3s ease;}
  .smart-btn:hover {background: #ffffff; color: #1cb3b8; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1);}
  .smart-btn img {width: 26px; height: 26px; object-fit: contain; transition: all 0.3s ease;}

  /* Cấu hình tối ưu riêng cho màn hình điện thoại */
  @media (max-width: 768px) {
    .smart-actions {gap: 10px;}
    .smart-btn {flex-direction: column; gap: 6px; padding: 12px 5px; border-radius: 14px; font-size: 0.8rem;}
    .smart-btn img {width: 32px; height: 32px;}
  }

    /* PAGE NHẬT KÝ BÁC SĨ 
    2. CẤU HÌNH MA TRẬN 2 CỘT */
  .diary-2-cols { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 50px 40px !important; align-items: start; }
  .polaroid-item-large .polaroid-wrapper { width: 100% !important; max-width: 480px; margin: 0 auto; padding: 20px 20px 30px 20px !important;}
  .polaroid-item-large .polaroid-wrapper img { height: 380px !important; object-fit: cover;}
  .polaroid-date { font-family: 'Segoe UI', Arial, sans-serif; font-size: 0.85rem; color: #999; text-align: center; margin-top: 6px; margin-bottom: 12px;}
  /* 5. CSS CHO CÂU CHUYỆN (CAPTION) BÊN DƯỚI */
  .polaroid-caption-content {font-family: 'Segoe UI', Arial, sans-serif; font-size: 0.95rem; line-height: 1.6; color: #444; text-align: justify; padding-top: 15px; border-top: 1px dashed #ddd; margin-top: 10px;}

  /* 6. RESPONSIVE CHO ĐIỆN THOẠI: QUAY VỀ 1 CỘT CHO DỄ ĐỌC */
@media (max-width: 768px) {
  .diary-2-cols {grid-template-columns: 1fr !important; gap: 40px !important;}
  .polaroid-item-large .polaroid-wrapper img { height: 320px !important; /* Giảm chiều cao ảnh trên điện thoại */}
}

/* --- FIX LỖI RỚT DÒNG TIÊU ĐỀ TRANG CON TRÊN ĐIỆN THOẠI --- */
@media (max-width: 768px) {
  .page-hero h1, 
  .page-hero .hero-name {font-size: clamp(1.2rem, 5vw, 2rem) !important; white-space: nowrap !important;}
  /* Dành cho thẻ H2 (Tiêu đề các mục bên dưới) */
  h2, .section-title {font-size: clamp(1.0rem, 4vw, 1.6rem) !important; white-space: nowrap !important;}
}

/* --- ĐỊNH DẠNG NỘI DUNG BÀI VIẾT: CANH ĐỀU + DẤU CỘNG (+) --- */
/* 1. Canh đều 2 bên cho tất cả các đoạn văn thường */
.post-content p:not(.has-text-align-center):not(.has-text-align-right) {text-align: justify !important;text-indent: 20px !important;}
/* 2. Xóa bỏ dấu chấm tròn mặc định của danh sách và lùi khối vào 1 tí */
.post-content ul {list-style-type: none !important; list-style: none !important; padding-left: 0 !important; margin-left: 20px !important;}
/* 3. Căn chỉnh chữ bên trong danh sách (Canh đều và chừa chỗ cho dấu +) */
.post-content ul li {position: relative !important; padding-left: 18px !important; margin-bottom: 12px !important; text-align: justify !important; line-height: 1.8 !important;}
.post-content ul li::before {content: "\2713" !important; display: inline-block !important; position: absolute !important; left: 0px !important; top: -1.5px !important; color: #333333 !important; font-weight: 600 !important; font-size: 18px !important; line-height: inherit !important;}

/* --- ĐỊNH DẠNG ĐỒNG BỘ CHO DANH SÁCH ĐẾM SỐ (1, 2, 3...) --- */
.post-content ol { list-style-type: decimal !important; padding-left: 25px !important; margin-left: 20px !important; }
.post-content ol li {margin-bottom: 12px !important; text-align: justify !important; line-height: 1.8 !important; padding-left: 0 !important;}
/* --- TỐI ƯU HÓA TRẢI NGHIỆM ĐỌC TRÊN ĐIỆN THOẠI --- */
@media (max-width: 768px) {
  /* 1. Ép mỏng viền trắng 2 bên của khung bài viết để nhường chỗ cho chữ */
  .section .container {padding-left: 15px !important; padding-right: 15px !important; padding-top: 25px !important; padding-bottom: 25px !important; }
  /* 2. Thu nhỏ tiêu đề H2 cho thanh thoát, đỡ lấn át chữ thường */
  .post-content h2 {
    font-size: 20px !important; line-height: 1.4 !important;  margin-top: 25px !important;  margin-bottom: 12px !important;}
  /* 3. Tiện thể thu nhỏ luôn H3 (nếu bác sĩ có dùng trong bài) */
  .post-content h3 { font-size: 18px !important; line-height: 1.4 !important; margin-top: 20px !important; margin-bottom: 10px !important;}
}

/* --- ÉP TẤT CẢ TIÊU ĐỀ (H1, H2, H3) RỚT DÒNG KHI ZOOM (CHỈ KHÓA RIÊNG TRONG BÀI VIẾT) --- */
.single-post .page-hero h1,
.single-post h1,
.single-post .post-content h2, 
.single-post .post-content h3,
.single-post .container h2,
.single-post .container h3 {white-space: normal !important; word-wrap: break-word !important; overflow-wrap: break-word !important; word-break: keep-all !important;}

/* --- ĐỒNG BỘ HIỆU ỨNG NÚT CHIA SẺ TRONG BÀI VIẾT VỚI TRANG CHỦ --- */

/* 1. Cấu trúc chuẩn: Nút bo tròn, icon đi kèm chữ */
.share-btn {display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; padding: 12px 5px; border-radius: 16px; font-weight: 600; font-size: 0.95rem;  text-decoration: none; transition: all 0.3s ease; border: none; cursor: pointer;}
.share-btn img { width: 26px; height: 26px; object-fit: contain; transition: all 0.3s ease; }
/* 2. Màu sắc nổi bật trên nền trắng */
.btn-fb { background: #1877F2; color: #ffffff; }
.btn-zalo { background: #0068FF; color: #ffffff; }
.btn-copy { background: #1cb3b8; color: #ffffff; }
/* 3. Hiệu ứng Hover (Di chuột vào nẩy lên + có bóng mờ y hệt ở Home) */
.share-btn:hover {transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.15);filter: brightness(1.1); color: #ffffff;}
/* 4. Tối ưu riêng cho Điện thoại (Cấu trúc xếp dọc Icon trên, Chữ dưới) */
@media (max-width: 768px) {
  .share-actions > div { gap: 10px !important; }
  .share-btn { flex-direction: column; gap: 6px; padding: 12px 5px; border-radius: 14px; font-size: 0.8rem; } 
  .share-btn img { width: 32px; height: 32px; }
}