/* stylelint-disable max-nesting-depth */

body.template-page-casino-template {
  @media (max-width: 979px) {
    nav.navigation {
      height: 0;

      .mobile-logo { display: none; }
    }

    #main {
      padding-top: 0;
      margin-top: -16px;
    }
  }

  .page-content {
    margin: 8px;

    @media (min-width: 980px) {
      margin: 0;
    }

    .page-updated {
      margin-bottom: 16px;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.3;
      letter-spacing: 0.01em;
    }

    h1 {
      margin: 24px 0 8px;
      font-size: 28px;
      font-weight: 900;
      letter-spacing: -0.7px;

      @media (min-width: 980px) {
        font-size: 32px;
      }
    }

    h2,
    h3 {
      margin: 24px 0 16px;
      font-size: 24px;
      font-weight: 900;
      letter-spacing: -0.7px;

      @media (min-width: 980px) {
        font-size: 28px;
      }
    }
  }

  .block-box {
    padding: 28px;
    color: #13274f;
    border: 1px solid white;
    border-radius: 24px;
  }

  .author-box {
    padding: 28px 24px;
    background: linear-gradient(135deg, #146cd6f5, #4c97e7e6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 12px 24px rgba(18, 113, 255, 0.2);

    @media (min-width: 980px) {
      padding: 32px;
    }

    .author-box__items {
      position: relative;
      display: flex;
      gap: 12px;
      align-items: center;
      padding: 12px 14px;
      background: linear-gradient(135deg, rgba(82, 158, 235, 0.45) 0%, rgba(105, 175, 247, 0.35) 100%);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 20px;

      @media (max-width: 767px) {
        flex-direction: column;
        align-items: flex-start;
      }
      @media (min-width: 980px) {
        gap: 16px;
        padding: 16px 20px;
      }

      .author-avatar {
        flex-shrink: 0;
        
        .author-avatar__image {
          width: 84px;
          height: 84px;
          object-fit: cover;
          border: 2px solid rgba(255, 255, 255, 0.75);
          border-radius: 50%;
        
          @media (min-width: 980px) {
            width: 86px;
            height: 86px;
          }
        }
      }

      .author-box__socials {
        position: absolute;
        top: 16px;
        right: 16px;
        display: flex;
        gap: 8px;
        align-items: center;
  
        @media (min-width: 980px) {
          top: 10px;
          right: 10px;
          gap: 5px;
        }
  
        a {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          width: 32px;
          height: 32px;
          color: #fff;
          background: rgba(255, 255, 255, 0.12);
          border: 1px solid rgba(255, 255, 255, 0.2);
          border-radius: 50%;
          transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  
          &:hover {
            background: rgba(255, 255, 255, 0.22);
            border-color: rgba(255, 255, 255, 0.4);
            transform: translateY(-2px);
          }
  
          svg {
            width: 16px;
            height: 16px;
          }
        }
      }

      .author-description {
        color: #fff;
      }

      .author-description__subheading {
        margin-bottom: 4px;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.08em;

        @media (min-width: 980px) {
          margin-bottom: 3px;
          font-size: 14px;
        }
      }

      .author-description__heading {
        margin: 0 0 6px;
        font-size: 28px;
        font-weight: 700;
        line-height: 1.05;
        color: #fff;
        letter-spacing: -0.01em;

        @media (min-width: 980px) {
          font-size: 32px;
        }
      }

      .author-description__text {
        max-width: 720px;
        font-size: 15px;
        font-weight: 500;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.96);

        @media (min-width: 980px) {
          max-width: 760px;
          font-size: 16px;
        }
      }
    }
  }

  .casino-list {
    margin: 4px 0 20px;

    @media (min-width: 768px) {
      margin: 16px 0 32px;
    }

    .casino-list-type-new {
      display: grid;
      gap: 20px;
      padding: 0;
      margin: 0;
      list-style: none;

      .item {
        position: relative;
        overflow: hidden;
        background: #fff;
        border: 1px solid #b8d7ff;
        border-radius: 28px;
        box-shadow: 0 24px 46px rgba(18, 113, 255, 0.22);
        backdrop-filter: blur(2px);
        transition: transform 0.2s ease, box-shadow 0.2s ease;

        &:hover {
          box-shadow: 0 28px 54px rgba(18, 113, 255, 0.28);
          transform: translateY(-4px) scale(1.004);

          .cta-shimmer {
            transform: skewX(-20deg) translateX(320%) !important;
          }
        }

        /* MOBILE LAYOUT */
        .mobile-layout {
          position: relative;
          display: block;
          min-height: 280px;
          padding: 20px;

          @media (min-width: 768px) {
            display: none;
          }

          .mobile-index {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 90px;
            min-height: 118px;
            overflow: hidden;
            background: linear-gradient(to bottom right, #2a9bff 0%, #1577ff 50%, #0b47dc 100%);
            border-radius: 28px 0 0 28px;

            .mobile-index-decorations {
              position: absolute;
              top: 0;
              right: 0;
              bottom: 0;
              left: 0;
              pointer-events: none;
              opacity: 0.45;

              .mobile-index-line {
                position: absolute;
                height: 2px;

                &.mobile-index-line-1 {
                  top: 24px;
                  left: -22px;
                  width: 160px;
                  background: rgba(255, 255, 255, 0.6);
                  transform: rotate(135deg);
                }

                &.mobile-index-line-2 {
                  top: -6px;
                  left: 16px;
                  width: 176px;
                  background: rgba(255, 255, 255, 0.35);
                  transform: rotate(135deg);
                }
              }

              .mobile-index-accent {
                position: absolute;
                bottom: 12px;
                left: 16px;
                width: 36px;
                height: 3px;
                background: rgba(103, 232, 249, 0.9);
                border-radius: 9999px;
                transform: rotate(130deg);
              }

              .mobile-index-sparkle {
                position: absolute;
                right: 12px;
                bottom: 12px;

                svg {
                  width: 16px;
                  height: 16px;
                  color: rgba(255, 255, 255, 0.75);
                }
              }
            }

            .mobile-index-glow {
              position: absolute;
              top: 50%;
              left: 8px;
              width: 96px;
              height: 96px;
              background: rgba(47, 146, 255, 0.42);
              border-radius: 9999px;
              filter: blur(40px);
              transform: translateY(-50%);
            }

            .mobile-index-number {
              position: relative;
              z-index: 1;
              font-size: 54px;
              font-weight: 900;
              line-height: 1;
              color: #fff;
              letter-spacing: -0.06em;
              filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.18));
            }
          }

          .mobile-content {
            display: flex;
            flex-direction: column;
            gap: 16px;
            align-items: flex-start;
            padding-left: 16px;
            margin-left: 90px;

            .mobile-logo {
              position: relative;
              display: flex;
              align-items: center;
              justify-content: center;

              .mobile-logo-decorations {
                position: absolute;
                top: 0;
                right: 0;
                bottom: 0;
                left: 0;
                pointer-events: none;
                opacity: 0.8;

                .mobile-logo-line {
                  position: absolute;
                  height: 1px;
                  background: rgba(42, 155, 255, 0.25);

                  &.mobile-logo-line-1 {
                    top: 18%;
                    left: 12%;
                    width: 320px;
                    transform: rotate(135deg);
                  }

                  &.mobile-logo-line-2 {
                    top: 28%;
                    left: 26%;
                    width: 360px;
                    transform: rotate(135deg);
                  }

                  &.mobile-logo-line-3 {
                    top: 16%;
                    left: 4%;
                    width: 360px;
                    transform: rotate(135deg);
                  }
                }
              }

              a {
                position: relative;
                z-index: 1;
                display: inline-flex;
                align-items: center;
                justify-content: center;
              }

              img {
                width: auto;
                max-width: 180px;
                height: auto;
                max-height: 60px;
              }
            }

            .mobile-offer {
              font-size: 18px;
              font-weight: 700;
              line-height: 1.3;
              color: #13274f;
            }

            .mobile-cta {
              position: relative;
              display: inline-flex;
              gap: 8px;
              align-items: center;
              justify-content: center;
              width: 100%;
              min-height: 56px;
              padding: 0;
              overflow: hidden;
              font-size: 18px;
              font-weight: 700;
              line-height: 1;
              color: #fff;
              text-decoration: none;
              background: linear-gradient(135deg, #2a9bff 0%, #1577ff 50%, #126cff 100%);
              border: 0;
              border-radius: 18px;
              box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(12, 64, 138, 0.10);
              transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;

              .cta-shimmer {
                position: absolute;
                top: 0;
                bottom: 0;
                left: -22%;
                width: 34%;
                pointer-events: none;
                background: rgba(255, 255, 255, 0.2);
                transform: skewX(-20deg);
                transition: transform 0.7s ease;
              }

              &:hover {
                background: linear-gradient(135deg, #3095f8 0%, #1f84f2 50%, #0d60db 100%);
                box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 12px 30px rgba(8, 49, 112, 0.10);
                transform: translateY(-2px);
              }

              svg {
                position: relative;
                z-index: 1;
                flex-shrink: 0;
                width: 18px;
                height: 18px;
              }
            }

            .mobile-rating {
              display: grid;
              grid-template-columns: 1fr;
              gap: 8px;
              align-items: center;

              .mobile-rating-stars {
                display: flex;
                gap: 8px;
                align-items: center;
                line-height: 1;

                .mobile-stars {
                  display: block;

                  .star-rating-svg {
                    --star-width: 18px;
                    position: relative;
                    display: inline-block;
                    width: calc(var(--star-width) * 5);
                    height: var(--star-width);
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f1b90a' fill-opacity='0.3' d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E");
                    background-repeat: repeat-x;
                    background-size: var(--star-width) var(--star-width);

                    span {
                      position: absolute;
                      top: 0;
                      left: 0;
                      height: 100%;
                      overflow: hidden;
                      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f1b90a' d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E");
                      background-repeat: repeat-x;
                      background-size: var(--star-width) var(--star-width);
                    }
                  }
                }

                .mobile-score {
                  font-size: 14px;
                  font-weight: 700;
                  color: #13274f;
                }
              }

              .mobile-more-info {
                display: inline-flex;
                gap: 6px;
                align-items: center;
                padding: 0;
                font-size: 13px;
                font-weight: 700;
                color: #24589f;
                text-decoration: none;
                cursor: pointer;
                transition: color 0.2s ease;

                &:hover {
                  color: #1463c4;
                }

                &.btn-fd-on {
                  svg {
                    transform: rotate(180deg);
                  }
                }

                svg {
                  width: 13px;
                  height: 13px;
                  transition: transform 0.2s ease;
                }
              }
            }
          }
        }

        /* DESKTOP LAYOUT */
        .desktop-layout {
          position: relative;
          display: none;
          grid-template-columns: 104px minmax(150px, 200px) minmax(240px, 1fr) 145px 165px; 
          gap: 0;
          align-items: stretch;
          min-height: 118px;
          background-color: #eaf3ff;

          @media (min-width: 768px) {
            display: grid;
          }

          .desktop-index {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 118px;
            overflow: hidden;
            background: linear-gradient(to bottom right, #2a9bff 0%, #1577ff 50%, #0b47dc 100%);
            border-radius: 28px 0 0 28px;

            .desktop-index-decorations {
              position: absolute;
              top: 0;
              right: 0;
              bottom: 0;
              left: 0;
              pointer-events: none;
              opacity: 0.45;

              .desktop-index-line {
                position: absolute;
                height: 2px;

                &.desktop-index-line-1 {
                  top: 24px;
                  left: -22px;
                  width: 160px;
                  background: rgba(255, 255, 255, 0.6);
                  transform: rotate(135deg);
                }

                &.desktop-index-line-2 {
                  top: -6px;
                  left: 16px;
                  width: 176px;
                  background: rgba(255, 255, 255, 0.35);
                  transform: rotate(135deg);
                }
              }

              .desktop-index-accent {
                position: absolute;
                bottom: 12px;
                left: 16px;
                width: 36px;
                height: 3px;
                background: rgba(103, 232, 249, 0.9);
                border-radius: 9999px;
                transform: rotate(130deg);
              }

              .desktop-index-sparkle {
                position: absolute;
                right: 12px;
                bottom: 12px;

                svg {
                  width: 16px;
                  height: 16px;
                  color: rgba(255, 255, 255, 0.75);
                }
              }
            }

            .desktop-index-number {
              position: relative;
              z-index: 1;
              font-size: 74px;
              font-weight: 900;
              line-height: 1;
              color: #fff;
              letter-spacing: -0.06em;
              filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.18));
            }
          }

          .desktop-logo {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding-left: 10px;
            overflow: hidden;
            background: linear-gradient(90deg, #f3f8ff 0%, #eaf3ff 100%);
            border-right: 1px solid rgba(255, 255, 255, 0.55);

            .desktop-logo-decorations {
              position: absolute;
              top: 0;
              right: 0;
              bottom: 0;
              left: 0;
              pointer-events: none;
              opacity: 0.8;

              .desktop-logo-line {
                position: absolute;
                height: 2px;
                background: rgba(42, 155, 255, 0.25);

                &.desktop-logo-line-1 {
                  top: 40px;
                  left: -40px;
                  width: 176px;
                  transform: matrix(-0.707107, 0.707107, -0.707107, -0.707107, 0, 0);
                }

                &.desktop-logo-line-2 {
                  top: -10px;
                  left: 24px;
                  width: 176px;
                  transform: matrix(-0.707107, 0.707107, -0.707107, -0.707107, 0, 0);
                }
              }
            }

            a {
              position: relative;
              z-index: 1;
              display: inline-flex;
              align-items: center;
              justify-content: center;
            }

            img {
              width: auto;
              max-width: 100%;
              height: auto;
              max-height: 60px;
            }
          }

          .desktop-offer {
            display: flex;
            align-items: center;
            padding: 16px;
            font-size: 17px;
            font-weight: 900;
            line-height: 1.3;
            color: #121a46;
            background: linear-gradient(90deg, #f3f8ff 0%, #eaf3ff 100%);
            border-right: 1px solid #e4edf8;

            @media (min-width: 980px) {
              font-size: 19px;
            }
          }

          .desktop-meta {
            display: flex;
            flex-direction: column;
            gap: 6px;
            justify-content: center;
            padding: 16px 18px;
            background: linear-gradient(270deg, #f3f8ff 0%, #eaf3ff 100%);
            border-right: 1px solid #e4edf8;

            .desktop-casino-name {
              font-size: 13px;
              font-weight: 900;
              line-height: 1.2;
              color: #13274f;
              text-transform: uppercase;
            }

            .desktop-rating {
              display: flex;

              .desktop-rating-stars {
                display: inline-flex;
                gap: 8px;
                align-items: center;
                line-height: 1;

                .desktop-stars {
                  display: block;

                  .star-rating-svg {
                    --star-width: 18px;
                    position: relative;
                    display: inline-block;
                    width: calc(var(--star-width) * 5);
                    height: var(--star-width);
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f1b90a' fill-opacity='0.3' d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E");
                    background-repeat: repeat-x;
                    background-size: var(--star-width) var(--star-width);

                    span {
                      position: absolute;
                      top: 0;
                      left: 0;
                      height: 100%;
                      overflow: hidden;
                      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f1b90a' d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E");
                      background-repeat: repeat-x;
                      background-size: var(--star-width) var(--star-width);
                    }
                  }
                }

                .desktop-score {
                  font-size: 12px;
                  font-weight: 600;
                  color: #13274f;
                  letter-spacing: -0.75px;
                }
              }
            }
          }

          .desktop-cta {
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: center;
            justify-content: center;
            padding: 16px 18px;
            background: linear-gradient(90deg, #f3f8ff 0%, #eaf3ff 100%);

            .desktop-more-info {
              display: inline-flex;
              gap: 6px;
              align-items: center;
              padding: 0;
              font-size: 11px;
              font-weight: 700;
              color: #24589f;
              white-space: nowrap;
              text-decoration: none;
              cursor: pointer;
              transition: color 0.2s ease;

              &:hover {
                color: #1463c4;
              }

              &.btn-fd-on {
                svg {
                  transform: rotate(180deg);
                }
              }

              svg {
                width: 11px;
                height: 11px;
                transition: transform 0.2s ease;
              }
            }

            .desktop-cta-btn {
              position: relative;
              display: inline-flex;
              gap: 6px;
              align-items: center;
              justify-content: center;
              width: 100%;
              min-height: 54px;
              padding: 0;
              overflow: hidden;
              font-size: 17px;
              font-weight: 700;
              line-height: 1;
              color: #fff;
              text-decoration: none;
              background: linear-gradient(135deg, #2a9bff 0%, #1577ff 50%, #126cff 100%);
              border: 0;
              border-radius: 20px;
              box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(12, 64, 138, 0.10);
              transition: background 0.2s ease, box-shadow 0.2s ease;

              .cta-shimmer {
                position: absolute;
                top: 0;
                bottom: 0;
                left: -22%;
                width: 34%;
                pointer-events: none;
                background: rgba(255, 255, 255, 0.2);
                transform: skewX(-20deg);
                transition: transform 0.7s ease;
              }

              &:hover {
                background: linear-gradient(135deg, #3095f8 0%, #1f84f2 50%, #0d60db 100%);
                box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 12px 30px rgba(8, 49, 112, 0.10);
              }

              svg {
                position: relative;
                z-index: 1;
                flex-shrink: 0;
                width: 18px;
                height: 18px;
              }
            }
          }
        }

        /* ADDITIONAL INFO SECTION */
        .additional-info {
          max-height: 0;
          overflow: hidden;
          background: #fff;
          transition: max-height 0.3s ease;

          &.active {
            max-height: 2000px;
          }

          .additional-info-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
            padding: 10px;
            background: linear-gradient(1deg, #f3f8ff 0%, #eaf3ff 100%);

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

            .col {
              padding: 18px 16px;
              background: #fff;
              border: 1px solid #e5ebf4;
              border-radius: 22px;

              @media (min-width: 768px) {
                padding: 20px 18px;
              }

              .column-title {
                margin-bottom: 14px;
                font-size: 14px;
                font-weight: 700;
                color: #24589f;
                text-transform: uppercase;
                letter-spacing: 0.8px;
              }

              .entry {
                display: grid;
                grid-template-columns: 20px minmax(0, 1fr) auto;
                gap: 10px;
                align-items: center;
                padding: 7px 0;
                font-size: 13px;
                line-height: 1.3;
                color: #15396b;

                .entry-icon {
                  display: inline-flex;
                  align-items: center;
                  justify-content: center;
                  width: 20px;
                  height: 20px;
                  color: #2d67da;

                  svg {
                    width: 20px;
                    height: 20px;
                  }
                }

                span:last-child {
                  font-weight: 600;
                  color: #15396b;
                }
              }

              &.col-full {
                grid-column: 1 / -1;
                border-top: 1px solid rgba(173, 214, 255, 0.28);

                .btn {
                  width: 100%;
                  min-height: 52px;
                  padding: 14px 20px;
                  margin-top: 6px;
                  font-size: 17px;
                  font-weight: 700;
                  color: #fff;
                  text-transform: uppercase;
                  text-decoration: none;
                  background: linear-gradient(135deg, #2a9bff 0%, #126cff 100%);
                  border: 0;
                  border-radius: 24px;
                  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
                  transition: all 0.2s ease;

                  &:hover {
                    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
                    transform: translateY(-2px);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
