/* =========================================================
   LegalToolKit Pro — Shared Stylesheet
   ========================================================= */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  color: #1e293b;
  background: #ffffff;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* --- Layout --- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4rem 0; }
.section-alt { background: #f8fafc; }
.section-dark { background: #1e3a5f; color: #fff; }

/* --- Typography --- */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin-bottom: 1rem; }

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
  color: #1e3a5f;
}
.section-subtitle {
  text-align: center;
  color: #64748b;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* --- Header --- */
.site-header {
  background: #1e3a5f;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: #2563eb;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
}
.logo-text span { color: #60a5fa; }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 1.75rem; }
.main-nav a {
  color: #cbd5e1;
  font-size: .92rem;
  font-weight: 500;
  transition: color .2s;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a.active { color: #fff; }
.nav-cta {
  background: #2563eb;
  color: #fff !important;
  padding: .45rem 1.1rem;
  border-radius: 6px;
  transition: background .2s !important;
}
.nav-cta:hover { background: #1d4ed8 !important; text-decoration: none !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: .3s;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #bfdbfe;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p {
  font-size: 1.15rem;
  color: #bfdbfe;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
}
.stat-item { text-align: center; }
.stat-number { font-size: 1.75rem; font-weight: 800; color: #fff; }
.stat-label { font-size: .85rem; color: #93c5fd; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: #2563eb;
  color: #fff;
}
.btn-primary:hover { background: #1d4ed8; text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37,99,235,.4); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
}
.btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }

.btn-white {
  background: #fff;
  color: #1e3a5f;
}
.btn-white:hover { background: #f1f5f9; text-decoration: none; color: #1e3a5f; }

.btn-lg { padding: .9rem 2.2rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-generate {
  background: #059669;
  color: #fff;
  font-size: 1rem;
  padding: .8rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all .2s;
}
.btn-generate:hover { background: #047857; transform: translateY(-1px); }

/* --- Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.09); transform: translateY(-2px); }

.card-icon {
  width: 48px; height: 48px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: .4rem; color: #1e3a5f; }
.card p { color: #64748b; font-size: .93rem; margin-bottom: 1.1rem; }
.card-link {
  color: #2563eb;
  font-size: .9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.card-link:hover { text-decoration: underline; }

/* --- Tool page layout --- */
.tool-page { padding: 3rem 0 5rem; }
.tool-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.tool-header h1 { color: #1e3a5f; margin-bottom: .5rem; }
.tool-header p { color: #64748b; font-size: 1.05rem; }

.tool-disclaimer {
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: .85rem 1.1rem;
  font-size: .88rem;
  color: #713f12;
  margin-bottom: 1.75rem;
  display: flex; gap: .5rem; align-items: flex-start;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .tool-layout { grid-template-columns: 1fr; }
}

/* --- Forms --- */
.form-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem;
}
.form-panel h2 { font-size: 1.1rem; margin-bottom: 1.25rem; color: #1e3a5f; }

.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: .35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  font-size: .95rem;
  color: #1e293b;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

/* --- Output panel --- */
.output-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem;
}
.output-panel h2 { font-size: 1.1rem; margin-bottom: 1.25rem; color: #1e3a5f; }

.output-box {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  font-size: .9rem;
  line-height: 1.75;
  min-height: 300px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1e293b;
  font-family: 'Courier New', monospace;
}

.output-placeholder {
  color: #94a3b8;
  font-style: italic;
  font-family: inherit;
  font-size: .95rem;
}

.output-actions { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.btn-copy, .btn-download {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1.1rem;
  border-radius: 7px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}
.btn-copy { background: #e0f2fe; color: #0369a1; }
.btn-copy:hover { background: #bae6fd; }
.btn-download { background: #dcfce7; color: #166534; }
.btn-download:hover { background: #bbf7d0; }

/* --- Calculator specific --- */
.calc-result {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: #fff;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}
.calc-result-label { font-size: .9rem; color: #bfdbfe; margin-bottom: .5rem; }
.calc-result-value { font-size: 2.5rem; font-weight: 800; }
.calc-result-sub { font-size: .85rem; color: #93c5fd; margin-top: .5rem; }

/* --- GDPR Checklist --- */
.checklist-section { margin-bottom: 2rem; }
.checklist-section h3 {
  font-size: 1rem;
  color: #1e3a5f;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #e2e8f0;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #2563eb;
  flex-shrink: 0;
}
.checklist-item label {
  font-size: .93rem;
  color: #374151;
  cursor: pointer;
  line-height: 1.5;
}
.checklist-item.checked label { text-decoration: line-through; color: #94a3b8; }

.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 99px;
  height: 12px;
  margin-bottom: .5rem;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #059669);
  border-radius: 99px;
  transition: width .4s ease;
}
.progress-text { font-size: .85rem; color: #64748b; text-align: right; }
.progress-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.progress-summary h3 { font-size: 1rem; margin-bottom: .75rem; color: #1e3a5f; }

/* --- Blog --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.blog-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.09); transform: translateY(-2px); }
.blog-card-img {
  height: 160px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.blog-card-body { padding: 1.25rem; }
.blog-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #2563eb;
  background: #eff6ff;
  padding: .2rem .65rem;
  border-radius: 99px;
  margin-bottom: .65rem;
}
.blog-card h3 { font-size: 1rem; margin-bottom: .5rem; color: #1e3a5f; }
.blog-card h3 a { color: inherit; }
.blog-card h3 a:hover { color: #2563eb; text-decoration: none; }
.blog-card p { font-size: .88rem; color: #64748b; margin-bottom: .85rem; }
.blog-meta { font-size: .8rem; color: #94a3b8; display: flex; gap: 1rem; }

/* Article page */
.article-page { padding: 3rem 0 5rem; }
.article-container { max-width: 780px; margin: 0 auto; padding: 0 1.25rem; }
.article-header { margin-bottom: 2rem; }
.article-tag { margin-bottom: .75rem; }
.article-header h1 { color: #1e3a5f; margin-bottom: 1rem; }
.article-meta { color: #94a3b8; font-size: .88rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.article-body h2 { color: #1e3a5f; margin: 2rem 0 .75rem; font-size: 1.4rem; }
.article-body h3 { color: #1e3a5f; margin: 1.5rem 0 .6rem; font-size: 1.1rem; }
.article-body ul, .article-body ol { margin: .75rem 0 1rem 1.5rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: .4rem; font-size: .97rem; }
.article-divider { border: none; border-top: 1px solid #e2e8f0; margin: 2.5rem 0; }
.article-cta {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: #fff;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}
.article-cta h3 { margin-bottom: .5rem; color: #fff; }
.article-cta p { color: #bfdbfe; margin-bottom: 1.25rem; }

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-item { text-align: center; padding: 1.5rem; }
.feature-icon {
  font-size: 2.2rem;
  margin-bottom: .75rem;
}
.feature-item h3 { font-size: 1rem; margin-bottom: .4rem; color: #1e3a5f; }
.feature-item p { font-size: .9rem; color: #64748b; }

/* --- Page hero (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: .5rem; }
.page-hero p { color: #bfdbfe; font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* --- About page --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 768px) { .about-content { grid-template-columns: 1fr; } }
.about-visual {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  font-size: 5rem;
}

/* --- Contact --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 768px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info h3 { margin-bottom: .5rem; color: #1e3a5f; }
.contact-info p { font-size: .93rem; color: #64748b; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.contact-item-icon {
  width: 40px; height: 40px;
  background: #eff6ff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
}

/* --- Legal pages --- */
.legal-page { padding: 3rem 0 5rem; }
.legal-container { max-width: 820px; margin: 0 auto; padding: 0 1.25rem; }
.legal-body h2 { color: #1e3a5f; margin: 2rem 0 .75rem; font-size: 1.3rem; }
.legal-body h3 { color: #334155; margin: 1.25rem 0 .5rem; font-size: 1.05rem; }
.legal-body ul { margin: .5rem 0 1rem 1.5rem; list-style: disc; }
.legal-body ul li { margin-bottom: .35rem; font-size: .95rem; }
.legal-body p { font-size: .95rem; }
.legal-last-updated {
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  padding: .75rem 1rem;
  font-size: .88rem;
  color: #64748b;
  margin-bottom: 2rem;
  border-radius: 0 6px 6px 0;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: .85rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: #2563eb; }
.breadcrumb-sep { color: #cbd5e1; }

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%);
  color: #fff;
  padding: 5rem 0;
  text-align: center;
}
.cta-section h2 { color: #fff; margin-bottom: .75rem; }
.cta-section p { color: #bfdbfe; margin-bottom: 2rem; font-size: 1.05rem; }

/* --- Footer --- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand p { font-size: .88rem; line-height: 1.65; margin-top: .75rem; }
.footer-col h4 { color: #fff; font-size: .9rem; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a { color: #94a3b8; font-size: .88rem; transition: color .2s; }
.footer-col ul li a:hover { color: #60a5fa; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom p { font-size: .82rem; }
.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom-links a { font-size: .82rem; color: #64748b; }
.footer-bottom-links a:hover { color: #94a3b8; text-decoration: none; }

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

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #1e3a5f;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem 1.5rem;
    gap: 1rem;
    border-top: 1px solid #2d4e77;
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { padding: 3.5rem 0 3rem; }
  .section { padding: 3rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.tag-free {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
  margin-left: .35rem;
}

/* --- Blog Filter Tabs --- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: .45rem 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 99px;
  background: #fff;
  color: #475569;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.filter-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.filter-btn.active {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: #fff;
}

/* --- FAQ Section --- */
.faq-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}
.faq-section h2 {
  margin-bottom: 1.25rem;
}
.faq-item {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #2563eb;
}
.faq-item h3 {
  font-size: 1rem;
  color: #1e3a5f;
  margin-bottom: .4rem;
}
.faq-item p {
  font-size: .92rem;
  color: #475569;
  margin: 0;
}
