:root {
  --primary: #EA580C;
  --primary-dark: #C2410C;
  --secondary: #D97706;
  --accent: #059669;
  --bg: #FFFBF5;
  --card: #FFFFFF;
  --text: #1C1917;
  --muted: #78716C;
  --border: #E7E5E4;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== NAVBAR ========== */
.navbar {
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.5rem;
}

.logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
}

.logo span {
  color: var(--secondary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 1rem;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  }
  .nav-links.open {
    display: flex;
  }
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-left: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ========== STATS BAR ========== */
.stats-bar {
  background: var(--card);
  padding: 2rem;
  text-align: center;
  margin-top: -1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.stats-bar h2 {
  font-size: 2.25rem;
  color: var(--primary);
}

.stats-bar p {
  color: var(--muted);
}

/* ========== SECTIONS ========== */
.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin: 3rem 0 2rem;
  font-size: 2rem;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ========== CARDS GRID ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border-radius: 1rem;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.12);
}

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Card content padding for icon-style cards */
.card > div {
  padding: 1.5rem;
}

/* ========== ARTICLE CARDS ========== */
.article-card {
  display: flex;
  flex-direction: column;
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.article-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card h3 {
  font-size: 1rem;
  margin: 0.375rem 0 0.5rem;
  line-height: 1.4;
  flex-grow: 1;
}

.article-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.tool-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--secondary);
  letter-spacing: 0.03em;
}

/* ========== SEARCH & FILTERS ========== */
.search-wrap {
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.search-box {
  position: relative;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: var(--card);
  font-family: 'Inter', sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

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

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========== FOOTER ========== */
footer {
  background: #1C1917;
  color: #fff;
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

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

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

footer h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1rem;
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: 0.5rem;
}

footer a {
  color: #9CA3AF;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #292524;
  text-align: center;
  color: #6B7280;
  font-size: 0.875rem;
}

/* ========== NEWSLETTER ========== */
.newsletter {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
  border-radius: 1rem;
  margin: 3rem auto;
  max-width: 900px;
}

.newsletter h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.newsletter p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 450px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.875rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}

.newsletter-form button {
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .newsletter-form {
    flex-direction: column;
  }
}

/* ========== TOOL PAGE ========== */
.tool-page {
  padding: 2rem 0 4rem;
}

.tool-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.tool-header p {
  color: var(--muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 2rem;
}

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

.tool-main {
  background: var(--card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tool-sidebar {
  background: var(--card);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  height: fit-content;
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  background: var(--card);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-calc {
  width: 100%;
  padding: 0.875rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Inter', sans-serif;
}

.btn-calc:hover {
  background: var(--primary-dark);
}

.result-box {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-top: 1.5rem;
  text-align: center;
}

.result-box .result-num {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.result-box .result-label {
  font-size: 0.875rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

/* ========== FAQ ========== */
.faq-section {
  margin-top: 2.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

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

.faq-q {
  font-weight: 600;
  margin-bottom: 0.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after {
  content: '+';
  font-weight: 700;
  color: var(--primary);
  font-size: 1.25rem;
}

.faq-a {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========== RELATED ITEMS ========== */
.related-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.related-item:hover {
  background: var(--primary);
  color: #fff;
}

.related-item i {
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

.related-item:hover i {
  color: #fff;
}

/* ========== CTA BANNER ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 3rem 1.5rem;
  text-align: center;
  margin: 3rem 0;
  border-radius: 1rem;
}

.cta-banner h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.cta-banner p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

/* ========== ARTICLE PAGE ========== */
.article-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.article-header .excerpt {
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.article-body {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.article-body h2 {
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
}

.article-body h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.2rem;
}

.article-body p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1rem 1.5rem;
}

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

.article-body img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  width: 100%;
}

.article-body code {
  background: #F3F4F6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875em;
}

.article-body pre {
  background: #1F2937;
  color: #F9FAFB;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-footer {
  background: var(--card);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ========== ERROR PAGE ========== */
.error-page {
  text-align: center;
  padding: 6rem 1.5rem;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--primary);
}

@media (max-width: 480px) {
  .btn-secondary {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
