/* Origins Index Page Styles */

/* Import main site variables */
:root {
  --bg: #FFFBF9;
  --card: #FFFFFF;
  --muted: #6B7280;
  --accent: #FF8DAA;
  --accent-2: #FFD3E0;
  --accent-3: #FFE7F0;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --border: rgba(17, 24, 39, 0.06);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.06);
  --shadow-accent: 0 8px 18px rgba(255, 141, 170, 0.18);
  --radius: 14px;
  --transition: cubic-bezier(0.28, 0.11, 0.32, 1);
  --max-width: 1100px;
}

/* Override main site body layout for origins index page */
body {
  display: block !important;
  padding: 0 !important;
  background: linear-gradient(180deg, #FFF6F8 0%, #FFFBF9 60%) !important;
  margin: 0 !important;
  min-height: 100vh;
  width: 100% !important;
  max-width: none !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Ensure full width layout */
html, body {
  overflow-x: hidden;
}

/* Reset container styles */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Site Header Styles - Match main site branding */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

.nav-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-link {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.nav-brand .logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #FFA3C1 60%, #FFD3E0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 141, 170, 0.18);
  flex: 0 0 48px;
}

.nav-brand .logo svg {
  width: 28px;
  height: 28px;
}

.nav-brand h1 {
  font-size: 18px;
  margin: 0;
  line-height: 1;
  color: var(--text-primary);
  font-weight: 600;
}

.nav-brand p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--transition);
  padding: 8px 12px;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-3);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-3);
}

/* Hero Section - Match main site pink theme */
.origins-hero {
  background: linear-gradient(135deg, var(--accent) 0%, #FFA3C1 60%, var(--accent-2) 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.origins-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Search Section */
.search-section {
  padding: 3rem 0;
  background: transparent;
}

.search-container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 3px solid #e1e8ed;
  border-radius: 50px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(255, 141, 170, 0.2);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 10;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-suggestions.active {
  display: block;
}

.suggestion-item {
  padding: 1rem 1.5rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s ease;
}

.suggestion-item:hover {
  background: #f8f9fa;
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* Origins Grid Section */
.origins-grid-section {
  padding: 4rem 0;
}

.origins-grid-section h2 {
  font-size: 3rem;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3rem;
}

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

.origin-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  position: relative;
  overflow: hidden;
}

.origin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--accent) 0%, #FFA3C1 100%);
}

.origin-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-header h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-header h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-header h3 a:hover {
  color: var(--accent);
}

.card-stats {
  text-align: right;
}

.name-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.card-content {
  margin-bottom: 1.5rem;
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.characteristics-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.characteristic-tag {
  background: var(--accent-3);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.popular-names-preview {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.popular-names-preview strong {
  color: var(--text-primary);
}

.name-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.name-link:hover {
  color: #FF7A9A;
  text-decoration: underline;
}

.card-footer {
  text-align: center;
}

.explore-btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent) 0%, #FFB0CB 100%);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
}

.explore-btn:hover {
  background: linear-gradient(90deg, #FF7A9A 0%, #FFA0BB 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 141, 170, 0.35);
}

/* Featured Origins */
.featured-origins {
  padding: 4rem 0;
  background: #f8f9fa;
}

.featured-origins h2 {
  font-size: 3rem;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 3rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.5rem;
  height: 400px;
}

.featured-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-card:hover {
  transform: translateY(-4px);
}

.featured-card.large {
  grid-row: 1 / -1;
}

.featured-card h3 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.featured-card h3 a {
  color: inherit;
  text-decoration: none;
}

.featured-card h3 a:hover {
  color: #667eea;
}

.featured-card p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.featured-names {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.featured-names a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: #e8f2ff;
  border-radius: 15px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.featured-names a:hover {
  background: #667eea;
  color: white;
}

/* Cultural Insights */
.cultural-insights {
  padding: 4rem 0;
}

.cultural-insights h2 {
  font-size: 3rem;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 3rem;
}

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

.insight-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.insight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.insight-card:hover {
  transform: translateY(-4px);
}

.insight-card h3 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.insight-card p {
  color: #666;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    height: auto;
  }
  
  .featured-card.large {
    grid-row: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 12px 16px;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .nav-brand .logo {
    width: 44px;
    height: 44px;
  }
  
  .nav-brand .logo svg {
    width: 26px;
    height: 26px;
  }
  
  .nav-brand h1 {
    font-size: 16px;
  }
  
  .nav-menu {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-link {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .origins-hero {
    margin: 0 16px;
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 2rem;
  }
  
  .origins-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
  }
  
  .origins-grid-section h2,
  .featured-origins h2,
  .cultural-insights h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .origins-grid {
    grid-template-columns: 1fr;
  }
  
  .origin-card {
    padding: 1.5rem;
  }
  
  .origins-grid-section h2,
  .featured-origins h2,
  .cultural-insights h2 {
    font-size: 2rem;
  }
}