/* ===== POLICY PAGES STYLES - Privacy & Cookie Policy ===== */

/* Policy Page Container */
.policy-page {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.policy-page .prose {
  max-width: 100%;
}

/* Policy Header */
.policy-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  color: white;
  padding: 6rem 0 4rem;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.policy-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.policy-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: white;
  margin-bottom: 0.75rem;
  position: relative;
}

.policy-header .policy-date {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Policy Content Area */
.policy-content {
  background: white;
  padding: 3rem 2rem;
  border-radius: 1rem;
  margin-top: -2rem;
  position: relative;
  z-index: 10;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .policy-content {
    padding: 4rem 3rem;
    margin-top: -3rem;
  }
}

/* Policy Headings */
.policy-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.policy-content h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.5rem;
  background: linear-gradient(135deg, #3b82f6, #1e293b);
  border-radius: 2px;
}

.policy-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #334155;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.policy-content h2:first-of-type {
  margin-top: 0;
}

/* Policy Paragraphs */
.policy-content p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* Policy Lists */
.policy-content ul,
.policy-content ol {
  margin: 1rem 0 1.5rem 0;
  padding-left: 0;
}

.policy-content ul li,
.policy-content ol li {
  font-size: 1rem;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.policy-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 6px;
  height: 6px;
  background: #3b82f6;
  border-radius: 50%;
}

.policy-content ol {
  counter-reset: policy-counter;
}

.policy-content ol li {
  counter-increment: policy-counter;
}

.policy-content ol li::before {
  content: counter(policy-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  color: #3b82f6;
}

.policy-content li strong {
  color: #1e293b;
  font-weight: 600;
}

/* Policy Links */
.policy-content a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.policy-content a:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

/* Policy Tables */
.policy-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.policy-content thead {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.policy-content thead th {
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.policy-content tbody tr {
  background: white;
  transition: background-color 0.2s ease;
}

.policy-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

.policy-content tbody tr:hover {
  background: #f1f5f9;
}

.policy-content tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  vertical-align: top;
}

.policy-content tbody tr:last-child td {
  border-bottom: none;
}

/* Table Responsive */
.policy-content .overflow-x-auto {
  margin: 1.5rem -1rem;
  padding: 0 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .policy-content .overflow-x-auto {
    margin: 1.5rem 0;
    padding: 0;
  }
}

/* Policy Info Box */
.policy-info-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-left: 4px solid #3b82f6;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

.policy-info-box h3 {
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.policy-info-box p {
  color: #334155;
  margin-bottom: 0.5rem;
}

.policy-info-box p:last-of-type {
  margin-bottom: 1rem;
}

/* Policy CTA Box */
.policy-cta-box {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.policy-cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.policy-cta-box h3 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.75rem;
  position: relative;
}

.policy-cta-box p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  position: relative;
}

.policy-cta-box .btn-primary {
  background: white !important;
  color: #1e293b !important;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.policy-cta-box .btn-primary:hover {
  background: #f1f5f9 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Cookie Manage Button */
.policy-content button.text-castaldo-blue-500 {
  background: none;
  border: none;
  color: #3b82f6;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.policy-content button.text-castaldo-blue-500:hover {
  color: #1d4ed8;
}

/* Section Divider */
.policy-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
  margin: 2.5rem 0;
}

/* Print Styles */
@media print {
  .policy-header {
    background: #1e293b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .policy-content {
    box-shadow: none;
    padding: 2rem 0;
  }

  .policy-cta-box {
    display: none;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.policy-content {
  animation: fadeInUp 0.5s ease-out;
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Manteniamo light mode per le policy pages per leggibilità */
}
