/* =============================================
   Speed – Home Page Components
   Usa CSS nesting nativo (sem pré-processador)
   ============================================= */

/* ----- Botões reutilizáveis ----- */
.btn-speed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s, color 0.2s;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
  line-height: 1;

  &.btn-primary {
    background-color: var(--speed-red);
    color: white;
    border-color: var(--speed-red);

    &:hover { opacity: 0.88; }
  }

  &.btn-outline {
    background-color: transparent;
    color: var(--speed-red);
    border-color: var(--speed-red);

    &:hover { background-color: var(--speed-red); color: white; }
  }

  &.btn-dark {
    background-color: var(--titulos);
    color: white;
    border-color: var(--titulos);

    &:hover { opacity: 0.85; }
  }

  &.btn-white {
    background-color: white;
    color: var(--speed-red);
    border-color: white;

    &:hover { opacity: 0.9; }
  }
}

/* ----- Hero ----- */
.hero-home {
  margin-top: 0;

  & .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 520px;

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

  & .hero-content {
    background-color: var(--titulos);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem;

    @media (min-width: 768px) {
      padding: 5rem 3.5rem;
    }

    @media (min-width: 992px) {
      padding: 5rem 4.5rem;
    }

    & h1 {
      color: white;
      font-size: clamp(1.875rem, 3.5vw, 3rem);
      font-weight: 700;
      line-height: 1.15;
      margin-bottom: 1rem;

      & .highlight {
        color: var(--speed-red);
      }
    }

    & .hero-subtitle {
      color: #9ca3af;
      line-height: 1.65;
      max-width: 420px;
      font-size: 0.9375rem;
      margin-bottom: 2rem;
    }
  }

  & .hero-image {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    order: -1;

    @media (min-width: 768px) {
      order: 0;
    }

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

/* Hero Form */
.hero-form {
  display: flex;
  gap: 0.625rem;
  max-width: 440px;
  flex-wrap: wrap;

  & input[type="tel"] {
    flex: 1;
    min-width: 160px;
    padding: 0.75rem 1rem;
    border: 1px solid #3a3a3a;
    background-color: #2a2a2a;
    color: white;
    border-radius: 6px;
    font-size: 0.9rem;

    &::placeholder { color: #666; }

    &:focus {
      outline: none;
      border-color: var(--speed-red);
    }
  }
}

/* ----- Features Bar ----- */
.features-bar {
  background-color: var(--speed-red);
  margin-top: 0;

  & .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

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

  & .feature-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.25rem 1.5rem;
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.2);

    &:nth-child(2n) { border-right: none; }
    &:nth-child(1),
    &:nth-child(2) { border-bottom: 1px solid rgba(255, 255, 255, 0.2); }

    @media (min-width: 768px) {
      padding: 1.5rem 2rem;
      border-bottom: none;

      &:nth-child(1),
      &:nth-child(2) { border-bottom: none; }
      &:last-child { border-right: none; }
    }

    & .feature-icon {
      width: 2rem;
      height: 2rem;
      flex-shrink: 0;
    }

    & .feature-texts { display: flex; flex-direction: column; gap: 0.1rem; }

    & .feature-label {
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      opacity: 0.85;
    }

    & .feature-value {
      font-size: 1rem;
      font-weight: 800;
    }
  }
}

/* ----- Plans Section ----- */
.plans-section {
  padding: 4.5rem 0;

  & .plans-heading {
    text-align: center;
    margin-bottom: 2.75rem;

    & h2 {
      font-size: clamp(1.25rem, 2.5vw, 1.875rem);
      font-weight: 700;
      color: var(--titulos);
    }

    & p {
      color: var(--cinza);
      margin-top: 0.5rem;
      font-size: 0.9rem;
    }
  }

  & .plans-carousel-wrap {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    gap: 0.75rem;
    align-items: center;

    @media (min-width: 768px) {
      grid-template-columns: 3rem 1fr 3rem;
      gap: 1rem;
    }
  }

  & .plans-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09);
    color: var(--titulos);

    &:hover {
      background-color: var(--speed-red);
      border-color: var(--speed-red);
      color: white;
    }

    & svg { pointer-events: none; }
  }
}

/* Plan Card */
.plan-card {
  background: white;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1.5px solid #f0f0f0;

  & .card-logo {
    height: 1.125rem;
    width: auto;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 0.875rem;
  }

  & .card-speed {
    color: var(--speed-red);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;

    & span { font-size: 1.125rem; font-weight: 600; }
  }

  & .card-type {
    font-size: 0.7rem;
    color: var(--cinza);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.2rem;
  }

  & .card-old-price {
    font-size: 0.8rem;
    color: #aaa;
    text-decoration: line-through;
    margin-top: 0.875rem;
  }

  & .card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--titulos);

    & small {
      font-size: 0.8rem;
      font-weight: 400;
      color: var(--cinza);
    }
  }

  & .card-features {
    list-style: none;
    margin: 1.25rem 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    & li {
      display: flex;
      align-items: flex-start;
      gap: 0.5rem;
      font-size: 0.8125rem;
      color: var(--cinza);

      & .check {
        color: var(--speed-red);
        font-weight: 700;
        flex-shrink: 0;
        margin-top: 1px;
      }
    }
  }

  &.featured {
    background-color: var(--speed-red);
    border-color: var(--speed-red);
    position: relative;
    padding-top: 2.5rem;

    & .card-badge {
      position: absolute;
      top: -0.875rem;
      left: 50%;
      transform: translateX(-50%);
      background: #c0281f;
      color: white;
      font-size: 0.65rem;
      font-weight: 700;
      padding: 0.3rem 1rem;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      white-space: nowrap;
    }

    & .card-speed { color: white; }
    & .card-type  { color: rgba(255, 255, 255, 0.7); }
    & .card-old-price { color: rgba(255, 255, 255, 0.55); }
    & .card-price { color: white; & small { color: rgba(255, 255, 255, 0.75); } }

    & .card-features li {
      color: rgba(255, 255, 255, 0.9);
      & .check { color: white; }
    }
  }
}

/* ----- Indique um Amigo ----- */
.indique-section {
  margin-top: 0;

  & .indique-grid {
    display: grid;
    grid-template-columns: 1fr;

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

  & .indique-promo {
    background-color: var(--speed-red);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem 2.5rem;
    min-height: 380px;

    & .indique-bg-img {
      position: absolute;
      right: 0;
      bottom: 0;
      height: 100%;
      width: 65%;
      object-fit: cover;
      object-position: top right;
    }

    & .indique-promo-content {
      position: relative;
      z-index: 1;
    }

    & .indique-tag {
      display: inline-block;
      background: rgba(0, 0, 0, 0.25);
      color: white;
      font-size: 0.7rem;
      font-weight: 700;
      padding: 0.35rem 0.875rem;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 0.75rem;
    }

    & .indique-ganhe {
      font-size: 1rem;
      font-weight: 700;
      color: white;
      text-transform: uppercase;
    }

    & .indique-percent {
      font-size: clamp(4.5rem, 10vw, 7rem);
      font-weight: 900;
      color: white;
      line-height: 0.95;
    }

    & .indique-desc {
      font-size: 0.875rem;
      color: rgba(255, 255, 255, 0.85);
      margin-top: 0.5rem;
    }
  }

  & .indique-content {
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem 3rem;

    @media (min-width: 992px) {
      padding: 4rem 4.5rem;
    }

    & h2 {
      font-size: clamp(1.4rem, 2.5vw, 2rem);
      font-weight: 700;
      line-height: 1.3;
      color: var(--titulos);

      & em {
        font-style: italic;
        color: var(--speed-red);
      }
    }

    & p {
      color: var(--cinza);
      margin-top: 1rem;
      margin-bottom: 1.75rem;
      line-height: 1.65;
      font-size: 0.9375rem;
      max-width: 520px;
    }

    & .btn-group {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }
  }
}

/* ----- Combos Promocionais ----- */
.combos-promo {
  background-color: #111;
  margin-top: 0;
  padding: 4.5rem 0;

  & .combos-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;

    @media (min-width: 992px) {
      grid-template-columns: 280px 1fr;
      gap: 3rem;
    }
  }

  & .combos-header {
    & .combos-logo {
      height: 2.25rem;
      width: auto;
      margin-bottom: 0.875rem;
      filter: brightness(0) invert(1);
    }

    & h2 {
      color: white;
      font-size: clamp(1.25rem, 2.5vw, 1.75rem);
      font-weight: 800;
      text-transform: uppercase;
      line-height: 1.2;
      margin-bottom: 0.75rem;

      & span { color: var(--speed-red); }
    }

    & p {
      color: #777;
      font-size: 0.85rem;
      line-height: 1.55;
      max-width: 260px;
    }
  }

  & .combos-carousel-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
  }

  & .combos-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1.5px solid #333;
    background: #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    color: white;

    &:hover {
      background-color: var(--speed-red);
      border-color: var(--speed-red);
    }
  }
}

/* Combo Card */
.combo-card {
  background: #1c1c1c;
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;

  & .combo-logo {
    height: 1rem;
    width: auto;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 0.875rem;
    filter: brightness(0) invert(1);
    opacity: 0.6;
  }

  & .combo-speed {
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    line-height: 1;

    & span { font-size: 1rem; font-weight: 500; color: #999; }
  }

  & .combo-type {
    font-size: 0.7rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.2rem;
    margin-bottom: 1rem;
  }

  & .combo-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;

    & .channel-badge {
      background: #2a2a2a;
      color: #aaa;
      font-size: 0.6rem;
      font-weight: 700;
      padding: 0.25rem 0.5rem;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }
  }

  & .combo-price {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #2a2a2a;

    & .combo-old-price {
      font-size: 0.75rem;
      color: #555;
      text-decoration: line-through;
    }

    & .combo-current {
      font-size: 1.375rem;
      font-weight: 700;
      color: white;

      & small { font-size: 0.8rem; color: #777; font-weight: 400; }
    }
  }
}

/* ----- Publicidade ----- */
.publicidade {
  & .swiper.publi {
    height: 500px;
  }

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