/* MathGrid Space - Home Improvements Theme */
:root {
  --lime: #d4ff37;
  --mint: #4ade80;
  --mint-dark: #22c55e;
  --charcoal: #1a1a1a;
  --charcoal-soft: #2d2d2d;
  --white: #ffffff;
  --off-white: #f5f5f5;
  --cream: #faf8f4;
  --beige: #e8e4dc;
  --text: #333333;
  --text-muted: #666666;
  --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-btn: 50px;
  --font: "Poppins", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: var(--mint-dark);
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.section {
  padding: 90px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 12px;
  line-height: 1.25;
}

.section-title .highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Top bar */
.top-bar {
  background: var(--charcoal);
  color: #ccc;
  font-size: 0.85rem;
  padding: 10px 0;
  display: none;
}

@media (min-width: 992px) {
  .top-bar {
    display: block;
  }
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar a {
  color: var(--lime);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.logo img {
  height: 42px;
  width: auto;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.3s;
}

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 20px;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 4px;
}

.main-nav.open {
  display: flex;
}

.main-nav a {
  padding: 12px 16px;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--off-white);
  color: var(--charcoal);
}

.header-cta .btn-primary {
  display: none;
}

@media (min-width: 1100px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    box-shadow: none;
    align-items: center;
    gap: 2px;
  }

  .header-cta .btn-primary {
    display: inline-flex;
  }
}


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--lime);
  color: var(--charcoal);
  border-color: var(--lime);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(212, 255, 55, 0.45);
  color: var(--charcoal);
}

.btn-dark {
  background: var(--charcoal);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--charcoal-soft);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.btn-mint {
  background: var(--mint);
  color: var(--charcoal);
}

/* Hero */
.hero {
  background: var(--off-white);
  padding: 60px 0 80px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--charcoal);
  margin: 0 0 20px;
}

.hero .highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-badge {
  display: inline-block;
  background: var(--mint);
  color: var(--charcoal);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Choose us */
.choose-grid {
  display: grid;
  gap: 50px;
  align-items: center;
}

@media (min-width: 992px) {
  .choose-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.choose-image img {
  border-radius: var(--radius);
  width: 100%;
  min-height: 360px;
  object-fit: cover;
}

.feature-list {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: var(--off-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.feature-item h4 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.feature-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Subscribe banner */
.subscribe-banner {
  background: var(--mint);
  padding: 50px 0;
}

.subscribe-banner .form-success {
  max-width: min(1200px, 92%);
  margin: 16px auto 0;
}

.subscribe-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .subscribe-banner-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.subscribe-banner h3 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--charcoal);
  max-width: 480px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.inline-form input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 0.95rem;
}

/* Stats */
.stats-section {
  background: var(--charcoal);
  color: var(--white);
  padding: 80px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-box {
  border: 2px solid var(--lime);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.stat-box .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--lime);
  display: block;
}

.stat-box .label {
  font-size: 0.9rem;
  color: #bbb;
  margin-top: 8px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.price-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.price-card:hover {
  transform: translateY(-6px);
}

.price-card.featured {
  border: 3px solid var(--lime);
  transform: scale(1.02);
}

.price-card h3 {
  margin: 0 0 8px;
}

.price-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--charcoal);
  margin: 16px 0;
}

.price-card .price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
}

.price-card li {
  padding: 8px 0;
  border-bottom: 1px solid #e5e5e5;
  font-size: 0.95rem;
}

.price-card li::before {
  content: "✓ ";
  color: var(--mint-dark);
  font-weight: 700;
}

/* Services split */
.split-section {
  display: grid;
  gap: 50px;
  align-items: center;
}

@media (min-width: 992px) {
  .split-section {
    grid-template-columns: 1fr 1fr;
  }
}

.service-rows .service-row {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.service-row .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* FAQ */
.faq-section {
  background: var(--off-white);
}

.faq-layout {
  display: grid;
  gap: 40px;
  align-items: stretch;
}

@media (min-width: 992px) {
  .faq-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.faq-image-wrap {
  background: linear-gradient(135deg, var(--lime) 0%, var(--mint) 100%);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 320px;
}

.faq-image-wrap img {
  border-radius: 8px;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.accordion-item {
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.accordion-btn {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  border: none;
  background: var(--white);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-btn.active {
  background: var(--mint);
  color: var(--charcoal);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-panel-inner {
  padding: 0 22px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.accordion-item.open .accordion-panel {
  max-height: 400px;
}

/* Team */
.team-section {
  background: var(--beige);
}

.team-grid {
  display: grid;
  gap: 30px;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.team-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.team-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.team-card .info {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--white);
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.team-card .info h4 {
  margin: 0;
  font-size: 1.1rem;
}

.team-card .info span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Testimonial */
.testimonial-box {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 992px) {
  .testimonial-box {
    grid-template-columns: 1fr 1fr;
  }
}

.testimonial-content {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stars {
  color: #fbbf24;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

/* Blog cards */
.blog-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.blog-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.blog-card .body {
  padding: 22px;
}

.blog-card .date {
  font-size: 0.85rem;
  color: var(--mint-dark);
  font-weight: 600;
}

/* Page hero inner */
.page-hero {
  background: var(--charcoal);
  color: var(--white);
  padding: 70px 0;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.page-hero .breadcrumb {
  color: #aaa;
  font-size: 0.9rem;
}

.page-hero .breadcrumb a {
  color: var(--lime);
}

/* Forms */
.form-section {
  max-width: 720px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: #ef4444;
}

.field-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.field-error.show {
  display: block;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
  margin-bottom: 20px;
  width: 100%;
}

.checkbox-group input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  margin: 2px 0 0;
  padding: 0;
  border: none;
  box-shadow: none;
  accent-color: var(--mint-dark);
  cursor: pointer;
  align-self: start;
  justify-self: start;
}

.checkbox-group label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0;
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.55;
  cursor: pointer;
  text-align: left;
}

.checkbox-group label a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkbox-group .field-error {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  width: 100%;
}

.form-success {
  display: none;
  background: var(--mint);
  color: var(--charcoal);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 20px;
}

.form-success.show {
  display: block;
}

.form-row {
  display: grid;
  gap: 20px;
}

@media (min-width: 600px) {
  .form-row.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* Legal content */
.legal-content {
  max-width: 900px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 40px;
  color: var(--charcoal);
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 28px;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 1.25rem;
}

/* Footer */
.footer-newsletter {
  position: relative;
  padding: 80px 0;
  background: var(--charcoal);
  text-align: center;
}

.footer-newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?w=1600&q=80") center/cover;
  opacity: 0.25;
}

.footer-newsletter .container {
  position: relative;
  z-index: 1;
}

.footer-newsletter h3 {
  color: var(--white);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 24px;
}

.footer-newsletter .inline-form {
  margin: 0 auto;
  justify-content: center;
}

.site-footer {
  background: #0d0d0d;
  color: #aaa;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  gap: 40px;
  margin-bottom: 40px;
}

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

.site-footer h4 {
  color: var(--white);
  margin: 0 0 20px;
  font-size: 1.1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a {
  color: #aaa;
}

.site-footer a:hover {
  color: var(--lime);
}

.footer-about p {
  font-size: 0.95rem;
  line-height: 1.8;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--charcoal-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
}

.social-links a:hover {
  background: var(--lime);
  color: var(--charcoal);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-legal a {
  margin: 0 8px;
}

.footer-legal a:first-child {
  margin-left: 0;
}

/* Cards grid services page */
.cards-3 {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.service-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.service-card .body {
  padding: 24px;
}

/* Content blocks */
.prose {
  max-width: 900px;
  margin: 0 auto;
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 1.2em;
}

.icon-boxes {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 600px) {
  .icon-boxes {
    grid-template-columns: repeat(3, 1fr);
  }
}

.icon-box {
  background: var(--off-white);
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
}

.icon-box .emoji {
  font-size: 2rem;
  margin-bottom: 12px;
}
