/* ============================================================
   THEME: Red / Urbanist  (overrides + unique components for style-04.css)
   Load AFTER style.css:
     <link rel="stylesheet" href="/assets/css/style.css">
     <link rel="stylesheet" href="/assets/css/style-04-theme.css">
   ============================================================ */
@layer root {
  :root {
    --primary-color: #ff0000;
    --font-family-heading: "Urbanist", sans-serif;
    --font-family-body: "Inter", sans-serif;
    --dark-primary: #570000a2;
    --white: #fff;
    --light: #f6f6f6;
    --light-gray: #f2f2f2;
    --gray: #808080;
    --dark-gray: #201d1d;
    --dark: #0a0a0a;
    --red: #d84848;
    --border-radius: 2rem;
    --border: 1.5px solid #570000a2;
    /* Semantic role tokens used by shared components in style.css
     (only diverge from --primary-color where this theme has a richer palette) */
    --accent-purple: var(--primary-color);
    --accent-yellow: var(--primary-color);
    --accent-red: var(--red);
    --accent-green: var(--primary-color);
    --hover-link-bg: var(--light);
    --contact-form-bg: var(--light);
    /* Component tokens: only values that differ from the defaults in style.css */
    --page-bg: black;
    --container-max-width: 1680px;
    --container-md-max-width: 1440px;
    --games-list-gap: 0px;
    --hero-title-font-size: clamp(2rem, 8vw, 4.55rem);
    --pagination-active-color: var(--white);
  }
}

/* ============================================================
   @layer base — UNIQUE TO RED / URBANIST (not shared across themes)
   ============================================================ */
@layer base {
  body {
    line-height: 1.4;
  }

  h1 {
    font-family: "Urbanist", sans-serif;
    font-size: 3rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;

    @media (max-width: 1023px) {
      font-size: 2rem;
    }

    span {
      color: var(--primary-color);
    }
  }

  h2 {
    text-transform: uppercase;

    @media (max-width: 1023px) {
      font-size: 1.75rem;
    }

    span {
      color: var(--primary-color);
    }
  }

  h3 {
    @media (max-width: 1023px) {
      font-size: 1.5rem;
    }

    span {
      color: var(--primary-color);
    }
  }

  h4 {
    @media (max-width: 1023px) {
      font-size: 1.25rem;
    }
  }

  article {
    h2,
    h2 span {
      font-size: 2rem !important;
      margin: 30px 0 15px;
      font-weight: 600;

      span {
        color: var(--white) !important;
      }
    }

    h3,
    h3 span {
      font-size: 1.5rem !important;
      margin: 30px 0 15px;
      font-weight: 600;

      span {
        color: var(--white) !important;
      }
    }
  }

  footer {
    margin-top: 50px;
    position: relative;

    &::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 1px;
      background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    }
  }
}

/* ============================================================
   @layer layout — UNIQUE TO RED / URBANIST (not shared across themes)
   ============================================================ */
@layer layout {
  .w-100 {
    width: 100%;
  }

  .mobile-column {
    @media screen and (max-width: 991px) {
      flex-direction: column;
    }
  }

  .flex-75 {
    width: calc(70% - 100px);

    @media (min-width: 992px) and (max-width: 1199px) {
      width: calc(65% - 100px);
    }

    @media (max-width: 991px) {
      width: 100%;
    }
  }

  .flex-25 {
    width: 25%;

    @media (min-width: 992px) and (max-width: 1199px) {
      width: 35%;
    }

    @media (max-width: 991px) {
      width: 100%;
    }
  }
}

/* ============================================================
   @layer components — UNIQUE TO RED / URBANIST (not shared across themes)
   ============================================================ */
@layer components {
  .btn {
    width: 100%;
  }

  .btn-icon {
    img {
      -webkit-filter: brightness(6);
      filter: brightness(6);
    }
  }

  .page-content {
    z-index: 1;
    margin-top: 85px;
    position: relative;

    &::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 1px;
      background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    }
  }

  .hero-home {
    background: black;

    .hero-text {
      padding-bottom: 10%;
      gap: 30px;

      @media (min-width: 768px) and (max-width: 1199px) {
        padding-bottom: 18%;
      }
    }
  }

  .scroll-wrapper {
    width: 100%;
    overflow: hidden;
    position: absolute;
    padding: 0;
    bottom: 50px;
    z-index: 2;

    @media screen and (max-width: 1199px) {
      bottom: 20px;
    }

    &::before {
      content: "";
      position: absolute;
      z-index: 2;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      background: -webkit-linear-gradient(
        90deg,
        rgba(0, 0, 0, 1) 5%,
        rgba(0, 0, 0, 0) 25%,
        rgba(0, 0, 0, 0) 75%,
        rgba(0, 0, 0, 1) 95%
      );
      background: -moz-linear-gradient(
        90deg,
        rgba(0, 0, 0, 1) 5%,
        rgba(0, 0, 0, 0) 25%,
        rgba(0, 0, 0, 0) 75%,
        rgba(0, 0, 0, 1) 95%
      );
      background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 1) 5%,
        rgba(0, 0, 0, 0) 25%,
        rgba(0, 0, 0, 0) 75%,
        rgba(0, 0, 0, 1) 95%
      );
      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#000000", endColorstr="#000000", GradientType=1);
    }
  }

  .scroll-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex: 0 0 320px;
    overflow: hidden;
    padding: 20px 24px 20px 30px;
    border: 1px solid var(--dark-primary);
    border-radius: 15px;
    background: #1b00007e;
    box-shadow: 0 0 60px 0 rgba(51, 0, 0, 0.1) inset;
    color: var(--white);
    text-decoration: none;
    isolation: isolate;
    transition:
      transform 180ms ease,
      border-color 180ms ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    @media screen and (max-width: 767px) {
      flex-basis: 280px;
      min-height: 120px;
      padding: 18px 20px;
    }

    &::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.35));
    }

    &:hover,
    &:focus-visible {
      transform: translateY(-4px);
      border-color: var(--white);
    }
  }

  .scroll-card__image {
    width: 90px;
    height: 90px;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
  }

  .scroll-card__label {
    @media screen and (max-width: 767px) {
      font-size: 1rem;
    }
  }

  .scroll-track {
    @media screen and (max-width: 767px) {
      animation-duration: 22s;
    }

    @media (prefers-reduced-motion: reduce) {
      animation-play-state: paused;
    }
  }

  .slider-controls .nav-btn {
    img {
      filter: brightness(6);
      -webkit-filter: brightness(6);
    }
  }

  .slide-button {
    .pic-container {
      img {
        @media screen and (max-width: 767px) {
          min-height: 150px;
          max-height: 150px;
        }
      }
    }
  }

  .hero-subpage {
    padding-block: 60px;
    margin-bottom: 50px;
    background: #330000;
    background: -webkit-linear-gradient(0deg, rgba(51, 0, 0, 1) 0%, rgba(51, 0, 0, 0) 100%);
    background: -moz-linear-gradient(0deg, rgba(51, 0, 0, 1) 0%, rgba(51, 0, 0, 0) 100%);
    background: linear-gradient(0deg, rgba(51, 0, 0, 1) 0%, rgba(51, 0, 0, 0) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#330000", endColorstr="#330000", GradientType=0);

    .container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 50px;

      @media (max-width: 767px) {
        gap: 30px;
      }

      .text-container {
        text-align: center;

        @media (max-width: 991px) {
          width: 100%;
          padding: 30px 0 0;
          max-width: none;
        }

        .label {
          border: none;
          background: none;
          font-size: 24px;
          font-style: normal;
          font-weight: 700;
          text-transform: uppercase;
          padding: 10px 0;
          margin: 0 auto;
        }

        h1 {
          text-transform: capitalize;
          font-weight: 600;

          @media (max-width: 767px) {
            font-size: 30px;
          }
        }

        p {
          color: var(--gray);
          margin-top: 10px;
          letter-spacing: 1px;
          font-weight: 500;
          font-size: 1.125rem;
          font-family: "Urbanist", sans-serif;
        }
      }

      .img-container {
        display: flex;
        gap: 20px;
        width: 100%;

        @media (max-width: 991px) {
          flex-direction: column;
          padding: 0;
        }

        .btnNone {
          width: 100%;
          background: none;
          border: 0px;
          outline: none;
          cursor: pointer;

          &:nth-child(1) .img-box.article {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/articles-games.jpg") center/cover no-repeat;
          }

          &:nth-child(2) .img-box.article {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/playing-game.jpg") center/cover no-repeat;
          }

          &:nth-child(3) .img-box.article {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/articles-review.jpg") center/cover no-repeat;
          }

          &:nth-child(1) .img-box.apps {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/golf.jpg") center/cover no-repeat;
          }

          &:nth-child(2) .img-box.apps {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/ninja.jpg") center/cover no-repeat;
          }

          &:nth-child(3) .img-box.apps {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/spaceship.jpg") center/cover no-repeat;
          }

          &:nth-child(1) .img-box.games {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/games-race.jpg") center/cover no-repeat;
          }

          &:nth-child(2) .img-box.games {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/games-war.jpg") center/cover no-repeat;
          }

          &:nth-child(3) .img-box.games {
            background:
              linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0)),
              url("../images/banners/games-simple.jpg") center/cover no-repeat;
          }

          .img-box {
            height: 380px;
            border-radius: 20px;
            overflow: hidden;
            background-size: cover;
            background-position: center;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-end;
            padding: 20px;
            transition: transform 0.5s ease;

            &:hover {
              transform: scale(1.05);
            }

            @media (max-width: 767px) {
              height: 280px;
            }

            p {
              color: #fff;
              width: 100%;
              text-align: left;
              margin: 0;
              padding: 10px;
              font-size: 1.1rem;
            }
          }
        }
      }

      .label {
        display: flex;
        padding: 5px 20px;
        justify-content: center;
        align-items: center;
        gap: 10px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        color: var(--white);
        max-width: fit-content;
      }

      .btn {
        border: none;
        border-radius: 30px;
        background: var(--primary-color);
        color: var(--white);
        text-align: center;
        font-size: 24px;
        box-sizing: content-box;
        max-width: 170px;
        height: 40px;
        position: relative;
        padding: 6px 5px;
        text-align: center;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        justify-content: center;

        /* border: none;
        border-radius: 30px;
        background: var(--primary-color);
        color: var(--white);
        text-align: center;
        font-size: 24px;
        box-sizing: content-box;
        max-width: 170px;
        height: 40px;
        position: relative;
        padding: 6px 5px;
        text-align: center;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        justify-content: center; */
        img {
          position: absolute;
          top: 50%;
          right: 12px;
          width: 24px;
          height: 24px;
          display: block;
          transform: translateY(-50%);
        }
      }
    }
  }

  .contact-popup {
    @media (max-width: 991px) {
      gap: 50px;
    }
  }

  .single-app {
    @media (max-width: 991px) {
      flex-direction: column;
    }
  }

  .games-list a {
    h3 {
      color: var(--gray);
    }

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

    &:hover {
      color: var(--primary-color);

      .icon-app {
        transform: scale(0.95);
      }
    }
  }

  .game-item .text {
    h3 {
      font-size: 16px;
      line-height: 20px;
      display: -webkit-box;
      /* -webkit-line-clamp: 1;
    /* number of rows */
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
  }

  .article-list {
    .article-item {
      &:hover {
        color: var(--primary-color);
      }
    }
  }

  .filters {
    @media (max-width: 767px) {
      justify-content: center;
    }

    label {
      transition: all 0.5s ease;
      background: 0 0;
      background: rgba(0, 0, 0, 0.1);

      span {
        color: var(--primary-color);
        margin-right: 6px;
      }

      &:hover {
        transform: scale(1.1);
      }
    }

    input[type="radio"]:checked + label,
    &.filters-play input[type="radio"]:checked + label {
      span {
        color: var(--white);
      }
    }
  }

  .mySelection {
    .app-selection .small-text {
      color: var(--light-gray);
    }

    .app-description {
      gap: 3px;

      .btn {
        padding: 0.5rem 1rem;
        font-size: 14px;
        border: 1px solid var(--dark-primary);
        border-radius: var(--border-radius);
        color: var(--primary-color);
        background: transparent;
      }
    }
  }

  .banner-exclusive {
    margin-top: 50px;
    padding: 100px;
    color: var(--white);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;

    @media (max-width: 1023px) {
      padding: 50px 20px;
    }

    .banner-content {
      position: relative;
      z-index: 1;
      background: rgba(28, 3, 3, 0.5);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: var(--border);
      padding: 100px 20px;
      border-radius: var(--border-radius);

      @media (max-width: 1023px) {
        padding: 50px 20px;
      }

      h2 {
        max-width: 640px;
        margin-inline: auto;
      }

      .banner-description {
        font-size: 20px;
        max-width: 720px;
        color: var(--gray);
        margin-inline: auto;

        @media (max-width: 1023px) {
          text-align: center;
          max-width: 100%;
        }
      }
    }

    .video-wrap {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 0;
      filter: brightness(0.7) contrast(1.35) hue-rotate(25deg);
    }
  }

  .footer-wrap {
    .footer-info {
      padding-top: 20px;
      border-top: 1px solid var(--dark-gray);
    }

    .footer-links {
      padding-top: 20px;
      border-top: 1px solid var(--dark-gray);
    }
  }

  .page-title {
    h1 {
      font-size: 2rem;
      font-weight: 600;
    }
  }
}

/* ============================================================
   @layer utilities — UNIQUE TO RED / URBANIST (not shared across themes)
   ============================================================ */
@layer utilities {
  .label {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3rem;
    font-size: 0.8rem;
    padding: 5px 12px;

    span {
      line-height: 1;
      color: var(--primary-color);
      font-weight: 900;
      padding-right: 5px;
    }
  }
}
