/* ============================================================
   rechnify.at — Global Design System
   ============================================================ */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --bg:              #f3f6fb;
  --card:            #ffffff;
  --text:            #1a2332;
  --muted:           #64748b;
  --border:          #dce5ef;
  --input:           #ffffff;
  --primary:         #1f4e79;
  --primary-hover:   #173a5c;
  --primary-light:   #e8f0fb;
  --secondary:       #6b7280;
  --secondary-hover: #4b5563;
  --danger:          #c62828;
  --danger-hover:    #a51f1f;
  --success:         #0b7a2a;
  --success-bg:      #e8f5ec;
  --warning:         #b45309;
  --warning-bg:      #fef3c7;
  --info:            #2563eb;
  --info-bg:         #eff6ff;
  --soft:            #eef4fa;
  --soft-row:        #f8fbff;
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.07);
  --shadow:          0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg:       0 16px 48px rgba(0,0,0,0.12);

  /* Spacing */
  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;

  /* Typography */
  --font:       'Inter', system-ui, -apple-system, sans-serif;
  --text-xs:    12px;
  --text-sm:    13px;
  --text-base:  15px;
  --text-lg:    18px;
  --text-xl:    22px;
  --text-2xl:   28px;
  --text-3xl:   36px;
}

/* --- Dark Mode --- */
body.dark {
  --bg:              #0f172a;
  --card:            #1e293b;
  --text:            #f1f5f9;
  --muted:           #94a3b8;
  --border:          #334155;
  --input:           #0f172a;
  --primary:         #3b82f6;
  --primary-hover:   #2563eb;
  --primary-light:   #1e3a5f;
  --secondary:       #475569;
  --secondary-hover: #334155;
  --danger:          #ef4444;
  --danger-hover:    #dc2626;
  --success:         #22c55e;
  --success-bg:      #052e16;
  --warning:         #f59e0b;
  --warning-bg:      #1c1007;
  --info:            #60a5fa;
  --info-bg:         #0c1e3a;
  --soft:            #1e293b;
  --soft-row:        #1a2535;
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
  --shadow:          0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg:       0 16px 48px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   SITE HEADER / NAVIGATION
   ============================================================ */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-logo-text {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.site-logo-text span {
  color: var(--muted);
  font-weight: 400;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--soft);
  color: var(--primary);
  text-decoration: none;
}

.site-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon:hover {
  background: var(--soft);
  color: var(--primary);
  border-color: var(--primary);
}

.country-switch {
  font-size: 14px;
  font-weight: bold;
  width: auto;
  padding: 0 10px;
}

/* Mobile Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  max-width: 1100px;
  margin: 12px auto 0;
  padding: 0 20px;
  font-size: var(--text-sm);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.site-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 20px 48px;
}

.page-hero {
  text-align: center;
  padding: 48px 20px 32px;
}

.page-hero h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.page-hero .subtitle {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 24px;
}

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
}

.trust-badge .icon { font-size: 14px; }

/* ============================================================
   CARDS & TOOL CARDS
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  display: block;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
  text-decoration: none;
  color: var(--text);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  opacity: 0;
  transition: opacity 0.2s;
}

.tool-card:hover::before { opacity: 1; }

.tool-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.tool-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.tool-card-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.5;
}

.tool-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new { background: var(--success-bg); color: var(--success); }
.badge-popular { background: var(--warning-bg); color: var(--warning); }
.badge-at { background: var(--info-bg); color: var(--info); }

/* Category Header */
.category-section { margin-top: 48px; }
.category-section:first-child { margin-top: 16px; }

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.category-header h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
}

.category-header-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   CONTENT SECTIONS (below tools)
   ============================================================ */
.content-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 32px;
  box-shadow: var(--shadow-sm);
}

.content-section h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.content-section h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 10px;
}

.content-section p {
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

.content-section ul, .content-section ol {
  padding-left: 24px;
  color: var(--muted);
  margin-bottom: 12px;
}

.content-section li { margin-bottom: 6px; }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list { margin-top: 8px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  background: var(--soft);
  border: none;
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
  font-family: var(--font);
}

.faq-question:hover { background: var(--primary-light); color: var(--primary); }

.faq-icon {
  font-size: 18px;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 20px 16px;
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================================
   RELATED TOOLS SECTION
   ============================================================ */
.related-tools {
  margin-top: 32px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.related-tools h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.related-tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.15s;
}

.related-tool-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
}

.related-tool-link .rtl-icon { font-size: 20px; }

/* ============================================================
   BUTTONS
   ============================================================ */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
  font-family: var(--font);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
}

button:hover, .btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31,78,121,0.3);
  text-decoration: none;
  color: white;
}

button:active, .btn:active { transform: translateY(0); }

button.secondary, .btn-secondary {
  background: var(--secondary);
  color: white;
}
button.secondary:hover, .btn-secondary:hover {
  background: var(--secondary-hover);
  box-shadow: 0 4px 12px rgba(107,114,128,0.3);
}

button.danger { background: var(--danger); }
button.danger:hover { background: var(--danger-hover); }

button.small { padding: 8px 12px; font-size: var(--text-sm); min-height: 34px; }
button.outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
button.outline:hover { background: var(--primary); color: white; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input);
  color: var(--text);
  font-size: var(--text-base);
  font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31,78,121,0.1);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 24px;
}

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

.footer-brand .site-logo-text {
  font-size: var(--text-lg);
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: 12px;
}

.footer-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--success);
  background: var(--success-bg);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 600;
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--muted);
}

.footer-legal-links {
  display: flex;
  gap: 16px;
}

.footer-legal-links a {
  font-size: var(--text-xs);
  color: var(--muted);
  text-decoration: none;
}

.footer-legal-links a:hover { color: var(--primary); }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }
.text-warning { color: var(--warning); font-weight: 600; }
.text-info { color: var(--info); font-weight: 600; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert-danger { background: #fef2f2; color: var(--danger); }

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--text-sm);
  color: white;
}
.status-green { background: var(--success); }
.status-yellow { background: var(--warning); }
.status-red { background: var(--danger); }
.status-blue { background: var(--info); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root { --text-3xl: 28px; --text-2xl: 22px; }

  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    z-index: 99;
  }

  .hamburger { display: flex; }

  .page-hero h1 { font-size: var(--text-2xl); }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .tool-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .related-tools, button, .btn { display: none !important; }
  body { background: white; color: black; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
