/* =================================================================
   AGI Governance Framework - Enhanced Global Stylesheet
   ================================================================= */

/* Color Palette */
:root {
  --primary: #1a3a52;
  --primary-dark: #0f2438;
  --primary-light: #2a5a7a;
  --accent: #00d4ff;
  --accent-dark: #0099cc;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-light: #f8fafc;
  --bg-lighter: #f1f5f9;
  --border: #e2e8f0;
  --text: #1a1a1a;
  --text-muted: #666666;
  --gradient-primary: linear-gradient(135deg, #1a3a52 0%, #2a5a7a 100%);
  --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--bg-light);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}



/* =================================================================
   Navigation with Modern Styling
   ================================================================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s ease;
    border-radius: 2px;
}

/* Animate to X when active */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


nav {
    width: 100%;
    background: linear-gradient(180deg, rgba(26, 58, 82, 0.98), rgba(26, 58, 82, 0.95));
    padding: 0.75rem 1rem;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all 0.25s ease;
    will-change: transform, height, padding;
}
/* Shrink on scroll */
nav.shrink {
    padding: 0.4rem 1rem;
    
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    height: 100px;
    width: auto;
}


.logo:hover {
  transform: scale(1.05);

}

.scrolled .logo {
  width: 20px;
  height: 20px;
}


.logo-title {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    white-space: nowrap;
}

.logo-title:hover {
  transform: none;
  
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    transition: 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: #3bc7ff;
}

.nav-links a.active::after {
  width: 100%;
}

@media (max-width: 1024px) {
    .nav-links {
        gap: 1.25rem;
    }
    .logo-title {
        font-size: 1.05rem;
    }
}
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        text-align: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .logo {
        height: 32px;
    }

    .logo-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.5rem;
    }

    .logo {
        height: 28px;
    }

    .logo-title {
        font-size: 0.95rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }
}

/* =================================================================
   Shrinking Header — Base State (Large)
   ================================================================= */

nav {
  transition: padding 0.3s ease, background 0.4s ease, box-shadow 0.3s ease;
  padding: 1.5rem 0;
}

.logo {
  font-size: 1.6rem;  /* bigger when top */
  transition: transform 0.3s ease, font-size 0.3s ease;
}

.nav-links a {
  font-size: 1rem;  /* slightly larger */
  transition: font-size 0.3s ease, padding 0.3s ease;
}

.nav-links {
  gap: 2.5rem;
  transition: gap 0.3s ease;
}

/* =================================================================
   Shrunk State (appear AFTER scrolling)
   ================================================================= */

nav.shrink {
  padding: 0.6rem 0;
  background: rgba(26, 58, 82, 0.97);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.12);
}

/* smaller logo */
nav.shrink .logo {
    height: 28px;   /* smaller logo when scrolling */
    transition: height 0.25s ease;
}

/* smaller font + tighter spacing */
nav.shrink .nav-links {
  gap: 1.5rem;
}

nav.shrink .nav-links a {
  font-size: 0.82rem;
  padding-bottom: 0.2rem;
}


/* =================================================================
   Breadcrumb Navigation
   ================================================================= */

   .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}


.breadcrumb {
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* =================================================================
   Page Header with Gradient
   ================================================================= */

.page-header {
  max-width: 1400px;
  margin: 3rem auto 2rem;
  padding: 3rem 2rem;
  background: var(--gradient-primary);
  border-radius: 1rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.page-header h1 {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}

.page-header p {
  font-size: 1.1rem;
  line-height: 1.8;
  position: relative;
  z-index: 1;
  opacity: 0.95;
}

/* =================================================================
   Hero Section
   ================================================================= */

.hero {
  max-width: 1400px;
  margin: 3rem auto;
  padding: 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3.25rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  line-height: 1.2;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* =================================================================
   Buttons & CTAs
   ================================================================= */

button,
.btn {
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

button::before,
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  z-index: -1;
}

button:hover::before,
.btn:hover::before {
  left: 0;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(26, 58, 82, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 58, 82, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: 0 2px 10px rgba(26, 58, 82, 0.1);
}

.btn-secondary:hover {
  background: var(--bg-lighter);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* =================================================================
   Highlight & Alert Boxes
   ================================================================= */

.security-banner {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(96, 165, 250, 0.05) 100%);
  border: 2px solid var(--accent);
  border-radius: 0.75rem;
  padding: 1.75rem;
  margin: 2rem 0;
  text-align: center;
  color: var(--primary);
  font-size: 0.95rem;
  position: relative;
  backdrop-filter: blur(10px);
}

.security-banner::before {
  content: '🔒';
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.highlight-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.05) 100%);
  border-left: 4px solid var(--success);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.highlight-box.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
  border-left-color: var(--warning);
}

.highlight-box.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.05) 100%);
  border-left-color: var(--danger);
}

/* =================================================================
   Framework Section
   ================================================================= */

.framework-section {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  text-align: center;
  color: var(--primary);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 600;
}

/* =================================================================
   Grid Layouts
   ================================================================= */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.models-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* =================================================================
   Card Components with Modern Design
   ================================================================= */

.pillar,
.page-card,
.requirement-item,
.doc-item,
.research-item,
.model-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pillar::before,
.page-card::before,
.requirement-item::before,
.doc-item::before,
.research-item::before,
.model-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.pillar:hover::before,
.page-card:hover::before,
.requirement-item:hover::before,
.doc-item:hover::before,
.research-item:hover::before,
.model-card:hover::before {
  transform: scaleX(1);
}

.pillar:hover,
.page-card:hover,
.doc-item:hover,
.research-item:hover,
.model-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.15);
  transform: translateY(-4px);
}

.page-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.page-card:hover {
  transform: translateY(-6px);
}

.pillar h3,
.page-card h3,
.requirement-item h4,
.doc-item h4,
.research-item h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.pillar p,
.page-card p,
.requirement-item p,
.doc-item p,
.research-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: auto;
}

/* =================================================================
   Badge Styles with Icons
   ================================================================= */

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-badge {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
  color: var(--primary);
  border: 1px solid var(--accent);
}

.status {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(96, 165, 250, 0.15) 100%);
  color: var(--primary);
  padding: 0.4rem 0.9rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--accent);
}

.status.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.2) 100%);
  color: var(--success);
  border-color: var(--success);
}

.research-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
  border: 1px solid var(--accent);
}

.research-badge.primary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.2) 100%);
  color: var(--success);
  border-color: var(--success);
}

/* =================================================================
   Timeline
   ================================================================= */

.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-accent);
}

.timeline-item {
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--accent);
}

.timeline-label {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.timeline-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =================================================================
   Content Container - FIX FOR ALIGNMENT
   ================================================================= */

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.framework-section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
  width: 100%;
}

.page-header {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2.5rem;
  width: auto;
  background: var(--gradient-primary);
  border-radius: 1rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.page-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* =================================================================
   Section Containers - PROPER ALIGNMENT
   ================================================================= */

.section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.section-divider {
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.toc-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  width: auto;
}

.toc-section h2 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
  border: none;
  padding: 0;
}

.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.toc-list li {
  padding: 0.75rem 0;
}

.toc-list a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.toc-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* =================================================================
   Filter Section - ALIGNMENT FIX
   ================================================================= */

.filter-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: auto;
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--primary);
  background: white;
  color: var(--primary);
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
}

/* =================================================================
   Grid Fixes - PROPER SPACING
   ================================================================= */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.requirements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.models-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* =================================================================
   Card Sizing - PROPER WIDTH
   ================================================================= */

.pillar,
.page-card,
.requirement-item,
.doc-item,
.research-item,
.model-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pillar h3,
.page-card h3,
.requirement-item h4,
.doc-item h4,
.research-item h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  margin-top: 0;
  font-weight: 700;
}

.pillar p,
.page-card p,
.requirement-item p,
.doc-item p,
.research-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.research-author {
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* =================================================================
   Feature Lists - PROPER ALIGNMENT
   ================================================================= */

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin: 2rem 0;
}

.features-text h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 0.75rem 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.feature-list li:before {
  content: "✓";
  color: var(--success);
  font-weight: bold;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.features-visual {
  background: var(--bg-lighter);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
}

.features-visual h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.features-visual p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.75rem 0;
}

/* =================================================================
   Model Cards - PROPER WIDTH
   ================================================================= */

.model-card {
  background: var(--bg-lighter);
  border-left: 4px solid var(--primary);
  padding: 1.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.model-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.model-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
  flex: 1;
}

.effectiveness-badge {
  background: white;
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--primary);
  white-space: nowrap;
}

.model-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =================================================================
   Responsive Fixes
   ================================================================= */

@media (max-width: 768px) {
  .content,
  .framework-section,
  .filter-section,
  .toc-section {
    padding: 0 1rem;
  }

  .section {
    padding: 1.5rem;
  }

  .page-header {
    padding: 2rem 1.5rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pillars,
  .pages-grid,
  .requirements-grid,
  .research-grid {
    grid-template-columns: 1fr;
  }

  .model-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .filter-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .content,
  .framework-section,
  .filter-section,
  .toc-section {
    padding: 0 0.75rem;
  }

  .section {
    padding: 1rem;
  }

  .pillar,
  .page-card,
  .requirement-item {
    padding: 1.25rem;
  }

  .pillar h3,
  .page-card h3 {
    font-size: 1rem;
  }
}

/* =================================================================
   Component Boxes
   ================================================================= */

.component-box {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(96, 165, 250, 0.05) 100%);
  border-left: 4px solid var(--accent);
  padding: 1.75rem;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.component-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.component-box h4 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.component-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* =================================================================
   Form Styles with Bootstrap
   ================================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
  background: linear-gradient(white, white);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

/* =================================================================
   Navigation Buttons
   ================================================================= */

.nav-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.nav-button {
  padding: 0.85rem 1.75rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(26, 58, 82, 0.2);
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 58, 82, 0.3);
}

.nav-button.secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.nav-button.secondary:hover {
  background: var(--bg-lighter);
  transform: translateY(-2px);
}

/* =================================================================
   Footer - Fixed Layout
   ================================================================= */

footer {
  background: var(--gradient-primary);
  border-top: 2px solid var(--accent);
  margin-top: 4rem;
  color: white;
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(3rem, 4vw, 6rem);
  align-items: center;
  justify-items: center;
  width: 100%;
  
}

/* LEFT - LOGO */
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.footer-logo-img {
  width: clamp(45px, 8vw, 120px);
  height: clamp(45px, 8vw, 120px);
  border-radius: 50%;
  border: 2px solid var(--accent);
  transition: transform 0.3s ease;
  object-fit: contain;
}

.footer-logo a:hover .footer-logo-img {
  transform: scale(1.1) rotate(5deg);
}

/* MIDDLE - LINKS & COPYRIGHT */
.footer-middle {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  gap: clamp(0.75rem, 1vw, 1rem);
  min-width: 0;
}

.footer-copyright {
  margin: 0;
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 1.5rem);
  justify-content: center;
  font-size: clamp(0.75rem, 1.6vw, 0.85rem);
  margin: 0;
  padding: 0;
  list-style: none;
  
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  font-weight: 500;

}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:hover::after {
  width: 100%;
}

/* RIGHT - SNS */
.footer-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-sns {
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.footer-sns a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(32px, 7vw, 44px);
  height: clamp(32px, 7vw, 44px);
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.footer-sns a:hover {
  transform: translateY(-3px) scale(1.1);
  color: var(--accent);
}

.fa-solid--envelope-filled {
  display: inline-block;
  width: 30px;
  height: 30px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23000' d='M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7c22.4 17.4 52.1 39.5 154.1 113.6c21.1 15.4 55.9 50.2 73.2 50.2s52.1-34.8 73.2-50.2C445.7 230.2 479.8 207.7 502.3 190.8zM256 320c23.2 0 56.6-29.375 73.9-42.5c132.3-96.3 142.3-106.3 171.4-129.7c4.2-3.3 6.7-8.1 6.7-13.3V64c0-26.5-21.5-48-48-48H48C21.5 16 0 37.5 0 64v70.5c0 5.2 2.5 10 6.7 13.3c29.1 23.4 39.1 33.4 171.4 129.7c17.3 13.125 50.7 42.5 73.9 42.5z'/%3E%3C/svg%3E");
  background-color: white;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.fa-solid--envelope-filled:hover {
  background-color: rgb(201, 190, 140);
}


.cib--github {
  display: inline-block;
  width: 30px;
  height: 30px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 .396c-8.839 0-16 7.167-16 16c0 7.073 4.584 13.068 10.937 15.183c.803.151 1.093-.344 1.093-.772c0-.38-.009-1.385-.015-2.719c-4.453.964-5.391-2.151-5.391-2.151c-.729-1.844-1.781-2.339-1.781-2.339c-1.448-.989.115-.968.115-.968c1.604.109 2.448 1.645 2.448 1.645c1.427 2.448 3.744 1.74 4.661 1.328c.14-1.031.557-1.74 1.011-2.135c-3.552-.401-7.287-1.776-7.287-7.907c0-1.751.62-3.177 1.645-4.297c-.177-.401-.719-2.031.141-4.235c0 0 1.339-.427 4.4 1.641a15.4 15.4 0 0 1 4-.541c1.36.009 2.719.187 4 .541c3.043-2.068 4.381-1.641 4.381-1.641c.859 2.204.317 3.833.161 4.235c1.015 1.12 1.635 2.547 1.635 4.297c0 6.145-3.74 7.5-7.296 7.891c.556.479 1.077 1.464 1.077 2.959c0 2.14-.02 3.864-.02 4.385c0 .416.28.916 1.104.755c6.4-2.093 10.979-8.093 10.979-15.156c0-8.833-7.161-16-16-16z'/%3E%3C/svg%3E");
  background-color: white;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  
}

.cib--github:hover {
              background: #832b93;

}

/* =================================================================
   Responsive - Tablet (768px and below)
   ================================================================= */

@media (max-width: 768px) {
  footer {
    padding: 2.5rem 1.5rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
    justify-items: center;
  }

  .footer-middle {
    width: 100%;
    order: 2;
  }

  .footer-logo {
    order: 1;
  }

  .footer-right {
    order: 3;
    width: 100%;
  }
}

/* =================================================================
   Responsive - Mobile (500px and below)
   ================================================================= */

@media (max-width: 500px) {
  footer {
    padding: clamp(1.5rem, 2vw, 2rem);
  }

  .footer-container {
    gap: clamp(1rem, 2vw, 1.5rem);
  }

  .footer-copyright {
    max-width: 100%;
  }

  .footer-links {
    gap: clamp(0.75rem, 1.5vw, 1rem);
    font-size: clamp(0.7rem, 1.6vw, 0.8rem);
  }

  .footer-logo-img {
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
  }

  .footer-sns a {
    width: clamp(28px, 6vw, 36px);
    height: clamp(28px, 6vw, 36px);
    font-size: 1rem;
  }
}

/* =================================================================
   Responsive - Small Mobile (350px and below)
   ================================================================= */

@media (max-width: 350px) {
  footer {
    padding: 1.25rem 1rem;
  }

  .footer-container {
    gap: 1rem;
  }

  .footer-middle {
    gap: 0.5rem;
  }

  .footer-copyright {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    margin: 0;
  }

  .footer-links {
    gap: 0.6rem;
    font-size: clamp(0.65rem, 1.4vw, 0.75rem);
  }

  .footer-logo-img {
    width: 36px;
    height: 36px;
  }

  .footer-sns a {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
}

/* =================================================================
   Responsive Design
   ================================================================= */

@media (max-width: 1024px) {
  .nav-links {
    gap: 1.5rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.8rem;
    justify-content: center;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .pillars,
  .pages-grid,
  .research-grid,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
  }

  button,
  .btn {
    width: 100%;
  }

  .nav-buttons {
    flex-direction: column;
  }

  .nav-button {
    width: 100%;
  }

  .model-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-links {
    gap: 1rem;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1rem;
  }

  .page-header {
    padding: 2rem 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 0 1rem;
  }

  .content {
    padding: 0 1rem;
  }

  .framework-section {
    padding: 0 1rem;
  }

  .section {
    padding: 1.5rem 1rem;
  }
}

/* =================================================================
   Animations
   ================================================================= */

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

.pillar,
.page-card,
.section {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.highlight-box {
  animation: fadeInUp 0.6s ease-out;
}

/* =================================================================
   Print Styles
   ================================================================= */

@media print {
  nav,
  footer,
  .nav-buttons {
    display: none;
  }

  .section {
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* Default desktop layout */
.nav-links {
    display: flex;
    gap: 1rem;
}

/* Mobile */
@media (max-width: 820px) {

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        background: rgba(26, 58, 82, 0.97);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        display: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    .nav-links.open {
        display: flex;
        animation: menuFade 0.25s ease;
    }

    @keyframes menuFade {
        from { opacity: 0; transform: translateY(-10px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 820px) {

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        margin-left: 0;
    }

    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Hide desktop menu on mobile */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        background: rgba(26, 58, 82, 0.97);
        padding: 1rem 0;
    }

    /* Show when opened */
    .nav-links.open {
        display: flex;
    }
}


