/* ================== Hero Section Styles ================== */

/* Hero full width - override any conflicting styles */
.uv-hero.alignfull,
.wp-block-group.alignfull.uv-hero,
.wp-block-group.alignfull.uv-hero.uv-section {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Override any section alignfull styles specifically for hero */
.uv-hero.alignfull .is-layout-constrained,
.wp-block-group.alignfull.uv-hero .is-layout-constrained {
  max-width: none !important;
  width: 100% !important;
  margin-inline: 0 !important;
  box-sizing: border-box;
}

/* Override any section alignfull styles for hero */
.uv-hero.alignfull .uv-hero-inner {
  padding-inline: 24px !important;
  max-width: 1200px !important;
}

@media (max-width: 1200px) {
  .uv-hero.alignfull .uv-hero-inner {
    padding-inline: 20px !important;
  }
}

@media (max-width: 768px) {
  .uv-hero.alignfull .uv-hero-inner {
    padding-inline: 16px !important;
  }
}

/* Override mobile.css styles for full width */
@media (min-width: 360px) and (max-width: 419px) {
  .uv-hero.alignfull {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (min-width: 360px) and (max-width: 375px) {
  .uv-hero.alignfull {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (min-width: 376px) and (max-width: 419px) {
  .uv-hero.alignfull {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Универсальный контейнер: совпадение краёв на 1366/1920 */
.uv-container{ 
  width: min(1200px, 92vw); 
  margin: 0 auto; 
  padding: 0 12px; 
}

/* Отступы и типографика секции */
.uv-section{ 
  padding: clamp(32px, 5vw, 72px) 0; 
}

.uv-hero-title{ 
  font-size: clamp(28px, 4vw, 44px); 
  line-height: 1.12; 
  margin: 0 0 10px; 
}

.uv-hero-description{ 
  font-size: clamp(16px, 2vw, 18px); 
  opacity: .9; 
}

/* Кнопки одинаковые на 1366/1920 */
.uv-hero-buttons .uv-glass-btn{ 
  height: 44px; 
  padding: 0 20px; 
  font-size: clamp(14px, 1.6vw, 16px); 
  font-weight: 600; 
}

/* Сетка геро */
.uv-hero-inner .wp-block-columns{ 
  gap: 24px; 
}

@media (max-width: 1200px){
  .uv-hero-content, .uv-hero-right{ 
    flex-basis: 100% !important; 
  }
  .uv-hero-photo{ 
    max-width: 520px; 
    margin: 0 auto; 
    display: block; 
  }
}

/* Фон за фото, чтобы было «стекло»/свечение при желании */
.uv-hero-photo-container{ 
  position: relative; 
}

.uv-photo-background{
  position: absolute; 
  inset: -24px -16px -16px -24px;
  border-radius: 24px; 
  filter: blur(20px); 
  opacity: .35;
  background: radial-gradient(60% 60% at 65% 35%, rgba(124,58,237,.45), transparent 60%);
  pointer-events: none;
}

/* Hero variables */
:root {
  --uv-hero-max: 1200px;
  --uv-hero-gutter: 24px;
  --top-gap: 0px;
}

/* Hero main container */
.uv-hero { 
  padding: clamp(40px, 8vw, 120px) 0; 
  position: relative; 
  overflow: visible;
}

.uv-hero-inner { 
  max-width: var(--uv-hero-max); 
  margin-inline: auto; 
  padding-inline: var(--uv-hero-gutter);
  position: relative;
  width: 100%;
}

/* Hero CTA button */
.uv-hero .uv-cta { 
  display: inline-block; 
  padding: .9em 1.2em; 
  border-radius: 999px; 
  text-decoration: none; 
  font-weight: 600; 
}

/* Hero badge */
.uv-hero-badge { 
  font-size: .95rem; 
  color: var(--uv-muted);
  text-align: left !important;
}

.uv-hero-accent { 
  color: var(--uv-primary); 
  font-weight: 700;
  display: inline-block !important;
  text-align: left !important;
}

/* Hero description */
.uv-hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--uv-muted);
  text-align: left !important;
}

/* Template Part - Hero Section Alignment */
.wp-block-template-part {
  text-align: left !important;
}

.wp-block-template-part * {
  text-align: left !important;
}

/* Hero Right - Photo Section */
.uv-hero-right { 
  position: relative; 
  isolation: isolate; 
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

.uv-hero-photo-container {
  margin-top: var(--top-gap);
  position: relative;
  width: 700px;
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

.uv-photo-background { 
  position: absolute; 
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%; 
  background: radial-gradient(circle at center, rgba(124,58,237,0.4) 0%, rgba(167,139,250,0.3) 30%, rgba(124,58,237,0.15) 60%, transparent 80%); 
  border-radius: 50%; 
  z-index: -1;
  filter: blur(80px);
}

.uv-hero-photo {
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: 700px !important;
  border-radius: 0 30px 30px 0 !important;
  display: block !important;
  object-fit: cover;
}

/* Hero Left - Content Section */
.uv-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  position: relative;
}

.uv-hero-title {
  line-height: 1.1 !important;
  font-weight: 700;
  color: var(--uv-text) !important;
  text-align: left !important;
  display: block !important;
  font-size: clamp(1.5rem, 3vw, 2.2rem) !important;
}

.uv-hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--uv-muted);
  margin: 0;
}

.uv-hero-buttons {
  display: flex;
  gap: 12px;
}

.uv-hero-buttons::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, var(--uv-primary), #A78BFA);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
  z-index: -1;
}

/* Remove backgrounds/borders/radius around hero photo */
.uv-hero .wp-block-cover,
.uv-hero .wp-block-group.has-background,
.uv-hero .uv-card,
.uv-hero .uv-glass {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Remove rounded style from hero images */
.uv-hero .wp-block-image,
.uv-hero .wp-block-image.is-style-rounded,
.uv-hero .wp-block-image img {
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* Remove radius from decorative elements */
.uv-hero-right,
.uv-hero-right .uv-oval {
  border-radius: 0 !important;
}

/* ================== Hero Responsive Styles ================== */

/* Large screens */
@media (min-width: 1400px) {
  .uv-hero-inner {
    max-width: 1400px;
    padding-inline: 32px;
  }
  
  .uv-hero-title {
    font-size: clamp(2rem, 2.5vw, 2.5rem) !important;
  }
  
  .uv-hero-photo-container {
    width: 800px;
    max-width: 800px;
  }
  
  .uv-hero-photo {
    width: 800px !important;
    max-width: 800px !important;
  }
}

/* Tablet styles */
@media (max-width: 1024px) {
  .uv-hero {
    padding: clamp(30px, 6vw, 80px) 0;
  }
  
  .uv-hero-inner {
    padding-inline: 20px;
  }
  
  .uv-hero-content {
    padding-left: 20px;
  }
  
  .uv-hero-title {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem) !important;
  }
  
  .uv-hero-description {
    font-size: 1rem;
  }
  
  .uv-hero-badge {
    font-size: 0.9rem;
  }
  
  .uv-hero-buttons {
    gap: 10px;
  }
  
  .uv-hero-photo-container {
    width: 500px;
    max-width: 500px;
  }
  
  .uv-hero-photo {
    width: 500px !important;
    max-width: 500px !important;
    margin-top: -40px !important;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .uv-hero {
    padding: clamp(20px, 8vw, 40px) 0;
  }
  
  .uv-hero-inner {
    padding-inline: 16px;
  }
  
  .uv-hero-content {
    padding-left: 0;
    text-align: center !important;
  }
  
  .uv-hero-title {
    font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
    text-align: center !important;
  }
  
  .uv-hero-description {
    text-align: center !important;
    font-size: 1rem;
  }
  
  .uv-hero-badge {
    text-align: center !important;
  }
  
  .uv-hero-buttons {
    justify-content: center !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .uv-hero-photo-container {
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0;
  }
  
  .uv-hero-photo {
    width: 100% !important;
    max-width: 300px !important; /* Уменьшаем размер фото */
    margin-top: 30px !important; /* Уменьшаем margin над фото */
    border-radius: 20px !important;
  }
  
  .uv-hero-content {
    margin-top: 38px !important; /* Опускаем текстовый блок на 1см */
  }
  
  .uv-audit-btn {
    margin-top: -20px !important; /* Поднимаем кнопку "ХОЧУ АУДИТ" выше */
  }
  
  .uv-photo-background {
    height: 100% !important; /* Такой же размер как у фото */
    width: 100% !important;
    max-width: 300px !important; /* Такой же размер как у фото */
  }
  
  .uv-hero-right {
    justify-content: center;
  }
}

/* Small mobile styles */
@media (max-width: 480px) {
  .uv-hero {
    padding: clamp(16px, 10vw, 24px) 0;
  }
  
  .uv-hero-inner {
    padding-inline: 12px;
  }
  
  .uv-hero-title {
    font-size: clamp(1.1rem, 5vw, 1.4rem) !important;
    margin-bottom: 8px;
  }
  
  .uv-hero-description {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }
  
  .uv-hero-badge {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }
  
  .uv-hero-buttons {
    gap: 8px !important;
  }
  
  .uv-hero-buttons .uv-glass-btn {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }
  
  .uv-hero-photo-container {
    max-width: 300px;
  }
  
  .uv-hero-photo {
    max-width: 250px !important; /* Уменьшаем размер фото */
    margin-top: 30px !important; /* Уменьшаем margin над фото */
    border-radius: 16px !important;
  }
  
  .uv-hero-content {
    margin-top: 38px !important; /* Опускаем текстовый блок на 1см */
  }
  
  .uv-audit-btn {
    margin-top: -20px !important; /* Поднимаем кнопку "ХОЧУ АУДИТ" выше */
  }
  
  .uv-photo-background {
    height: 100% !important; /* Такой же размер как у фото */
    width: 100% !important;
    max-width: 300px !important; /* Такой же размер как у фото */
  }
}

/* Дополнительные стили для маленьких экранов */
@media (max-width: 480px) {
  .uv-photo-background {
    max-width: 250px !important; /* Такой же размер как у фото на маленьких экранах */
  }
}

/* Экстремально маленькие экраны (iPhone SE, старые Android) */
@media (max-width: 320px) {
  .uv-hero {
    padding: clamp(12px, 8vw, 20px) 0;
  }
  
  .uv-hero-inner {
    padding-inline: 8px;
  }
  
  .uv-hero-title {
    font-size: clamp(0.9rem, 5.5vw, 1.1rem) !important;
    margin-bottom: 6px;
  }
  
  .uv-hero-description {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }
  
  .uv-hero-badge {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }
  
  .uv-hero-buttons {
    gap: 6px !important;
  }
  
  .uv-hero-buttons .uv-glass-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
  
  .uv-hero-photo-container {
    max-width: 250px;
  }
  
  .uv-hero-photo {
    max-width: 200px !important;
    margin-top: 20px !important;
  }
  
  .uv-photo-background {
    max-width: 200px !important;
    opacity: 0.5 !important; /* Делаем градиент ярче на мобилке */
    background: radial-gradient(60% 60% at 65% 35%, rgba(124,58,237,0.6), rgba(167,139,250,0.4) 40%, transparent 70%) !important;
  }
}

/* Более яркий градиент для мобильных устройств */
@media (max-width: 768px) {
  .uv-photo-background {
    opacity: 0.5 !important; /* Делаем градиент ярче на мобилке */
    background: radial-gradient(60% 60% at 65% 35%, rgba(124,58,237,0.6), rgba(167,139,250,0.4) 40%, transparent 70%) !important;
  }
}

/* ================== ТОЧНЫЕ РАЗРЕШЕНИЯ ЭКРАНОВ ================== */

/* 1280x800 - компактные ноутбуки */
@media (min-width: 1280px) and (max-width: 1280px) and (min-height: 800px) and (max-height: 800px) {
  .uv-hero { padding: 80px 0 !important; }
  .uv-hero-inner { max-width: 1150px !important; padding-inline: 24px !important; }
  .uv-hero-title { font-size: 36px !important; }
  .uv-hero-description { font-size: 17px !important; }
  .uv-hero-photo-container { width: 550px !important; max-width: 550px !important; }
  .uv-hero-photo { width: 550px !important; max-width: 550px !important; }
}

/* 1280x1024 - квадратные мониторы */
@media (min-width: 1280px) and (max-width: 1280px) and (min-height: 1024px) and (max-height: 1024px) {
  .uv-hero { padding: 100px 0 !important; }
  .uv-hero-inner { max-width: 1150px !important; padding-inline: 24px !important; }
  .uv-hero-title { font-size: 40px !important; }
  .uv-hero-description { font-size: 18px !important; }
  .uv-hero-right {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }
  .uv-hero-photo-container { 
    width: 650px !important; 
    max-width: 650px !important; 
    height: 720px !important;
    margin-left: -2.5cm !important;
  }
  .uv-hero-photo { 
    width: 650px !important; 
    max-width: 650px !important;
    height: 720px !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  .uv-photo-background {
    width: 650px !important;
    max-width: 650px !important;
    height: 720px !important;
  }
}

/* 1366x768 - БАЗОВОЕ разрешение, эталон */
@media (min-width: 1366px) and (max-width: 1366px) and (min-height: 768px) and (max-height: 768px) {
  .uv-hero { padding: 100px 0 !important; }
  .uv-hero-inner { max-width: 1250px !important; padding-inline: 28px !important; }
  .uv-hero-title { font-size: 42px !important; }
  .uv-hero-description { font-size: 18px !important; }
  .uv-hero-photo-container { width: 550px !important; max-width: 550px !important; }
  .uv-hero-photo { width: 550px !important; max-width: 550px !important; }
}

/* 1440x900 - MacBook Air, популярные ноутбуки */
@media (min-width: 1440px) and (max-width: 1440px) and (min-height: 900px) and (max-height: 900px) {
  .uv-hero { padding: 110px 0 !important; }
  .uv-hero-inner { max-width: 1320px !important; padding-inline: 32px !important; }
  .uv-hero-title { font-size: 44px !important; }
  .uv-hero-description { font-size: 19px !important; }
  .uv-hero-photo-container { width: 580px !important; max-width: 580px !important; }
  .uv-hero-photo { width: 580px !important; max-width: 580px !important; }
}

/* 1536x864 - современные ноутбуки */
@media (min-width: 1536px) and (max-width: 1536px) and (min-height: 864px) and (max-height: 864px) {
  .uv-hero { padding: 110px 0 !important; }
  .uv-hero-inner { max-width: 1380px !important; padding-inline: 32px !important; }
  .uv-hero-title { font-size: 44px !important; }
  .uv-hero-description { font-size: 19px !important; }
  .uv-hero-photo-container { width: 600px !important; max-width: 600px !important; }
  .uv-hero-photo { width: 600px !important; max-width: 600px !important; }
}

/* 1600x900 - широкие мониторы */
@media (min-width: 1600px) and (max-width: 1600px) and (min-height: 900px) and (max-height: 900px) {
  .uv-hero { padding: 120px 0 !important; }
  .uv-hero-inner { max-width: 1450px !important; padding-inline: 36px !important; }
  .uv-hero-title { font-size: 46px !important; }
  .uv-hero-description { font-size: 20px !important; }
  .uv-hero-photo-container { width: 620px !important; max-width: 620px !important; }
  .uv-hero-photo { width: 620px !important; max-width: 620px !important; }
}

/* 1920x1080 - Full HD мониторы */
@media (min-width: 1920px) and (max-width: 1920px) and (min-height: 1080px) and (max-height: 1080px) {
  .uv-hero { padding: 140px 0 !important; }
  .uv-hero-inner { max-width: 1700px !important; padding-inline: 48px !important; }
  .uv-hero-title { font-size: 52px !important; }
  .uv-hero-description { font-size: 22px !important; }
  .uv-hero-photo-container { width: 720px !important; max-width: 720px !important; }
  .uv-hero-photo { width: 720px !important; max-width: 720px !important; }
}

/* 2560x1440 - 2K мониторы */
@media (min-width: 2560px) and (max-width: 2560px) and (min-height: 1440px) and (max-height: 1440px) {
  .uv-hero { padding: 160px 0 !important; }
  .uv-hero-inner { max-width: 2200px !important; padding-inline: 80px !important; }
  .uv-hero-title { font-size: 64px !important; }
  .uv-hero-description { font-size: 26px !important; }
  .uv-hero-photo-container { width: 1100px !important; max-width: 1100px !important; }
  .uv-hero-photo { width: 1100px !important; max-width: 1100px !important; }
}
