/* ============================================================
       KNOWLEDGE BASE STYLESHEET
       Golden Ratio Consulting
============================================================ */

/* ============================================================
       1. CSS VARIABLES & RESET
============================================================ */
:root {
  --color-primary: #DAA520;
  --color-primary-dark: #B8860B;
  --color-primary-light: #FFD700;
  --transition-base: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================================
       2. BODY & BACKGROUND
============================================================ */
body {
  font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a2e 0%, #16213e 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background decoration overlay */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
       3. MAIN CONTENT CONTAINER
============================================================ */
.content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

/* ============================================================
       4. HEADER SECTION
============================================================ */
.header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

/* ============================================================
       5. LOGO STYLING
============================================================ */
.logo {
  margin-bottom: 2rem;
}

.logo img {
  max-width: 380px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.02);
}

/* ============================================================
       6. TYPOGRAPHY & BRANDING
============================================================ */
.golden-phi {
  font-size: 2.5rem;
  line-height: 1;
  color: #DAA520;
  margin-bottom: 0.5rem;
  font-family: 'Times New Roman', serif;
  text-shadow: 0 2px 10px rgba(218, 165, 32, 0.3);
}

h1 {
  color: white;
  font-size: 2.5rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.5rem;
}

h1 span {
  color: #DAA520;
}

.subhead {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* ============================================================
       7. SEARCH SECTION
============================================================ */
.search-section {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 60px;
  padding: 0.5rem;
  margin-bottom: 2rem;
  display: flex;
  border: 1px solid rgba(218, 165, 32, 0.3);
}

.search-icon {
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.5);
}

.search-input {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: none;
  color: white;
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #DAA520, #B8860B);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-2px);
}

/* ============================================================
       8. QUICK ACTIONS
============================================================ */
.quick-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.action-link {
  background: rgba(218, 165, 32, 0.15);
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.action-link:hover {
  background: rgba(218, 165, 32, 0.3);
  transform: translateY(-2px);
}

/* ============================================================
       9. CATEGORY TABS
============================================================ */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.category-tab {
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(218, 165, 32, 0.2);
}

.category-tab:hover,
.category-tab.active {
  background: rgba(218, 165, 32, 0.2);
  color: #DAA520;
  border-color: rgba(218, 165, 32, 0.5);
}

/* ============================================================
       10. STATS BANNER
============================================================ */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(218, 165, 32, 0.2);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #DAA520;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.25rem;
}

/* ============================================================
       11. ARTICLES GRID
============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ============================================================
       12. ARTICLE CARDS
============================================================ */
.article-card {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid rgba(218, 165, 32, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: rgba(218, 165, 32, 0.5);
}

/* Article Badges */
.article-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.badge-finance { background: rgba(33, 150, 243, 0.2); color: #2196f3; }
.badge-cloud { background: rgba(33, 150, 243, 0.2); color: #00bcd4; }
.badge-security { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.badge-ai { background: rgba(156, 39, 176, 0.2); color: #9c27b0; }
.badge-it { background: rgba(255, 152, 0, 0.2); color: #ff9800; }
.badge-compliance { background: rgba(244, 67, 54, 0.2); color: #f44336; }

.article-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.article-description {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.read-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================================
       13. FEATURED SECTION
============================================================ */
.featured-section {
  background: rgba(218, 165, 32, 0.05);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(218, 165, 32, 0.2);
}

.featured-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #DAA520;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.featured-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.featured-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.featured-links a:hover {
  color: #DAA520;
}

/* ============================================================
       14. PAGINATION
============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(218, 165, 32, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
  background: rgba(218, 165, 32, 0.2);
  color: #DAA520;
}

/* ============================================================
       15. FOOTER
============================================================ */
.footer-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
       16. RESPONSIVE STYLES
============================================================ */
@media only screen and (max-width: 768px) {
  .content {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .logo img {
    max-width: 200px;
  }
  
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .search-section {
    flex-direction: column;
    border-radius: 20px;
  }
  
  .search-btn {
    margin-top: 0.5rem;
  }
}

@media only screen and (max-width: 480px) {
  h1 {
    font-size: 1.6rem;
  }
  
  .golden-phi {
    font-size: 2rem;
  }
  
  .stats-banner {
    grid-template-columns: 1fr;
  }
  
  .category-tab {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
  }
  
  .article-title {
    font-size: 1rem;
  }
}

/* ============================================================
       17. PRINT STYLES
============================================================ */
@media print {
  body::before {
    opacity: 0;
  }
  
  body {
    background: white;
  }
  
  .search-section,
  .quick-actions,
  .category-tabs,
  .pagination,
  .featured-section {
    display: none !important;
  }
  
  .article-card {
    background: white;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  
  .article-title {
    color: #333;
  }
  
  .article-description {
    color: #555;
  }
  
  .stat-box {
    background: white;
    border: 1px solid #ddd;
  }
}