/* Base variables and theme tokens */
:root {
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 16px;
  --container-max: 1200px;
  --shadow-strong: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 2px 10px rgba(0, 0, 0, 0.15);
  --underline-height: 3px;
  --navbar-offset: 60px;
  /* Professional Navbar Gradient */
  --navbar-gradient: linear-gradient(
    135deg,
    #b85450 0%,
    #a8559f 30%,
    #8b6fa8 50%,
    #7b88c7 70%,
    #6366f1 85%,
    #818cf8 100%
  );
  /* Professional Accent Underline */
  --navbar-underline: linear-gradient(
    135deg,
    #c85a5a 0%,
    #b865b0 30%,
    #9a7ab8 50%,
    #8b95d0 70%,
    #7377f5 85%,
    #9195ff 100%
  );
  --btn-gradient: linear-gradient(
    135deg,
    #a8559f 0%,
    #8b6fa8 50%,
    #7b88c7 100%
  );
  --btn-gradient-hover: linear-gradient(
    135deg,
    #7b88c7 0%,
    #8b6fa8 50%,
    #a8559f 100%
  );
}

/* DARK THEME */
body.theme-dark {
  --bg-gradient: linear-gradient(
    135deg,
    #0f172a 0%,
    #1e293b 30%,
    #334155 60%,
    #1e293b 100%
  );
  --text-color: #e0e0e0;
  --muted-text: #b8b8b8;
  --heading-color: #ffffff;
  --heading-sub: #a1acf1;
  --container-bg: #1e293b;
  --border-color: rgba(67, 67, 74, 0.53);
  --table-header-bg: #0f172a;
  --card-bg: #232f43;
  --info-item-bg: rgba(178, 126, 215, 0.09);
  --input-bg: #0f172a;
  --link: #a5b4fc;
  --link-hover: #6366f1;
  --blockquote: #6366f1;
  --dropdown-bg: #1e293b;
  --shadow-elev: 0 4px 20px rgba(0, 0, 0, 0.5);
  --primary-blue: #a1acf1;
  --primary-blue-hover: #8a98f5;
  --accent-blue: #a5b4fc;
  --accent-blue-light: #e3e8ff;
  --light-blue-text: #d5b5ff;
  --link: var(--accent-blue);
  --link-hover: var(--primary-blue);
  --blockquote: var(--primary-blue);
  --bg-dark: #18212f;
  --footer-bottom-bg: #1a2332;
  --footer-border: #334155;
  --footer-section-bg: linear-gradient(135deg, #1f2a3c 0%, #232f43 100%);
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --card-header-bg: #1e293b;
  --item-bg: #1e293b;
  --item-hover-bg: #2a3a52;
  --primary-color: #4d9fff;
  --primary-hover: #0d6efd;
  --primary-shadow: rgba(13, 110, 253, 0.4);
  --info-text: #a3d5f0;
  --info-bg: #1a4a5e;
  --info-border: #2d5f74;
  --shadow-color: rgba(0, 123, 255, 0.3);
}

/* LIGHT THEME */
body.theme-light {
  --bg-gradient: linear-gradient(
    135deg,
    #f8fafc 0%,
    #f1f5f9 30%,
    #e2e8f0 60%,
    #f1f5f9 100%
  );
  --text-color: #333333;
  --muted-text: #666666;
  --heading-color: #222222;
  --heading-sub: #444444;
  --container-bg: #ffffff;
  --border-color: #e2e8f0;
  --table-header-bg: #f1f5f9;
  --card-bg: rgba(35, 47, 67, 0.02);
  --info-item-bg: rgba(178, 126, 215, 0.09);
  --input-bg: #ffffff;
  --link: var(--primary-blue);
  --link-hover: var(--primary-blue-hover);
  --blockquote: var(--primary-blue);
  --dropdown-bg: #ffffff;
  --shadow-elev: 0 4px 20px rgba(0, 0, 0, 0.3);
  --primary-blue: #6366f1;
  --primary-blue-hover: #818cf8;
  --light-blue-text: #d5b5ff;
  --accent-blue: #a5b4fc;
  --primary-blue: #6366f1;
  --primary-blue-hover: #818cf8;
  --accent-blue: #a5b4fc;
  --bg-dark: #e0edf3;
  --footer-nav-bg: #f8fafc;
  --footer-bottom-bg: #f1f5f9;
  --footer-border: #e2e8f0;
  --footer-section-bg: #e0edf4;
  --text-primary: #333333;
  --text-secondary: #666666;
  --card-header-bg: #f8f9fa;
  --item-bg: #f8f9fa;
  --item-hover-bg: #ffffff;
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --primary-shadow: rgba(0, 123, 255, 0.3);
  --info-text: #0c5460;
  --info-bg: #d1ecf1;
  --info-border: #bee5eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Global Resets & Layout */
* {
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg-gradient);
  background-image:
    url('/assets/img/contour-pattern-bg.svg'), var(--bg-gradient);
  background-repeat: repeat, no-repeat;
  color: var(--text-color);
  line-height: 1.6;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  background: var(--container-bg);
  border-radius: 0 0 var(--radius-large) var(--radius-large);
  padding: 40px;
  padding-top: 20px;
  box-shadow: var(--shadow-strong);
  border-top: none;
}

.container.container-90 {
  max-width: 90%;
  width: 90%;
}

.container.container-70 {
  max-width: 70%;
  width: 70%;
}

.container.container-1200 {
  max-width: 1200px;
}

.container .card,
.container table,
.container pre,
.container code {
  border-radius: var(--radius-large);
}

h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  color: var(--heading-color);
  font-weight: 300;
  letter-spacing: 1px;
}
h2 {
  font-size: 1.8em;
  margin: 30px 0 15px 0;
  color: var(--heading-sub);
  font-weight: 300;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}
h3 {
  font-size: 1.3em;
  margin: 20px 0 10px 0;
  color: var(--text-color);
  font-weight: 400;
}
h4,
h5,
h6 {
  color: var(--text-color);
}
p {
  margin-bottom: 15px;
  color: var(--muted-text);
}

/* Links with FontAwesome icon support */
a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}
a .fas,
a .fab,
a .far {
  font-size: 0.9em;
  opacity: 0.8;
}
a:hover .fas,
a:hover .fab,
a:hover .far {
  opacity: 1;
  transform: scale(1.1);
  transition: all 0.3s ease;
}

/* Lists */
ul,
ol {
  margin: 15px 0 15px 25px;
  color: var(--muted-text);
}
li {
  margin-bottom: 8px;
}
ul {
  list-style-type: disc;
}

/* Code blocks */
code,
pre {
  font-family: 'Courier New', 'Monaco', monospace;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  padding: 2px 6px;
  font-size: 0.9em;
}
pre {
  padding: 15px;
  margin: 15px 0;
  overflow-x: auto;
  border-radius: var(--radius-medium);
}
body.theme-dark pre code {
  color: #81c784;
  background: transparent;
  border: none;
}
body.theme-light pre code {
  color: #2d8659;
  background: transparent;
  border: none;
}

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  overflow: hidden;
  background: var(--card-bg);
}
thead th {
  background: var(--table-header-bg) !important;
  color: var(--heading-color) !important;
  border-bottom: 1px solid var(--border-color) !important;
  text-align: left;
  padding: 16px 20px;
}
td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
thead th:first-child,
td:first-child {
  padding-left: 28px;
}
thead th:last-child,
td:last-child {
  padding-right: 28px;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
body.theme-light tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Blockquote with icon support */
blockquote {
  border-left: 4px solid var(--blockquote);
  padding-left: 24px;
  margin: 20px 0;
  font-style: italic;
  color: var(--muted-text);
  position: relative;
  border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
  background: rgba(37, 99, 235, 0.05);
  padding: 16px 24px;
}
blockquote::before {
  content: '\f10d';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--blockquote);
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 1.2em;
  opacity: 0.3;
}
body.theme-light blockquote {
  background: rgba(37, 99, 235, 0.03);
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 30px 0;
}

/* Grid utility for non-Skeleton sections */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

main {
  flex: 1;
}

.footer {
  margin-top: 60px;
}

.footer-navigation {
  padding: 35px 0;
}

.footer-nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.footer-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  justify-content: center;
}

.footer-nav-section {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--footer-section-bg);
  border-radius: var(--radius-large);
  flex: 0 1 auto;
}

/* 2 items per row on tablet */
@media (min-width: 768px) {
  .footer-nav-section {
    flex: 0 1 auto;
  }
}

/* 3 items per row on desktop */
@media (min-width: 1200px) {
  .footer-nav-section {
    flex: 0 1 auto;
  }
}

.footer-nav-title {
  font-size: 1.05em;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 16px 0;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-nav-title i {
  color: var(--primary-blue);
  font-size: 1em;
  width: 20px;
  text-align: center;
}

.footer-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 12px 24px;
  align-items: start;
}

@media (max-width: 500px) {
  .footer-nav-links {
    grid-template-columns: repeat(2, auto);
  }
}

.footer-nav-links li {
  margin: 0;
}

.footer-nav-links a {
  color: var(--muted-text);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  line-height: 1.6;
  white-space: nowrap;
}

.footer-nav-links a:hover {
  color: var(--link-hover);
  border-bottom: none;
}

.footer-nav-links a i {
  font-size: 0.9em;
  opacity: 0.8;
}

.footer-bottom {
  padding: 15px 0;
  background: var(--footer-bottom-bg);
  border-top: 1px solid var(--footer-border);
}

.footer-bottom-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.85em;
}

.footer-made-in-europe {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.85em;
}

.footer-red-heart {
  color: #e74c3c;
}

.footer-copyright-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-credit-inline {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.7em;
  opacity: 0.8;
}

.footer-credit-inline a {
  color: var(--primary-blue);
  text-decoration: none;
  border-bottom: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-credit-inline a:hover {
  color: var(--link-hover);
  border-bottom: none;
}

.footer-menu {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-menu a {
  color: var(--muted-text);
  text-decoration: none;
  border-bottom: none;
  font-size: 0.85em;
  transition: color 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-menu a:hover {
  color: var(--link-hover);
  border-bottom: none;
  cursor: pointer;
}

.footer-menu a.footer-menu-icon-only {
  font-size: 1.2em;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--footer-section-bg);
  transition: all 0.2s ease;
}

.footer-menu a.footer-menu-icon-only:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
}

@media (max-width: 750px) {
  .footer-navigation {
    padding: 30px 0;
  }

  .footer-nav-container,
  .footer-bottom-container {
    padding: 0 20px;
  }

  .footer-nav-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-nav-section {
    padding: 16px;
  }

  .footer-bottom {
    padding: 16px 0;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-menu {
    justify-content: center;
  }
}

.row:has(.six.columns) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-left: 0;
  margin-right: 0;
}

.row:has(.six.columns) .six.columns {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
}

.row:has(.six.columns) .six.columns .card {
  margin: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.row:has(.six.columns) .six.columns .card h5 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.row:has(.six.columns) .six.columns .card p {
  margin-bottom: 0;
  flex: 1;
}

/* Blog card links - remove outline/border and add hover effect */
.card > a {
  outline: none;
  border: none;
  display: block;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card > a:focus {
  outline: none;
  border: none;
}

/* Add blue bottom border to clickable cards on hover using box-shadow */
.card:has(> a) {
  box-shadow: inset 0 -1px 0 0 transparent;
  transition:
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

.card:has(> a):hover {
  box-shadow:
    inset 0 -1px 0 0 var(--link),
    0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Add blue bottom border to tool-card links on hover using box-shadow */
a.tool-card {
  box-shadow: inset 0 -1px 0 0 transparent !important;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease !important;
}

a.tool-card:hover {
  box-shadow: inset 0 -1px 0 0 var(--link) !important;
}

.card:has(> a):hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.card > a:hover {
  cursor: pointer;
}

/* Responsive: stack cards on mobile */
@media (max-width: 768px) {
  .row:has(.six.columns) {
    grid-template-columns: 1fr;
  }
}

/* Theme switcher styles moved to assets/css/theme_switcher.css */

/* Remove default focus outlines and dotted borders from links */
*:focus {
  outline: none !important;
}

a {
  border-bottom: none !important;
}
