/* ===== MedLink 스타일 의료 전문 디자인 리디자인 ===== */

body {
  background-color: #eef1f8 !important;
  color: #2d3748 !important;
}

#masthead, .site-header, .ast-site-header-wrap, header.site-header {
  background-color: #ffffff !important;
  border-bottom: 3px solid #1e3a5f !important;
  box-shadow: 0 2px 16px rgba(30,58,95,0.10) !important;
}

.site-title a, .ast-site-name {
  color: #1e3a5f !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
}

.ast-nav-menu > li > a, .main-header-bar nav a, .navigation-accessibility a {
  color: #1e3a5f !important;
  font-weight: 600 !important;
}
.ast-nav-menu > li > a:hover, .main-header-bar nav a:hover {
  color: #3d6fa8 !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #1e3a5f !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

a { color: #3d6fa8 !important; transition: color 0.2s ease !important; }
a:hover { color: #1e3a5f !important; }

.ast-btn, .button, .wp-block-button__link, a.ast-button, .elementor-button,
input[type="submit"], button[type="submit"] {
  background-color: #1e3a5f !important;
  color: #ffffff !important;
  border-color: #1e3a5f !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  padding: 12px 28px !important;
  box-shadow: 0 2px 8px rgba(30,58,95,0.20) !important;
  transition: all 0.25s ease !important;
}
.ast-btn:hover, .button:hover, .wp-block-button__link:hover,
a.ast-button:hover, .elementor-button:hover,
input[type="submit"]:hover, button[type="submit"]:hover {
  background-color: #3d6fa8 !important;
  border-color: #3d6fa8 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(30,58,95,0.30) !important;
}

.ast-above-header, #ast-desktop-header .ast-above-header-section,
.ast-masthead-custom-menu-items {
  background-color: #152d4a !important;
}
.ast-above-header a, .ast-masthead-custom-menu-items a { color: #a8c4e0 !important; }

.ast-article-post, .post-grid-item, .ast-post-grid-item {
  background: #ffffff !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 20px rgba(30,58,95,0.08) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  overflow: hidden !important;
}
.ast-article-post:hover, .post-grid-item:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 36px rgba(30,58,95,0.14) !important;
}

.widget-title, .wp-block-heading { color: #1e3a5f !important; font-weight: 700 !important; }
.widget-area .widget-title {
  border-bottom: 3px solid #3d6fa8 !important;
  padding-bottom: 10px !important;
  margin-bottom: 16px !important;
}

.site-footer, #colophon, .ast-small-footer, .footer-bar-section, .ast-footer-bar {
  background-color: #1e3a5f !important;
  color: #b0c8e8 !important;
}
.site-footer a, #colophon a, .ast-small-footer a, .ast-footer-bar a { color: #90b8d8 !important; }
.site-footer a:hover, #colophon a:hover { color: #ffffff !important; }

input[type="text"], input[type="email"], input[type="search"], textarea, select {
  border: 1.5px solid #c8d8ec !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #2d3748 !important;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  border-color: #3d6fa8 !important;
  box-shadow: 0 0 0 3px rgba(61,111,168,0.15) !important;
  outline: none !important;
}

.entry-meta, .posted-on, .byline { color: #5a6a80 !important; font-size: 0.875rem !important; }
hr { border-color: #d0dae8 !important; }

.ast-tag, .post-tags a, .cat-links a {
  background-color: #dce8f6 !important;
  color: #1e3a5f !important;
  border-radius: 20px !important;
  padding: 3px 12px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border: 1px solid #b0c8e8 !important;
}

.ast-read-more-container a {
  color: #ffffff !important;
  background: #3d6fa8 !important;
  border-radius: 4px !important;
  padding: 8px 20px !important;
  font-weight: 600 !important;
}

img { border-radius: 6px; }

/* Fix: hide WordPress auto-inserted <br> tags inside flex button row */
.hf-btns br { display: none !important; }

/* Fix: hero right side - doctor card centered */
.hf-hero-side.right {
  align-items: center;
  justify-content: center;
}

/* Fix: blog grid - force 4 columns on wide desktop */
@media (min-width: 901px) {
  .hf-blog-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* === DOCTOR PHOTO: fill right column, bigger photo === */
.hf-hero-side.right {
  align-items: stretch !important;
  justify-content: flex-start !important;
}
.hf-hero-side.right .hf-doctor-card {
  width: 100% !important;
}
.hf-doctor-photo {
  aspect-ratio: 3/4 !important;
  min-height: 280px !important;
}

/* === HERO GRID: wider right column for photo === */
.hf-hero {
  grid-template-columns: 1fr 1.8fr 1.4fr !important;
}

/* === FONT SIZES: bigger for readability === */
.hf-hero h1 { font-size: 48px !important; }
.hf-hero h1, .hf-hero-center > p { line-height: 1.4 !important; }
.hf-hero-center > p { font-size: 17px !important; }
.hf-badge { font-size: 14px !important; }
.hf-stat-num { font-size: 26px !important; }
.hf-stat-label { font-size: 13px !important; }
.hf-btn-p, .hf-btn-s { font-size: 16px !important; padding: 13px 26px !important; }
.hf-doctor-name { font-size: 16px !important; padding: 12px 10px 4px !important; }
.hf-doctor-sub { font-size: 13px !important; padding: 0 10px 14px !important; }

/* Blog section fonts */
.hf-section-head h2 { font-size: 32px !important; }
.hf-section-head p { font-size: 16px !important; }
.hf-blog-body h3, .hf-blog-card h3 { font-size: 17px !important; }
.hf-blog-body p, .hf-blog-card p { font-size: 15px !important; }
.hf-tag { font-size: 13px !important; }

/* General body text */
.hf p, .hf li, .hf-about-info p { font-size: 16px !important; line-height: 1.75 !important; }
.hf-about-info h3 { font-size: 22px !important; }
.hf-section h2 { font-size: 30px !important; }

/* Newsletter fonts */
.hf-newsletter h3 { font-size: 22px !important; }
.hf-newsletter > div > p { font-size: 16px !important; }
.hf-newsletter-benefits p { font-size: 15px !important; }

/* Doctor card credentials */
.hf-doctor-creds {
  padding: 6px 10px 14px;
  border-top: 1px solid #e5e7eb;
  margin-top: 4px;
}
.hf-doctor-creds p {
  font-size: 11px !important;
  color: #64748B !important;
  line-height: 1.6 !important;
  margin: 0 0 2px 0 !important;
  text-align: center;
}

/* === 사진 위아래 스왑: 이름/자격증을 위로, 사진을 아래로 === */
.hf-doctor-card {
  display: flex !important;
  flex-direction: column !important;
}
.hf-doctor-photo { order: 10 !important; border-radius: 0 0 14px 14px !important; }
.hf-doctor-name  { order: 1 !important; padding-top: 14px !important; }
.hf-doctor-sub   { order: 2 !important; }
.hf-doctor-creds { order: 3 !important; border-top: none !important; border-bottom: 1px solid #e5e7eb !important; margin-bottom: 0 !important; padding-bottom: 10px !important; }

/* === 글씨 더 크게 === */
.hf-hero h1 { font-size: 56px !important; line-height: 1.2 !important; }
.hf-hero-center > p { font-size: 18px !important; line-height: 1.8 !important; }
.hf-badge { font-size: 15px !important; }
.hf-stat-num { font-size: 30px !important; }
.hf-stat-label { font-size: 14px !important; }
.hf-btn-p, .hf-btn-s { font-size: 17px !important; padding: 14px 28px !important; }
.hf-doctor-name { font-size: 18px !important; font-weight: 800 !important; }
.hf-doctor-sub { font-size: 14px !important; }
.hf-doctor-creds p { font-size: 12px !important; }
.hf-section-head h2 { font-size: 36px !important; }
.hf-section-head p { font-size: 18px !important; }
.hf-blog-body h3, .hf-blog-card h3 { font-size: 18px !important; }
.hf-blog-body p { font-size: 16px !important; }
.hf p, .hf li { font-size: 17px !important; line-height: 1.8 !important; }
.hf-about-info h3 { font-size: 24px !important; }
.hf-about-info p { font-size: 17px !important; }
.hf-section h2 { font-size: 34px !important; }
.hf-newsletter h3 { font-size: 24px !important; }
.hf-newsletter-benefits p { font-size: 16px !important; }
.hf-tag { font-size: 14px !important; }

/* === REVERT: 히어로 카드 사진 다시 위로 복원 === */
.hf-doctor-card {
  display: block !important;
  flex-direction: unset !important;
}
.hf-doctor-photo { order: unset !important; border-radius: 14px 14px 0 0 !important; }
.hf-doctor-name  { order: unset !important; }
.hf-doctor-sub   { order: unset !important; }
.hf-doctor-creds { order: unset !important; border-top: 1px solid #e5e7eb !important; border-bottom: none !important; padding-bottom: 14px !important; }

/* === 히어로 오른쪽: 원형 아바타 + 약력 스타일 === */
.hf-hero-about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 10px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E1F5EE;
  box-shadow: 0 4px 20px rgba(30,58,95,0.08);
}
.hf-avatar-lg {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-image: url('https://headachefree.doctor/wp-content/uploads/2026/05/KakaoTalk_20260317_132340526.jpg');
  background-size: cover;
  background-position: center 18%;
  border: 4px solid #1D9E75;
  flex-shrink: 0;
}
.hf-hero-name {
  font-size: 22px !important;
  font-weight: 800;
  color: #0F172A;
  margin: 0 !important;
}
.hf-hero-spec {
  font-size: 14px !important;
  color: #1D9E75;
  font-weight: 600;
  margin: 0 !important;
}
.hf-hero-bio {
  font-size: 13px !important;
  color: #475569;
  line-height: 1.6 !important;
  margin: 0 !important;
}
.hf-hero-tags {
  justify-content: center;
  margin-top: 4px;
}
.hf-hero-tags .hf-about-tag {
  font-size: 11px;
}

/* === 어바웃 스트립: 큰 사진 카드 + 텍스트 === */
.hf-about-strip .hf-doctor-card {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(30,58,95,0.10);
}
.hf-about-strip .hf-doctor-photo {
  width: 200px;
  height: 240px;
  aspect-ratio: unset !important;
  min-height: unset !important;
  background-image: url('https://headachefree.doctor/wp-content/uploads/2026/05/KakaoTalk_20260317_132340526.jpg');
  background-size: cover;
  background-position: center 18%;
}
/* === 히어로 오른쪽: 직사각형 카드 === */
.hf-hero-card { width:100%; border-radius:16px; overflow:hidden; box-shadow:0 4px 24px rgba(30,58,95,0.12); background:#fff; border:1px solid #E1F5EE; }
.hf-hero-card .hf-doctor-photo { width:100%; height:320px; aspect-ratio:unset !important; min-height:unset !important; background-image:url('https://headachefree.doctor/wp-content/uploads/2026/05/KakaoTalk_20260317_132340526.jpg'); background-size:cover; background-position:center 18%; border-radius:0; }
.hf-hero-card .hf-doctor-name { font-size:20px !important; font-weight:800; color:#0F172A; padding:14px 16px 2px; text-align:center; }
.hf-hero-card .hf-doctor-sub { font-size:13px !important; color:#1D9E75; font-weight:600; padding:0 16px 10px; text-align:center; }
.hf-doctor-cred { font-size:11.5px; color:#64748B; line-height:1.6; padding:8px 14px 14px; text-align:center; border-top:1px solid #f1f5f9; margin-top:4px; }
/* === 어바웃 스트립: 원형 아바타로 복원 === */
.hf-about-strip .hf-avatar { width:96px; height:96px; flex-shrink:0; }