/* ===== СБРОС И БАЗОВЫЕ СТИЛИ (унифицированные) ===== */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-primary: #222;
  --text-secondary: #333;
  --text-light: #ccc;
  --accent-color: #667eea;
  --white: #fff;
  --shadow-light: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
  --shadow-medium:
    0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --border-radius: 0.75rem;
  --border-radius-sm: 0.5rem;
  --border-radius-full: 9999px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 2.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
  background-color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.container {
  max-width: 75rem; /* 1200px */
  margin: 0 auto;
  padding: 0 1.25rem; /* 20px */
  width: 100%;
}

/* ===== HEADER ===== */
.header {
  background: var(--primary-gradient);
  color: var(--white);
  padding: var(--spacing-xxl) 1.25rem;
  text-align: center;
}

.header__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.header__subtitle {
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  opacity: 0.9;
  font-weight: 400;
}

/* ===== MAIN CONTENT ===== */
.main {
  padding: var(--spacing-xxl) 0;
  flex: 1;
}

.section-title {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--text-primary);
}

/* ===== SOCIALS GRID ===== */
.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: var(--spacing-xl);
  justify-content: center;
  margin-bottom: var(--spacing-xl);
}

/* ===== SOCIAL CARD ===== */
.social-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--spacing-lg);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: inherit;
}

.social-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.social-card__icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  color: var(--accent-color);
  transition: all 0.2s ease;
}

.social-card__icon svg {
  width: 1.5rem; /* 24px */
  height: 1.5rem; /* 24px */
  fill: currentColor;
  transition: fill 0.2s ease;
}

.social-card:hover .social-card__icon {
  background: var(--primary-gradient);
  color: var(--white);
}

.social-card:hover .social-card__icon svg {
  fill: var(--white);
}

.social-card__name {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.social-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  opacity: 0.8;
  margin: 0;
  line-height: 1.4;
}

/* ===== BACK BUTTON ===== */
.button-container {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-xl);
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--primary-gradient);
  color: var(--white);
  text-align: center;
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 600;
  border-radius: var(--border-radius-full);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  gap: var(--spacing-sm);
  text-decoration: none;
}

.back-button:hover {
  opacity: 0.9;
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-medium);
}

.back-button:active {
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text-primary);
  color: var(--text-light);
  padding: var(--spacing-xl) 1.25rem;
  margin-top: auto;
}

.footer__container {
  max-width: 75rem;
  margin: 0 auto;
  text-align: center;
}

.footer__hours {
  font-size: 0.9375rem;
  margin-bottom: var(--spacing-xl);
  color: var(--white);
}

.footer__info {
  margin-bottom: var(--spacing-xl);
  display: grid;
  gap: var(--spacing-xs);
}

.footer__info p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer__info a {
  color: var(--accent-color);
}

.footer__info a:hover {
  text-decoration: underline;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm) var(--spacing-xl);
}

.footer__links a {
  font-size: 0.875rem;
  color: #999;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--white);
}

/* ===== FLOATING CONTACTS BUTTON ===== */
.floating-contacts {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
}

.floating-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.floating-btn:active {
  transform: scale(0.95);
}

.floating-menu {
  position: absolute;
  bottom: 80px;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.floating-contacts.active .floating-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.social-link:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--accent-color);
  transform: translateX(4px);
}

.social-link__icon {
  font-size: 1.2rem;
  min-width: 20px;
}

.floating-btn::before {
  content: "Контакты";
  position: absolute;
  bottom: 70px;
  right: -10px;
  background: var(--text-primary);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.floating-btn:hover::before {
  opacity: 1;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 48rem) {
  /* 768px */
  .header {
    padding: var(--spacing-xl) var(--spacing-lg);
  }

  .header__title {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }

  .header__subtitle {
    font-size: clamp(0.875rem, 3vw, 1rem);
  }

  .main {
    padding: var(--spacing-xl) 0;
  }

  .socials-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: var(--spacing-lg);
  }

  .social-card {
    padding: var(--spacing-md);
  }

  .social-card__icon {
    width: 3.5rem;
    height: 3.5rem;
  }

  .social-card__icon svg {
    width: 1.25rem; /* 20px */
    height: 1.25rem; /* 20px */
  }

  .social-card__name {
    font-size: clamp(0.9375rem, 2vw, 1rem);
  }

  .social-card__desc {
    font-size: 0.8125rem;
  }

  .back-button {
    padding: 0.625rem 1.25rem;
  }

  .floating-contacts {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .floating-btn {
    width: 50px;
    height: 50px;
  }

  .floating-btn svg {
    width: 20px;
    height: 20px;
  }

  .floating-menu {
    bottom: 65px;
  }
}

@media (max-width: 30rem) {
  /* 480px */
  .container {
    padding: 0 var(--spacing-md);
  }

  .header {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .main {
    padding: var(--spacing-lg) 0;
  }

  .section-title {
    margin-bottom: var(--spacing-lg);
  }

  .socials-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .social-card__icon {
    width: 3rem;
    height: 3rem;
  }

  .social-card__icon svg {
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
  }

  .footer {
    padding: var(--spacing-lg) var(--spacing-md);
    margin-top: var(--spacing-xl);
  }

  .footer__links {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .floating-contacts {
    bottom: 1rem;
    right: 1rem;
  }

  .floating-btn {
    width: 45px;
    height: 45px;
  }

  .floating-btn svg {
    width: 18px;
    height: 18px;
  }

  .floating-menu {
    bottom: 60px;
  }
}

/* Для очень больших экранов */
@media (min-width: 90rem) {
  /* 1440px */
  .container,
  .header,
  .footer__container {
    max-width: 85rem; /* 1360px */
  }

  .socials-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  }

  .social-card__icon {
    width: 4.5rem;
    height: 4.5rem;
  }

  .social-card__icon svg {
    width: 1.75rem; /* 28px */
    height: 1.75rem; /* 28px */
  }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }

  .section-title {
    color: var(--text-light);
  }

  .social-card {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
  }

  .social-card__name {
    color: #f0f0f0;
  }

  .social-card__desc {
    color: #b0b0b0;
  }

  .social-card__icon {
    background: rgba(102, 126, 234, 0.15);
    color: #8a9eff;
  }

  .social-card__icon svg {
    fill: #8a9eff;
  }

  .social-card:hover .social-card__icon {
    background: var(--primary-gradient);
    color: var(--white);
  }

  .social-card:hover .social-card__icon svg {
    fill: var(--white);
  }

  .floating-menu {
    background: #2d2d2d;
  }

  .social-link {
    color: #e0e0e0;
  }

  .social-link:hover {
    background: rgba(102, 126, 234, 0.2);
  }

  .floating-btn svg {
    stroke: currentColor;
  }

  .floating-btn::before {
    background: #fff;
    color: #222;
  }
}
