/* === Тема: Яркий Нео/Биоморфизм для консалтингового сайта === */
/* Tailwind CSS подключён, только дополняем кастомными стилями */

:root {
  --color-primary: #31d7f0;              /* Акцент ярко-циановый */
  --color-primary-dark: #207aac;         /* Тёмно-акцентный */
  --color-accent: #22e39e;               /* Ярко-бирюзовый */
  --color-accent-dark: #1ec786;
  --color-secondary: #2f57ef;            /* Яркий синий */
  --color-bg: #faffff;                   /* Основной светлый */
  --color-bg-glass: rgba(255,255,255,0.7); /* Глассморфизм */
  --color-bg-card: #f6fdff;              /* Карточки */
  --color-bg-gradient: linear-gradient(125deg, #2bf5c3 0%, #31d7f0 60%, #2f57ef 100%);
  --color-bg-gradient-subtle: linear-gradient(120deg, #e3ffff 0%, #f5fdfe 40%, #c6f7fa 100%);
  --color-footer-bg: #e2f5fa;
  --color-shadow-main: 9px 9px 32px 0 rgba(47,87,239,0.13), -9px -9px 22px 0 rgba(255,255,255,0.92);
  --color-shadow-neu: 6px 6px 22px 0 rgba(45,135,215,0.08), -5px -5px 20px 0 rgba(255,255,255,0.85);
  --color-shadow-hover: 0 10px 40px 0 rgba(33,214,90,0.10);
  --color-dark: #232931;
  --color-text-main: #222b38;
  --color-text-sub: #425466;
  --color-white: #fff;

  --gradient-hero: linear-gradient(115deg, rgba(47,87,239,0.87) 16%, rgba(49,215,240,0.82) 100%);
  --gradient-overlay: linear-gradient(180deg,rgba(0,0,0,0.56) 60%,rgba(0,0,0,0.25) 100%);
  --icon-social-facebook: #2f57ef;
  --icon-social-twitter: #31d7f0;
  --icon-social-instagram: #22e39e;

  --transition-time: 0.4s;
  --transition-btn: 0.23s cubic-bezier(.42,1.48,.43,.82);
}

body {
  background: var(--color-bg-gradient-subtle);
  color: var(--color-text-main);
  font-family: 'Merriweather', serif;
  font-size: 1.08rem;
  line-height: 1.7;
  min-width: 320px;
}

h1, h2, h3, h4, .section-title {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-dark);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
}
h1, .hero-title { font-size: 2.6rem; @apply sm:text-5xl md:text-6xl; }
h2, .section-title { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; }

/* === Hero Section === */
#hero, .hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero), url('image/hero-business-consulting-team-bg.jpg') center/cover no-repeat;
  background-blend-mode: multiply;
  min-height: 58vh;
  width: 100%;
  overflow: hidden;
}
#hero .section-content, .hero-section .section-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
#hero .section-content h1, .hero-section .section-content h1,
#hero .section-content p, .hero-section .section-content p {
  color: var(--color-white);
  text-shadow: 1px 3px 14px rgba(0,0,0,0.37);
}
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
  pointer-events: none;
  z-index: 1;
}
#hero img[alt], .hero-section img[alt] {
  display: none !important;
}
@media (max-width: 769px) {
  #hero { min-height: 320px; }
}
/* === Карточки (cards, профили и прочие) === */
.card, .item, .testimonial, .team-member, .product-card {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--color-shadow-main);
  background: var(--color-bg-card);
  border-radius: 2rem;
  padding: 0;
  margin: 16px 0;
  transition: box-shadow .3s, transform .7s cubic-bezier(.55,1.24,.41,.90);
  will-change: box-shadow, transform;
  text-align: center;
  position: relative;
}
.card:hover, .item:hover, .testimonial:hover, .team-member:hover, .product-card:hover {
  box-shadow: 0 14px 46px 0 rgba(47,87,239,0.17), -4px -6px 24px 0 #fff;
  transform: translateY(-4px) scale(1.022) rotate(-1deg);
}

.card-image, .profile-image, .image-container {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 140px;
  max-height: 210px;
  height: 180px;
  background: linear-gradient(140deg, var(--color-primary) 70%, var(--color-accent) 100%);
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: 0 4px 30px 0 rgba(49,215,240,0.08);
  overflow: hidden;
}
.card-image img, .image-container img, .profile-image img {
  display: block;
  max-width: 94%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: cover !important;
  object-position: center center;
  border-radius: 1rem 1rem 0 0;
  background-color: #eef9fb;
}

/* === Контент карточки === */
.card-content, .testimonial-content {
  width: 100%;
  padding: 1.3rem 2rem 1.7rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
@media (max-width: 640px) {
  .card-content { padding: 1rem 0.8rem 1.2rem; }
}

.card h3, .item h3, .team-member h3 {
  margin: 0.5em 0 0.2em;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-secondary);
  font-size: 1.17rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* === Модулированная сетка === */
.section-content {
  padding: 2.6rem 0 2.6rem 0;
  margin-bottom: 1.4rem;
}

.grid-portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* === Buttons: глобально, минимизировано === */
.btn, button, input[type='submit'] {
  display: inline-block;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.15;
  background: linear-gradient(102deg, var(--color-primary) 32%, var(--color-secondary) 98%);
  color: var(--color-white);
  border: none;
  border-radius: 2em;
  box-shadow: 0 4px 30px 0 rgba(49,215,240,0.10), 0 1px 2px #fff inset;
  padding: 0.9em 2.6em;
  outline: none;
  cursor: pointer;
  transition: background var(--transition-btn), transform .16s cubic-bezier(.75,1.58,.55,.82), box-shadow .28s;
  position: relative;
  text-align: center;
  margin: 0.5em 0;
  will-change: background, transform, box-shadow;
}
.btn:active, button:active, input[type="submit"]:active,
.btn:focus, button:focus, input[type="submit"]:focus,
.btn:hover, button:hover, input[type="submit"]:hover {
  background: linear-gradient(94deg, var(--color-secondary) 0%, var(--color-accent) 98%);
  color: #fff;
  transform: scale(1.045) rotate(-.5deg) translateY(-2px);
  box-shadow: 0 8px 36px 2px rgba(47,87,239,.15), 0 2px 11px 0 #e3ffff inset;
  filter: saturate(1.08) brightness(1.05);
}

/* === Links === */
a, .link {
  color: var(--color-secondary);
  transition: color .24s cubic-bezier(.52,1.44,.98,.89), box-shadow .2s;
}
a:focus,
a:hover {
  color: var(--color-accent);
  text-decoration: underline;
  outline: none;
  box-shadow: 0 1px 0 0 var(--color-accent);
}

.read-more,
.link-readmore {
  color: var(--color-primary-dark);
  background: linear-gradient(92deg, var(--color-accent) 0%, var(--color-primary) 80%);
  font-weight: 600;
  border-radius: 12px;
  padding: .16rem .7em;
  margin: 0 .2em;
  text-decoration: underline dashed var(--color-secondary) 2px;
  transition: color .3s, background .25s, box-shadow .24s;
  box-shadow: 0 3px 12px -5px var(--color-secondary);
  cursor: pointer;
}
.read-more:hover,
.link-readmore:hover {
  color: var(--color-white);
  background: linear-gradient(82deg, var(--color-accent-dark) 0%, var(--color-primary-dark) 92%);
  box-shadow: 0 6px 25px 0 var(--color-primary-dark);
  text-decoration: none;
}

/* === Фиксированная навигация === */
header, .navbar, .site-header {
  background: var(--color-bg-glass);
  box-shadow: var(--color-shadow-neu);
  position: sticky; top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

/* === Глассморфизм-блоки (например, Contact) === */
.section-glass, .glass-bg, .contact-form-bg {
  background: var(--color-bg-glass);
  border-radius: 1.6rem;
  box-shadow: 0 6px 32px 0 rgba(49,215,240,0.09);
  backdrop-filter: blur(10px);
}

/* === Форма (Contact) === */
input[type=text], input[type=email], textarea {
  background: #faffff;
  border: 1.7px solid #c8f3f8;
  color: var(--color-text-main);
  border-radius: 14px;
  box-shadow: 0 1px 9px 0 #e3f5ff inset;
  padding: .85em 1.15em;
  font-family: 'Merriweather', serif;
  font-size: 1.06rem;
  margin-bottom: 16px;
  transition: border-color .22s, box-shadow .19s;
}
input:focus, textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 16px 0 var(--color-primary) inset;
  outline: none;
}
label[for] {
  color: var(--color-dark);
  font-weight: 600;
  letter-spacing: .01em;
  font-family: 'Montserrat', sans-serif;
}

@media (min-width: 900px) {
  .section-flex {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
  }
  .section-flex > * { flex: 1 1 0; min-width: 320px; }
}

/* === Биоморфные тени и плавные неоморфные переходы === */
.biomorphic-bg, .biomorph {
  background: var(--color-bg-gradient);
  background-repeat: no-repeat;
  background-size: cover;
}
.shadow-neu, .card, .navbar, .footer, .glass-bg {
  box-shadow: var(--color-shadow-main);
}

/* === Инновация и портфолио блоки — параллакс и динамика === */
.section-bg-parallax {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  position: relative;
}
@media (max-width:900px) {
  .section-bg-parallax { background-attachment: scroll; }
}
.section-bg-parallax .overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,rgba(0,0,0,0.45) 27%,rgba(0,0,0,.11) 92%);
}
.section-bg-parallax .section-content { position: relative; z-index: 2; }

/* === Анимации нелинейных движений для появления карточек === */
@keyframes biomorphicIn {
  0%   { opacity: 0; transform: translateY(30px) scale(0.88) skewY(-6deg) rotate(-7deg); }
  60%  { opacity: .65; transform: translateY(-12px) scale(1.04) skewY(1deg) rotate(2deg);}
  100% { opacity: 1; transform: translateY(0) scale(1) skewY(0deg) rotate(0deg);}
}
@keyframes biomorphicHover {
  0%   { transform: scale(1) rotate(0deg) }
  55%  { transform: scale(1.08) rotate(-3deg)}
  100% { transform: scale(1.035) rotate(-1deg)}
}
.card, .item, .testimonial, .team-member, .product-card {
  animation: biomorphicIn .98s cubic-bezier(.18,1.16,.22,1) both;
}

/* === Portfolio grid: красивое выравнивание (2/3+1/3, 1/2+1/2, равные для 3+) === */
.grid-portfolio,
.portfolio-grid, .team-grid, .instructors-grid {
  display: grid;
  grid-gap: 2.4rem;
  grid-template-columns: repeat(auto-fit,minmax(310px,1fr));
}
@media (min-width: 900px) {
  .portfolio-grid, .team-grid, .instructors-grid {
    grid-template-columns: repeat(3, minmax(340px, 1fr));
  }
}
@media (min-width: 1200px) {
  .portfolio-grid, .team-grid, .instructors-grid {
    grid-template-columns: 2fr 2fr 2fr;
  }
}

/* === Эффекты для изображений: чуть динамики при наведении === */
.card-image img, .profile-image img, .image-container img {
  transition: filter .26s cubic-bezier(.34,1.85,.66,1.13), transform .29s cubic-bezier(.36,1.05,.67,.89);
}
.card:hover img, .item:hover img, .team-member:hover img {
  filter: brightness(1.13) saturate(1.15);
  transform: scale(1.04) rotate(-2deg);
}

/* === Футер === */
footer, .footer, .site-footer {
  background: var(--color-footer-bg);
  color: var(--color-text-main);
  border-radius: 1.75rem 1.75rem 0 0;
  text-align: center;
  box-shadow: 0 -3px 24px -4px var(--color-secondary);
  font-family: 'Merriweather', serif;
  font-size: 1.03rem;
  margin-top: 3.4rem;
  padding: 1.9rem 4vw 1.2rem;
  position: relative;
}

footer a, .footer a {
  color: var(--color-primary-dark);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1em;
  margin: 0 0.6em;
  opacity: 1;
  text-decoration: none;
  transition: color .23s, text-shadow .22s;
}
footer a:hover, .footer a:hover {
  color: var(--color-secondary);
  text-shadow: 0 1px 0 var(--color-accent);
  text-decoration: underline;
}

.footer-socials {
  margin: .4rem 0 1.4rem 0;
  font-size: 1.07rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
}
.footer-socials span {
  font-weight: bold;
}
.footer-socials a {
  color: var(--color-secondary);
  text-decoration: underline wavy var(--color-primary) 2px;
  transition: color .28s;
  font-size: 1.04rem;
  margin: 0 .26em;
}
.footer-socials a:hover {
  color: var(--color-accent);
  background: var(--color-bg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: underline;
}

/* SVG-иконки — стилизуем аккуратно через fill (если используются, но по ТЗ должны быть только текстом в футере) */
.icon-social {
  display: inline-block;
  margin-right: 0.33em;
  vertical-align: middle;
  transition: filter .16s, transform .22s cubic-bezier(0.5, 1.8, 0.8, 0.9);
  width: 1.1em; height: 1.1em;
}
.icon-social-facebook { color: var(--icon-social-facebook); }
.icon-social-twitter { color: var(--icon-social-twitter);}
.icon-social-instagram { color: var(--icon-social-instagram);}
.icon-social:hover, .icon-social:focus { filter: brightness(1.15) saturate(1.14); transform: scale(1.12) rotate(-4deg); }

.footer-copyright {
  color: #5180ca;
  font-size: 0.98em;
  margin-top: 10px;
}

/* === success.html (центрирование) === */
.success-page, .page-success {
  min-height: 100vh;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  color: var(--color-white);
}
.success-page .card, .page-success .card {
  margin: 0 auto;
  max-width: 490px;
  padding: 3.2rem 2.2rem 2.6rem;
  background: var(--color-bg-glass);
  box-shadow: 0 18px 64px 3px rgba(49,215,240,0.23), 0 1px 16px #fff inset;
}

/* === Отступы для privacy и terms === */
.privacy-page, .terms-page {
  padding-top: 100px !important;
}

/* === Контейнеры — Центральная ширина, отступы === */
.main-content, .main-section {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 2.1vw;
  padding-right: 2.1vw;
}

/* === Отступы между секциями — компактно, не громоздко === */
section, .section-block {
  margin-top: 2.5rem;
  margin-bottom: 2.7rem;
}

/* === Прочие UI мелочи === */
::-webkit-scrollbar-thumb {
  background: #8ae7fe;
  border-radius: 2em;
}
::-webkit-scrollbar-track { background: #e6f8fd; }

@media (max-width: 1020px) {
  .main-content, .main-section { padding-left: 12px; padding-right: 12px; }
  .card-content { padding: 1.2rem 0.5rem 1.2rem; }
}
@media (max-width: 700px) {
  .main-content, .main-section { padding: 1px; }
  .section-content { padding: 1.2rem 0 1.2rem 0; }
}

@media (max-width: 900px) {
  .section-flex { flex-direction: column; gap: 2.2rem; }
}

/* === Служебные классы === */
.text-center { text-align: center !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.row { display: flex; flex-direction: row; }
.col { flex-direction: column; }
.mt-4 { margin-top: 1rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.pt-4 { padding-top: 1rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.gap-3 { gap: 1.2rem !important; }
.gap-5 { gap: 2rem !important; }

.w-2-3 { width: 66.66%; max-width: 900px; margin: 0 auto; }
@media (max-width: 900px) { .w-2-3 { width: 100%; max-width: none; } }

.grid-2-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-gap: 2.2rem;
}
@media (max-width: 900px) {
  .grid-2-3 { display: block; }
}

/* === Прогресс-бары и biomorph теневые элементы === */
.progress-indicator {
  width: 86%;
  height: 16px;
  border-radius: 38px;
  background: #e3faff;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 2px 16px 0 #b9f9f0 inset;
}
.progress-indicator span {
  display: block;
  height: 100%;
  border-radius: 38px;
  background: linear-gradient(90deg, #22e39e 0%, #31d7f0 100%);
  transition: width 1.3s cubic-bezier(.41,1.43,.54,.97);
}

/* === Для блоков с фоновым изображением под текстом === */
.bg-img-dark-blur {
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center;
  position: relative;
  /* затемнение */
}
.bg-img-dark-blur::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0,0,0,0.42), rgba(0,0,0,0.15) 74%);
  z-index: 1;
}
.bg-img-dark-blur .text-overlay, .bg-img-dark-blur h1, .bg-img-dark-blur h2, .bg-img-dark-blur p {
  position: relative;
  z-index: 2;
  color: #fff !important;
}

/* Акцентные подчеркивания заголовков */
.section-title::after {
  display: block;
  content: '';
  width: 68px;
  height: 5px;
  margin: 12px auto 0 auto;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0.72;
}

/* --- Всегда следим за контрастом текста! --- */
.bg-gradient-to-br, .bg-gradient-to-r, .biomorphic-bg, .header, .hero {
  color-scheme: light;
}
.bg-gradient-to-br .card-content, .bg-gradient-to-r .card-content {
  color: var(--color-dark);
}
.bg-gradient-to-br h2, .bg-gradient-to-r h2, .bg-gradient-to-br .section-title, .bg-gradient-to-r .section-title {
  color: var(--color-secondary);
}

@media (max-width: 440px) {
  h1, .hero-title { font-size: 1.38rem; }
  h2, .section-title { font-size: 1.2rem; }
  .footer, footer { font-size: .92em; }
}
/* ==== END STYLES ==== */