/* ==============================================================================
   vorwahlnummern.info - Modern Clean Design System & Stylesheet
   ============================================================================== */

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-text: #1e3a8a;

  --secondary: #0f172a;
  --accent: #0284c7;

  --success: #059669;
  --success-bg: #ecfdf5;
  --success-text: #065f46;

  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;

  --neutral-bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --container-max: 1160px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--neutral-bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
}

/* ==============================================================================
   Layout & Container
   ============================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-main {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

/* ==============================================================================
   Header & Navigation
   ============================================================================== */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

/* Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}

.brand-logo:hover {
  text-decoration: none;
  color: var(--secondary);
}

.brand-logo svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
  flex-shrink: 0;
}

.brand-logo .dot-info {
  color: var(--primary);
}

/* Main Navigation Container */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0 0.7rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
  line-height: 1;
  vertical-align: middle;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
  background-color: var(--primary-light);
  text-decoration: none;
}

/* CTA Action Button: Nummer formatieren */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0 1.05rem;
  margin-left: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff !important;
  background-color: var(--primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgba(30, 64, 175, 0.18);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  line-height: 1;
  vertical-align: middle;
}

.nav-btn:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 2px 4px 0 rgba(30, 64, 175, 0.25);
  text-decoration: none;
}

.nav-btn:active {
  transform: translateY(1px);
}

.nav-btn.active {
  background-color: var(--primary-hover);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mobile-toggle:hover {
  background-color: var(--neutral-bg);
  border-color: #cbd5e1;
}

.mobile-toggle.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-toggle svg {
  width: 22px;
  height: 22px;
}

/* ==============================================================================
   Search Hero & Autocomplete
   ============================================================================== */
.search-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--neutral-bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 3.5rem;
  text-align: center;
}

.search-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.search-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--secondary);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.search-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.search-form-wrapper {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.5rem 0.4rem 1.25rem;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), var(--shadow-md);
}

.search-bar svg.search-icon {
  width: 22px;
  height: 22px;
  color: var(--text-subtle);
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.1rem;
  color: var(--text-main);
  background: transparent;
  min-width: 0;
}

.search-btn {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background-color: var(--primary-hover);
}

.search-examples {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.example-tag {
  background-color: #ffffff;
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.example-tag:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  text-decoration: none;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  text-align: left;
  display: none;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}

.autocomplete-dropdown.active {
  display: block;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: var(--text-main);
  transition: background-color 0.1s ease;
}

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

.autocomplete-item:hover, .autocomplete-item.selected {
  background-color: var(--neutral-bg);
  text-decoration: none;
}

.autocomplete-info {
  display: flex;
  flex-direction: column;
}

.autocomplete-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
}

.autocomplete-subtitle {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.autocomplete-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary-text);
  white-space: nowrap;
}

/* ==============================================================================
   Cards, Grid & Components
   ============================================================================== */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.card-body {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.link-badge-card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background-color: var(--neutral-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.link-badge-card:hover {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transform: translateY(-1px);
}

.link-badge-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

.link-badge-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Section Titles */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

.section-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

/* ==============================================================================
   Breadcrumbs
   ============================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumbs .separator {
  color: #cbd5e1;
}

.breadcrumbs .current {
  color: var(--text-main);
  font-weight: 600;
}

/* ==============================================================================
   Detail Page Components (Area Code, City, Country, Phone Number)
   ============================================================================== */
.detail-header {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.detail-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.detail-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.info-table th, .info-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.95rem;
}

.info-table tr:last-child th, .info-table tr:last-child td {
  border-bottom: none;
}

.info-table th {
  background-color: #f8fafc;
  color: var(--text-subtle);
  font-weight: 600;
  width: 35%;
}

.info-table td {
  color: var(--text-main);
}

.info-table td.code-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

/* Copy Button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* ==============================================================================
   Phone Number & Spam Rating Components
   ============================================================================== */
.risk-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid;
}

.risk-card.risk-critical {
  background-color: var(--danger-bg);
  border-color: #fecaca;
  color: var(--danger-text);
}

.risk-card.risk-high {
  background-color: var(--warning-bg);
  border-color: #fde68a;
  color: var(--warning-text);
}

.risk-card.risk-moderate {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.risk-card.risk-low, .risk-card.risk-unrated {
  background-color: var(--success-bg);
  border-color: #a7f3d0;
  color: var(--success-text);
}

.risk-score-display {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.score-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.risk-details h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.risk-details p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Rating Breakdown Bar */
.ratings-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.breakdown-bar-bg {
  flex: 1;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: var(--radius-full);
  margin: 0 1rem;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-danger { background-color: #fee2e2; color: #991b1b; }
.badge-warning { background-color: #fef3c7; color: #92400e; }
.badge-info { background-color: #dbeafe; color: #1e40af; }
.badge-success { background-color: #d1fae5; color: #065f46; }
.badge-neutral { background-color: #f1f5f9; color: #475569; }

/* Comment & Rating Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--secondary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: #f1f5f9;
  text-decoration: none;
}

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

/* Rating Chips */
.rating-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rating-chip-label {
  cursor: pointer;
}

.rating-chip-input {
  display: none;
}

.rating-chip-text {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  background-color: #ffffff;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.rating-chip-input:checked + .rating-chip-text {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 600;
}

/* User Comments Stream */
.comments-stream {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.comment-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

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

.comment-author {
  font-weight: 600;
  color: var(--secondary);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.comment-body {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-footer {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.5rem;
}

.report-link {
  font-size: 0.75rem;
  color: var(--text-subtle);
  cursor: pointer;
}

.report-link:hover {
  color: var(--danger);
}

/* ==============================================================================
   FAQ Accordions & Guides
   ============================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.faq-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

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

.article-content {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1e293b;
}

.article-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 2rem 0 1rem;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--secondary);
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.alert-box {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.alert-box.info {
  background-color: #eff6ff;
  border-color: var(--primary);
  color: #1e3a8a;
}

.alert-box.warning {
  background-color: #fffbeb;
  border-color: var(--warning);
  color: #78350f;
}

/* ==============================================================================
   Pagination
   ============================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
}

.page-btn {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  background-color: #ffffff;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.page-btn:hover {
  background-color: #f1f5f9;
  text-decoration: none;
}

.page-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 700;
}

/* ==============================================================================
   Footer
   ============================================================================== */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-subtle);
}

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

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* ==============================================================================
   Toast Notification & Modal
   ============================================================================== */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--secondary);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-subtle);
  cursor: pointer;
}

/* ==============================================================================
   Responsive Breakpoints
   ============================================================================== */
@media (max-width: 1040px) {
  .header-inner {
    height: 64px;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.35rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    z-index: 99;
  }

  .main-nav.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    justify-content: flex-start;
    padding: 0 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-link:hover, .nav-link.active {
    background-color: var(--primary-light);
  }

  .nav-btn {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    margin-left: 0;
    margin-top: 0.5rem;
    justify-content: center;
    font-size: 0.95rem;
  }
}

@media (max-width: 900px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .search-hero { padding: 2rem 0; }
  .search-hero h1 { font-size: 1.65rem; }
  .search-hero-subtitle { font-size: 0.95rem; margin-bottom: 1.25rem; }
  .search-bar { flex-direction: column; padding: 0.75rem; gap: 0.6rem; }
  .search-btn { width: 100%; }
  .search-bar svg.search-icon { display: none; }
  .grid-cols-4, .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; }
  .detail-header { padding: 1.25rem; }
  .detail-title { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}
