/* Reset và Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px; /* Offset cho sticky nav */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
  padding: 2.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-main {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  display: flex;
  justify-content: center;
}

.header-logo img {
  height: 80px;
  width: auto;
  filter: brightness(1.1);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.header-logo img:hover {
  transform: scale(1.05);
}

.header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.header h1 {
  font-size: 2.8rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.header h1::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-phone {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  padding: 8px 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  margin-top: 8px;
  transition: all 0.3s ease;
}

.header-phone:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
  font-size: 1rem;
  color: #ffffff;
  opacity: 0.95;
  margin-bottom: 0;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.3px;
}

.header h1 i {
  margin-right: 12px;
  font-size: 2rem;
  opacity: 0.9;
}

/* Quick Summary */
.quick-summary {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 120px;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.summary-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.summary-item:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.summary-item i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.summary-service {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  opacity: 0.8;
  text-align: center;
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: auto;
}

.summary-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffd700;
}

/* Navigation Styles */
.nav {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #f5c6cb;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  overflow-x: auto;
  gap: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #dc3545;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  min-width: 70px;
  position: relative;
}

.nav-link:hover,
.nav-link:focus {
  background: #fff5f5;
  color: #dc3545;
  transform: translateY(-1px);
}

.nav-link.active {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  animation: pulseActive 2s infinite;
}

@keyframes pulseActive {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  }
  50% {
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5);
  }
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: white;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-icon {
  margin-bottom: 0.25rem;
}

.nav-icon i {
  font-size: 1.1rem;
}

.nav-link span {
  font-size: 0.8rem;
  line-height: 1;
}

/* Quick Calculator Button */
.quick-calc-btn {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.quick-calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.quick-calc-btn i {
  font-size: 1rem;
}

.quick-calc-btn span {
  font-size: 0.9rem;
}

/* Main Content */
.main {
  padding: 2rem 0;
}

/* Service Section Styles */
.service-section {
  background: white;
  margin-bottom: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #f5c6cb;
}

.service-section:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-3px);
  border-color: #f5c6cb;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #fef5f5 0%, #fce8e8 100%);
  border-bottom: 1px solid #f5c6cb;
  cursor: pointer;
  user-select: none;
}

.section-header h2 {
  color: #721c24;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  letter-spacing: -0.3px;
}

.section-header h2 i {
  margin-right: 12px;
  color: #dc3545;
  font-size: 1.2rem;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #dc3545;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-btn:hover {
  background: #dc3545;
  color: white;
  transform: rotate(180deg);
}

.section-content {
  padding: 1.5rem;
  display: block;
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
}

.section-content.collapsed {
  display: none;
}

.service-section.collapsed .section-content {
  display: none;
}

.toggle-btn i {
  transition: transform 0.3s ease;
}

/* Price Group Styles */
.price-group {
  margin-bottom: 2rem;
}

.price-group:last-child {
  margin-bottom: 0;
}

.price-group h3 {
  color: #721c24;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dc3545;
  display: flex;
  align-items: center;
}

.price-group h3 i {
  margin-right: 8px;
  color: #dc3545;
}

/* Price Group Header với nút thêm */
.price-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.price-group-header h3 {
  margin-bottom: 0;
  flex: 1;
}

/* Tiêu đề có thể click */
.clickable-title {
  cursor: pointer;
  transition: color 0.3s ease;
}

.clickable-title:hover {
  color: #dc3545 !important;
}

/* Nút thêm sản phẩm */
.add-service-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  z-index: 10;
  position: relative;
}

.add-service-btn:hover {
  background: linear-gradient(135deg, #218838 0%, #1e9e8e 100%);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.add-service-btn:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.add-service-btn i {
  font-size: 0.75rem;
}

/* Price List Styles */
.price-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.price-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #fef9f9;
  border-radius: 10px;
  border: 1px solid #f5c6cb;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
  gap: 1rem;
}

.price-list li:hover {
  background: #fef5f5;
  border-color: #f5c6cb;
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1);
}

/* Container cho condition và price */
.price-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.price-list li.highlight {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border-color: #ffcc02;
  position: relative;
}

.price-list li.highlight::before {
  content: "🎉";
  position: absolute;
  left: -8px;
  top: -8px;
  font-size: 1.2rem;
}

.condition {
  font-weight: 500;
  color: #721c24;
  flex: 1;
  font-size: 0.95rem;
}

.price {
  font-weight: 700;
  color: #721c24 !important;
  font-size: 1.2rem;
  white-space: nowrap;
  margin-left: 1rem;
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  border: 1px solid #f5c6cb;
}

/* Note Styles */
.note {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #dc3545;
  margin-top: 1.5rem;
  display: flex;
  align-items: flex-start;
}

.note i {
  color: #dc3545;
  margin-right: 10px;
  margin-top: 2px;
  font-size: 1.1rem;
}

.note p {
  margin-bottom: 0.5rem;
  color: #721c24;
}

.note ul {
  margin-left: 1rem;
  color: #721c24;
}

.note ul li {
  margin-bottom: 0.25rem;
}

/* Footer Styles */
.footer {
  background: #343a40;
  color: white;
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.contact-info h3 {
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.contact-info h3 i {
  margin-right: 10px;
  color: #dc3545;
}

.contact-info p {
  margin-bottom: 0.5rem;
  color: #dc3545;
}

.contact-details {
  margin-top: 1rem;
}

.contact-details p {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.contact-details p i {
  margin-right: 10px;
  color: #dc3545;
  width: 16px;
}

.footer-bottom {
  border-top: 1px solid #721c24;
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom p {
  color: #dc3545;
  font-size: 0.9rem;
}

/* Responsive Design */

/* Tablet Styles */
@media (max-width: 768px) {
  .header-logo img {
    height: 65px;
  }

  .header h1 {
    font-size: 2.2rem;
    letter-spacing: -0.8px;
  }

  .header-phone {
    font-size: 1.1rem;
    padding: 6px 14px;
  }

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

  .nav-menu {
    gap: 0.5rem;
    padding: 0.75rem 0;
  }

  .nav-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .section-header {
    padding: 1.2rem;
  }

  .section-header h2 {
    font-size: 1.2rem;
  }

  .section-content {
    padding: 1.2rem;
  }

  .price-list li {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .price {
    margin-left: 0;
    margin-top: 0.5rem;
    font-size: 1.2rem;
    color: #721c24 !important;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid #f5c6cb;
  }

  /* Responsive cho nút thêm sản phẩm */
  .price-group-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .add-service-btn {
    width: 28px;
    height: 28px;
    padding: 0.2rem;
  }

  .add-service-btn i {
    font-size: 0.65rem;
  }

  .price-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* Mobile Styles */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .header {
    padding: 2rem 0;
  }

  .header-logo img {
    height: 55px;
  }

  .header h1 {
    font-size: 1.8rem;
    letter-spacing: -0.6px;
  }

  .header h1::after {
    width: 40px;
    height: 2px;
  }

  .header-phone {
    font-size: 1rem;
    padding: 6px 12px;
  }

  .header h1 i {
    font-size: 1.6rem;
  }

  .quick-summary {
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: space-between;
  }

  .summary-item {
    min-width: 100px;
    padding: 0.6rem 0.5rem;
    flex: 1;
    max-width: none;
    text-align: center;
  }

  .summary-item i {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
  }

  .summary-service {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .summary-price {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .nav-wrapper {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .nav-menu {
    justify-content: space-around;
  }

  .nav-link {
    padding: 0.6rem 0.5rem;
    min-width: 60px;
    position: relative;
  }

  .nav-link.active {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4);
  }

  .nav-link.active::after {
    bottom: -0.5rem;
    width: 20px;
    height: 3px;
  }

  .nav-link span {
    font-size: 0.75rem;
  }

  .quick-calc-btn {
    padding: 0.75rem 1rem;
    justify-content: center;
    align-self: center;
    width: auto;
  }

  .main {
    padding: 1rem 0;
  }

  .service-section {
    margin-bottom: 2rem;
    border: 2px solid #f5c6cb;
    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }

  .section-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #fef5f5 0%, #fce8e8 100%);
    border-bottom: 2px solid #f5c6cb;
  }

  .section-header h2 {
    font-size: 1.2rem;
    color: #721c24;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
  }

  .section-header h2::before {
    content: "";
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border-radius: 2px;
  }

  .section-content {
    padding: 1.25rem;
  }

  .price-group {
    margin-bottom: 1.5rem;
  }

  .price-group h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #721c24;
    font-weight: 600;
  }

  .price-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .price-list li {
    padding: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #f5c6cb;
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    transition: all 0.3s ease;
  }

  .price-list li:hover {
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
  }

  .condition {
    font-size: 0.95rem;
    width: 100%;
    color: #721c24;
    font-weight: 500;
    line-height: 1.4;
  }

  .price {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #721c24 !important;
    background: #f8d7da !important;
    padding: 0.5rem 1rem !important;
    border-radius: 25px !important;
    margin-left: 0 !important;
    align-self: flex-end !important;
    border: 2px solid #dc3545 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #721c24 !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    display: inline-block !important;
  }

  .note {
    padding: 1rem;
    flex-direction: row;
    align-items: flex-start;
  }

  .note i {
    margin-right: 0.75rem;
    margin-top: 0.1rem;
  }

  .price-group h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .footer {
    padding: 1.5rem 0 1rem;
  }

  /* Nút thêm sản phẩm - ẩn hoàn toàn trên mobile */
  .add-service-btn {
    display: none;
  }

  /* Visual feedback cho price-item trên mobile */
  .price-list li.price-item {
    position: relative;
    padding-right: 3rem; /* Đảm bảo có đủ chỗ cho dấu + */
  }

  .price-list li.price-item::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 0.7;
    z-index: 5;
  }

  /* Đảm bảo price-content có đủ không gian */
  .price-content {
    gap: 0.5rem;
    margin-right: 0.5rem; /* Tránh đè lên dấu + */
  }
}

/* Animation Classes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

.pulse {
  animation: pulse 2s infinite;
}

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #dc3545;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
.nav-link:focus,
.toggle-btn:focus {
  outline: 2px solid #dc3545;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .nav,
  .toggle-btn,
  .footer {
    display: none;
  }

  .service-section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .section-content {
    display: block !important;
  }
}

/* Extra small mobile styles */
@media (max-width: 480px) {
  .header {
    padding: 1.5rem 0;
  }

  .quick-summary {
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .summary-item {
    padding: 0.4rem 0.3rem;
    min-width: 95px;
    max-width: none;
    border-radius: 8px;
    flex: 1;
  }

  .summary-item i {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }

  .summary-service {
    font-size: 0.65rem;
    margin-bottom: 0.15rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .summary-price {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
  }

  .header-subtitle {
    font-size: 0.85rem;
  }
}
