/* New Homepage Styles */

.new-homepage {
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Header */
.site-header {
  background: #1a1a1a;
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

.logo-image {
  height: 32px;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 600;
}

.header-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #e53e3e;
}

/* Legacy Search Area */
.new-homepage .legacy-search-area {
  background: #1a202c;
  color: var(--color-text-primary);
  padding: 2rem 0;
}

.new-homepage .legacy-search-area article {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.new-homepage .legacy-search-area h1.homepage {
  text-align: center;
  color: white;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.new-homepage .legacy-search-area #inpagesearch {
  margin-bottom: 1rem;
  position: relative;
}

.new-homepage .legacy-search-area .white a {
  color: white;
  text-align: center;
  display: block;
}

/* Hero Section */
.hero-section {
  background: var(--color-background-primary, #1a202c);
  border: 1px solid var(--color-border-primary, #2d3748);
  color: white;
  max-width: 1200px;
  margin: 1rem auto 1rem;
  border-radius: 12px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.125rem;
  margin: 0 0 1.5rem 0;
  text-align: center;
  opacity: 0.95;
}

/* Hero Search */
.hero-search {
  position: relative;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.1);
}

.search-icon {
  color: #9ca3af;
  margin-right: 0.75rem;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #1a1a1a;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-shortcut {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-family: monospace;
}

.dropdown-search {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  margin-top: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.dropdown-search.show {
  display: block;
}

/* Top Cards */
.top-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.top-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: #1a1a1a;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.top-card .card-icon {
  flex-shrink: 0;
  color: #667eea;
}

.top-card .card-content {
  flex: 1;
}

.top-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.top-card .card-link {
  color: #667eea;
  font-weight: 500;
}

/* Main Content */
.new-homepage .main-content {
  flex: 1;
  width: 100%;
  padding: 0;
  background: white;
}

.new-homepage .content-sections {
  max-width: 100%;
  margin: 0 auto;

}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-tab:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.filter-tab.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

/* Content Sections */
.content-sections {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}

.content-section {
  transition: opacity 0.3s, transform 0.3s;
  width: 100%;
  padding-left: 2rem;
  padding-right: 2rem;
}

.content-section.hidden {
  display: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-icon {
  font-size: 2rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
}

.section-description {
  color: #6b7280;
  margin: 0 0 2rem 0;
  font-size: 1.0625rem;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin: 0 auto;
}

.card-grid ul.ql {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card-grid li {
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
  list-style: none;
}

.card-grid li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.card-grid li.quicklink .qlrow,
.card-grid li.box {
  display: flex;
  padding: 1.5rem;
  gap: 1rem;
}

.card-grid li .icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-grid li .icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-grid li .qlcontent,
.card-grid li .boxtitle {
  flex: 1;
}

.card-grid li h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.card-grid li h4 a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s;
}

.card-grid li h4 a:hover {
  color: #667eea;
}

.card-grid li p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9375rem;
  line-height: 1.5;
}

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

.update-column h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #1a1a1a;
}

.update-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.update-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.update-list li:last-child {
  border-bottom: none;
}

.update-list a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
}

.update-list span.date {
    color: #222222;
    font-style: italic;
}

.update-list a:hover {
  color: #667eea;
}

.view-more {
  display: inline-block;
  margin-top: 1rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.view-more:hover {
  color: #5568d3;
}

/* Footer */
.site-footer {
  background: #1a1a1a;
  color: white;
  padding: 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer-brand {
  color: white;
  font-size: 0.875rem;
}

.footer-support {
  color: white;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-support:hover {
  color: #e53e3e;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  display: block;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-social a:hover {
  opacity: 1;
}

.footer-social img {
  width: 24px;
  height: 24px;
}

.footer-copyright {
  max-width: 1400px;
  margin: 1.5rem auto 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #374151;
  text-align: center;
}

.footer-copyright p {
  margin: 0;
  font-size: 0.875rem;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .header-nav {
    gap: 1rem;
    font-size: 0.875rem;
  }
  
  .filter-tabs {
    flex-wrap: nowrap;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-left {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .main-content {
    padding: 2rem 1rem;
  }
  
  .top-cards {
    grid-template-columns: 1fr;
  }
  
  .search-shortcut {
    display: none;
  }
}

/* Content Type Badges - Multi-Badge System */
/* These badges/lozenges can be used on links throughout the homepage */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

/* Content Type Badges (Blue Theme) */
.badge-contenttype {
  background-color: #e3f2fd;
  color: #1565c0;
}

/* Security Badges (Red Theme) */
.badge-security {
  background-color: #ffebee;
  color: #c62828;
}

/* Level Badges (Green Theme) */
.badge-level {
  background-color: #e8f5e9;
  color: #2e7d32;
}

/* Legacy class support - maps to contenttype */
.content-type-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  background-color: #e3f2fd;
  color: #1565c0;
}

/* Specific Content Type Badges */
.badge-tutorial {
  background-color: #e3f2fd;
  color: #1565c0;
}

.badge-concept {
  background-color: #f3e5f5;
  color: #6a1b9a;
}

.badge-reference {
  background-color: #e0f2f1;
  color: #00695c;
}

.badge-guide {
  background-color: #e0f7fa;
  color: #00838f;
}

.badge-video {
  background-color: #ffebee;
  color: #c62828;
}

.badge-api {
  background-color: #e8eaf6;
  color: #283593;
}

.badge-example {
  background-color: #fff3e0;
  color: #e65100;
}

.badge-quickstart {
  background-color: #f1f8e9;
  color: #558b2f;
}

.badge-troubleshooting {
  background-color: #efebe9;
  color: #4e342e;
}

/* Security Badge Types */
.badge-internal {
  background-color: #f5f5f5;
  color: #616161;
}

.badge-partner {
  background-color: #fff8e1;
  color: #f57f17;
}

.badge-beta {
  background-color: #fff3e0;
  color: #e65100;
}

.badge-deprecated {
  background-color: #ffebee;
  color: #c62828;
}

.badge-new {
  background-color: #e8f5e9;
  color: #2e7d32;
}

/* Level Badge Types */
.badge-beginner {
  background-color: #e1f5fe;
  color: #0277bd;
}

.badge-intermediate {
  background-color: #e3f2fd;
  color: #01579b;
}

.badge-advanced {
  background-color: #e8eaf6;
  color: #1a237e;
}

.badge-expert {
  background-color: #ede7f6;
  color: #4a148c;
}

/* Dark mode adjustments for badges */
body.dark-mode .badge-contenttype,
body.dark-mode .content-type-badge,
body.dark-mode .badge-tutorial {
  background-color: #1a237e;
  color: #90caf9;
}

body.dark-mode .badge-concept {
  background-color: #4a148c;
  color: #ce93d8;
}

body.dark-mode .badge-reference {
  background-color: #004d40;
  color: #80cbc4;
}

body.dark-mode .badge-guide {
  background-color: #006064;
  color: #80deea;
}

body.dark-mode .badge-video {
  background-color: #b71c1c;
  color: #ffcdd2;
}

body.dark-mode .badge-api {
  background-color: #1a237e;
  color: #9fa8da;
}

body.dark-mode .badge-example {
  background-color: #e65100;
  color: #ffccbc;
}

body.dark-mode .badge-quickstart {
  background-color: #33691e;
  color: #c5e1a5;
}

body.dark-mode .badge-troubleshooting {
  background-color: #3e2723;
  color: #bcaaa4;
}

body.dark-mode .badge-security,
body.dark-mode .badge-internal {
  background-color: #424242;
  color: #bdbdbd;
}

body.dark-mode .badge-partner {
  background-color: #f57f17;
  color: #fff8e1;
}

body.dark-mode .badge-beta {
  background-color: #e65100;
  color: #ffccbc;
}

body.dark-mode .badge-deprecated {
  background-color: #b71c1c;
  color: #ffcdd2;
}

body.dark-mode .badge-new,
body.dark-mode .badge-level {
  background-color: #1b5e20;
  color: #a5d6a7;
}

body.dark-mode .badge-beginner {
  background-color: #01579b;
  color: #81d4fa;
}

body.dark-mode .badge-intermediate {
  background-color: #0d47a1;
  color: #90caf9;
}

body.dark-mode .badge-advanced {
  background-color: #1a237e;
  color: #9fa8da;
}

body.dark-mode .badge-expert {
  background-color: #4a148c;
  color: #ce93d8;
}
