/* ====================
   Legal Pages Styles
   Estilos compartidos para páginas estáticas (Términos, FAQ, Sistema de Puntos)
   ==================== */

/* Mobile first - Base styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1F2548 url('/assets/images/figma/bg-wrapers.png') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Container principal */
.legal-container,
.faq-container,
.points-container {
  width: 100%;
  margin: 1rem auto 3rem;
  padding: 0 0.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* Tablet */
@media (min-width: 768px) {
  .legal-container,
  .faq-container,
  .points-container {
    max-width: 90%;
    margin: 1.5rem auto 4rem;
    padding: 0 1rem;
    border-radius: 12px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .legal-container,
  .faq-container {
    max-width: 900px;
    margin: 2rem auto 5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }

  .points-container {
    max-width: 1000px;
    margin: 2rem auto 5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }
}

/* Header de páginas */
.legal-header,
.faq-header,
.points-header {
  background: var(--devir-blue-dark);
  color: white;
  padding: 2rem 2rem;
  text-align: center;
}

.legal-header h1,
.faq-header h1,
.points-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.legal-header p,
.faq-header p,
.points-header p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
}

.points-header .disclaimer {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  opacity: 0.85;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Tablet */
@media (min-width: 768px) {
  .legal-header,
  .faq-header,
  .points-header {
    padding: 2.5rem 3rem;
  }

  .legal-header h1,
  .faq-header h1,
  .points-header h1 {
    font-size: 2rem;
  }

  .legal-header p,
  .faq-header p,
  .points-header p {
    font-size: 0.95rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .legal-header,
  .faq-header,
  .points-header {
    padding: 3rem 4rem;
  }

  .legal-header h1,
  .faq-header h1,
  .points-header h1 {
    font-size: 2.5rem;
  }

  .legal-header p,
  .faq-header p,
  .points-header p {
    font-size: 1rem;
  }
}

/* Contenido de páginas */
.legal-content,
.faq-content,
.points-content {
  padding: 1.5rem 1rem;
  color: #333;
  line-height: 1.7;
}

/* Tablet */
@media (min-width: 768px) {
  .legal-content,
  .faq-content,
  .points-content {
    padding: 2.5rem 2rem;
    line-height: 1.75;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .legal-content,
  .faq-content,
  .points-content {
    padding: 3rem 2.5rem;
    line-height: 1.8;
  }
}

/* Títulos y subtítulos */
.legal-content h2,
.faq-content h2,
.points-content h2 {
  color: var(--devir-blue);
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--devir-accent);
}

.legal-content h2:first-child,
.faq-content h2:first-child,
.points-content h2:first-child {
  margin-top: 0;
}

.legal-content h3,
.faq-content h3,
.points-content h3 {
  color: var(--devir-dark);
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Desktop */
@media (min-width: 1024px) {
  .legal-content h2,
  .faq-content h2,
  .points-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
  }

  .legal-content h3,
  .faq-content h3,
  .points-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
}

.legal-content p,
.faq-content p,
.points-content p {
  margin-bottom: 1rem;
}

.legal-callout {
  margin-bottom: 1.5rem;
}

.legal-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}

.legal-jump-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(59, 91, 161, 0.1);
  color: var(--devir-blue);
  font-weight: 700;
  text-decoration: none;
}

.legal-jump-links a:hover {
  background: rgba(59, 91, 161, 0.16);
}

.legal-content ul,
.legal-content ol,
.faq-content ul,
.faq-content ol,
.points-content ul,
.points-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-content li,
.faq-content li,
.points-content li {
  margin-bottom: 0.5rem;
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--devir-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--devir-dark);
}

/* Highlight boxes */
.highlight-box {
  background: #FFF3CD;
  border-left: 4px solid #FFC107;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.highlight-box strong {
  color: #856404;
}

.info-box {
  background: #D1ECF1;
  border-left: 4px solid #17A2B8;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.info-box strong {
  color: #0C5460;
}

/* Contact box */
.contact-box {
  background: var(--devir-light-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.contact-box h4 {
  color: var(--devir-blue);
  margin-bottom: 1rem;
}

/* Last updated */
.last-updated {
  text-align: right;
  font-size: 0.9rem;
  color: #6c757d;
  font-style: italic;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
}

/* FAQ specific - Accordion */
.faq-category {
  margin-bottom: 3rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-question {
  background: var(--devir-light-bg);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--devir-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #e9ecef;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--devir-blue);
  transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 1.5rem;
  max-height: 500px;
}

.faq-answer p {
  margin-bottom: 0.75rem;
  color: #495057;
  line-height: 1.7;
}

.faq-answer ul {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.faq-answer li {
  margin-bottom: 0.5rem;
  color: #495057;
}

.faq-answer a {
  color: var(--devir-blue);
  font-weight: 600;
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* Sistema de Puntos - Tablas */
.points-table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.points-table thead {
  background: linear-gradient(135deg, var(--devir-dark) 0%, var(--devir-blue) 100%);
  color: white;
}

.points-table th {
  padding: 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.points-table td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

.points-table tbody tr:hover {
  background: var(--devir-light-bg);
}

.points-table .event-type,
.points-table .factor-name {
  text-align: left;
  font-weight: 600;
  color: var(--devir-dark);
}

.points-table .points-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.points-table .position-1 { color: #FFD700; } /* Gold */
.points-table .position-2 { color: #C0C0C0; } /* Silver */
.points-table .position-3 { color: #CD7F32; } /* Bronze */
.points-table .position-4 { color: var(--devir-blue); }

.points-table .factor-weight {
  text-align: center;
  font-weight: 700;
  color: var(--devir-blue);
}

@media (max-width: 768px) {
  .points-table {
    font-size: 0.9rem;
  }

  .points-table th,
  .points-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* Example boxes */
.example-box {
  background: var(--devir-light-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid #dee2e6;
}

.example-box h4 {
  color: var(--devir-blue);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.example-box .result {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  border-left: 4px solid var(--devir-blue);
}

.example-box .result strong {
  color: var(--devir-blue);
}

/* Botones consistentes */
.btn-primary-devir {
  display: inline-block;
  background: var(--devir-blue-dark) !important;
  color: white !important;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  margin-right: 1rem;
}

.btn-primary-devir:hover {
  background: var(--devir-blue) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 91, 161, 0.4);
}

.btn-secondary-devir {
  display: inline-block;
  background: var(--devir-accent) !important;
  color: white !important;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-secondary-devir:hover {
  background: #C94D72 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(221, 96, 132, 0.4);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .legal-header h1,
  .faq-header h1,
  .points-header h1 {
    font-size: 1.5rem;
  }

  .legal-content,
  .faq-content,
  .points-content {
    padding: 1.5rem 1rem;
  }

  .legal-content h2,
  .faq-content h2,
  .points-content h2 {
    font-size: 1.25rem;
  }

  .contact-box {
    padding: 1rem;
  }

  .btn-primary-devir,
  .btn-secondary-devir {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
    text-align: center;
  }
}
