/*
Theme Name: Điều dưỡng Thanh Đa
Theme URI: https://dieuduongthanhda.vn/
Author: Custom Build
Author URI: https://dieuduongthanhda.vn/
Description: A warm, accessible WordPress theme for nursing homes and elderly care centers, modeled on Điều dưỡng Thanh Đa. Includes a top contact bar, hero slider, services grid, facilities gallery, and a news section. Custom post types for Services and News, plus Customizer options for contact details and branding.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dieu-duong-thanh-da
Tags: healthcare, custom-logo, custom-menu, featured-images, translation-ready, two-columns, right-sidebar
*/

/* ============================================================
   DESIGN TOKENS
   Warm care-sector palette: deep green + soft cream + amber CTA
   ============================================================ */
:root {
  --tda-green:        #1f7a4d;   /* primary brand green */
  --tda-green-dark:   #155c39;
  --tda-green-light:  #e8f4ed;
  --tda-amber:        #f0a500;   /* CTA / phone accent */
  --tda-amber-dark:   #d18e00;
  --tda-cream:        #fbf8f1;
  --tda-ink:          #243027;   /* body text */
  --tda-muted:        #6b7a70;
  --tda-line:         #e3e8e3;
  --tda-white:        #ffffff;

  --tda-radius:       14px;
  --tda-radius-sm:    9px;
  --tda-shadow:       0 10px 30px rgba(31,122,77,.10);
  --tda-shadow-sm:    0 4px 14px rgba(36,48,39,.08);

  --tda-maxw:         1180px;
  --tda-font-body:    "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --tda-font-head:    "Playfair Display", "Be Vietnam Pro", Georgia, serif;
}

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

body {
  margin: 0;
  font-family: var(--tda-font-body);
  color: var(--tda-ink);
  background: var(--tda-cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--tda-green); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--tda-green-dark); }

h1, h2, h3, h4 {
  font-family: var(--tda-font-head);
  color: var(--tda-green-dark);
  line-height: 1.25;
  margin: 0 0 .5em;
  font-weight: 700;
}

p { margin: 0 0 1em; }

.tda-container {
  max-width: var(--tda-maxw);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Buttons */
.tda-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease;
  line-height: 1;
}
.tda-btn:hover { transform: translateY(-2px); }
.tda-btn-primary { background: var(--tda-amber); color: #2a2200; box-shadow: 0 6px 18px rgba(240,165,0,.35); }
.tda-btn-primary:hover { background: var(--tda-amber-dark); color: #2a2200; }
.tda-btn-ghost { background: transparent; color: var(--tda-white); border-color: rgba(255,255,255,.7); }
.tda-btn-ghost:hover { background: rgba(255,255,255,.15); color: var(--tda-white); }
.tda-btn-outline { background: transparent; color: var(--tda-green); border-color: var(--tda-green); }
.tda-btn-outline:hover { background: var(--tda-green); color: var(--tda-white); }

/* ============================================================
   TOP BAR
   ============================================================ */
.tda-topbar {
  background: var(--tda-green-dark);
  color: rgba(255,255,255,.92);
  font-size: 14px;
}
.tda-topbar .tda-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  gap: 16px;
  flex-wrap: wrap;
}
.tda-topbar a { color: rgba(255,255,255,.92); }
.tda-topbar a:hover { color: var(--tda-amber); }
.tda-topbar-left { display: flex; gap: 22px; flex-wrap: wrap; }
.tda-topbar-item { display: inline-flex; align-items: center; gap: 7px; }
.tda-topbar-socials { display: flex; gap: 12px; }
.tda-topbar-socials a { font-size: 15px; }

/* ============================================================
   HEADER
   ============================================================ */
.tda-header { background: var(--tda-white); border-bottom: 1px solid var(--tda-line); position: sticky; top: 0; z-index: 50; }
.tda-header .tda-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 86px;
}
.tda-branding { display: flex; align-items: center; gap: 14px; }
.tda-logo img { max-height: 62px; width: auto; }
.tda-site-title { font-family: var(--tda-font-head); font-size: 22px; color: var(--tda-green-dark); margin: 0; line-height: 1.15; }
.tda-site-title a { color: inherit; }
.tda-site-desc { font-size: 13px; color: var(--tda-muted); margin: 0; }

.tda-header-contact { display: flex; align-items: center; gap: 26px; }
.tda-hc-item { display: flex; align-items: center; gap: 11px; }
.tda-hc-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--tda-green-light); color: var(--tda-green);
  display: grid; place-items: center; font-size: 18px; flex: none;
}
.tda-hc-label { font-size: 12px; color: var(--tda-muted); text-transform: uppercase; letter-spacing: .04em; }
.tda-hc-value { font-weight: 700; color: var(--tda-green-dark); font-size: 15px; }

/* ============================================================
   PRIMARY NAVIGATION
   ============================================================ */
.tda-nav { background: var(--tda-green); position: relative; z-index: 40; }
.tda-nav .tda-container { display: flex; align-items: center; justify-content: space-between; }
.tda-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.tda-menu li { position: relative; }
.tda-menu a {
  display: block; color: var(--tda-white); padding: 16px 18px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  transition: background .2s ease;
}
.tda-menu li:hover > a,
.tda-menu .current-menu-item > a,
.tda-menu .current_page_item > a { background: var(--tda-green-dark); color: var(--tda-amber); }

/* dropdown */
.tda-menu ul.sub-menu {
  list-style: none; margin: 0; padding: 8px 0;
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: var(--tda-white); box-shadow: var(--tda-shadow);
  border-radius: 0 0 var(--tda-radius-sm) var(--tda-radius-sm);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .2s ease; z-index: 60;
}
.tda-menu li:hover > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.tda-menu ul.sub-menu a { color: var(--tda-ink); padding: 11px 18px; font-size: 14px; }
.tda-menu ul.sub-menu a:hover { background: var(--tda-green-light); color: var(--tda-green-dark); }
.tda-menu .menu-item-has-children > a::after { content: " \25BE"; font-size: 11px; opacity: .8; }

.tda-nav-toggle {
  display: none; background: none; border: none; color: #fff;
  font-size: 26px; cursor: pointer; padding: 12px 6px;
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.tda-hero { position: relative; overflow: hidden; background: #0d3322; }
.tda-slides { position: relative; }
.tda-slide { display: none; position: relative; }
.tda-slide.is-active { display: block; animation: tdaFade .8s ease; }
@keyframes tdaFade { from { opacity: 0; } to { opacity: 1; } }
.tda-slide-img { width: 100%; height: clamp(340px, 46vw, 540px); object-fit: cover; display: block; }
.tda-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,51,34,.78) 0%, rgba(13,51,34,.35) 55%, rgba(13,51,34,0) 100%);
  display: flex; align-items: center;
}
.tda-slide-caption { max-width: 560px; color: #fff; padding: 0 20px; margin-left: max(20px, calc((100vw - var(--tda-maxw)) / 2)); }
.tda-slide-caption h2 { color: #fff; font-size: clamp(28px, 4vw, 46px); margin-bottom: .35em; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.tda-slide-caption p { font-size: 17px; opacity: .95; margin-bottom: 1.4em; }
.tda-slide-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.tda-slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.85); border: none; cursor: pointer;
  font-size: 20px; color: var(--tda-green-dark); display: grid; place-items: center;
  transition: background .2s ease; z-index: 5;
}
.tda-slider-btn:hover { background: #fff; }
.tda-slider-prev { left: 18px; }
.tda-slider-next { right: 18px; }
.tda-slider-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; z-index: 5; }
.tda-dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0; }
.tda-dot.is-active { background: var(--tda-amber); }

/* ============================================================
   SECTIONS
   ============================================================ */
.tda-section { padding: 72px 0; }
.tda-section--alt { background: var(--tda-white); }
.tda-section--green { background: var(--tda-green-light); }
.tda-section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.tda-section-head h2 { font-size: clamp(26px, 3.4vw, 38px); }
.tda-section-head .tda-eyebrow {
  display: inline-block; color: var(--tda-amber-dark); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: 13px;
  font-family: var(--tda-font-body); margin-bottom: 10px;
}
.tda-section-head p { color: var(--tda-muted); font-size: 17px; }

/* ABOUT / INTRO */
.tda-about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.tda-about-img img { border-radius: var(--tda-radius); box-shadow: var(--tda-shadow); }
.tda-about-pillars { display: grid; gap: 18px; margin: 26px 0; }
.tda-pillar { display: flex; gap: 16px; padding: 18px; background: var(--tda-cream); border-radius: var(--tda-radius-sm); border: 1px solid var(--tda-line); }
.tda-pillar-icon { font-size: 26px; color: var(--tda-green); flex: none; }
.tda-pillar h4 { margin: 0 0 4px; font-family: var(--tda-font-body); font-size: 17px; color: var(--tda-green-dark); }
.tda-pillar p { margin: 0; font-size: 14.5px; color: var(--tda-muted); }

/* SERVICES GRID */
.tda-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tda-card {
  background: var(--tda-white); border-radius: var(--tda-radius); overflow: hidden;
  box-shadow: var(--tda-shadow-sm); border: 1px solid var(--tda-line);
  display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease;
}
.tda-card:hover { transform: translateY(-6px); box-shadow: var(--tda-shadow); }
.tda-card-thumb { position: relative; aspect-ratio: 365 / 260; overflow: hidden; background: var(--tda-green-light); }
.tda-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tda-card:hover .tda-card-thumb img { transform: scale(1.06); }
.tda-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.tda-card-body h3 { font-size: 19px; margin-bottom: 10px; }
.tda-card-body h3 a { color: var(--tda-green-dark); }
.tda-card-excerpt { color: var(--tda-muted); font-size: 14.5px; flex: 1; }
.tda-card-more { margin-top: 14px; font-weight: 700; color: var(--tda-amber-dark); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.tda-card-more::after { content: "\2192"; transition: transform .2s ease; }
.tda-card:hover .tda-card-more::after { transform: translateX(4px); }
.tda-card-date { font-size: 13px; color: var(--tda-muted); display: inline-flex; gap: 6px; align-items: center; margin-bottom: 8px; }

/* FACILITIES GALLERY */
.tda-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tda-gallery a { display: block; border-radius: var(--tda-radius-sm); overflow: hidden; aspect-ratio: 620 / 353; box-shadow: var(--tda-shadow-sm); }
.tda-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tda-gallery a:hover img { transform: scale(1.07); }
.tda-facility-intro { max-width: 760px; margin: 0 auto 36px; text-align: center; color: var(--tda-muted); }

/* CTA BAND */
.tda-cta-band { background: linear-gradient(120deg, var(--tda-green-dark), var(--tda-green)); color: #fff; padding: 54px 0; }
.tda-cta-band .tda-container { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.tda-cta-band h2 { color: #fff; margin: 0 0 6px; }
.tda-cta-band p { margin: 0; opacity: .92; }

/* ============================================================
   POSTS / CONTENT / SINGLE / ARCHIVE
   ============================================================ */
.tda-content-wrap { max-width: var(--tda-maxw); margin: 0 auto; padding: 56px 20px; display: grid; grid-template-columns: 1fr 320px; gap: 44px; }
.tda-content-wrap.tda-no-sidebar { grid-template-columns: 1fr; max-width: 860px; }
.tda-page-title { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 24px; }

.tda-entry { background: #fff; border: 1px solid var(--tda-line); border-radius: var(--tda-radius); overflow: hidden; margin-bottom: 30px; box-shadow: var(--tda-shadow-sm); }
.tda-entry-thumb img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.tda-entry-body { padding: 26px; }
.tda-entry-body h2 { font-size: 24px; }
.tda-entry-meta { font-size: 13.5px; color: var(--tda-muted); margin-bottom: 14px; display: flex; gap: 18px; flex-wrap: wrap; }

.tda-single .tda-entry-content { font-size: 17px; line-height: 1.8; }
.tda-single .tda-entry-content img { border-radius: var(--tda-radius-sm); margin: 22px 0; }
.tda-single .tda-entry-content h2,
.tda-single .tda-entry-content h3 { margin-top: 1.4em; }
.tda-single .tda-entry-content ul,
.tda-single .tda-entry-content ol { padding-left: 1.4em; }

.tda-breadcrumb { font-size: 13.5px; color: var(--tda-muted); margin-bottom: 18px; }
.tda-breadcrumb a { color: var(--tda-green); }

/* Sidebar */
.tda-sidebar .widget {
  background: #fff; border: 1px solid var(--tda-line); border-radius: var(--tda-radius);
  padding: 22px; margin-bottom: 24px; box-shadow: var(--tda-shadow-sm);
}
.tda-sidebar .widget-title { font-size: 18px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--tda-green-light); }
.tda-sidebar ul { list-style: none; margin: 0; padding: 0; }
.tda-sidebar li { padding: 8px 0; border-bottom: 1px dashed var(--tda-line); }
.tda-sidebar li:last-child { border-bottom: none; }

.tda-widget-contact { background: var(--tda-green) !important; color: #fff; }
.tda-widget-contact .widget-title { color: #fff; border-color: rgba(255,255,255,.25); }
.tda-widget-contact a { color: #fff; }
.tda-widget-contact .tda-wc-row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.tda-widget-contact .tda-wc-row span:first-child { font-size: 17px; }

/* Pagination */
.tda-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.tda-pagination .page-numbers {
  padding: 9px 15px; border-radius: var(--tda-radius-sm); background: #fff;
  border: 1px solid var(--tda-line); color: var(--tda-green-dark); font-weight: 600;
}
.tda-pagination .page-numbers.current,
.tda-pagination .page-numbers:hover { background: var(--tda-green); color: #fff; border-color: var(--tda-green); }

/* ============================================================
   FOOTER
   ============================================================ */
.tda-footer { background: #11281c; color: rgba(255,255,255,.78); padding: 60px 0 0; font-size: 15px; }
.tda-footer h3 { color: #fff; font-family: var(--tda-font-body); font-size: 18px; margin-bottom: 18px; }
.tda-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; }
.tda-footer a { color: rgba(255,255,255,.78); }
.tda-footer a:hover { color: var(--tda-amber); }
.tda-footer ul { list-style: none; margin: 0; padding: 0; }
.tda-footer li { padding: 6px 0; }
.tda-footer-logo img { max-height: 60px; margin-bottom: 16px; }
.tda-footer-contact-row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.tda-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; font-size: 13.5px; color: rgba(255,255,255,.6); }

/* Floating contact buttons */
.tda-floats { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 12px; z-index: 90; }
.tda-float {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: tdaPulse 2s infinite;
}
.tda-float-phone { background: var(--tda-amber); }
.tda-float-zalo { background: #0068ff; font-size: 14px; font-weight: 800; }
.tda-float-fb { background: #1877f2; }
@keyframes tdaPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* WP core alignment & captions */
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--tda-muted); text-align: center; }
.sticky, .bypostauthor { display: block; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}

/* Comments */
.tda-comments { background:#fff; border:1px solid var(--tda-line); border-radius:var(--tda-radius); padding:26px; margin-top:30px; }
.tda-comments .comment-list { list-style:none; padding:0; }
.tda-comments .comment-body { padding:14px 0; border-bottom:1px dashed var(--tda-line); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .tda-footer-grid { grid-template-columns: 1fr 1fr; }
  .tda-cards { grid-template-columns: repeat(2, 1fr); }
  .tda-header-contact { gap: 16px; }
}
@media (max-width: 860px) {
  .tda-content-wrap { grid-template-columns: 1fr; }
  .tda-about-grid { grid-template-columns: 1fr; }
  .tda-header-contact { display: none; }
  .tda-nav-toggle { display: block; }
  .tda-menu {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--tda-green-dark); padding: 6px 0; box-shadow: var(--tda-shadow); z-index: 60;
  }
  .tda-menu.is-open { display: flex; }
  .tda-menu li { width: 100%; }
  .tda-menu ul.sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(0,0,0,.18); border-radius: 0; padding: 0; }
  .tda-menu ul.sub-menu a { color: rgba(255,255,255,.85); padding-left: 34px; }
  .tda-menu ul.sub-menu a:hover { background: rgba(0,0,0,.25); color: #fff; }
  .tda-slide-caption { margin-left: 20px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .tda-cards, .tda-gallery { grid-template-columns: 1fr; }
  .tda-footer-grid { grid-template-columns: 1fr; }
  .tda-section { padding: 50px 0; }
  .tda-topbar-left { gap: 12px; }
  .tda-cta-band .tda-container { flex-direction: column; text-align: center; }
}
