:root {
  --primary: #ff3b3b;
  --primary-dark: #e02222;
  --dark: #1a1a1a;
  --dark-footer: #121212;
  --text: #555555;
  --text-dark: #222222;
  --light: #f7f7f7;
  --white: #ffffff;
  --border: #e8e8e8;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, 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;
  font-size: 16px;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0 0 1rem;
}

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

/* Top bar */
.top-bar {
  background: var(--dark);
  color: #ccc;
  font-size: 14px;
  padding: 10px 0;
}

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

.top-bar span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-links a {
  color: #fff;
  margin-left: 18px;
  font-weight: 500;
}

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

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

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

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 15px;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--dark);
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  background: var(--primary);
  color: var(--white) !important;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

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

.btn-outline {
  background: transparent;
  color: var(--primary) !important;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white) !important;
}

.btn-white {
  background: var(--white);
  color: var(--primary) !important;
  border-color: var(--white);
}

.btn-white:hover {
  background: transparent;
  color: var(--white) !important;
}

.section {
  padding: 80px 0;
}

.section-light {
  background: var(--light);
}

.section-title {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-title .sub {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
}

.section-title h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--light);
  padding: 60px 0 0;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 59, 59, 0.08) 40%);
  pointer-events: none;
}

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

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 17px;
  margin-bottom: 28px;
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: 8px;
}

.hero-shape {
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 120px;
  height: 120px;
  background: var(--primary);
  opacity: 0.15;
  border-radius: 8px;
  z-index: -1;
}

/* Service cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  padding: 36px 24px 32px;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-bottom: 4px solid var(--primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(255, 59, 59, 0.15);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(255, 59, 59, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 28px;
}

.service-card h3 {
  font-size: 1.15rem;
}

/* About block */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-image img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.progress-list {
  margin-top: 24px;
}

.progress-item {
  margin-bottom: 20px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.progress-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
}

.check-list li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 10px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Quote section */
.quote-section {
  background: var(--light);
}

.quote-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.quote-tabs {
  background: var(--dark);
  padding: 24px 0;
}

.quote-tabs button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 24px;
  background: none;
  border: none;
  color: #aaa;
  font-weight: 600;
  cursor: pointer;
  border-left: 3px solid transparent;
  font-size: 15px;
}

.quote-tabs button.active,
.quote-tabs button:hover {
  color: var(--white);
  background: rgba(255, 59, 59, 0.15);
  border-left-color: var(--primary);
}

.quote-form-box {
  padding: 40px;
}

.quote-form-box h3 {
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.12);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: #c0392b;
}

.field-error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

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

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 3px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-checkbox + .field-error.show {
  margin-top: -6px;
  margin-bottom: 14px;
}

.range-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.range-value {
  font-weight: 700;
  color: var(--primary);
}

.form-success {
  display: none;
  padding: 20px;
  background: #e8f8ef;
  border: 1px solid #27ae60;
  color: #1e7e45;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  margin-top: 16px;
}

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

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.team-card {
  text-align: center;
}

.team-photo {
  position: relative;
  overflow: hidden;
  border-radius: 120px 120px 8px 8px;
  margin-bottom: -40px;
  z-index: 1;
}

.team-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.team-info {
  background: var(--primary);
  color: var(--white);
  padding: 52px 16px 24px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.team-info h4 {
  color: var(--white);
  margin-bottom: 4px;
}

.team-info span {
  font-size: 14px;
  opacity: 0.9;
}

/* CTA red block */
.cta-block {
  background: var(--primary);
  color: var(--white);
  padding: 70px 0;
}

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

.cta-grid h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.cta-grid p {
  opacity: 0.95;
}

.cta-features {
  background: rgba(255, 255, 255, 0.12);
  padding: 24px;
  border-radius: var(--radius);
  margin-top: 20px;
}

.cta-features li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.cta-features li::before {
  content: "●";
  position: absolute;
  left: 0;
  color: var(--white);
}

.cta-image img {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.testimonial-head {
  background: var(--primary);
  color: var(--white);
  padding: 20px 24px;
  font-weight: 600;
}

.testimonial-body {
  padding: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px 24px;
}

.testimonial-author img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-box {
  background: var(--white);
  padding: 32px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-box h3 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 4px;
}

/* Page banner */
.page-banner {
  background: linear-gradient(rgba(26, 26, 26, 0.75), rgba(26, 26, 26, 0.75)),
    url("../images/page-banner.jpg") center/cover no-repeat;
  padding: 100px 0 80px;
  text-align: center;
  color: var(--white);
}

.page-banner h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.breadcrumb {
  margin-top: 12px;
  font-size: 14px;
  opacity: 0.85;
}

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

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 28px;
  text-align: center;
  border-top: 4px solid var(--border);
  transition: transform 0.2s;
}

.pricing-card.featured {
  border-top-color: var(--primary);
  transform: scale(1.03);
}

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

.pricing-card ul {
  text-align: left;
  margin: 24px 0;
}

.pricing-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  padding-left: 24px;
  position: relative;
}

.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

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

.project-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.4s;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: var(--white);
  padding: 24px;
}

.project-overlay h3 {
  color: var(--white);
  margin-bottom: 8px;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.blog-feature img {
  border-radius: var(--radius);
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.blog-list article {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.blog-list img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

/* Newsletter strip */
.newsletter-strip {
  background: linear-gradient(rgba(139, 0, 0, 0.88), rgba(80, 0, 0, 0.9)),
    url("../images/newsletter-bg.jpg") center/cover no-repeat;
  padding: 60px 0;
  color: var(--white);
}

.newsletter-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.newsletter-inner h2 {
  color: var(--white);
  margin: 0;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
  max-width: 520px;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
}

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

.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.legal-content p,
.legal-content li {
  margin-bottom: 12px;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info-box {
  background: var(--dark);
  color: #ccc;
  padding: 40px;
  border-radius: var(--radius);
}

.contact-info-box h3 {
  color: var(--white);
}

.contact-info-box .icon-row {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  align-items: flex-start;
}

.contact-info-box .icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  background: var(--dark-footer);
  color: #aaa;
  padding-top: 70px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer-about .logo-footer {
  height: 40px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-about p {
  font-size: 14px;
  margin-bottom: 20px;
}

.footer-about .btn-outline {
  color: var(--white) !important;
  border-color: rgba(255, 255, 255, 0.6);
}

.footer-about .btn-outline:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white) !important;
}

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

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

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

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

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.social-links a:hover {
  background: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0;
  font-size: 14px;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-legal a {
  margin-left: 16px;
  color: #ccc;
}

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

/* Mobile */
@media (max-width: 992px) {
  .hero-grid,
  .about-grid,
  .cta-grid,
  .contact-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

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

  .stats-grid,
  .team-grid,
  .testimonial-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .quote-tabs {
    display: flex;
    flex-wrap: wrap;
    padding: 12px;
  }

  .quote-tabs button {
    flex: 1 1 auto;
    border-left: none;
    border-bottom: 3px solid transparent;
    text-align: center;
    padding: 10px;
  }

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

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 85vw);
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 24px;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.3s;
    gap: 16px;
  }

  .main-nav.open {
    right: 0;
  }

  .header-cta {
    display: none;
  }

  .services-grid,
  .stats-grid,
  .team-grid,
  .testimonial-grid,
  .pricing-grid,
  .projects-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

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

  .section {
    padding: 56px 0;
  }
}
