@layer variables {
  :root {
    --color-primary: #1e3a8a;
    --color-secondary: #374151;
    --color-accent: #f97316;
    --color-success: #84cc16;
    --color-light: #ffffff;
    --color-background: #f5f5dc;
    --color-text: #374151;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  }
}

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

  body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-light);
  }

  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    .cta-container {
      margin-top: 40px;
      text-align: center;

      .cta-button {
        display: inline-block;
        background: var(--color-accent);
        color: var(--color-light);
        padding: 15px 30px;
        border-radius: 5px;
        text-decoration: none;
        font-weight: 600;
        transition: transform 0.3s ease, background-color 0.3s ease;

        .cta-button:hover {
          transform: translateY(-5px);
          background-color: darken(var(--color-accent), 10%);
        }
      }
    }
  }

  h2 {
    text-align: center;
  }
}

@layer components {
  .minimal-header {
    background-color: var(--color-light);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);

    & .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    & .logo {
      height: 60px;
    }

    & .header-nav {
      display: flex;
      gap: 30px;

      & a {
        text-decoration: none;
        color: var(--color-text);
        font-weight: 500;
        transition: color 0.3s ease;

        &:hover {
          color: var(--color-accent);
        }
      }
    }

    & .header-phone {
      display: flex;
      gap: 10px;

      a,
      i {
        color: var(--color-primary);
      }
      a {
        text-decoration: none;
        font-weight: 600;
        font-size: 18px;
      }

      i {
        font-size: 30px;
      }
    }
  }

  .hero-section {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(rgba(30, 58, 138, 0.9), rgba(30, 58, 138, 0.9));
    color: var(--color-light);

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

      & .hero-content {
        & h1 {
          font-size: 48px;
          line-height: 1.2;
          margin-bottom: 20px;
        }

        & h2 {
          text-align: left;
          font-size: 24px;
          font-weight: 400;
          margin-bottom: 30px;
        }
      }

      & .hero-benefits {
        list-style: none;
        margin-bottom: 30px;

        & li {
          display: flex;
          align-items: center;
          margin-bottom: 10px;
          font-size: 18px;

          & i {
            font-size: 22px;
            color: var(--color-success);
            margin-right: 10px;
          }
        }
      }
      & .hero-carousel {
        position: relative;
        width: 100%;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: var(--shadow-lg);

        & .carousel-container {
          display: flex;
          transition: transform 0.5s ease-in-out;
          height: 400px;

          & .carousel-slide {
            min-width: 100%;
            height: 100%;

            & img {
              width: 100%;
              height: 100%;
              object-fit: cover;
            }
          }
        }

        & .carousel-controls {
          position: absolute;
          bottom: 20px;
          left: 0;
          right: 0;
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 20px;

          & .carousel-btn {
            background: rgba(255, 255, 255, 0.3);
            border: none;
            color: white;
            padding: 10px 15px;
            cursor: pointer;
            border-radius: 50%;
            transition: background-color 0.3s ease;

            &:hover {
              background: rgba(255, 255, 255, 0.5);
            }
          }

          & .carousel-dots {
            display: flex;
            gap: 8px;

            & .dot {
              width: 10px;
              height: 10px;
              border-radius: 50%;
              background: rgba(255, 255, 255, 0.3);
              cursor: pointer;
              transition: background-color 0.3s ease;

              &.active {
                background: var(--color-light);
              }
            }
          }
        }
      }

      & .cta-button {
        display: inline-block;
        background: var(--color-accent);
        color: var(--color-light);
        padding: 15px 30px;
        border-radius: 5px;
        text-decoration: none;
        font-weight: 600;
        transition: transform 0.3s ease;

        &:hover {
          transform: translateY(-5px);
        }
      }
    }
  }

  .social-proof {
    padding: 40px 0;
    background: var(--color-light);

    & .proof-items {
      display: flex;
      justify-content: space-around;
      align-items: center;
      text-align: center;

      & .proof-item {
        i {
          font-size: 30px;
          color: var(--color-primary);
          margin-bottom: 10px;
        }
        .stars i {
          color: #f0d764;
        }
      }
    }
  }

  .services-section {
    padding: 80px 0;
    background: var(--color-primary);
    color: var(--color-light);

    & .services-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 30px;
      margin-top: 40px;
    }

    & .service-card {
      background: var(--color-light);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: var(--shadow-md);
      transition: transform 0.3s ease;
      color: var(--color-text);

      &:hover {
        transform: translateY(-5px);
      }

      & img {
        width: 100%;
        height: 200px;
        object-fit: cover;
      }

      & h3 {
        padding: 20px;
        margin: 0;
      }

      & p {
        padding: 0 20px 20px;
      }
    }
  }

  .process-section {
    padding: 80px 0;
    background: var(--color-light);

    & .process-steps {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 30px;
      margin-top: 40px;
    }

    & .step {
      text-align: center;
      padding: 20px;

      & .step-number {
        width: 50px;
        height: 50px;
        background: var(--color-primary);
        color: var(--color-light);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto 20px;
        font-size: 24px;
        font-weight: 600;
      }
    }
  }

  .portfolio-section {
    padding: 80px 0;
    background: var(--color-primary);
    h2 {
      text-align: center;
      color: var(--color-light);
    }
    & .portfolio-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 30px;
      margin-top: 40px;
    }

    & .portfolio-card {
      background: var(--color-light);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: var(--shadow-md);

      .text {
        padding: 20px;
      }

      & .before-after {
        position: relative;
        height: 250px;

        & img {
          width: 100%;
          height: 100%;
          object-fit: cover;
          position: absolute;
          transition: opacity 0.3s ease;

          &:last-child {
            opacity: 0;
          }
        }

        &:hover img:last-child {
          opacity: 1;
        }
      }
    }
  }

  .testimonials-section {
    padding: 80px 0;
    background: var(--color-light);

    & .testimonial {
      text-align: center;
      padding: 30px;
      background: var(--color-primary);
      border-radius: 8px;
      margin: 20px;
      color: var(--color-light);

      & img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        margin-bottom: 20px;
      }
    }
  }

  .guarantees-section {
    padding: 80px 0;
    background: var(--color-primary);
    color: var(--color-light);

    & .guarantees-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 30px;
      margin-top: 40px;
    }

    & .guarantee {
      text-align: center;
      padding: 30px;
      background: var(--color-light);
      border-radius: 8px;
      box-shadow: var(--shadow-md);
      color: var(--color-text);

      & img {
        width: 60px;
        margin-bottom: 20px;
      }

      & h3 {
        color: var(--color-primary);
      }
    }
  }

  .contact-section {
    padding: 80px 0;
    color: var(--color-primary);

    & .contact-content {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 50px;

      & .contact-details {
        margin-top: 20px;
        .details {
          display: flex;
          align-items: center;
          gap: 5px;
          margin-top: 5px;
          font-size: 18px;

          i {
            font-size: 22px;
          }
        }
      }
    }

    & .contact-form {
      display: flex;
      flex-direction: column;
      gap: 15px;

      & input,
      & select,
      & textarea {
        padding: 12px;
        border: none;
        border-radius: 5px;
        font-size: 16px;
        background-color: #fcfcfc;
        border: 2px solid #f0f0f0;
      }

      & textarea {
        height: 120px;
      }

      & .submit-button {
        background: var(--color-accent);
        color: var(--color-light);
        padding: 15px;
        border: none;
        border-radius: 5px;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.3s ease;

        &:hover {
          transform: translateY(-5px);
        }
      }
    }
  }

  .main-footer {
    background: var(--color-primary);
    color: var(--color-light);
    padding: 60px 0 20px;

    & .footer-content {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 40px;
      margin-bottom: 40px;
    }

    & .footer-logo {
      width: 40%;
      margin-bottom: 20px;
    }

    & .footer-links a {
      display: block;
      color: var(--color-light);
      text-decoration: none;
      margin-bottom: 10px;
      opacity: 0.8;
      transition: opacity 0.3s ease;

      &:hover {
        opacity: 1;
      }
    }

    & .footer-social i {
      font-size: 30px;
    }

    & .footer-bottom {
      text-align: center;
      padding-top: 20px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
  }
}

@layer utilities {
  @media (max-width: 768px) {
    .minimal-header {
      & .header-nav {
        display: none;
      }
    }

    .hero-section {
      & .hero-content h1 {
        font-size: 36px;
      }

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

      & .hero-carousel {
        order: -1;
        margin-bottom: 30px;

        & .carousel-container {
          height: 300px;
        }
      }
    }

    .contact-section {
      & .contact-content {
        grid-template-columns: 1fr;
      }
    }

    .process-section {
      & .process-steps {
        grid-template-columns: 1fr;
      }
    }

    .testimonials-carousel {
      grid-template-columns: 1fr;
      padding: 20px;
    }
  }

  @media (max-width: 480px) {
    .hero-section {
      & .hero-content {
        & h1 {
          font-size: 28px;
        }

        & h2 {
          font-size: 18px;
        }
      }
    }

    .social-proof {
      & .proof-items {
        flex-direction: column;
        gap: 20px;
      }
    }
  }
}
