/* ============================================
   Bệnh viện Thú y - Style tham chiếu benhvienthuybangpham.vn
   Palette, typography, buttons, cards, sections
   ============================================ */

:root {
  --primary: #005BAC;
  --primary-hover: #0066CC;
  --accent: #00AEEF;
  --emergency: #E63946;
  --bg-alt: #F8FAFC;
  --text: #2D3748;
  --text-muted: #718096;
  --border: #E2E8F0;
  --white: #FFFFFF;
  --shadow-sm: 0 4px 15px rgba(0, 91, 172, 0.25);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 20px 40px rgba(0, 91, 172, 0.18);
  --radius-card: 16px;
  --radius-btn: 50px;
  --container-max: 1320px;
  --section-padding: 80px 0;
  --section-padding-mobile: 60px 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", "Helvetica Neue", sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "Roboto", "Helvetica Neue", sans-serif;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); }

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn-primary {
  background: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  padding: 14px 32px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent) !important;
  color: var(--white) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 91, 172, 0.35);
}

.btn-outline-primary {
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
  border-radius: var(--radius-btn) !important;
  padding: 12px 28px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-color: var(--primary) !important;
  transform: translateY(-2px);
}

.btn-danger,
.btn-emergency {
  background: var(--emergency) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.btn-danger:hover,
.btn-emergency:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

/* Container */
.container {
  max-width: var(--container-max);
}

/* ========== Header (một thanh duy nhất) ========== */
.main-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  background: var(--white) !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  padding: 0.75rem 0;
  transition: box-shadow 0.3s ease;
}

.main-navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-navbar .navbar-brand-icon {
  flex-shrink: 0;
  border-radius: 6px;
}
.main-navbar .navbar-brand-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.main-navbar .navbar-brand-icon-fallback svg {
  width: 28px;
  height: 28px;
}
.main-navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primary) !important;
}

.main-navbar .nav-link {
  color: var(--text) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.main-navbar .nav-link:hover {
  color: var(--accent) !important;
  background: rgba(0, 174, 239, 0.08);
}

.main-navbar .navbar-toggler {
  border-color: var(--border);
}

.main-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23005BAC' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.main-navbar .nav-phone {
  color: var(--primary) !important;
  font-weight: 600;
  padding: 0.4rem 0.6rem !important;
}

.main-navbar .nav-phone:hover {
  color: var(--accent) !important;
}

.main-navbar .btn-primary.btn-sm {
  padding: 8px 20px !important;
}

/* ========== Hero ========== */
.hero-section {
  padding: 100px 0 80px;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--white) 100%);
}

.hero-section .hero-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-section .hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero .carousel-caption {
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  text-align: left;
  background: linear-gradient(90deg, rgba(0, 91, 172, 0.85) 0%, transparent 100%);
  padding: 1.5rem 2rem;
  border-radius: 12px;
}

.hero .carousel-caption h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
}

.hero .carousel-control-prev-icon,
.hero .carousel-control-next-icon {
  background-color: var(--primary);
  border-radius: 50%;
  padding: 1.5rem;
}

/* ========== Sections ========== */
section.section-block {
  padding: var(--section-padding);
}

section.section-alt {
  background: var(--bg-alt);
  padding: var(--section-padding);
}

@media (max-width: 768px) {
  section.section-block,
  section.section-alt {
    padding: var(--section-padding-mobile);
  }
  .hero-section {
    padding: 60px 0 50px;
  }
}

/* ========== Cards (Service / Blog / Feature) ========== */
.service-card,
.blog-card,
.feature-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.service-card:hover,
.blog-card:hover,
.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-card-hover);
}

.service-card .card-img-top,
.blog-card .card-img-top {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  height: 200px;
  object-fit: cover;
}

.service-card .card-body,
.blog-card .card-body {
  padding: 1.5rem 0 0;
}

.service-card .card-title,
.blog-card .card-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.service-card .card-text,
.blog-card .card-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Legacy .card when not using service-card */
.card {
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

.card .card-img-top {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

/* ========== Contact form ========== */
.contact-form .form-control {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 91, 172, 0.15);
}

.contact-form .form-label {
  font-weight: 600;
  color: var(--text);
}

/* ========== Footer ========== */
footer.site-footer {
  background: var(--text) !important;
  color: rgba(255, 255, 255, 0.9);
  padding: 4rem 0 2rem;
}

footer.site-footer h5,
footer.site-footer h6 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1rem;
}

footer.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s;
}

footer.site-footer a:hover {
  color: var(--accent);
}

footer.site-footer hr {
  border-color: rgba(255, 255, 255, 0.2);
}

footer.site-footer .footer-map-wrap {
  max-width: 100%;
  height: 220px;
}

footer.site-footer .footer-map-wrap iframe {
  width: 100%;
  height: 220px;
  display: block;
}

/* ========== Feature icon / Counter (optional) ========== */
.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(0, 91, 172, 0.1);
  color: var(--primary);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.counter-box {
  text-align: center;
  padding: 1.5rem;
}

.counter-box .counter-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* ========== Links ========== */
a:not(.btn) {
  transition: color 0.2s;
}

a:not(.btn):hover {
  color: var(--accent);
}

/* ========== Post content (article body) ========== */
.post-content {
  line-height: 1.8;
  color: var(--text);
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.post-content pre,
.service-description pre {
  background: #f6f8fa;
  padding: 1rem;
  border-radius: 12px;
  overflow-x: auto;
}

.post-content .hljs,
.service-description .hljs {
  background: transparent;
  padding: 0;
}

/* ========== Admin (same palette) ========== */
body.bg-light .navbar-dark {
  background: var(--primary) !important;
}

body.bg-light .btn-primary {
  background: var(--primary) !important;
}

body.bg-light .btn-primary:hover {
  background: var(--accent) !important;
}

body.bg-light .card {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body.bg-light .table {
  border-radius: 12px;
  overflow: hidden;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .hero .carousel-caption {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
