/* ========================================
   HOME CARE WEBSITE TEMPLATE — STYLE.CSS
   ======================================== */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* === CSS Custom Properties === */
:root {
  --primary: #880085;
  --primary-dark: #6B006A;
  --primary-light: #f9e6f9;
  --accent: #FFB800;
  --accent-dark: #D99D00;
  --text-dark: #1e0a1e;
  --text: #3a1f3a;
  --text-light: #7a5a7a;
  --text-lighter: #a88da8;
  --bg-white: #ffffff;
  --bg-light: #fdf5fd;
  --bg-section: #f7ecf7;
  --border: #e8d5e8;
  --shadow-sm: 0 1px 3px rgba(80, 0, 78, 0.08);
  --shadow-md: 0 4px 16px rgba(80, 0, 78, 0.12);
  --shadow-lg: 0 10px 40px rgba(80, 0, 78, 0.15);
  --shadow-card: 0 4px 20px rgba(136, 0, 133, 0.1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 50px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Top Bar === */
.top-bar {
  background: var(--primary);
  color: white;
  padding: 8px 0;
  font-size: 0.85rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-left a {
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

.top-bar-left a:hover {
  opacity: 1;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-right a {
  color: white;
  opacity: 0.9;
}

.top-bar-right a:hover {
  opacity: 1;
}

/* === Header / Navbar === */
.header {
  background: var(--bg-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  display: block;
  height: 68px;
  width: 68px;
  object-fit: contain;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  padding: 6px;
  box-sizing: border-box;
  border: 2px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.logo-text span {
  display: block;
  font-size: 0.72em;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 24px 28px;
  position: relative;
  z-index: 2;
}

.nav-links a {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.header-phone svg {
  width: 18px;
  height: 18px;
  fill: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(136, 0, 133, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(136, 0, 133, 0.45);
}

.btn-accent {
  background: linear-gradient(135deg, #fbfbfb, #ffffff);
  color: white;
  box-shadow: 0 4px 14px;
  color: #880085;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 184, 0, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* === Login modal === */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-modal.is-open {
  display: flex;
}

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}

.login-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 28px;
  max-height: min(90vh, 640px);
  overflow-y: auto;
}

.login-modal-panel h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

.login-modal-intro {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
}

.login-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.login-modal-close:hover {
  background: var(--bg-soft);
  color: var(--text-dark);
}

.login-modal-form .login-modal-actions {
  margin-top: 8px;
}

.login-modal-form .login-modal-actions .btn {
  width: 100%;
}

.login-modal-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.login-modal-foot a {
  color: var(--primary);
  font-weight: 600;
}

body.login-modal-open {
  overflow: hidden;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* === Hero Section === */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(136, 0, 133, 0.94) 0%, rgba(107, 0, 106, 0.92) 100%);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  fill: var(--accent);
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  color: white;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  position: relative;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  flex-shrink: 0;
  width: 480px;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  border: 4px solid rgba(255, 255, 255, 0.2);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-shapes .circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.hero-shapes .circle:nth-child(1) {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
}

.hero-shapes .circle:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: -50px;
}

.hero-shapes .circle:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 30%;
}

.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-title .highlight {
  color: var(--primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* === Services Section === */
.services {
  background: var(--bg-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 36px 28px;
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--primary-light);
  transition: var(--transition);
  overflow: hidden;
  padding: 0;
}

.service-card:hover .service-icon {
  background: var(--primary);
}

.service-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--primary);
  transition: var(--transition);
}

.service-card:hover .service-icon svg {
  fill: white;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.service-card:hover .service-icon img {
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.service-link svg {
  width: 18px;
  height: 18px;
  fill: var(--primary);
  transition: transform 0.3s;
}

.service-link:hover svg {
  transform: translateX(4px);
}

/* === Equipment rental (landing section) === */
.equipment {
  background: var(--bg-white);
}

.equipment .service-icon {
  width: 100%;
  height: 140px;
  background: var(--bg-light);
}

.equipment .service-icon img {
  object-fit: contain;
  padding: 8px;
  background: #fff;
}

.equipment .service-card:hover .service-icon {
  background: var(--bg-light);
}

/* === Health care section background === */
.health-care {
  background: var(--bg-light);
}

/* === Health care — 2×3 pill card grid carousel === */
.hc-care-grid-carousel {
  position: relative;
  z-index: 1;
  padding: 0 0 8px;
  max-width: 1180px;
  margin: 0 auto;
}

.hc-carousel-layout {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.hc-carousel-viewport-wrap {
  flex: 1;
  min-width: 0;
}

.hc-carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.hc-carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .hc-carousel-track {
    transition: none;
  }
}

.hc-carousel-page {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  gap: 20px 16px;
  align-content: start;
  justify-items: stretch;
  box-sizing: border-box;
}

.hc-grid-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 24px 20px 20px;
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  min-height: 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  width: 100%;
  max-width: none;
}

.hc-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.hc-grid-card-media {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--primary-light);
  flex-shrink: 0;
}

.hc-grid-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hc-grid-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.hc-carousel-nav-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 4px 0;
}

.hc-carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  transition: color 0.2s, background 0.2s, transform 0.2s, border-color 0.2s;
}

.hc-carousel-btn:hover {
  color: var(--primary);
  border-color: rgba(136, 0, 133, 0.25);
  transform: scale(1.05);
}

.hc-carousel-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .hc-carousel-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
  }
}

@media (max-width: 560px) {
  .hc-carousel-layout {
    flex-direction: column;
  }

  .hc-carousel-nav-side {
    flex-direction: row;
    justify-content: center;
    padding: 8px 0 0;
  }

  .hc-carousel-page {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, auto);
  }

  .hc-grid-card-title {
    font-size: 0.95rem;
  }
}

/* === Safe Banner Section === */
.safe-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.safe-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.safe-banner .container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.safe-banner h2 {
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  line-height: 1.2;
}

.safe-banner p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  margin-bottom: 32px;
}

.safe-banner .btn-accent {
  background: #ffffff;
}

/* === Why Choose Us === */
.why-us {
  background: var(--bg-white);
}

.why-us-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.why-us-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.why-us-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.why-us-image-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: white;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

.why-us-image-badge .badge-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.why-us-image-badge .badge-text {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
  line-height: 1.3;
}

.why-us-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.why-us-content h2 .highlight {
  color: var(--primary);
}

.why-us-content>p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 36px;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: var(--bg-light);
}

.feature-item:hover {
  background: var(--primary-light);
  transform: translateX(4px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* === Stats Section === */
.stats {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.stats::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-number .suffix {
  font-size: 1.5rem;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* === About Section === */
.about {
  background: var(--bg-section);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.about-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 36px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.about-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.about-card:hover::after {
  transform: scaleX(1);
}

.about-card-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.about-card-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--primary);
}

.about-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.about-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* === Training & Manpower Section === */
.training {
  background: var(--bg-white);
}

.training-intro {
  max-width: 900px;
  margin: 0 auto 48px;
  text-align: center;
}

.training-intro p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.8;
}

.training-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.training-step {
  background: var(--bg-section);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.training-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.training-step-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 12px;
}

.training-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.training-step p {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.65;
}

.training-step p strong {
  color: var(--primary-dark);
}

.training-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}

.training-highlight {
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  border-left: 4px solid var(--primary);
}

.training-highlight h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.training-highlight ul {
  list-style: disc;
  padding-left: 20px;
}

.training-highlight li {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.6;
}

.training-cta {
  text-align: center;
  padding: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg);
  color: white;
}

.training-cta p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  opacity: 0.95;
}

.training-cta .btn {
  margin: 0 8px 8px;
}

.training-cta .btn-outline {
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}

.training-cta .btn-outline:hover {
  background: white;
  color: var(--primary);
}

/* === Contact / CTA Section === */
.contact {
  background: var(--bg-white);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-info h2 .highlight {
  color: var(--primary);
}

.contact-info>p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-detail-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--primary);
}

.contact-detail h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 2px;
}

.contact-detail p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.contact-form-wrap {
  background: white;
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.contact-form-wrap h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  transition: var(--transition);
  background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(136, 0, 133, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-submit {
  margin-top: 8px;
}

.form-submit .btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

/* === Footer === */
.footer {
  background: #161616;
  color: rgba(255, 255, 255, 0.8);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-img {
  display: block;
  height: 72px;
  width: 72px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  padding: 7px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
}

.footer-brand .logo-text {
  color: white;
  font-size: 1.65rem;
  margin-bottom: 16px;
}

.footer-brand .logo-text span {
  color: var(--accent);
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.7);
}

.footer-social a:hover svg {
  fill: white;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul li a::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: white;
  padding-left: 4px;
}

.footer-col ul li a:hover::before {
  opacity: 1;
}

.footer-col ul li.footer-address a {
  align-items: flex-start;
  line-height: 1.55;
  white-space: normal;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgb(253, 253, 253);
}

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

/* === Floating Buttons === */
.floating-buttons {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-btn.call {
  background: var(--primary);
}

.float-btn.whatsapp {
  background: #25D366;
}

.float-btn.niv-chat-launcher {
  background: #0d1b2a;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.float-btn.niv-chat-launcher svg path {
  fill: #ffffff !important;
}

.float-btn.niv-chat-launcher:hover {
  background: #1b2838;
}

.float-btn svg {
  width: 26px;
  height: 26px;
  fill: white;
}

#niv-chatbot-root {
  position: relative;
  z-index: 10000;
}

.niv-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 220px;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  z-index: 10000;
}

/* One view at a time (welcome vs form); avoids stacking if [hidden] is overridden */
.niv-chat-panel.niv-chat-panel--form #nivChatWelcome {
  display: none !important;
}

.niv-chat-panel:not(.niv-chat-panel--form) #nivChatFormView {
  display: none !important;
}

.niv-chat-panel.niv-chat-panel--form #nivChatFormView {
  display: flex !important;
  flex-direction: column;
}

.niv-chat-view--welcome {
  background: #0d1b2a;
  color: #fff;
  padding: 28px 22px 26px;
  position: relative;
}

.niv-chat-welcome-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 36px 10px 0;
  line-height: 1.35;
}

.niv-chat-welcome-sub {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.niv-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.niv-chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.niv-chat-close--corner {
  position: absolute;
  top: 10px;
  right: 10px;
}

.niv-chat-new-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  text-align: left;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #0d1b2a;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.niv-chat-new-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.niv-chat-new-card-text strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.niv-chat-new-card-text span {
  font-size: 0.85rem;
  color: #64748b;
}

.niv-chat-new-card-icon {
  color: #0d1b2a;
  flex-shrink: 0;
}

.niv-chat-view--form {
  background: #fff;
  display: flex;
  flex-direction: column;
  max-height: min(520px, calc(100vh - 140px));
}

.niv-chat-form-header {
  background: #0d1b2a;
  color: #fff;
  padding: 12px 14px 14px;
}

.niv-chat-form-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.niv-chat-form-header .niv-chat-back,
.niv-chat-form-header .niv-chat-close {
  color: #fff;
  font-size: 1.35rem;
}

.niv-chat-back {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.niv-chat-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.niv-chat-form-intro {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.95;
}

.niv-chat-form-body {
  padding: 16px 16px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.niv-chat-field {
  margin-bottom: 14px;
}

.niv-chat-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.niv-req {
  color: #e11d48;
}

.niv-chat-field input,
.niv-chat-field textarea,
.niv-chat-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}

.niv-chat-field textarea {
  resize: vertical;
  min-height: 72px;
}

.niv-chat-phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.niv-chat-phone-row .niv-chat-country {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  flex: 0 0 88px;
  padding-left: 8px;
  padding-right: 24px;
}

.niv-chat-phone-row .niv-chat-phone-input {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
}

.niv-chat-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  background: #0d1b2a;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.niv-chat-start:hover {
  background: #1b2838;
}

@media (max-width: 480px) {
  .niv-chat-panel {
    right: 16px;
    bottom: 200px;
    width: calc(100vw - 24px);
  }

  .back-to-top {
    bottom: calc(24px + 3 * 56px + 2 * 12px + 20px);
  }
}

/* === Scroll Reveal Animation === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

.reveal-delay-6 {
  transition-delay: 0.6s;
}

.reveal-delay-7 {
  transition-delay: 0.7s;
}

.reveal-delay-8 {
  transition-delay: 0.8s;
}

.reveal-delay-9 {
  transition-delay: 0.9s;
}

.reveal-delay-10 {
  transition-delay: 1s;
}

/* === Back to Top === */
.back-to-top {
  position: fixed;
  /* Above floating stack: 24px offset + 3×56px buttons + 2×12px gaps + 16px clearance */
  bottom: calc(24px + 3 * 56px + 2 * 12px + 16px);
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 998;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--primary-dark);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* === Mobile Responsive === */
@media (max-width: 1024px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero p {
    margin: 0 auto 36px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    width: 100%;
    max-width: 500px;
    height: 350px;
  }

  .why-us-wrapper {
    grid-template-columns: 1fr;
  }

  .why-us-image {
    order: -1;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .header-phone {
    display: none;
  }

  .header-cta {
    gap: 8px;
  }

  .header .container {
    gap: 10px;
  }

  .logo {
    flex: 0 0 auto;
    min-width: 0;
    margin-right: 8px;
  }

  .header .logo-text {
    display: none;
  }

  .header-cta .btn {
    padding: 10px 14px;
    font-size: 0.8rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero {
    min-height: 500px;
  }

  .hero-image {
    height: 280px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .training-highlights {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .safe-banner h2 {
    font-size: 1.6rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .hero-image {
    height: 220px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .btn {
    padding: 10px 22px;
    font-size: 0.85rem;
  }

  .service-card {
    padding: 24px 20px;
  }

  .about-card {
    padding: 24px;
  }

  .contact-form-wrap {
    padding: 24px;
  }
}

/* === Service Detail Page === */
.service-detail {
  padding: 60px 0;
  background: var(--bg-white);
}

.service-detail-wrapper {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 50px;
  align-items: start;
}

.service-sidebar {
  position: sticky;
  top: 100px;
}

.service-content {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.8;
}

.service-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 24px;
  line-height: 1.2;
}

.service-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.service-content h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 24px 0 12px;
}

.service-content p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.equipment-detail-grid {
  display: grid;
  gap: 24px;
  margin: 32px 0;
}

.equipment-detail-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
}

.equipment-detail-item img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px;
}

.equipment-detail-item h3 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 1.25rem;
}

.equipment-detail-item p {
  margin: 0;
}

@media (max-width: 640px) {
  .equipment-detail-item {
    grid-template-columns: 1fr;
  }

  .equipment-detail-item img {
    width: 100%;
    height: 180px;
  }
}

.service-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 24px;
}

.service-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-light);
}

.service-content ul li::before {
  content: "•";
  color: var(--accent);
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -4px;
}

.service-content ul li strong {
  color: var(--text-dark);
}

.service-image-banner {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 60px 0;
  text-align: center;
  color: white;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

@media (max-width: 1024px) {
  .service-detail-wrapper {
    grid-template-columns: 1fr;
  }
  .service-sidebar {
    order: 2;
    position: static;
  }
  .service-content {
    order: 1;
  }
}
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2.2rem;
  }
  .service-image-banner {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .service-image-banner {
    height: 180px;
  }
}

/* === Back links with icon === */
.niv-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.niv-back-link svg {
  flex-shrink: 0;
}

.service-link.niv-back-link {
  gap: 8px;
}

.service-link.niv-back-link svg {
  fill: currentColor;
  width: 18px;
  height: 18px;
}

/* === Toast notifications === */
.niv-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #0d1b2a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: min(92vw, 420px);
  text-align: center;
}

.niv-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.niv-toast--err {
  background: #b91c1c;
}

.niv-toast--ok {
  background: #15803d;
}

/* === Chat back button & live thread === */
.niv-chat-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.niv-chat-panel.niv-chat-panel--thread #nivChatWelcome,
.niv-chat-panel.niv-chat-panel--thread #nivChatFormView {
  display: none !important;
}

.niv-chat-panel.niv-chat-panel--thread #nivChatThreadView {
  display: flex !important;
  flex-direction: column;
}

.niv-chat-view--thread {
  background: #f8fafc;
  flex-direction: column;
  max-height: min(520px, calc(100vh - 140px));
}

.niv-chat-thread-header {
  background: #0d1b2a;
  color: #fff;
  padding: 12px 14px 14px;
  flex-shrink: 0;
}

.niv-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 340px;
}

.niv-chat-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.niv-chat-bubble--user {
  align-self: flex-end;
  background: #0d1b2a;
  color: #fff;
}

.niv-chat-bubble--admin {
  align-self: flex-start;
  background: #880085;
  color: #fff;
}

.niv-chat-bubble--system {
  align-self: center;
  background: #e2e8f0;
  color: #334155;
  max-width: 95%;
  text-align: center;
  font-size: 0.85rem;
}

.niv-chat-bubble-meta {
  font-size: 0.72rem;
  opacity: 0.85;
  margin-bottom: 4px;
}

.niv-chat-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.niv-chat-compose input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.niv-chat-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #0d1b2a;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.niv-chat-send:hover {
  background: #1b2838;
}

.niv-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.niv-chat-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
}

.niv-chat-start:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* === Mobile header spacing === */
@media (max-width: 768px) {
  .header .logo-text {
    display: none;
  }

  .header .container {
    gap: 10px;
  }

  .header .logo {
    flex: 0 0 auto;
    min-width: 0;
    margin-right: 8px;
    max-width: none;
  }

  .header .logo-img {
    height: 52px;
    width: 52px;
  }

  .header-cta {
    flex-shrink: 0;
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .header .logo-img {
    height: 46px;
    width: 46px;
  }

  .header-cta {
    gap: 5px;
  }

  .header-cta .btn {
    padding: 8px 10px;
    font-size: 0.74rem;
  }

  .header-cta .btn-login-open {
    display: inline-flex;
    padding: 8px 9px;
  }

  .header-cta .btn-primary {
    padding: 8px 10px;
    font-size: 0.74rem;
    white-space: nowrap;
  }
}