/* --- CSS Variables --- */
:root {
  /* Colors */
  --color-bg-page: #EDDDBC;
  --color-bg-card: #EDDDBC;
  --color-bg-footer: #6D5139;
  --color-text-primary: #231F20;
  --color-text-secondary: #6D5139;
  --color-accent: #286585;
  --color-button: #A42522;
  --color-button-hover: #8B1E1B;
  --color-white: #FFFFFF;
  --color-white-60: rgba(255, 255, 255, 0.6);
  --color-white-85: rgba(255, 255, 255, 0.85);
  --color-border-light: rgba(255, 255, 255, 0.2);
  --color-black-90: rgba(0, 0, 0, 0.9);

  
  /* Typography - based on 1rem = 16px */
  --text-xs: 0.9rem;    
  --text-sm: 0.95rem;    
  --text-base: 1rem;    
  --text-md: 1.05rem;   
  --text-lg: 1.1rem;    
  --text-xl: 1.2rem;     
  --text-2xl: 1.3rem;     
  
  /* Spacing */
  --card-padding: 40px;
  
  /* Border Radius */
  --radius-main: 20px;
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

a {
  color: var(--color-button);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
}

a:hover {
  color: var(--color-button-hover);
  text-decoration: none;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--color-text-primary);
  line-height: 1.4;
  min-height: 100vh;
  background: var(--color-bg-page);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

input, select, button {
  font-family: inherit;
  color: inherit;
}

/* --- Page --- */
/* Базовые стили страницы */
.page {
  min-height: 100vh;
  background-color: var(--color-bg-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--card-padding);
  position: relative;
  isolation: isolate;
}

/* Псевдоэлемент для фонового изображения */
.page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/public/images/victory/bg-curtain.webp');
  background-size: 100% 100%;
  background-position: top center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  z-index: -1;
  pointer-events: none;
}

/* Анимация появления при загрузке страницы */
.page.loaded::before {
  opacity: 1;
}

/* Фолбэк для старых браузеров */
.page {
  background-image: url('/public/images/victory/bg-curtain.webp');
  background-size: 100% 100%;
  background-position: top center;
  background-repeat: no-repeat;
}

@supports (isolation: isolate) {
  .page {
    background-image: none;
  }
}

/* --- Card Wrapper --- */
.card-wrap {
  max-width: 1612px;
  width: 100%;
  border-radius: var(--radius-main);
  overflow: hidden;
  border: 2px solid #c8b99c;
  box-shadow: -8px 0 12px -4px rgba(200, 185, 156, 0.5);
}

/* --- Card --- */
.card {
  background-color: var(--color-bg-card);
  padding: var(--card-padding);
}

/* --- Registration Section --- */
.registration-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 20px;
  margin-bottom: 40px;
}

.registration-part {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.registration-part:first-child {
  width: 30%;
}

.registration-part:last-child {
  width: 70%;
}

.header-logo-wrap {
  width: 160px;
}

.header-logo {
  width: 100%;
  height: auto;
}

.divider {
  width: 100%;
  height: 3px;
  background: var(--color-accent);
}

.header-title,
.header-subtitle {
  max-width: 100%;
  height: auto;
}

/* --- Form --- */
.form {
  display: flex;
  flex-direction: column;
}

/* --- Form Sections --- */
.form-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 40px;
  max-height: none !important;
}


.form-section:last-of-type {
  margin-bottom: 0;
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* --- Grid Rows --- */
.row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.row:last-child {
  margin-bottom: 0;
}

.row--2 {
  grid-template-columns: 1fr 1fr;
}

.row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.row--4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* --- Input Fields --- */
.field {
  position: relative;
  width: 100%;
}

.input {
  width: 100%;
  height: 64px;
  padding: 0 20px;
  background: var(--color-white-60);
  border: none;
  border-radius: 10px;
  font-size: var(--text-md);
  outline: none;
  transition: background-color 0.2s, padding 0.25s;
}

.input::placeholder {
  color: transparent;
}

.input:focus {
  background: var(--color-white-85);
}

.input:focus,
.input:not(:placeholder-shown) {
  padding-top: 20px;
  padding-bottom: 0;
}

.field__label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  pointer-events: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.input:focus + .field__label,
.input:not(:placeholder-shown) + .field__label {
  top: 10px;
  transform: translateY(0);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

/* --- Select --- */
.select-wrap {
  position: relative;
  width: 100%;
}

.input--select {
  width: 100%;
  height: 64px;
  padding: 0 20px;
  background: var(--color-white); /* Изменено с var(--color-white-60) на var(--color-white) */
  border: none;
  border-radius: 10px;
  font-size: var(--text-md);
  outline: none;
  transition: background-color 0.2s, padding 0.25s;
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  color: var(--color-text-primary);
  background-image: none;
}

.input--select option {
  color: #231F20;
  background: #FFFFFF;
}

.input--select {
  color: #231F20 !important;
}

.input--select option {
  color: #231F20 !important;
  background: #FFFFFF !important;
}

.input--select option:checked {
  color: #231F20 !important;
  background: #FFFFFF !important;
}

.input--select:focus {
  color: #231F20 !important;
}

.select-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: auto;
  pointer-events: none;
  fill: var(--color-text-primary);
}

/* --- Upload Boxes --- */
.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 240px;
  background: var(--color-white-60);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
  padding: 15px;
}

.upload:hover {
  background: var(--color-white-85);
}

.upload--wide {
  height: 200px;
}

.upload__icon {
  width: 80px;
  height: auto;
  margin-bottom: 10px;
}

.upload__title {
  font-size: var(--text-md);
  line-height: 1.3;
}

.upload__title {
  font-size: var(--text-md);
  line-height: 1.3;
  word-break: break-word; /* Добавь эту строчку */
  overflow-wrap: break-word; /* Добавь эту строчку */
  max-width: 100%; /* Добавь эту строчку */
}

.upload__format {
  font-size: var(--text-sm);
  opacity: 0.6;
  line-height: 1.3;
}

/* --- Checkbox --- */
.checkbox {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  height: 64px;
  padding: 0 20px;
  background: var(--color-white-60);
  border-radius: 10px;
  margin-bottom: 32px;
}

.checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox__box {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--color-white);
  border: 2px solid var(--color-text-primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox__input:checked ~ .checkbox__box {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.checkbox__input:checked ~ .checkbox__box::after {
  content: '';
  width: 30%;
  height: 55%;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -10%;
}

.checkbox__label {
  font-size: var(--text-md);
}

/* --- Consent Text --- */
.consent-text {
  font-size: var(--text-base);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* --- Submit Button --- */
.submit {
  display: block;
  width: 400px;
  height: 64px;
  margin: 48px auto 0;
  background: var(--color-button);
  color: var(--color-white);
  border: none;
  border-radius: 10px;
  font-size: var(--text-lg);
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.submit:disabled:hover {
  transform: none;
  box-shadow: none;
}

.submit:hover {
  background: var(--color-button-hover);
}

.submit:active {
  transform: scale(0.98);
}

/* --- Disclaimer --- */
.disclaimer {
  text-align: center;
  font-size: var(--text-sm);
  opacity: 0.6;
  margin-top: 32px;
}

/* --- Sponsors Footer --- */
.sponsors {
  background: var(--color-bg-footer);
}

.sponsors__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.sponsors__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 11px 20px;
  border-right: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.sponsors__cell:nth-child(4n) {
  border-right: none;
}

.sponsors__cell:nth-child(n+5) {
  border-bottom: none;
}

.sponsors__logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

 header {
    position: absolute !important; 
    padding: 20px !important;
    padding-top: 70px !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  .burger-menu {
    color:var(--color-bg-footer) !important;
  }


  
.success-screen {
    padding-top: 50px;
    display: none;
    text-align: center;
    width: 100%;

  overflow: hidden;
}

.success-screen h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var( --color-button);
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  animation: slideDownFade 0.5s ease-out;
  transform: translateY(0);
}

.success-screen p {
  font-size: 2rem;
  color: var( --color-button);
  margin-bottom: 0;
  font-family: 'Inter', sans-serif;
  animation: slideDownFade 0.5s ease-out 0.1s both;
  transform: translateY(0);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tank-footer {
  width: 100%;
  margin-top: 0;
  line-height: 0;
  background: transparent;
  overflow: hidden;
}

.tank-footer img {
  width: 100%;
  height: auto;
  display: block;
  animation: slideUpFade 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(0);
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
  


/* --- Responsive --- */
@media (max-width: 1200px) {
  .row--3, .row--4 {
    grid-template-columns: 1fr 1fr;
  }

  
  .row--3 > :last-child {
    grid-column: 1 / -1;
  }
  
  .submit {
    width: 300px;
  }

   header {
    padding-top: 70px !important;
  }
}


@media (max-width: 768px) {
 header {
    padding-top: 50px !important;
  }
}

@media (max-width: 640px) {

  .page {
    padding: 20px;
  }

  .card {
    padding: 20px;
  }
  
  .registration-section {
    flex-direction: column;
    gap: 20px;
  }
  
  .registration-part,
  .registration-part:first-child,
  .registration-part:last-child {
    width: 100%;
  }
  
  .header-logo-wrap {
    width: 100px;
    margin: 0 auto;
  }
  
  .row--2,
  .row--3, 
  .row--4 {
    grid-template-columns: 1fr;
  }
  

  
  .submit {
    width: 100%;
  }
  
  .sponsors__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 1fr);
  }
  
  .sponsors__cell:nth-child(4n) {
    border-right: 1px solid var(--color-border-light);
  }
  
  .sponsors__cell:nth-child(2n) {
    border-right: none;
  }
  
  .sponsors__cell:nth-child(n+5) {
    border-bottom: 1px solid var(--color-border-light);
  }
  
  .sponsors__cell:nth-child(n+7) {
    border-bottom: none;
  }
}