/**
 * MinCloud.se - Modern Design System & Theme Styles
 * Follows Modern Web Guidance: Modern CSS Variables, Dark Mode, Container Queries, Responsive Grid
 */

:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-alt: #f1f5f9;
  --bg-overlay: rgba(15, 23, 42, 0.6);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #0284c7;

  /* Brand Accents */
  --brand-primary: #0284c7;       /* Cloud Blue */
  --brand-primary-hover: #0369a1;
  --brand-secondary: #4f46e5;     /* Indigo */
  --brand-accent: #06b6d4;        /* Cyan */
  --brand-gradient: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  --brand-gradient-alt: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);

  /* Status & Rating */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --star-color: #f59e0b;

  /* Strategic Ad & Affiliate */
  --ad-bg: #f8fafc;
  --ad-border: #e2e8f0;
  --ad-label: #64748b;
  --badge-corporate: #e0e7ff;
  --badge-corporate-text: #3730a3;
  --badge-individual: #e0f2fe;
  --badge-individual-text: #0369a1;
  --badge-best: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  /* Shadows */
  --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);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --container-max: 1200px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-alt: #161e2e;
  --bg-overlay: rgba(0, 0, 0, 0.75);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --border-subtle: #1e293b;
  --border-medium: #334155;
  --border-focus: #38bdf8;

  --brand-primary: #38bdf8;
  --brand-primary-hover: #7dd3fc;
  --brand-gradient: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);

  --ad-bg: #111827;
  --ad-border: #1e293b;
  --ad-label: #94a3b8;
  --badge-corporate: #1e1b4b;
  --badge-corporate-text: #a5b4fc;
  --badge-individual: #082f49;
  --badge-individual-text: #7dd3fc;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.site-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-base), border-color var(--transition-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-gradient);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.brand-highlight {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links .current-menu-item > a {
  color: var(--brand-primary);
  background-color: var(--bg-alt);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: scale(1.05);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0.5rem;
  cursor: pointer;
}

/* Strategic Header Notice / Sponsor Bar */
.ad-header-notice {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
}

.ad-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  background: var(--border-medium);
  color: var(--text-secondary);
  border-radius: 4px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-smooth);
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary) !important;
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.btn-affiliate {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  font-weight: 700;
}

.btn-affiliate:hover {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
  transform: translateY(-2px);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
}

/* Hero Section */
.hero-section {
  padding-block: clamp(3rem, 6vw, 5rem);
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 70%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 900px;
  margin-inline: auto;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Quick Navigator Cards in Hero */
.hero-category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin-inline: auto;
  text-align: left;
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-lg);
}

.category-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.icon-corporate {
  background: var(--badge-corporate);
  color: var(--badge-corporate-text);
}

.icon-individual {
  background: var(--badge-individual);
  color: var(--badge-individual-text);
}

.icon-toplist {
  background: var(--warning-bg);
  color: var(--warning);
}

.category-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.category-card-link {
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Strategic Ad Container Units */
.strategic-ad-unit {
  margin-block: 2.5rem;
  background: var(--ad-bg);
  border: 1px solid var(--ad-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.strategic-ad-unit.ad-slot-header {
  margin-block: 0;
  border-radius: 0;
  border-inline: none;
  background: var(--bg-alt);
}

.ad-label-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ad-label-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ad-label);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.ad-sponsor-link {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Strategic Ad Banner Showcase */
.ad-banner-showcase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
  border: 1px dashed var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.75rem;
}

.ad-banner-content h4 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.ad-banner-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Dynamic Toplist Section */
.toplist-section {
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Toplist Interactive Filter Tabs */
.toplist-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.filter-btn.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* Toplist Cards Layout */
.toplist-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.toplist-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: grid;
  grid-template-columns: 75px 1.5fr 1.3fr 1fr 180px;
  align-items: center;
  gap: 1.5rem;
}

.toplist-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.toplist-item.featured {
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-glow);
}

.toplist-item.featured::before {
  content: "REKOMMENDERAD 2026";
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

/* Toplist Columns */
.toplist-rank-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.rank-badge {
  font-size: 0.85rem;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  background: var(--bg-alt);
  color: var(--text-secondary);
}

.toplist-item:nth-child(1) .rank-badge {
  background: #fef3c7;
  color: #b45309;
}
.toplist-item:nth-child(2) .rank-badge {
  background: #f1f5f9;
  color: #475569;
}
.toplist-item:nth-child(3) .rank-badge {
  background: #ffedd5;
  color: #9a3412;
}

.provider-logo-box {
  width: 56px;
  height: 56px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brand-primary);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.provider-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.provider-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.badge-tag.type-corporate {
  background: var(--badge-corporate);
  color: var(--badge-corporate-text);
}

.badge-tag.type-individual {
  background: var(--badge-individual);
  color: var(--badge-individual-text);
}

.badge-tag.type-both {
  background: var(--bg-alt);
  color: var(--text-secondary);
}

.badge-tag.highlight {
  background: var(--badge-best);
  color: #fff;
}

.provider-rating-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.stars {
  color: var(--star-color);
  letter-spacing: 1px;
}

.rating-score {
  font-weight: 800;
  color: var(--text-primary);
}

.rating-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.rating-source-badge {
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--brand-light);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

/* Feature Bullets (Pros) */
.provider-features {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.provider-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.feature-check {
  color: var(--success);
  font-weight: bold;
}

/* Pricing Column */
.provider-price-box {
  text-align: right;
}

.price-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.price-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.free-tier-notice {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Action CTA Column */
.provider-action-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.affiliate-disclosure-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}



/* Corporate vs Individual Comparison Section / Table */
.comparison-section {
  padding-block: clamp(3rem, 5vw, 4.5rem);
  background-color: var(--bg-alt);
}

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

.comparison-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.comparison-box h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comparison-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.comparison-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comparison-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.point-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.point-icon.corporate {
  background: var(--badge-corporate);
  color: var(--badge-corporate-text);
}

.point-icon.individual {
  background: var(--badge-individual);
  color: var(--badge-individual-text);
}

/* Comparison Table Matrix */
.matrix-table-wrapper {
  overflow-x: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.matrix-table th,
.matrix-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-table th {
  background: var(--bg-alt);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

.matrix-table tr:hover td {
  background-color: var(--bg-alt);
}

.matrix-feature-name {
  font-weight: 600;
  color: var(--text-primary);
}

.matrix-feature-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Knowledge & Guides Section */
.guides-section {
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

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

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.guide-card-thumb {
  height: 200px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}

.guide-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.guide-card:hover .guide-card-thumb img {
  transform: scale(1.06);
}

.guide-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.guide-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.guide-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.guide-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.guide-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

/* Trust & FAQ Section */
.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: 2rem 1rem;
  border-block: 1px solid var(--border-subtle);
  margin-block: 3rem;
  text-align: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.trust-icon {
  color: var(--brand-primary);
  font-size: 1.25rem;
}

/* Single Post & Content Area */
.content-wrapper {
  padding-block: 3rem 5rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
}

.article-main {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.article-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

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

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

/* Article Images & Media */
.article-featured-image {
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-alt);
}

.article-featured-image img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.article-featured-image figcaption,
.article-inline-image figcaption {
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.article-featured-image figcaption a,
.article-inline-image figcaption a {
  color: var(--text-muted);
  text-decoration: underline;
}

.article-featured-image figcaption a:hover,
.article-inline-image figcaption a:hover {
  color: var(--brand-primary);
}

.article-inline-image {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-alt);
  box-shadow: var(--shadow-sm);
}

.article-inline-image img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: 4rem 2rem;
  color: var(--text-secondary);
}

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

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

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

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.affiliate-disclaimer-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Responsive Breakpoints & Mobile Optimization */

/* Medium Desktop & Tablet Landscape (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .toplist-item {
    grid-template-columns: 65px 1.5fr 1.2fr 160px;
    gap: 1.1rem;
    padding: 1.25rem;
  }
  .provider-price-box {
    grid-column: 2 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
    text-align: left;
  }
}

/* Tablet (<= 992px) */
@media (max-width: 992px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .site-container {
    padding-inline: 1rem;
  }

  /* Navigation Drawer */
  .main-navigation {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-xl);
  }

  .main-navigation.is-active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Toplist Filter Tabs: Smooth horizontal touch scroll */
  .toplist-filter-bar {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -1rem;
    padding-inline: 1rem;
  }
  .toplist-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  /* Toplist Cards - Vertical Mobile Card Architecture */
  .toplist-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-areas:
      "logo info"
      "features features"
      "price price"
      "action action";
    gap: 0.85rem 0.75rem;
    padding: 1.25rem 1rem;
    align-items: start;
    border-radius: var(--radius-md);
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .toplist-rank-logo {
    grid-area: logo;
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  .rank-badge {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .provider-logo-box {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }

  .provider-info {
    grid-area: info;
    grid-column: 2 / 3;
    min-width: 0;
  }

  .provider-badges {
    gap: 0.3rem;
    margin-bottom: 0.35rem;
  }

  .badge-tag {
    font-size: 0.7rem;
    padding: 0.12rem 0.45rem;
  }

  .provider-info h3 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .provider-rating-box {
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    font-size: 0.82rem;
  }

  .provider-features-col {
    grid-area: features;
    grid-column: 1 / -1;
    padding-block: 0.75rem;
    border-top: 1px dashed var(--border-subtle);
    border-bottom: 1px dashed var(--border-subtle);
    width: 100%;
    box-sizing: border-box;
  }

  .provider-features {
    gap: 0.35rem;
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .provider-price-box {
    grid-area: price;
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 0.75rem;
    text-align: left;
    background: var(--bg-alt);
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    width: 100%;
    box-sizing: border-box;
  }

  .price-main {
    font-size: 1.05rem;
    font-weight: 800;
  }

  .price-sub {
    font-size: 0.75rem;
  }

  .free-tier-notice {
    font-size: 0.72rem;
    width: 100%;
    margin-top: 0.1rem;
  }

  .provider-action-box {
    grid-area: action;
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-sizing: border-box;
  }

  .provider-action-box .btn-affiliate {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    box-sizing: border-box;
  }

  .toplist-item.featured::before {
    top: -10px;
    left: 12px;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
  }

  /* Matrix Comparison Table */
  .matrix-table {
    min-width: 580px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Strategic Ad Banners */
  .ad-banner-showcase {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: left;
  }

  .ad-banner-action .btn-affiliate {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* Small Smartphones (<= 540px) */
@media (max-width: 540px) {
  .header-cta {
    display: none;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6.5vw, 2.25rem);
  }

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

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .hero-category-cards {
    grid-template-columns: 1fr;
  }

  .toplist-item {
    grid-template-columns: 46px 1fr;
    padding: 1rem 0.75rem;
    gap: 0.75rem 0.6rem;
  }

  .provider-logo-box {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }

  .provider-info h3 {
    font-size: 1.05rem;
  }
}


/* --- MinCloud Ad Engine & Top Bar Styles --- */

/**
 * MinCloud Ad Engine - Frontend Styles
 * Refined, Non-intrusive Top Bar and Ad Enhancements
 */

/* 1. Slim Subtle Bar Style */
.mincloud-top-bar {
  background-color: var(--bg-alt, #f1f5f9);
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-secondary, #475569);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  max-height: 50px;
  opacity: 1;
}

.mincloud-top-bar.is-dismissed {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-block: 0 !important;
  border-bottom: none !important;
  pointer-events: none;
}

.mincloud-top-bar .top-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.4rem;
  gap: 1rem;
  min-height: 38px;
}

.mincloud-top-bar .top-bar-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex-grow: 1;
  justify-content: center;
}

.mincloud-top-bar .top-bar-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  background-color: var(--border-medium, #cbd5e1);
  color: var(--text-secondary, #334155);
  border-radius: 4px;
}

[data-theme="dark"] .mincloud-top-bar .top-bar-badge {
  background-color: #1e293b;
  color: #94a3b8;
}

.mincloud-top-bar .top-bar-text {
  font-weight: 500;
  color: var(--text-primary, #0f172a);
}

.mincloud-top-bar .top-bar-link {
  font-weight: 600;
  color: var(--brand-primary, #0284c7);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.mincloud-top-bar .top-bar-link:hover {
  color: var(--brand-primary-hover, #0369a1);
}

/* Close [x] Button */
.mincloud-top-bar .top-bar-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #94a3b8);
  padding: 0.25rem;
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.mincloud-top-bar .top-bar-close-btn:hover {
  color: var(--text-primary, #0f172a);
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .mincloud-top-bar .top-bar-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 2. Floating Minimal Pill Style */
.mincloud-top-bar.floating_pill {
  background: transparent;
  border-bottom: none;
  max-height: 60px;
  padding-block: 0.4rem;
}

.mincloud-top-bar.floating_pill .top-bar-container {
  max-width: 820px;
  margin-inline: auto;
  background-color: var(--bg-surface-elevated, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 9999px;
  padding: 0.35rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
}

[data-theme="dark"] .mincloud-top-bar.floating_pill .top-bar-container {
  background-color: rgba(17, 24, 39, 0.9);
  border-color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .mincloud-top-bar .top-bar-content {
    justify-content: flex-start;
    font-size: 0.78rem;
  }
}
