:root {
  --primary: #b71c1c;
  --accent: #ffd600;
  --bg: #fff9f0;
  --text: #1a0a00;
  --light-gray: #f5f5f5;
  --border: #e0e0e0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* Demo Bar */
.demo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  z-index: 1000;
  text-align: center;
}

.demo-bar a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.demo-bar a:hover {
  text-decoration: underline;
}

/* Header & Navigation */
header {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 2.5rem;
  position: relative;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

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

/* Hamburger Menu */
#menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 0.3rem;
}

.menu-icon span {
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s;
  font-size: 0.95rem;
}

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

/* Mobile Menu */
@media (max-width: 768px) {
  .menu-icon {
    display: flex;
  }

  #menu-toggle:checked ~ .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  #menu-toggle:checked ~ .menu-icon span:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle:checked ~ .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  #menu-toggle:checked ~ nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  #menu-toggle:checked ~ nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  nav {
    display: none;
  }
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

section {
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: #333;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.btn:hover {
  background: #8b1515;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(183,28,28,0.3);
}

.btn-secondary {
  background: var(--accent);
  color: var(--text);
}

.btn-secondary:hover {
  background: #ffca00;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #8b1515 100%);
  color: white;
  padding: 3rem 1rem;
  border-radius: 8px;
  margin-bottom: 3rem;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: 0 8px 24px rgba(183,28,28,0.15);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
}

.card-meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  background: var(--light-gray);
  color: var(--text);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Forms */
form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
}

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

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Simulation Calculator */
.calculator {
  background: var(--light-gray);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  margin-top: 2rem;
}

.result-label {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.result-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

/* Footer */
footer {
  background: var(--text);
  color: white;
  padding: 3rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

footer p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Detail Page Specific */
.detail-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #8b1515 100%);
  color: white;
  padding: 2rem 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.info-box {
  background: var(--light-gray);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.info-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.info-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .input-group {
    grid-template-columns: 1fr;
  }

  form {
    padding: 1.5rem;
  }

  .detail-info {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .demo-bar {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  main {
    padding: 1rem;
  }

  section {
    margin-bottom: 2rem;
  }
}
