/* ========================================
   📜 TERMS OF SERVICE PAGE - RESPONSIVE CSS
   Mobile First Design
======================================== */

/* ✅ Terms Main Container */
.terms-main {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 2rem 1.5rem;
}

/* ========================================
   📋 TERMS HEADER
======================================== */
.terms-header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-radius: 12px;
  margin-bottom: 3rem;
}

.terms-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.last-updated {
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
}

/* ========================================
   📝 TERMS SECTIONS
======================================== */
.terms-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.terms-section:last-of-type {
  border-bottom: none;
  margin-bottom: 2rem;
}

.terms-section h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1.25rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--primary-color);
}

.terms-section h3 {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.terms-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.terms-section strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* ========================================
   📋 LISTS
======================================== */
.terms-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.terms-section ul li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 0.5rem;
}

.terms-section ul li::marker {
  color: var(--primary-color);
}

/* ========================================
   🔗 LINKS
======================================== */
.terms-section a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.terms-section a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-color);
}

/* ========================================
   📞 CONTACT INFO BOX
======================================== */
.contact-info-box {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  margin-top: 1.5rem;
}

.contact-info-box p {
  margin-bottom: 0.75rem;
}

.contact-info-box p:last-child {
  margin-bottom: 0;
}

/* ========================================
   ✅ AGREEMENT SECTION
======================================== */
.agreement-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border: 2px solid var(--primary-color);
  text-align: center;
}

.agreement-section h2 {
  border-left: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.agreement-section p {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.agreement-note {
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 1rem;
  font-weight: 500;
}

/* ========================================
   🎨 SPECIAL HIGHLIGHTS
======================================== */
.terms-section h3.warning {
  color: #ef4444;
  border-bottom-color: #ef4444;
}

.terms-section .important-note {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.terms-section .important-note p {
  margin-bottom: 0;
  color: #92400e;
}

/* ========================================
   📱 RESPONSIVE - TABLETS (640px+)
======================================== */
@media (min-width: 640px) {
  .terms-header h1 {
    font-size: 2.25rem;
  }

  .last-updated {
    font-size: 1rem;
  }
}

/* ========================================
   💻 RESPONSIVE - DESKTOP (768px+)
======================================== */
@media (min-width: 768px) {
  .terms-main {
    padding: 3rem 2.5rem;
  }

  .terms-header {
    padding: 3rem 2rem;
  }

  .terms-header h1 {
    font-size: 2.5rem;
  }

  .terms-section h2 {
    font-size: 1.75rem;
  }

  .terms-section h3 {
    font-size: 1.3rem;
  }

  .terms-section p,
  .terms-section ul li {
    font-size: 1.05rem;
  }
}

/* ========================================
   🖥️ RESPONSIVE - LARGE DESKTOP (1024px+)
======================================== */
@media (min-width: 1024px) {
  .terms-header h1 {
    font-size: 3rem;
  }

  .terms-section h2 {
    font-size: 2rem;
  }

  .terms-section {
    padding-bottom: 2.5rem;
  }
}

/* ========================================
   ✨ ANIMATIONS
======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terms-header {
  animation: fadeInUp 0.6s ease;
}

.terms-section {
  animation: fadeInUp 0.6s ease backwards;
}

.terms-section:nth-of-type(1) { animation-delay: 0.1s; }
.terms-section:nth-of-type(2) { animation-delay: 0.15s; }
.terms-section:nth-of-type(3) { animation-delay: 0.2s; }
.terms-section:nth-of-type(4) { animation-delay: 0.25s; }
.terms-section:nth-of-type(5) { animation-delay: 0.3s; }
.terms-section:nth-of-type(6) { animation-delay: 0.35s; }
.terms-section:nth-of-type(7) { animation-delay: 0.4s; }
.terms-section:nth-of-type(8) { animation-delay: 0.45s; }
.terms-section:nth-of-type(9) { animation-delay: 0.5s; }
.terms-section:nth-of-type(10) { animation-delay: 0.55s; }
.terms-section:nth-of-type(11) { animation-delay: 0.6s; }
.terms-section:nth-of-type(12) { animation-delay: 0.65s; }
.terms-section:nth-of-type(13) { animation-delay: 0.7s; }
.terms-section:nth-of-type(14) { animation-delay: 0.75s; }

/* ========================================
   🎨 SCROLLBAR STYLING
======================================== */
.terms-main::-webkit-scrollbar {
  width: 8px;
}

.terms-main::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 4px;
}

.terms-main::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.terms-main::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ========================================
   ♿ ACCESSIBILITY
======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   🖨️ PRINT STYLES
======================================== */
@media print {
  .terms-main {
    box-shadow: none;
    padding: 0;
  }

  .terms-header {
    background: none;
    border: 2px solid #000;
  }

  .terms-section {
    page-break-inside: avoid;
  }

  nav {
    display: none;
  }
}