/* =====================================================
   FARMICON — Privacy Policy Page Styles
   ===================================================== */

/* ===== PRIVACY HERO ===== */
.privacy-hero {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 60px;
  background: linear-gradient(160deg, #ffffff 0%, #f0faf0 30%, #e0f2e0 60%, #c8e6c9 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.privacy-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(46,125,50,0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.privacy-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255,193,7,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.privacy-hero .section-tag {
  margin-bottom: 20px;
}

.privacy-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.15;
}

.privacy-hero h1 .highlight {
  color: var(--primary);
}

.privacy-hero .hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
}

.privacy-hero .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.privacy-hero .meta-item .meta-icon {
  font-size: 1.1rem;
}

/* ===== PRIVACY CONTENT AREA ===== */
.privacy-content {
  padding: 60px 0 80px;
  background: var(--bg);
}

.privacy-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== SIDEBAR TABLE OF CONTENTS ===== */
.privacy-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.toc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.toc-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-bg);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1.4;
  border-left: 3px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--primary);
  background: var(--primary-bg);
  border-left-color: var(--primary);
}

/* ===== PRIVACY SECTIONS ===== */
.privacy-body {
  min-width: 0;
}

.policy-section {
  margin-bottom: 40px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.policy-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.policy-section:hover {
  border-color: var(--primary-lighter);
  box-shadow: var(--shadow-sm);
}

.policy-section:hover::before {
  opacity: 1;
}

.policy-section:target {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.policy-section:target::before {
  opacity: 1;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-number {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(46,125,50,0.25);
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.policy-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-section strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== SUB-HEADINGS ===== */
.policy-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary-light);
}

/* ===== LISTS ===== */
.policy-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.policy-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.policy-list li:hover {
  background: var(--primary-bg);
  transform: translateX(4px);
}

.policy-list li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 1px;
  flex-shrink: 0;
}

/* Permission list with icons */
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.permission-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.permission-item:hover {
  border-color: var(--primary-lighter);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.permission-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--primary-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.permission-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.permission-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
  background: linear-gradient(135deg, var(--primary-bg), #f0faf0);
  border: 1px solid var(--primary-lighter);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.highlight-box .box-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.highlight-box p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--primary-dark);
  font-weight: 500;
  line-height: 1.6;
}

/* Warning style highlight */
.highlight-box.warning {
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border-color: #FFE082;
}

.highlight-box.warning p {
  color: var(--accent-dark);
}

/* ===== CONTACT CARD ===== */
.contact-card {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #142F17 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: var(--text-white);
  text-align: center;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(129,199,132,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.contact-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-white);
  border: none;
  padding: 0;
}

.contact-card > p {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  color: var(--text-white);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.contact-link:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.contact-link .link-icon {
  font-size: 1.1rem;
}

/* ===== FOOTER NOTE ===== */
.policy-footer-note {
  text-align: center;
  margin-top: 48px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.policy-footer-note p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

.policy-footer-note p + p {
  margin-top: 4px;
}

/* ===== ANIMATIONS ===== */
.privacy-fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: privacyFadeIn 0.6s ease-out forwards;
}

.privacy-fade-in.delay-1 { animation-delay: 0.1s; }
.privacy-fade-in.delay-2 { animation-delay: 0.2s; }
.privacy-fade-in.delay-3 { animation-delay: 0.3s; }

@keyframes privacyFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger sections on scroll */
.policy-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out, border-color var(--transition), box-shadow var(--transition);
}

.policy-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .privacy-wrapper {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .privacy-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    margin-bottom: 32px;
  }

  .toc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
}

@media (max-width: 767px) {
  .privacy-hero h1 {
    font-size: 2rem;
  }

  .privacy-hero .hero-meta {
    gap: 12px;
  }

  .policy-section {
    padding: 24px 20px;
  }

  .section-header h2 {
    font-size: 1.15rem;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .toc-list {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 28px 20px;
  }

  .contact-details {
    flex-direction: column;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .privacy-hero h1 {
    font-size: 3rem;
  }
}

/* Scrollbar for TOC */
.privacy-sidebar::-webkit-scrollbar {
  width: 4px;
}

.privacy-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.privacy-sidebar::-webkit-scrollbar-thumb {
  background: var(--primary-lighter);
  border-radius: 2px;
}

.privacy-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}
