:root {
  /* Основные цвета из Tailwind */
  --white: #ffffff;
  --gray-alpha: #eadaff07;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Оранжевые цвета */
  --orange-500: #f97316;
  --orange-600: #ea580c;
  
  /* Черный/темные цвета */
  --black: #000000;
  --dark-custom: #231306;
  
  /* Прозрачности */
  --black-40: rgba(0, 0, 0, 0.4);
  --black-50: rgba(0, 0, 0, 0.5);
  --black-70: rgba(0, 0, 0, 0.7);
  
  /* Дополнительные цвета из проекта */
  --orange-primary: #F16310;
  --orange-hover: #E55A0D;
  --orange-light: #ffedd5;
  --text-orange: #F16310;
}

/* Переопределение Tailwind классов с CSS variables */
.bg-white {
  background-color: var(--white) !important;
}

.bg-gray-300 {
  background-color: var(--gray-300) !important;
}

.bg-gray-50 {
  background-color: var(--gray-200) !important;
}

.bg-gray-900 {
  background-color: var(--gray-900) !important;
}

.bg-orange-500 {
  background-color: var(--orange-500) !important;
}

.bg-orange-50 {
  background-color: var(--orange-light) !important;
}

.bg-black {
  background-color: var(--black) !important;
}

/* Text colors */
.text-white {
  color: var(--white) !important;
}

.text-gray-200 {
  color: var(--gray-200) !important;
}

.text-gray-400 {
  color: var(--gray-400) !important;
}

.text-gray-500 {
  color: var(--gray-500) !important;
}

.text-gray-600 {
  color: var(--gray-600) !important;
}

.text-gray-700 {
  color: var(--gray-700) !important;
}

.text-gray-800 {
  color: var(--gray-800) !important;
}

.text-gray-900 {
  color: var(--gray-900) !important;
}

.text-orange-500 {
  color: var(--orange-500) !important;
}

.text-black {
  color: var(--black) !important;
}

/* Border colors */
.border-gray-200 {
  border-color: var(--gray-200) !important;
}

.border-gray-300 {
  border-color: var(--gray-300) !important;
}

.border-orange-500 {
  border-color: var(--orange-500) !important;
}

.border-\[\#231306\] {
  border-color: var(--dark-custom) !important;
}

/* Hover states */
.hover\:bg-orange-600:hover {
  background-color: var(--orange-hover) !important;
}

.hover\:bg-gray-300:hover {
  background-color: var(--gray-300) !important;
}

.hover\:bg-gray-800:hover {
  background-color: var(--gray-800) !important;
}

.hover\:text-orange-600:hover {
  color: var(--orange-hover) !important;
}

/* Opacity utilities */
.bg-black\/40 {
  background-color: var(--black-40) !important;
}

.bg-black\/50 {
  background-color: var(--black-50) !important;
}

.bg-black\/70 {
  background-color: var(--black-70) !important;
}

.text-white\/60 {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Specific project colors */
.bg-\[\#231306\] {
  background-color: var(--dark-custom) !important;
}

.text-\[\#231306\] {
  color: var(--dark-custom) !important;
}

.text-\[\#F16310\] {
  color: var(--orange-primary) !important;
}

.bg-\[\#F16310\] {
  background-color: var(--orange-primary) !important;
}

.gradient {
  color: transparent !important;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(180deg, var(--white), var(--white),  var(--gray-alpha));
}

.language-switcher {
    position: relative;
    display: inline-block;
    height: 28px;
}

#language-btn {
  height: 100%;
}

@media (min-width: 1024px) {
  .language-switcher {
      height: 38px;
  }
}

.language-icon img {
    height: 32px;
    width: 32px;
}

.language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  min-width: 120px;
  z-index: 30;
}

.language-dropdown.show {
  display: block;
}

.grid-container{
  position: relative;
}

.grid-absolute-bg{
  position: absolute;
  left:0;
  top:150px;
  @media(max-width: 992px){
    z-index: -1;
    top:-130px;
    svg{
      width: 100%;
    }
  }
}
.grid-title{
  font-weight: 400;
  letter-spacing: -0.07em;
  color: rgba(255, 255, 255, 0.6);
}
.grid-block {
  display: grid;
  grid-template-columns: repeat(3, calc(11px + 12dvh));
  grid-template-rows: repeat(5, calc(11px + 12dvh));
  gap: 0px 15px;
  position: relative;
  @media(max-width: 992px){
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px 5px;
  }
}

.col-4-int{
  flex: 0 0 auto;
  width: 33.33333333%;
  @media(max-width: 992px){
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
  }
}

.item {
    border-radius: calc(14px + 3dvh);
    width: calc(24px + 11dvh);
    height: calc(24px + 11dvh);
}

.item .absolute-text {
    bottom: calc(-20px - 1.8dvh);
    font-size: calc(1px + 1.8dvh);
}

.item {
  background: #03000845;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  backdrop-filter: blur(3px);
  transition: .3s ease all;

  @media(max-width: 768px) {
        border-radius: calc(12px + 1.5dvh);
        width: calc(70px + 1dvw + 1dvh);
        height: calc(70px + 1dvw + 1dvh);
        margin: 0 5px; /* добавляем горизонтальные отступы */
    }
}

.item svg {
    @media(max-width: 768px) {
        width: calc(14px + 1.5dvh);
        height: calc(14px + 1.5dvh);
    }
}



#services .col-4-int {
    width: calc(14px + 11dvh);
    height: calc(14px + 11dvh);
    margin-bottom: 0px;
}

.item:hover{
  transform: translateY(-10px);
}

.item svg {
    width: calc(14px + 3dvh);
    height: calc(14px + 3dvh);
    stroke: white;
    fill: none;
    stroke-width: 2;

    @media(max-width: 992px){
        width: calc(16px + 2dvw + 1dvh);
        height: calc(16px + 2dvw + 1dvh);
    }
}

.dev     { grid-column: 1; grid-row: 1; }
.design  { grid-column: 2; grid-row: 2; }
.analytics { grid-column: 3; grid-row: 3; }
.testing { grid-column: 2; grid-row: 4; }
.extra   { grid-column: 1; grid-row: 5; }


.absolute-text{
  color: white;
  position: absolute;
  bottom: -32px;
  left:0;

  text-align: center;
  width: 100%;
  font-size: clamp(16px, 1.4dvw, 24px);
  @media(max-width: 992px){
    bottom: calc(-16px - 2dvw);
  }
}

footer {
  color: #fff;
}


/* Анимации для попапа */
.fadeIn {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fadeIn.show {
    opacity: 1;
    transform: translateY(0);
}

.fadeOut {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fadeOut.hide {
    opacity: 0;
    transform: translateY(10px);
}

.popup-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-backdrop.show {
    opacity: 1;
}

.popup-content {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.popup-content.show {
    transform: scale(1);
    opacity: 1;
}

#main-screen, #main-screen > div {
    height: 100dvh;
    overflow: hidden;
}

#main-screen .lang-option, #main-screen .lang-option:hover {
    border-radius: 8px !important;
}

#main-subtext {
    position: absolute;
    bottom: calc(14px + 2dvh);
}

#cases-grid > div {
    overflow: hidden;
}

#cases-grid > div img {
    transition: all .3s;
}

/* Эффект при наведении и при тапе (через фокус) */
#cases-grid > div:hover img,
#cases-grid > div:active img,
#cases-grid > div:focus img {
    scale: 1.05;
}
.faq-item.active .faq-question {
    color: #FF8904; /* orange-500 */
}

.faq-item.active .faq-arrow {
    stroke: #FF8904;
}

.faq-question {
    color: #374151; /* gray-700 */
    transition: color 0.3s ease;
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-in-out;
    padding-top: 0;
    padding-bottom: 0;
}

.faq-answer > p {
    overflow: hidden;
    min-height: 0;
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
    padding-top: 0;
    padding-bottom: 1rem;
}

.faq-arrow {
    transition: transform 0.3s ease-in-out;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-item.active .faq-question {
    color: #FF8904;
}