/* Supplementary styles for Subpages, Modals, Forms & Popup Widgets */
/* Seamlessly integrates with the approved design system */

:root {
  --brand-light: #f5eef8;
  --accent-gold: #facc15;
  --success: #059669;
}

/* Modals */
.app-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(36, 19, 47, 0.65);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.app-modal.open {
  display: flex;
}
.modal-content-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(86, 32, 97, 0.25);
  position: relative;
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header-bar {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  padding: 20px 24px;
  position: relative;
}
.modal-header-bar h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.modal-header-bar p {
  margin: 0;
  font-size: 13px;
  color: #ebdcf2;
}
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
.modal-body-pad {
  padding: 24px;
}
.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #dcd3e3;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  background: #faf7fc;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(120, 39, 140, 0.15);
}
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin: 18px 0;
}
.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.btn-submit-lead {
  width: 100%;
  background: var(--brand);
  color: white;
  border: none;
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit-lead:hover {
  background: var(--brand-dark);
}
.btn-submit-lead:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Success Card Inside Modal */
.lead-success-card {
  text-align: center;
  padding: 10px 0;
}
.lead-success-icon {
  width: 60px;
  height: 60px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.lead-req-num {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px dashed var(--brand);
  margin: 12px 0 16px;
}
.btn-continue-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.btn-continue-wa:hover {
  background: #1ebc57;
  text-decoration: none;
}

/* Review Popup Widget */
.review-popup-widget {
  position: fixed;
  bottom: 25px;
  left: 24px;
  z-index: 14; /* Just below chat widget (z-index: 15) so it doesn't cover WA button */
  max-width: 320px;
  width: calc(100% - 48px);
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(36, 19, 47, 0.18);
  border: 1px solid #ebdcf2;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.review-popup-widget.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.review-popup-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.review-popup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.review-popup-info {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.review-popup-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.review-popup-stars {
  color: #f59e0b;
  font-size: 12px;
  margin-bottom: 3px;
}
.review-popup-text {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-popup-meta {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 4px;
}
.review-popup-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.review-popup-close:hover {
  color: var(--ink);
}

/* Subpage Hero & Content Styles */
.subpage-hero {
  background: linear-gradient(135deg, #3b2446 0%, #24132f 100%);
  color: white;
  padding: 48px 0 40px;
  text-align: center;
}
.subpage-hero h1 {
  font-size: 38px;
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.8px;
}
.subpage-hero p {
  max-width: 680px;
  margin: 0 auto;
  font-size: 17px;
  color: #ebdcf2;
}

.subpage-container {
  padding: 48px 16px 64px;
}

/* Package Grid Cards */
.package-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.pkg-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1.5px solid #ebdcf2;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.pkg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(86, 32, 97, 0.1);
}
.pkg-card.highlight {
  border-color: var(--brand);
  box-shadow: 0 10px 25px rgba(120, 39, 140, 0.15);
}
.pkg-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--brand);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}
.pkg-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
}
.pkg-cat {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pkg-speed {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 16px 0;
}
.pkg-speed-val {
  font-size: 36px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}
.pkg-speed-unit {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.pkg-price-box {
  background: #faf7fc;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.pkg-price-curr {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}
.pkg-price-period {
  font-size: 12px;
  color: var(--muted);
}
.pkg-tax-tag {
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  margin-top: 2px;
}
.pkg-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.pkg-benefits li {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.pkg-benefits li::before {
  content: '✓';
  color: var(--brand);
  font-weight: 800;
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-tab-btn {
  background: #ffffff;
  border: 1px solid #dcd3e3;
  color: var(--ink);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.filter-tab-btn:hover, .filter-tab-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

/* Article & Promo Cards */
.promo-card, .article-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #ebdcf2;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
}
.promo-card img, .article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.promo-card-body, .article-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* FAQ Accordion */
.faq-item {
  background: white;
  border: 1px solid #ebdcf2;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.faq-answer {
  padding: 0 20px 20px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 767px) {
  .subpage-hero h1 { font-size: 28px; }
  .review-popup-widget {
    bottom: 84px; /* Move above WhatsApp button on mobile */
    left: 16px;
    width: calc(100% - 32px);
  }
}
