/* ============================================
   Beautyviet - Health & Beauty | Main Styles
   ============================================ */

:root {
  --color-primary: #2d5a4a;
  --color-primary-light: #3d7a65;
  --color-accent: #c9a86c;
  --color-accent-light: #e8d5b5;
  --color-dark: #1a2e28;
  --color-text: #333;
  --color-text-muted: #5c6b66;
  --color-bg: #fdfcfb;
  --color-bg-alt: #f5f2ee;
  --color-white: #fff;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --shadow-sm: 0 2px 8px rgba(45, 90, 74, 0.06);
  --shadow-md: 0 4px 20px rgba(45, 90, 74, 0.08);
  --shadow-lg: 0 12px 40px rgba(45, 90, 74, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title .subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ========== Header & Navigation ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 252, 251, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.logo:hover {
  color: var(--color-primary);
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-desktop a {
  color: var(--color-dark);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--color-accent);
}

/* Mobile menu button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--color-white);
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  padding: 5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 999;
  overflow-y: auto;
}

.nav-mobile.open {
  transform: translateX(0);
}

.nav-mobile ul {
  list-style: none;
}

.nav-mobile li {
  border-bottom: 1px solid var(--color-bg-alt);
}

.nav-mobile a {
  display: block;
  padding: 1rem 0;
  font-weight: 500;
  color: var(--color-dark);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--color-accent);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 998;
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }

  .nav-desktop {
    display: block;
  }

  .nav-mobile {
    display: none;
  }
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-accent:hover {
  background: #b8945a;
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 72px;
  background: linear-gradient(135deg, rgba(45, 90, 74, 0.88) 0%, rgba(45, 90, 74, 0.82) 100%),
    url('https://images.unsplash.com/photo-1598440947619-2c35fc9aa908?w=1920&q=80') center/cover no-repeat;
  color: var(--color-white);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 1rem;
  animation: fadeUp 0.8s ease forwards;
}

.hero .lead {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  animation: fadeUp 0.8s ease 0.15s both;
}

.hero .btn {
  animation: fadeUp 0.8s ease 0.3s both;
}

.hero .btn-accent {
  background: var(--color-accent);
  color: var(--color-dark);
}

.hero .btn-accent:hover {
  background: var(--color-accent-light);
  color: var(--color-dark);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Intro / About preview ========== */
.intro-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.intro-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.intro-image img {
  width: 100%;
  object-fit: cover;
  min-height: 320px;
}

.intro-text h2 {
  margin-bottom: 1rem;
}

.intro-text p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .intro-grid.reverse {
    direction: rtl;
  }

  .intro-grid.reverse > * {
    direction: ltr;
  }
}

/* ========== Services grid ========== */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card-image img {
  transform: scale(1.05);
}

.service-card-body {
  padding: 1.5rem;
  flex: 1;
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.service-card .link {
  margin-top: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* ========== Why Choose Us ========== */
.features-list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.5rem;
}

.feature-item h4 {
  margin-bottom: 0.25rem;
}

.feature-item p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

@media (min-width: 600px) {
  .features-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .features-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========== Testimonials ========== */
.testimonials-slider {
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.testimonial-card .quote {
  font-size: 1.1rem;
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.testimonial-card .author {
  font-weight: 600;
  color: var(--color-primary);
}

.testimonial-card .role {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.testimonials-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== CTA Section ========== */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  text-align: center;
  padding: 4rem 1.5rem;
}

.cta-section h2 {
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.cta-section p {
  opacity: 0.95;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-accent {
  background: var(--color-accent);
  color: var(--color-dark);
}

.cta-section .btn-accent:hover {
  background: var(--color-accent-light);
  color: var(--color-dark);
}

/* ========== Footer ========== */
.footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 3rem 0 1.5rem;
}

.footer a {
  color: rgba(255,255,255,0.85);
}

.footer a:hover {
  color: var(--color-accent-light);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
  grid-template-columns: 1fr;
}

.footer-brand .logo {
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}

.footer h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer-contact p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* ========== Page header (inner pages) ========== */
.page-header {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, rgba(45, 90, 74, 0.9) 0%, rgba(45, 90, 74, 0.8) 100%),
    url('https://images.unsplash.com/photo-1540555700478-4be289fbecef?w=1920&q=80') center/cover no-repeat;
  color: var(--color-white);
  text-align: center;
}

.page-header h1 {
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.95;
  font-size: 1.1rem;
}

/* ========== About page ========== */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content .section {
  padding: 3rem 0;
}

.about-content h2 {
  margin-bottom: 1rem;
}

.about-content p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.about-image-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
}

.about-image-block img {
  width: 100%;
  object-fit: cover;
  min-height: 280px;
}

/* ========== Services page ========== */
.service-detail {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: center;
}

.service-detail:nth-child(even) .service-detail-image {
  order: 2;
}

.service-detail-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.service-detail-image img {
  width: 100%;
  object-fit: cover;
  min-height: 280px;
}

.service-detail-body h3 {
  margin-bottom: 0.75rem;
}

.service-detail-body p {
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .service-detail {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========== Contact page ========== */
.contact-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact-info-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-info-card h3 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-info-card p,
.contact-info-card a {
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.contact-form-wrapper {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  height: 320px;
  background: var(--color-bg-alt);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

/* ========== Legal pages (Terms, Privacy) ========== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.legal-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content .updated {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* ========== Utility ========== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
