:root {
  --accent: #007aff;
  --accent-gradient: linear-gradient(135deg, #007aff, #409cff);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --radius: 1.25rem;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --text-dark: #1a1a1a;
  --text-light: #fff;
  --close-size: 42px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: linear-gradient(180deg, #f3f6f9 0%, #e9ecf5 100%);
  color: var(--text-dark);

}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2.5rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto 0;
  padding: 0 1rem;
  position: relative;
  padding-block-end: 2.5rem;
}

.pricing-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow var(--transition);
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}

.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.card-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover .card-img {
  transform: scale(1.08);
}

.card-blur {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: var(--text-light);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-blur::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 45%, black 75%, black 100%);
  background: rgba(0, 0, 0, 0.25);
  transition: backdrop-filter 0.6s ease, background 0.6s ease;
  z-index: 0;
}

.card-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.65) 100%);
  z-index: 1;
  pointer-events: none;
}

.pricing-card:hover .card-blur::before,
.pricing-card.is-hovered .card-blur::before {
  backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.35);
}

.pricing-card:not(.is-hovered) .card-blur::before {
  transition: backdrop-filter 0.6s ease, background 0.6s ease;
}

.pricing-grid:hover .pricing-card:not(:hover) {
  filter: brightness(0.7) blur(4px);
  transition: filter 0.6s ease;
}

.card-blur h3,
.card-blur p,
.btn-more {
  position: relative;
  z-index: 2;
}

.card-blur h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.card-blur p {
  margin: 0.4rem 0 1.2rem;
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.9;
  max-width: 90%;
}

.btn-more {
  display: block;
  width: 100%;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 0.8rem 1.4rem;
  border-radius: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
  text-align: center;
  transition: all 0.25s ease;
}

.btn-more:hover {
  background: linear-gradient(135deg, #409cff, #007aff);
  transform: scale(1.02);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 25, 0.35);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(8px);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  display: flex;
  flex-direction: column;
  width: 92%;
  max-width: 720px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.45s ease forwards;
  transform: scale(0.95);
  border: 1px solid rgba(17, 24, 39, 0.08);
  max-height: min(92svh, 100dvh - 6vh);
}

.modal-content > * {
  min-height: 0;
}

@keyframes modalPop {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-image {
  display: none !important;
}

.modal-body {
  display: flex;
  flex-direction: column;
  color: var(--text-dark);
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 3rem;
  padding-right: calc(3rem + var(--close-size) + 0.5rem);
}

.modal-body h3 {
  font-weight: 900;
  margin: 0 0 0.9rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #111, #4b5563);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
  hyphens: auto;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  line-height: 1.15;
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #007aff, #66b2ff, #007aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.modal-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #2b2b2b;
  max-width: 90%;
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-600, #007aff);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.3);
  width: 85%;           
  margin: 0 auto;         
  cursor: pointer;
}

.btn-buy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 1;
}

.btn-buy:hover::before {
  transform: translateX(100%);
}

.btn-buy:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 122, 255, 0.35);
}

.btn-close {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  font-size: 1.2rem;
  color: #111;
  cursor: pointer;
  border-radius: 0.75rem;
  width: var(--close-size);
  height: var(--close-size);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.15s ease;
  z-index: 10;
}

.btn-close:hover {
  background: #f3f4f6;
}

.btn-close:active {
  transform: scale(0.96);
}

body.modal-open header.navbar-mac {
  filter: blur(6px) brightness(0.9);
  transition: filter 0.3s ease;
}

body.modal-open {
  overflow: hidden;
}

.modal-body > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .modal {
    align-items: stretch;
  }

  .modal-content {
    width: 94%;
    margin: auto;
    max-width: 720px;
  }

  .modal-body {
    height: 100%;
    padding-top: calc(1.25rem + var(--close-size) + 0.5rem);
    padding-right: calc(1.25rem + var(--close-size) + 0.5rem);
    padding-bottom: 1.25rem;
    padding-left: 1.25rem;
  }

  .modal-body h3 {
    font-size: clamp(1.8rem, 7.5vw, 2.4rem);
    line-height: 1.15;
  }

  .btn-buy {
    width: 100%;
  }
}

@media (hover: none), (pointer: coarse) {
  .pricing-grid:hover .pricing-card:not(:hover) { filter: none; }
  .pricing-card:hover .card-img { transform: none; }
  .pricing-card:hover .card-blur::before { backdrop-filter: none; background: rgba(0,0,0,0.25); }
  .btn-buy { transform: none; }
  .btn-buy::before { display: none; }
  .btn-buy:hover, .btn-buy:active { transform: none; }
}

@media (min-width: 769px) {
  .modal-body h3 { font-size: clamp(2.2rem, 2.2vw + 1rem, 3.2rem); }
}

@media (max-width: 768px) {
  body.modal-open header.navbar-mac {
    filter: none !important;
  }
}
