/* GSAP + React Integration Guide Page Styles */

/* Color variables */
:root {
  --gs-primary: #00FF66;
  --gs-secondary: #00CC88;
  --gs-dark: #1A1A2E;
  --gs-darker: #0F0F1A;
}

/* Hero Section */
.rc-hero {
  position: relative;
  background: linear-gradient(135deg, var(--gs-darker) 0%, #1a1a3e 100%);
  padding: 10rem 0 6rem;
  overflow: hidden;
}

.rc-hero [data-gsap] {
  opacity: 0;
}

.rc-hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 8vw, 3.5rem);
}

.rc-hero .lead {
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Table of Contents */
.rc-toc {
  background: rgba(0, 255, 102, 0.03);
  border: 1px solid rgba(0, 255, 102, 0.1);
  padding: 2rem;
}

.rc-toc a {
  transition: color 0.3s ease;
  display: inline-block;
}

.rc-toc a:hover {
  color: var(--gs-primary) !important;
  text-decoration: underline;
}

/* React Sections */
.rc-section {
  position: relative;
  transition: background-color 0.3s ease;
}

.rc-section h2 {
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.rc-section .text-white-50 {
  line-height: 1.7;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.rc-section p {
  margin-bottom: 1.25rem;
}

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

/* Code Blocks - MAJOR STYLING SINCE THIS IS A CODE-HEAVY GUIDE */
.rc-code {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 102, 0.1);
  overflow-x: auto;
  transition: all 0.3s ease;
}

.rc-code:hover {
  border-color: rgba(0, 255, 102, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

.rc-code pre {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.75);
}

.rc-code code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  word-break: break-word;
}

/* Syntax highlighting for code */
.rc-code .language-jsx,
.rc-code .language-tsx,
.rc-code .language-javascript {
  color: rgba(255, 255, 255, 0.7);
}

/* Copy button */
.rc-copy-btn {
  transition: all 0.3s ease;
  font-size: 0.85rem;
  white-space: nowrap;
}

.rc-copy-btn:hover {
  background-color: rgba(0, 255, 102, 0.1);
  border-color: var(--gs-primary);
  color: var(--gs-primary);
}

.rc-copy-btn.copied {
  background-color: var(--gs-primary);
  border-color: var(--gs-primary);
  color: var(--gs-darker);
}

.rc-copy-btn.copied i::before {
  content: '\f26c'; /* checkmark icon */
}

/* Code Comparison Boxes */
.rc-code-compare {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 102, 0.1);
  position: relative;
}

.rc-code-compare pre {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

.rc-code-compare code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem;
}

.rc-code-compare .badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}

/* Callout Boxes */
.rc-callout {
  background: rgba(0, 255, 102, 0.05);
  border: 1px solid rgba(0, 255, 102, 0.15);
  border-left: 4px solid var(--gs-primary);
  transition: all 0.3s ease;
  position: relative;
}

.rc-callout:hover {
  background: rgba(0, 255, 102, 0.08);
  border-color: rgba(0, 255, 102, 0.25);
}

.rc-callout h4 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.rc-callout p {
  margin-bottom: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.rc-callout ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.rc-callout li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

.rc-callout li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--gs-primary);
  font-weight: 800;
}

/* Inline code */
code {
  background: rgba(0, 255, 102, 0.1);
  color: var(--gs-primary);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9em;
  font-weight: 500;
}

a code {
  color: inherit;
}

/* Accordion */
.rc-accordion .accordion-button {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  border: none;
  background-color: transparent;
  color: var(--gs-primary);
  transition: all 0.3s ease;
  position: relative;
}

.rc-accordion .accordion-button:not(.collapsed) {
  background-color: rgba(0, 255, 102, 0.08);
  color: var(--gs-primary);
  box-shadow: none;
}

.rc-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 255, 102, 0.15);
  border-color: rgba(0, 255, 102, 0.25);
}

.rc-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2300FF66'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.rc-accordion .accordion-body {
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  font-size: 1rem;
}

.rc-accordion .accordion-body a {
  color: var(--gs-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.rc-accordion .accordion-body a:hover {
  text-decoration: underline;
  color: var(--gs-secondary);
}

/* Typography */
.font-mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace !important;
}

.ls-wide {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hover-primary:hover {
  color: var(--gs-primary) !important;
  text-decoration: underline;
}

/* Badge customization */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.bg-primary {
  background-color: var(--gs-primary) !important;
  color: var(--gs-darker) !important;
}

.bg-opacity-25 {
  opacity: 0.25;
}

.text-primary {
  color: var(--gs-primary) !important;
}

/* Section spacing */
section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

section h2 {
  margin-bottom: 1.5rem;
}

/* Button styles */
.btn-primary {
  background-color: var(--gs-primary);
  border-color: var(--gs-primary);
  color: var(--gs-darker);
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--gs-secondary);
  border-color: var(--gs-secondary);
  color: var(--gs-darker);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 255, 102, 0.3);
}

.btn-outline-light {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  color: var(--gs-primary);
  border-color: var(--gs-primary);
  background-color: transparent;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  font-size: 0.8rem;
}

/* Utility classes */
.bg-gs-darker {
  background-color: var(--gs-darker) !important;
}

.bg-gs-dark {
  background-color: var(--gs-dark) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Display heading */
.display-6 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.2;
  font-weight: 800;
}

.display-4 {
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1.1;
  font-weight: 800;
}

/* Responsive Design */
@media (max-width: 991px) {
  .rc-hero h1 {
    font-size: 2.5rem;
  }

  .rc-section h2 {
    font-size: 1.75rem;
  }

  .rc-code {
    margin-bottom: 1.5rem;
  }

  .rc-code pre {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .rc-code-compare pre {
    font-size: 0.75rem;
  }

  section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

@media (max-width: 768px) {
  .rc-hero {
    padding: 2rem 1rem;
  }

  .rc-hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .rc-hero .lead {
    font-size: 1rem;
    line-height: 1.6;
  }

  .rc-section {
    padding: 2rem 0;
  }

  .rc-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .rc-toc {
    padding: 1.5rem;
  }

  .rc-toc ul {
    font-size: 0.95rem;
  }

  .rc-toc a {
    font-size: 0.95rem;
  }

  .rc-code {
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .rc-code pre {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .rc-code-compare {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
  }

  .rc-code-compare pre {
    font-size: 0.7rem;
    line-height: 1.5;
  }

  .rc-callout {
    padding: 1.25rem;
  }

  .rc-callout h4 {
    font-size: 0.95rem;
  }

  .rc-callout p {
    font-size: 0.9rem;
  }

  .rc-accordion .accordion-button {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .rc-accordion .accordion-body {
    padding: 1.25rem;
    font-size: 0.95rem;
  }

  .btn-lg {
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
  }

  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .row {
    --bs-gutter-x: 1rem;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 576px) {
  .rc-hero h1 {
    font-size: 1.75rem;
  }

  .rc-hero .lead {
    font-size: 0.95rem;
  }

  .rc-section h2 {
    font-size: 1.25rem;
  }

  .display-6 {
    font-size: 1.5rem;
  }

  .rc-code,
  .rc-code-compare {
    padding: 0.75rem;
  }

  .rc-code pre,
  .rc-code-compare pre {
    font-size: 0.7rem;
  }

  .rc-copy-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }

  .d-flex {
    gap: 0.75rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .flex-wrap {
    flex-wrap: wrap;
  }
}

/* Scrollbar styling for code blocks */
.rc-code::-webkit-scrollbar {
  height: 6px;
}

.rc-code::-webkit-scrollbar-track {
  background: rgba(0, 255, 102, 0.05);
}

.rc-code::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 102, 0.3);
  border-radius: 3px;
}

.rc-code::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 102, 0.5);
}

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

[data-gsap="fade-up"] {
  animation: fadeUp 0.6s ease-out forwards;
}

/* Links */
a {
  color: var(--gs-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--gs-secondary);
}

/* Print styles */
@media print {
  .rc-copy-btn,
  .btn-primary,
  .btn-outline-light {
    display: none;
  }

  .rc-code {
    page-break-inside: avoid;
  }

  section {
    page-break-inside: avoid;
  }
}

/* Selection color */
::selection {
  background-color: var(--gs-primary);
  color: var(--gs-darker);
}

::-moz-selection {
  background-color: var(--gs-primary);
  color: var(--gs-darker);
}
