
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Nunito+Sans:wght@400;600&display=swap");

/* * :root позволяет нам задать "переменные", 
 * чтобы легко менять цвета на всем сайте в одном месте.
*/
:root {
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Nunito Sans", sans-serif;

  /* Palette - Lighter and Fresher */
  --color-primary: #00897b; /* Lighter Teal */
  --color-primary-hover: #00695c;
  --color-primary-rgb: 0, 137, 123; /* For rgba usage */
  --color-secondary: #d4ac0d; /* Brighter Gold */

  --color-text-main: #374151; /* Gray 700 - Softer than black */
  --color-text-muted: #6b7280; /* Gray 500 */
  --color-text-light: #9ca3af; /* Gray 400 */
  --color-text-dark: #1f2937; /* Gray 800 - For modal close etc */

  --color-bg-body: #f9fafb; /* Very light gray */
  --color-bg-card: #ffffff; /* Pure White */
  --color-bg-alt: #f3f4f6; /* Light Gray for alternating sections */
  --color-bg-subtle: #f8f8f8; /* Very subtle gray */
  --color-bg-muted: #eeeeee; /* Muted background */
  --color-bg-footer: #e1f3d8; /* Footer light green */

  --color-border: #e5e7eb;
  --color-overlay: rgba(0, 0, 0, 0.5);
  --color-overlay-dark: rgba(0, 0, 0, 0.6);

  /* Modern Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 12px 40px rgba(0, 0, 0, 0.25);
  --shadow-focus: 0 0 0 3px rgba(var(--color-primary-rgb), 0.4);

  --border-radius-main: 16px;
  --border-radius-btn: 50px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 60px;

  
  --gradient-core: rgba(var(--color-primary-rgb), 0.05);
  --gradient-core-strong: rgba(var(--color-primary-rgb), 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-smooth: 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);

  /* Breakpoints (for reference - CSS can't use vars in media queries) */
  /* --bp-sm: 480px; */
  /* --bp-md: 768px; */
  /* --bp-lg: 992px; */
  /* --bp-xl: 1200px; */
}



/* Base setup for sections using the pattern */
.bg-motif {
  position: relative;
  overflow: hidden; /* Contain the gradient */
  z-index: 0; /* Ensure content sits on top */
}

/* Variant 1: Central Glow (Good for Hero, FAQ, Features) */
.bg-motif-center::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    circle at center,
    var(--gradient-core-strong) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Variant 2: Corner Glow (Good for Contacts, Call to Action) */
.bg-motif-corner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Shifted to top-right for visual interest */
  background: radial-gradient(
    800px circle at 100% 0%,
    var(--gradient-core) 0%,
    transparent 100%
  );
  pointer-events: none;
}

/* Variant 3: Dual Spotlights (Good for wide sections like Team) */
.bg-motif-dual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      600px circle at 0% 0%,
      var(--gradient-core) 0%,
      transparent 100%
    ),
    radial-gradient(
      600px circle at 100% 100%,
      var(--gradient-core) 0%,
      transparent 100%
    );
  pointer-events: none;
}


.global-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -100;
  background-image: url("images/rastenie.png"); /* Исправлен путь к изображению */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Add the radial gradient overlay to the global background */
.global-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(0, 121, 107, 0.15) 0%,
    /* Teal tint */ rgba(243, 244, 246, 0.85) 80%
      /* Fade to light gray at edges */
  );
  pointer-events: none;
}

/* Update Body to be transparent so global bg shows through */
body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.6;
  background-color: transparent; /* Changed from var(--color-bg-body) */
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Ensure sections are readable by adding a glass/card effect */
section {
  padding: 100px 0;
  position: relative;
}

/* Default section background: Semi-transparent white */
section:not(.hero) {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  margin: 20px 0; /* Add separation to see the global background between sections */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Alternating background: Slightly darker semi-transparent */
section:nth-child(even):not(.hero) {
  background-color: rgba(
    249,
    250,
    251,
    0.85
  ); /* var(--color-bg-alt) with opacity */
}

/* Hero section uses background image, so text should be light */


.profile-page-content {
  padding-top: 60px;
  padding-bottom: 60px;
}
.profile-header {
  margin-bottom: 40px;
}
.back-link {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s;
}
.back-link:hover {
  transform: translateX(-5px);
}

/* Profile Layout - Mobile First */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 900px) {
  .profile-layout {
    grid-template-columns: 380px 1fr;
    gap: 80px;
  }
}

.profile-sidebar {
  position: static;
  order: -1; /* Image first on mobile */
}

@media (min-width: 900px) {
  .profile-sidebar {
    position: sticky;
    top: 100px;
    order: unset;
  }
}

.profile-gallery-wrapper {
  background: var(--color-bg-card);
  padding: 15px;
  border-radius: var(--border-radius-main);
  box-shadow: var(--shadow-card);
  margin-bottom: 30px;
  max-width: 500px; /* Constrained on mobile */
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 900px) {
  .profile-gallery-wrapper {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

.profile-gallery-wrapper .gallery-main img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  aspect-ratio: 3/4;
}

.profile-gallery-wrapper .gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.profile-gallery-wrapper .gallery-thumbs img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.profile-gallery-wrapper .gallery-thumbs img.active,
.profile-gallery-wrapper .gallery-thumbs img:hover {
  opacity: 1;
  border: 2px solid var(--color-primary);
}

.sidebar-cards .card {
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
}

@media (min-width: 768px) {
  .sidebar-cards .card {
    padding: 30px;
  }
}

.profile-info h1 {
  font-size: 1.8rem; /* Smaller on mobile */
  text-align: center;
}

@media (min-width: 480px) {
  .profile-info h1 {
    font-size: 2.2rem;
  }
}

@media (min-width: 900px) {
  .profile-info h1 {
    font-size: 2.5rem;
    text-align: left;
  }
}

.top-description {
  text-align: center;
  margin-bottom: 30px;
}

@media (min-width: 900px) {
  .top-description {
    text-align: left;
  }
}

.content-section {
  padding: var(--space-lg);
}

@media (min-width: 480px) {
  .content-section {
    padding: 30px;
  }
}

/* Container - Mobile First */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px; /* Увеличенные отступы для мобильных */
}

@media (min-width: 480px) {
  .container {
    padding: 0 20px; /* Больше пространства на больших телефонах */
  }
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 992px) {
  .container {
    padding: 0 var(--space-lg); /* 24px on desktop */
  }
}

/* Стили для всех заголовков */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.2;
  margin-top: 0;
}

/* h2 - Mobile First */
h2 {
  font-size: 1.5rem; /* Mobile: ~24px */
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

@media (min-width: 768px) {
  h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
}

@media (min-width: 992px) {
  h2 {
    font-size: 2.5rem; /* Desktop: ~40px */
    margin-bottom: 3rem;
  }
}

/* Decorative underline for headings (optional polish) */
/* section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    margin: 16px auto 0;
    border-radius: 2px;
} */

/* Общий стиль для всех секций - Mobile First */
section {
  padding: var(--space-xl) 0; /* 40px on mobile */
  position: relative;
}

@media (min-width: 480px) {
  section {
    padding: 50px 0;
  }
}

@media (min-width: 992px) {
  section {
    padding: 100px 0; /* Full padding on desktop */
  }
}

/* Resetting the "card-like section" behavior for a full-width section look */
section:not(.hero) {
  margin: 0; /* Remove margin between sections */
  border-radius: 0;
  box-shadow: none;
  background-clip: border-box;
}

/* Alternating Backgrounds for visual rhythm */
section:nth-child(even) {
  background-color: var(--color-bg-alt);
}
section:nth-child(odd) {
  background-color: var(--color-bg-body);
}

/* Override for specific sections if needed to be white */
.services,
.directions,
.faq-compact-section,
.team,
.contacts {
  background: transparent; /* Let nth-child handle it, or force white */
}

/* Force white backgrounds for content-heavy sections if they fall on gray */
.services,
.team {
  background-color: var(--color-bg-card);
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px; /* Smaller on mobile */
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: var(--border-radius-btn);
  cursor: pointer;
  box-sizing: border-box;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .btn {
    padding: 16px 32px;
    font-size: 16px;
  }
}
.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.btn-secondary {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-card);
}
/* Кнопка "Выбрать специалиста" в карточках - Mobile First */
.btn-choose {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 20px; /* Smaller on mobile */
  border-radius: var(--border-radius-btn);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all var(--transition-base);
}

@media (min-width: 768px) {
  .btn-choose {
    padding: 12px 24px;
    font-size: 14px;
  }
}

.btn-choose:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}


.btn:focus-visible,
.btn-choose:focus-visible,
.nav-link:focus-visible,
.back-link:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.nav-link:focus-visible {
  border-radius: var(--border-radius-sm);
}

/* Remove default focus outline when using focus-visible */
:focus:not(:focus-visible) {
  outline: none;
}



/* Шапка - Mobile First */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 900;
}

@media (min-width: 768px) {
  .navbar {
    padding: 20px 0;
  }
}

.nav-links {
  display: flex;
  justify-content: space-around; /* Spread on mobile */
  gap: 2px; /* Минимальный gap для мобильных */
  align-items: center;
  flex-wrap: wrap;
  width: 100%; /* Полная ширина на мобильных */
  padding: 8px 0; /* Добавлен вертикальный padding */
}

@media (min-width: 768px) {
  .nav-links {
    justify-content: flex-end;
    gap: var(--space-lg); /* 24px on tablet */
    flex-wrap: nowrap;
    width: auto;
    padding: 0;
  }

  .nav-link {
    flex: none;
    min-height: auto;
    padding: 6px 12px;
  }
}

@media (min-width: 992px) {
  .nav-links {
    gap: var(--space-xl); /* 40px on desktop */
  }
}

.nav-link {
  color: var(--color-text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px; /* Увеличен для лучшей читаемости */
  font-family: var(--font-heading);
  padding: 8px 10px; /* Увеличен padding для удобного тапа */
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 8px;
  flex: 1; /* Равномерное распределение на мобильных */
  text-align: center;
  min-height: 36px; /* Минимальная высота для тапа */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
  position: relative;
  padding: 5px;
}

@media (min-width: 480px) {
  .nav-link {
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .nav-link {
    font-size: 15px;
    padding: 0;
  }
}
/* Simple underline animation on hover */
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}
.nav-link:hover {
  color: var(--color-primary);
}
.nav-link:hover::after {
  width: 100%;
}

/* Главный блок (Hero) - Mobile First */
.hero {
  background-color: #374151; /* Dark fallback */
  padding: 100px 0 60px 0; /* Smaller on mobile */
  min-height: 50vh;
  text-align: center;
  background-image: url("images/Gemini.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  z-index: 1;
}

@media (min-width: 480px) {
  .hero {
    padding: 120px 0 80px 0;
    min-height: 40vh;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 100px 0;
  }
}

@media (min-width: 992px) {
  .hero {
    padding: 140px 0; /* Full height on desktop */
  }
}

/* Логотип поверх hero-фона - Mobile First */
.hero-logo {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  width: 90px; /* Small on mobile */
  max-width: 35%;
  height: auto;
  z-index: 3;
  pointer-events: none;
  display: block;
  opacity: 0.95;
}

@media (min-width: 480px) {
  .hero-logo {
    width: 120px;
    max-width: 28%;
    bottom: var(--space-md);
    right: var(--space-md);
  }
}

@media (min-width: 1024px) {
  .hero-logo {
    width: 200px;
    max-width: 25%;
    bottom: 20px;
    right: 20px;
  }
}

.profile-contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Псевдоэлемент для темного (или цветного) наложения */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 121, 107, 0.5) 100%
  ); /* Gradient overlay for pro feel */
  z-index: -1; /* Помещаем под текст */
}

/* Убедимся, что текст светлый и читаемый на фоне изображения */
.hero h1,
.hero-description {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Hero h1 - Mobile First */
.hero h1 {
  font-size: 1.75rem; /* Small on mobile */
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.4);
}

@media (min-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 24px;
  }
}

@media (min-width: 992px) {
  .hero h1 {
    font-size: 3.5rem; /* Full size on desktop */
  }
}

/* Hero description - Mobile First */
.hero-description {
  font-size: 0.95rem; /* Small on mobile */
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

@media (min-width: 480px) {
  .hero-description {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.15rem;
    margin-bottom: 40px;
  }
}

@media (min-width: 992px) {
  .hero-description {
    font-size: 1.25rem;
    margin-bottom: 48px;
  }
}

/* Блок: Направления - Mobile First */

.work {
  text-align: center;
  font-size: 1.5rem; /* Small on mobile */
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .work {
    font-size: 2rem;
    margin-bottom: var(--space-xl);
  }
}

@media (min-width: 992px) {
  .work {
    font-size: 2.5rem;
    margin-bottom: var(--space-2xl);
  }
}

.directions-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: var(--space-lg);
  align-items: stretch;
}

@media (min-width: 768px) {
  .directions-grid {
    gap: 30px;
  }
}

@media (min-width: 992px) {
  .directions-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
  }
}

.direction-card {
  background: var(--color-bg-card);
  padding: var(--space-lg) var(--space-md); /* Smaller on mobile */
  border-radius: var(--border-radius-main);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid rgba(var(--color-primary-rgb), 0.25); /* Visible border on mobile */
  transition: transform var(--transition-base),
    box-shadow var(--transition-base);
  margin-bottom: 20px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .direction-card {
    padding: 30px 20px;
    border: 1px solid var(--color-border);
    margin-bottom: 0;
  }
}

@media (min-width: 992px) {
  .direction-card {
    padding: var(--space-xl);
  }
}

.direction-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-primary);
}

.direction-card h2 {
  font-size: 1.3rem; /* Small on mobile */
  text-align: center;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .direction-card h2 {
    font-size: 1.5rem;
  }
}

.direction-card ul {
  margin: 0 0 var(--space-lg) var(--space-md);
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .direction-card ul {
    margin-left: 20px;
    font-size: 1rem;
  }
}

.direction-card li {
  margin-bottom: var(--space-sm);
  font-size: inherit;
}
.card-buttons {
  margin-top: auto; /* Push to bottom */
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center; /* Центрируем кнопки */
}

/* Блок Услуги - Mobile First */
.services {
  margin-bottom: 0;
}

.services h2 {
  text-align: center;
  font-size: 1.8rem; /* Small on mobile */
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .services h2 {
    font-size: 2rem;
    margin-bottom: var(--space-xl);
  }
}

@media (min-width: 992px) {
  .services h2 {
    font-size: 2.5rem;
    margin-bottom: var(--space-2xl);
  }
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: var(--space-lg);
  align-items: stretch;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
  }
}

@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
  }
}

.service-card {
  background: var(--color-bg-card);
  border-radius: var(--border-radius-main);
  padding: 30px 20px; /* Smaller on mobile */
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%; /* Stretch to full height */
  transition: transform var(--transition-base),
    box-shadow var(--transition-base);
  border: 2px solid rgba(var(--color-primary-rgb), 0.25);
  margin-bottom: 20px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .service-card {
    border: 1px solid var(--color-border);
    margin-bottom: 0;
  }
}

@media (min-width: 992px) {
  .service-card {
    padding: var(--space-xl);
  }
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-secondary);
}

.service-card h3 {
  font-size: 1.3rem; /* Smaller on mobile */
  margin-top: 0;
  margin-bottom: var(--space-md);
  color: var(--color-text-main);
}

@media (min-width: 768px) {
  .service-card h3 {
    font-size: 1.5rem;
  }
}

.service-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  font-size: 1.05rem;
  flex-grow: 1; /* Push button to bottom */
}

/* Button always at bottom of card */
.service-card .card-buttons {
  margin-top: auto;
}

/* Блок Наша Команда - Mobile First */
.team {
  padding: var(--space-xl) 0; /* Smaller on mobile */
}

@media (min-width: 992px) {
  .team {
    padding: 100px 0;
  }
}

.team h2 {
  text-align: center;
  font-size: 1.8rem; /* Small on mobile */
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-main);
  display: block;
  width: 100%;
}

@media (min-width: 768px) {
  .team h2 {
    font-size: 2rem;
  }
}

@media (min-width: 992px) {
  .team h2 {
    font-size: 2.5rem;
  }
}

.team-description {
  text-align: center;
  font-size: 1rem; /* Small on mobile */
  max-width: 600px;
  margin: 0 auto var(--space-xl) auto;
  color: var(--color-text-muted);
  display: block;
}

@media (min-width: 768px) {
  .team-description {
    font-size: 1.2rem;
    margin-bottom: var(--space-2xl);
  }
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: var(--space-lg); /* Consistent gap */
  align-items: stretch; /* Equal height cards */
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
  }
}

.team-member-card {
  text-align: center;
  background: var(--color-bg-card);
  padding: 30px 20px; /* Smaller on mobile */
  border-radius: var(--border-radius-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base);
  border: 2px solid rgba(var(--color-primary-rgb), 0.25); /* Visible border on mobile */
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%; /* Fill grid cell */
  box-sizing: border-box;
  overflow: hidden;
}

@media (min-width: 768px) {
  .team-member-card {
    padding: var(--space-xl) 20px;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  }
}

/* Removed default hover - now handled by a.team-member-link */

.team-member-actions {
  margin-top: auto;
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column; /* Stack on mobile */
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .team-member-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Сделать кнопки под профилями одинакового размера */
.team-member-actions .btn {
  width: 100%; /* Full width on mobile */
  min-width: auto;
  max-width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .team-member-actions .btn {
    width: auto;
    min-width: 140px;
  }
}

.team-member-actions .btn.btn-secondary {
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.team-member-actions .btn.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.team-member-photo {
  width: 160px; /* Smaller on mobile */
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-base);
}

@media (min-width: 768px) {
  .team-member-photo {
    width: 200px;
    height: 200px;
  }
}

.team-member-card:hover .team-member-photo {
  transform: scale(1.03);
}

.team-member-name {
  font-size: 1.3rem; /* Smaller on mobile */
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-text-main);
  font-weight: 700;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .team-member-name {
    font-size: 1.5rem;
  }
}

.team-member-title {
  font-size: 0.95rem; /* Smaller on mobile */
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
  font-style: normal;
  max-width: 280px;
  flex-grow: 1; /* Push actions to bottom */
}

@media (min-width: 768px) {
  .team-member-title {
    font-size: 1rem;
  }
}


a.team-member-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.team-member-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -8px rgba(var(--color-primary-rgb), 0.2);
}

a.team-member-link:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--border-radius-main);
}

/* Visual Button Styles (non-interactive spans inside links) */
.btn-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: var(--border-radius-btn);
  box-sizing: border-box;
  transition: all var(--transition-base);
  letter-spacing: 0.5px;
}

@media (min-width: 768px) {
  .btn-visual {
    min-width: 140px;
  }
}

.btn-visual-primary {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

a.team-member-link:hover .btn-visual-primary {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.btn-visual-secondary {
  background-color: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

a.team-member-link:hover .btn-visual-secondary {
  background-color: var(--color-primary);
  color: #fff;
}

/* Блок FAQ (Вопросы и ответы) - Mobile First */

.faq-compact-title {
  text-align: center;
  font-size: 1.5rem; /* Small on mobile */
  margin-bottom: var(--space-lg);
  color: var(--color-text-main);
}

@media (min-width: 768px) {
  .faq-compact-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
}

@media (min-width: 992px) {
  .faq-compact-title {
    font-size: 2.5rem;
    margin-bottom: var(--space-2xl);
  }
}

.faq-compact-grid {
  display: flex;
  flex-direction: column; /* Stack on mobile */
  gap: 20px;
}

@media (min-width: 768px) {
  .faq-compact-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }
}

.faq-compact-card {
  flex: 1 1 100%; /* Full width on mobile */
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(var(--color-primary-rgb), 0.1);
  border-radius: var(--border-radius-main);
  padding: var(--space-lg) 20px; /* Smaller on mobile */
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base),
    box-shadow var(--transition-base), border-color var(--transition-base);
}

@media (min-width: 768px) {
  .faq-compact-card {
    flex: 1 1 300px;
    padding: 30px var(--space-lg);
  }
}

@media (min-width: 992px) {
  .faq-compact-card {
    padding: var(--space-xl) 32px;
  }
}

/* Эффект при наведении */
.faq-compact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -5px rgba(var(--color-primary-rgb), 0.15);
  border-color: var(--color-primary);
}

/* Декоративный элемент (полоска слева при ховере или всегда) */
.faq-compact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.faq-compact-card:hover::before {
  opacity: 1;
}

.faq-card-question {
  font-size: 1.15rem; /* Smaller on mobile */
  font-weight: 700;
  color: var(--color-text-main);
  margin-top: 0;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

@media (min-width: 768px) {
  .faq-card-question {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }
}

.faq-card-answer {
  font-size: 1rem; /* Smaller on mobile */
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .faq-card-answer {
    font-size: 1.05rem;
  }
}

/* Блок Контакты - Mobile First */
.contacts {
  padding: var(--space-xl) 0; /* Smaller on mobile */
  background: transparent;
}

@media (min-width: 992px) {
  .contacts {
    padding: 100px 0;
  }
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: 30px;
  align-items: center;
}

@media (min-width: 992px) {
  .contacts-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

.contacts-info {
  text-align: center; /* Centered on mobile */
  background: var(--color-bg-card);
  padding: 30px 20px; /* Smaller on mobile */
  border-radius: var(--border-radius-main);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  order: 1;
}

@media (min-width: 992px) {
  .contacts-info {
    text-align: left;
    padding: var(--space-xl);
    order: unset;
  }
}

.contacts-map {
  width: 100%;
  height: 100%;
  min-height: 300px; /* Smaller on mobile */
  display: flex;
  justify-content: center;
  box-shadow: var(--shadow-card);
  border-radius: var(--border-radius-main);
  overflow: hidden;
  order: 2;
}

@media (min-width: 768px) {
  .contacts-map {
    min-height: 350px;
  }
}

@media (min-width: 992px) {
  .contacts-map {
    min-height: 450px;
    order: unset;
  }
}

.contacts h2 {
  text-align: center; /* Centered on mobile */
  justify-content: center;
  font-size: 1.8rem; /* Smaller on mobile */
  margin-bottom: var(--space-lg);
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .contacts h2 {
    font-size: 2rem;
  }
}

@media (min-width: 992px) {
  .contacts h2 {
    text-align: left;
    justify-content: flex-start;
    font-size: 2.5rem;
    margin-bottom: 30px;
  }
}

.contacts-icon {
  width: 28px; /* Smaller on mobile */
  height: 28px;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform var(--transition-base), color var(--transition-base);
}

@media (min-width: 480px) {
  .contacts-icon {
    width: 32px;
    height: 32px;
  }
}

@media (min-width: 992px) {
  .contacts-icon {
    width: 36px;
    height: 36px;
  }
}

.contacts h2:hover .contacts-icon {
  transform: rotate(15deg) scale(1.1);
  color: var(--color-primary-hover);
}

.contact-phone,
.contact-email,
.contact-address {
  text-align: center; /* Centered on mobile */
  color: var(--color-text-muted);
  font-size: 1rem; /* Smaller on mobile */
  margin: var(--space-md) 0;
  font-weight: 500;
}

@media (min-width: 992px) {
  .contact-phone,
  .contact-email,
  .contact-address {
    text-align: left;
    font-size: 1.1rem;
  }
}

.contacts-logo {
  max-height: 40px;
  width: auto;
  margin: 20px auto; /* Centered on mobile */
  display: block;
}

@media (min-width: 992px) {
  .contacts-logo {
    margin: 20px 0 0 0;
  }
}

.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: var(--color-bg-muted);
  border-radius: var(--border-radius-main);
  border: none;
  overflow: hidden;
}

@media (min-width: 992px) {
  .map-placeholder {
    min-height: 450px;
  }
}


.popup-wrapper {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.popup-wrapper.is-visible {
  display: block;
  opacity: 1;
  visibility: visible;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-overlay-dark);
  cursor: pointer;
}

.popup-content {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg-card);
  padding: 30px 20px; /* Smaller on mobile */
  border-radius: var(--border-radius-main);
  z-index: 1001;
  width: 95%; /* Wider on mobile */
  max-width: 500px;
  box-shadow: var(--shadow-card-hover);
  border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .popup-content {
    padding: 48px;
    width: 90%;
  }
}
.popup-content h3 {
  text-align: center;
  margin-top: 0;
  font-size: 1.8rem;
  color: var(--color-text-main);
  margin-bottom: 16px;
}
.popup-content p {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}
.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: var(--color-text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.popup-close:hover {
  color: var(--color-text-main);
}
/* Стили для формы в Pop-up */
.popup-content form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.services-section {
  /* background-color: #dbfce6; Светло-зеленый фон как на фото */
  padding: 50px 20px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}



.cards-container {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: 20px;
  justify-content: center;
  align-items: stretch; /* Equal height cards */
  width: 100%;
  max-width: 100%;
  margin-top: 40px;
}

/* Layout specific variant (used for Elena) - kept for backward compatibility but made responsive */
.cards-container.layout-bottom {
  flex-direction: row;
  align-items: stretch;
}

.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-main);
  padding: 40px 30px; /* Generous padding */

  /* Responsive width strategy */
  flex: 1 1 300px; /* Grow and shrink, basis 300px */
  max-width: 400px; /* Don't get too wide */
  width: 100%; /* Take full width on mobile if needed */

  text-align: center;
  color: var(--color-text-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  margin-bottom: 20px; /* Ensure spacing when stacked */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-secondary);
}

.card h3,
.card h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--color-text-main);
  font-weight: 700;
}

.card-subtitle {
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
  font-weight: 600;
}

.card ul {
  text-align: left;
  padding-left: 20px;
  margin-bottom: 24px;
  list-style-type: disc;
  color: var(--color-text-muted);
}

.card ul li {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.5;
}

.duration-text {
  color: var(--color-text-light);
  margin-bottom: 24px;
  font-size: 14px;
}

.price-block {
  margin-bottom: 24px;
}

.price-label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
  color: var(--color-text-light);
}

.price-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
}

.card-footer-text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.5;
  color: var(--color-text-light);
}

/* Cards container - Mobile First */
.cards-container,
.cards-container.layout-bottom,
#oks.cards-container {
  flex-direction: column; /* Stack on mobile */
  align-items: center;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.cards-container .card,
.cards-container.layout-bottom .card {
  max-width: 100%;
  margin-bottom: 15px;
  width: 100%;
  flex: 1 1 auto;
}

@media (min-width: 768px) {
  .cards-container,
  .cards-container.layout-bottom,
  #oks.cards-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .cards-container .card,
  .cards-container.layout-bottom .card {
    max-width: 400px;
    width: auto;
    flex: 1 1 300px;
  }
}

.popup-content input[type="text"],
.popup-content input[type="tel"] {
  padding: 14px;
  font-size: 16px;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.popup-content input[type="text"]:focus,
.popup-content input[type="tel"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 121, 107, 0.2);
}
.popup-content form .btn {
  width: 100%;
  margin-top: 10px;
}


.profile-modal-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition: opacity 280ms ease, visibility 280ms ease;
}
.profile-modal-wrapper.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.profile-modal-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}
.profile-modal-content {
  position: relative;
  background: var(--color-bg-card);
  width: 98%;
  max-height: 92vh; /* Smaller height on mobile */
  overflow: auto;
  border-radius: var(--border-radius-main);
  padding: 18px; /* Smaller on mobile */
  font-size: 15px;
  box-shadow: var(--shadow-modal);
  transform: translateY(12px) scale(0.995);
  opacity: 0;
  transition: transform 320ms var(--transition-smooth), opacity 320ms ease;
  z-index: 2;
}

@media (min-width: 768px) {
  .profile-modal-content {
    padding: var(--space-lg);
    max-height: 900px;
    width: min(1500px, 98%);
  }
}

.profile-modal-wrapper.is-visible .profile-modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.profile-modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: transparent;
  border: none;
  font-size: 24px; /* Smaller on mobile */
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

@media (min-width: 768px) {
  .profile-modal-close {
    font-size: 28px;
  }
}

.profile-modal-close:hover {
  color: var(--color-text-dark);
}

.profile-modal-close:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--border-radius-sm);
}
.profile-modal-content h1,
.profile-modal-content h2,
.profile-modal-content h3 {
  margin-top: 0;
}
.profile-modal-body img {
  max-width: 220px;
  height: auto;
  display: block;
  margin-bottom: 14px;
}

/* Make sure section cards keep rounded look inside modal */
.profile-modal-content section {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Layout inside profile modal: left visual column + right content - Mobile First */
.profile-modal-layout {
  display: flex;
  flex-direction: column; /* Stack on mobile */
  gap: var(--space-md);
  align-items: stretch;
}

@media (min-width: 768px) {
  .profile-modal-layout {
    flex-direction: row;
    gap: var(--space-lg);
  }
}
.profile-modal-visual {
  width: 100%; /* Full width on mobile */
  flex: 0 0 auto;
  min-height: 300px;
  border-radius: var(--border-radius-md);
  background: var(--color-bg-alt);
  position: relative;
  max-height: 500px; /* Smaller on mobile */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-bottom: var(--space-lg);
  overflow: visible;
  height: auto;
}

@media (min-width: 768px) {
  .profile-modal-visual {
    width: 360px;
    flex: 0 0 360px;
    max-height: 600px;
  }
}

@media (min-width: 1024px) {
  .profile-modal-visual {
    width: 500px;
    flex: 0 0 500px;
    min-height: 400px;
    max-height: 800px;
    max-width: 700px;
  }
}

/* Также нужно задать высоту для самой галереи, так как родитель теперь резиновый */
.profile-gallery {
  width: 100%;
  height: auto; /* Убираем жесткие 600px */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px;
  box-sizing: border-box;
}
.profile-modal-visual img {
  max-width: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.profile-modal-body {
  overflow: auto;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0px 28px 28px 28px;
}

.gallery-main {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  max-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  background-color: var(--color-bg-muted);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
}

/* Класс для "умного" отображения */
.gallery-main img.contain-mode {
  object-fit: contain;
  object-position: center;
  background-color: var(--color-bg-subtle);
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  padding: 6px 6px 0;
  overflow-x: auto;
}
.gallery-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.gallery-thumbs img.active {
  opacity: 1;
  outline: 3px solid var(--color-bg-card);
  transform: translateY(-2px);
}
.gallery-thumbs img:focus-visible {
  outline: 3px solid var(--color-primary);
  opacity: 1;
}

/* Arrow buttons overlay */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.gallery-arrow.left {
  left: 12px;
}
.gallery-arrow.right {
  right: 12px;
}
.gallery-arrow:hover {
  transform: translateY(-50%) scale(1.03);
}

/* Content fade-in inside body */
.profile-modal-body .fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease, transform 320ms ease;
}
.profile-modal-body .fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Legacy media queries removed - now using Mobile-First approach */

button {
  transition: background-color 0.3s ease, color 0.3s ease;
}


/* 1. Наша новая обертка для анимации */
.answer-wrapper {
  display: grid;
  /* По умолчанию "строка" сетки имеет 0 высоту */
  grid-template-rows: 0fr;
  /* Анимируем плавное изменение высоты строки. */
  transition: grid-template-rows 0.3s ease-in-out;
}

/* 2. Когда <details> открыт, мы даем строке полную высоту ее контента (1fr) */
details[open] > .answer-wrapper {
  grid-template-rows: 1fr;
}

/* 3. Стилизуем сам контент внутри обертки */
.answer-content {
  overflow: hidden;
  padding: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}


.main-footer {
  background-color: var(--color-bg-footer);
  padding: var(--space-xl) 0;
  color: var(--color-text-main);
  font-family: var(--font-body);
  margin-top: auto;
}

/* Footer grid - Mobile First */
.footer-grid {
  display: flex;
  flex-direction: column; /* Stack on mobile */
  text-align: center;
  align-items: center;
  gap: 30px;
}

@media (min-width: 900px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: var(--space-xl);
  }
}

.footer-brand {
  flex: 1;
  min-width: 250px;
  display: flex;
  justify-content: center; /* Centered on mobile */
}

@media (min-width: 900px) {
  .footer-brand {
    justify-content: flex-start;
  }
}

.footer-brand-logo {
  max-height: 50px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}

.footer-contacts {
  text-align: center;
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: 1.1rem;
  font-weight: 500;
}

.footer-contacts a {
  text-decoration: none;
  color: var(--color-text-main);
  transition: color var(--transition-fast);
}

.footer-contacts a:hover {
  color: var(--color-primary);
}

.footer-contacts a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--border-radius-sm);
}

.footer-legal {
  text-align: center; /* Centered on mobile */
  flex: 1;
  min-width: 250px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

@media (min-width: 900px) {
  .footer-legal {
    text-align: right;
  }
}

.footer-legal p {
  margin: 4px 0;
}

/* Обновления для навбара с логотипом - Mobile First */
.navbar .container {
  display: flex;
  flex-wrap: wrap; /* Wrap on mobile */
  gap: 15px;
  justify-content: center;
  align-items: center;
}

@media (min-width: 768px) {
  .navbar .container {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 0; /* No margin on mobile */
  margin-bottom: 10px;
  width: 100%; /* Full width on mobile */
  justify-content: center;
}

@media (min-width: 768px) {
  .nav-logo {
    margin-right: auto;
    margin-bottom: 0;
    width: auto;
    justify-content: flex-start;
  }
}

.nav-logo-img {
  height: 40px; /* Smaller on mobile */
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .nav-logo-img {
    height: 50px;
  }
}

/* Дополнительные правки для адаптивности профилей - Mobile First */
.profile-page-content {
  padding-top: 30px;
  padding-bottom: 40px;
}

@media (min-width: 900px) {
  .profile-page-content {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }
}

.profile-info h1 {
  margin-top: 20px;
  line-height: 1.2;
}

@media (min-width: 900px) {
  .profile-info h1 {
    margin-top: 0;
  }
}

.profile-gallery-wrapper .gallery-main img {
  max-height: 500px; /* Smaller on mobile */
}

@media (min-width: 900px) {
  .profile-gallery-wrapper .gallery-main img {
    max-height: none;
  }
}

/* ============================================
   REDESIGNED PROFILE PAGE STYLES
   Fresh green gradient, full-size photos
   Mobile-First approach (375px base)
   ============================================ */


:root {
  --profile-accent: #2d8f6f; /* Fresh green */
  --profile-accent-hover: #247a5e;
  --profile-accent-light: rgba(143, 255, 176, 0.15);
  --profile-accent-medium: rgba(143, 255, 176, 0.25);
  --profile-accent-glow: #8fffb0; /* Main gradient color */
  --profile-bg-dark: #0a1f17; /* Dark green for contrast */
  --profile-text: #1a3129;
  --profile-text-soft: #4a6b5c;
  --profile-text-light: #ffffff;
  --profile-shadow: 0 8px 32px rgba(45, 143, 111, 0.15);
  --profile-shadow-hover: 0 16px 48px rgba(45, 143, 111, 0.25);
  --profile-glass: rgba(255, 255, 255, 0.92);
  --profile-glass-border: rgba(143, 255, 176, 0.3);
}


.profile-page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #d1fae5 100%);
  overflow: hidden;
}

.profile-page-bg::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 80vw;
  height: 80vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(
    circle at center,
    var(--profile-accent-glow),
    transparent 70%
  );
  opacity: 0.6;
  animation: float-glow 20s ease-in-out infinite;
}

.profile-page-bg::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -15%;
  width: 70vw;
  height: 70vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(
    circle at center,
    rgba(34, 197, 94, 0.4),
    transparent 60%
  );
  opacity: 0.5;
  animation: float-glow 25s ease-in-out infinite reverse;
}

@keyframes float-glow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(5%, 3%) scale(1.05);
  }
  66% {
    transform: translate(-3%, -2%) scale(0.95);
  }
}


.profile-hero {
  background: transparent;
  padding: 24px 0 32px;
  margin-bottom: 0;
  position: relative;
}

@media (min-width: 480px) {
  .profile-hero {
    padding: 32px 0 40px;
  }
}

@media (min-width: 768px) {
  .profile-hero {
    padding: 48px 0 56px;
  }
}

@media (min-width: 992px) {
  .profile-hero {
    padding: 60px 0 80px;
  }
}

.profile-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

@media (min-width: 768px) {
  .profile-hero-inner {
    flex-direction: row;
    text-align: left;
    gap: 48px;
    align-items: flex-start;
  }
}

@media (min-width: 992px) {
  .profile-hero-inner {
    gap: 64px;
  }
}


.profile-portrait {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-width: 280px;
}

@media (min-width: 480px) {
  .profile-portrait {
    max-width: 320px;
  }
}

@media (min-width: 768px) {
  .profile-portrait {
    width: 340px;
    max-width: none;
  }
}

@media (min-width: 992px) {
  .profile-portrait {
    width: 400px;
  }
}

.profile-portrait-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  object-fit: cover;
  object-position: top center;
  box-shadow: var(--profile-shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  background: linear-gradient(135deg, #e0f2e9 0%, #f0fdf4 100%);
}

@media (min-width: 768px) {
  .profile-portrait-img {
    border-radius: 24px;
  }
}

.profile-portrait-img:hover {
  transform: translateY(-4px);
  box-shadow: var(--profile-shadow-hover);
}

/* Decorative accent behind photo */
.profile-portrait::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  right: -12px;
  bottom: -12px;
  background: linear-gradient(
    135deg,
    var(--profile-accent-glow) 0%,
    rgba(34, 197, 94, 0.3) 100%
  );
  border-radius: 24px;
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (min-width: 768px) {
  .profile-portrait::before {
    top: 16px;
    left: 16px;
    right: -16px;
    bottom: -16px;
    border-radius: 28px;
  }
}

.profile-portrait:hover::before {
  opacity: 0.7;
  transform: translate(4px, 4px);
}

/* Hero info block */
.profile-hero-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  padding: 0 8px; /* Увеличенные отступы для мобильных */
  box-sizing: border-box;
  overflow: hidden; /* Предотвращает переполнение */
}

@media (min-width: 480px) {
  .profile-hero-info {
    padding: 0 12px;
  }
}

@media (min-width: 768px) {
  .profile-hero-info {
    gap: 20px;
    max-width: 550px;
    padding: 0;
    overflow: visible; /* Разрешаем переполнение на больших экранах */
  }
}

.profile-hero-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--profile-text);
  margin: 0;
  line-height: 1.25;
  word-wrap: break-word;
}

@media (min-width: 375px) {
  .profile-hero-name {
    font-size: 1.65rem;
  }
}

@media (min-width: 480px) {
  .profile-hero-name {
    font-size: 1.85rem;
  }
}

@media (min-width: 768px) {
  .profile-hero-name {
    font-size: 2.2rem;
  }
}

@media (min-width: 992px) {
  .profile-hero-name {
    font-size: 2.5rem;
  }
}

.profile-hero-specialty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--profile-glass);
  color: var(--profile-accent);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--profile-glass-border);
  margin: 0 auto;
  text-align: center;
  line-height: 1.4;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(45, 143, 111, 0.1);
}

@media (min-width: 480px) {
  .profile-hero-specialty {
    font-size: 0.9rem;
    padding: 12px 20px;
  }
}

@media (min-width: 768px) {
  .profile-hero-specialty {
    margin: 0;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 30px;
  }
}

.profile-hero-specialty::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--profile-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Price and CTA section */
.profile-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .profile-hero-actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .profile-hero-actions {
    justify-content: flex-start;
    margin-top: 16px;
    width: auto;
  }
}

.profile-hero-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--profile-glass);
  padding: 14px 18px; /* Уменьшен padding для мобильных */
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(45, 143, 111, 0.1);
  border: 1px solid var(--profile-glass-border);
  backdrop-filter: blur(8px);
  flex-shrink: 0; /* Предотвращает сжатие */
  min-width: 0; /* Позволяет сжиматься при необходимости */
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .profile-hero-price {
    padding: 16px 24px;
  }
}

@media (min-width: 768px) {
  .profile-hero-price {
    align-items: flex-start;
    padding: 18px 28px;
  }
}

.profile-hero-price-label {
  font-size: 0.75rem;
  color: var(--profile-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.profile-hero-price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--profile-accent);
  font-family: var(--font-heading);
}

@media (min-width: 768px) {
  .profile-hero-price-value {
    font-size: 1.7rem;
  }
}

.btn-profile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Уменьшен gap для мобильных */
  padding: 14px 20px; /* Уменьшен padding для мобильных */
  background: linear-gradient(135deg, var(--profile-accent) 0%, #22c55e 100%);
  color: white;
  text-decoration: none;
  font-size: 0.85rem; /* Уменьшен размер шрифта для мобильных */
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(45, 143, 111, 0.35);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box; /* Важно для правильного расчета ширины */
  white-space: nowrap; /* Предотвращает перенос текста */
  overflow: hidden; /* Скрывает переполнение */
  text-overflow: ellipsis; /* Добавляет многоточие при переполнении */
  min-height: 44px; /* Минимальная высота для удобного тапа */
}

@media (min-width: 375px) {
  .btn-profile-cta {
    font-size: 0.9rem;
    padding: 14px 22px;
    gap: 10px;
  }
}

@media (min-width: 480px) {
  .btn-profile-cta {
    width: auto;
    padding: 16px 28px;
    font-size: 0.95rem;
    white-space: normal; /* Разрешаем перенос на больших экранах */
  }
}

@media (min-width: 768px) {
  .btn-profile-cta {
    padding: 16px 32px;
    font-size: 1rem;
  }
}

.btn-profile-cta:hover {
  background: linear-gradient(
    135deg,
    var(--profile-accent-hover) 0%,
    #16a34a 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(45, 143, 111, 0.45);
}

.btn-profile-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Для очень маленьких экранов - уменьшаем размер иконки */
@media (max-width: 374px) {
  .btn-profile-cta {
    font-size: 0.8rem;
    padding: 12px 16px;
    gap: 6px;
  }

  .btn-profile-cta svg {
    width: 16px;
    height: 16px;
  }
}


.profile-about {
  background: var(--profile-glass);
  padding: 40px 0;
  position: relative;
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--profile-glass-border);
  border-bottom: 1px solid var(--profile-glass-border);
}

@media (min-width: 768px) {
  .profile-about {
    padding: 60px 0;
  }
}

@media (min-width: 992px) {
  .profile-about {
    padding: 80px 0;
  }
}

.profile-about-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 8px; /* Увеличенные отступы для мобильных */
}

@media (min-width: 480px) {
  .profile-about-inner {
    padding: 0 12px;
  }
}

@media (min-width: 768px) {
  .profile-about-inner {
    padding: 0;
  }
}

.profile-section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--profile-text);
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (min-width: 480px) {
  .profile-section-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
  }
}

@media (min-width: 768px) {
  .profile-section-title {
    font-size: 1.75rem;
    margin-bottom: 32px;
  }
}

.profile-section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: linear-gradient(
    to bottom,
    var(--profile-accent-glow),
    var(--profile-accent)
  );
  border-radius: 2px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .profile-section-title::before {
    height: 32px;
  }
}

.profile-about-text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--profile-text-soft);
}

@media (min-width: 480px) {
  .profile-about-text {
    font-size: 1rem;
    line-height: 1.8;
  }
}

@media (min-width: 768px) {
  .profile-about-text {
    font-size: 1.05rem;
    line-height: 1.85;
  }
}

.profile-about-text p {
  margin: 0 0 1.25em 0;
}

.profile-about-text p:last-child {
  margin-bottom: 0;
}

.profile-about-text strong {
  color: var(--profile-text);
  font-weight: 600;
}

/* Subsections within About */
.profile-about-block {
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .profile-about-block {
    margin-bottom: 44px;
  }
}

.profile-about-block:last-child {
  margin-bottom: 0;
}

.profile-about-subtitle {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--profile-text);
  margin: 0 0 12px 0;
}

@media (min-width: 768px) {
  .profile-about-subtitle {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }
}


.profile-services {
  background: transparent;
  padding: 40px 0 60px;
  position: relative;
}

@media (min-width: 768px) {
  .profile-services {
    padding: 60px 0 80px;
  }
}

@media (min-width: 992px) {
  .profile-services {
    padding: 80px 0 100px;
  }
}

.profile-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start; /* Изменено с stretch на start для предотвращения перекрытия */
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .profile-services-grid {
    gap: 32px;
  }
}

@media (min-width: 600px) {
  .profile-services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@media (min-width: 1000px) {
  .profile-services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

/* For pages with 4 services, allow 3 columns on large screens */
.profile-services-grid.grid-3 {
  max-width: 1200px;
}

/* Убеждаемся, что grid-3 не наследует 2 колонки на больших экранах */
@media (min-width: 600px) {
  .profile-services-grid.grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@media (min-width: 1000px) {
  .profile-services-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
  }
}

@media (min-width: 1200px) {
  .profile-services-grid.grid-3 {
    gap: 44px;
  }
}

.profile-service-card {
  background: var(--profile-glass);
  border-radius: 20px;
  padding: 24px 20px; /* Уменьшены отступы для мобильных */
  display: flex;
  flex-direction: column;
  min-height: 260px; /* Немного уменьшена минимальная высота */
  box-shadow: 0 8px 32px rgba(45, 143, 111, 0.12);
  border: 1px solid var(--profile-glass-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(8px);
  position: relative; /* Добавлено для правильного позиционирования */
  width: 100%;
  box-sizing: border-box; /* Предотвращает выход за границы */
  overflow: hidden; /* Предотвращает выход контента за границы */
}

@media (min-width: 480px) {
  .profile-service-card {
    padding: 28px 24px;
    min-height: 280px;
  }
}

.profile-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(45, 143, 111, 0.2);
}

@media (min-width: 768px) {
  .profile-service-card {
    padding: 40px 36px;
    border-radius: 24px;
    min-height: 320px;
  }
}

.profile-service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem; /* Немного уменьшен для мобильных */
  font-weight: 700;
  color: var(--profile-text);
  margin: 0 0 14px 0;
  line-height: 1.3;
}

@media (min-width: 480px) {
  .profile-service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }
}

@media (min-width: 768px) {
  .profile-service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
}

.profile-service-duration {
  font-size: 0.95rem;
  color: var(--profile-text-soft);
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

@media (min-width: 768px) {
  .profile-service-duration {
    font-size: 1rem;
    margin-bottom: 24px;
  }
}

.profile-service-price {
  font-size: 1.4rem; /* Немного уменьшен для мобильных */
  font-weight: 700;
  color: var(--profile-accent);
  font-family: var(--font-heading);
  margin-bottom: 18px;
  margin-top: auto; /* Push price and button to bottom of card */
}

@media (min-width: 480px) {
  .profile-service-price {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }
}

@media (min-width: 768px) {
  .profile-service-price {
    font-size: 1.85rem;
    margin-bottom: 24px;
  }
}

.profile-service-card .btn-profile-cta {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px 20px; /* Оптимальный размер для тапа */
  font-size: 0.9rem; /* Немного уменьшен для мобильных */
  font-weight: 600;
  border-radius: 12px;
  flex-shrink: 0;
  min-height: 44px; /* Минимальная высота для удобного тапа */
}

@media (min-width: 480px) {
  .profile-service-card .btn-profile-cta {
    font-size: 0.95rem;
  }
}

@media (min-width: 768px) {
  .profile-service-card .btn-profile-cta {
    padding: 16px 24px;
    font-size: 1rem;
    min-height: auto;
  }
}


.profile-credentials {
  background: var(--profile-glass);
  padding: 40px 0;
  border-top: 1px solid var(--profile-glass-border);
  backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .profile-credentials {
    padding: 60px 0;
  }
}

@media (min-width: 992px) {
  .profile-credentials {
    padding: 80px 0;
  }
}

.profile-credentials-intro {
  max-width: 600px;
  margin: 0 auto 32px;
  text-align: center;
  color: var(--profile-text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0 8px;
}

@media (min-width: 768px) {
  .profile-credentials-intro {
    margin-bottom: 44px;
    font-size: 1rem;
    line-height: 1.7;
    padding: 0;
  }
}

.profile-creds-title {
  text-align: center;
  justify-content: center;
}

.profile-creds-title::before {
  display: none;
}

/* Credentials Grid */
.profile-creds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 400px) {
  .profile-creds-grid {
    gap: 12px;
  }
}

@media (min-width: 480px) {
  .profile-creds-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (min-width: 768px) {
  .profile-creds-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

@media (min-width: 992px) {
  .profile-creds-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

.profile-cred-item {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(45, 143, 111, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(135deg, #e0f2e9 0%, #f0fdf4 100%);
}

@media (min-width: 768px) {
  .profile-cred-item {
    border-radius: 12px;
  }
}

.profile-cred-item:hover {
  transform: scale(1.03);
  box-shadow: var(--profile-shadow-hover);
}

.profile-cred-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.profile-cred-item:hover img {
  transform: scale(1.05);
}

.profile-cred-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(45, 143, 111, 0.8) 0%,
    transparent 60%
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
  .profile-cred-overlay {
    padding: 16px;
  }
}

.profile-cred-item:hover .profile-cred-overlay {
  opacity: 1;
}

.profile-cred-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  color: var(--profile-accent);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .profile-cred-zoom {
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 20px;
  }
}

.profile-cred-item:hover .profile-cred-zoom {
  transform: translateY(0);
}

.profile-cred-zoom svg {
  width: 14px;
  height: 14px;
}

@media (min-width: 768px) {
  .profile-cred-zoom svg {
    width: 16px;
    height: 16px;
  }
}


.credential-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.credential-lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.credential-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.credential-lightbox.is-active .credential-lightbox-content {
  transform: scale(1);
}

.credential-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.credential-lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: 10px;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.credential-lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.credential-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0.8;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.credential-lightbox-nav:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
}

.credential-lightbox-nav.prev {
  left: -70px;
}

.credential-lightbox-nav.next {
  right: -70px;
}

@media (max-width: 768px) {
  .credential-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .credential-lightbox-nav.prev {
    left: 10px;
  }

  .credential-lightbox-nav.next {
    right: 10px;
  }
}


.profile-back {
  padding: 16px 0;
  background: transparent;
}

@media (min-width: 768px) {
  .profile-back {
    padding: 20px 0;
  }
}

.profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--profile-text-soft);
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 8px 16px;
  background: var(--profile-glass);
  border-radius: 24px;
  border: 1px solid var(--profile-glass-border);
  backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
  .profile-back-link {
    font-size: 0.9rem;
    gap: 8px;
  }
}

.profile-back-link:hover {
  color: var(--profile-accent);
  transform: translateX(-4px);
  background: white;
}

.profile-back-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .profile-back-link svg {
    width: 18px;
    height: 18px;
  }
}


.profile-education-list {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 0 8px;
  list-style: none;
}

@media (min-width: 768px) {
  .profile-education-list {
    margin-top: 44px;
    padding: 0;
  }
}

.profile-education-item {
  position: relative;
  padding: 16px 0 16px 24px;
  border-left: 2px solid var(--profile-accent-medium);
}

@media (min-width: 768px) {
  .profile-education-item {
    padding: 20px 0 20px 36px;
  }
}

.profile-education-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 20px;
  width: 8px;
  height: 8px;
  background: var(--profile-accent);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--profile-accent-light);
}

@media (min-width: 768px) {
  .profile-education-item::before {
    left: -6px;
    width: 10px;
    height: 10px;
    top: 24px;
  }
}

.profile-education-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--profile-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

@media (min-width: 768px) {
  .profile-education-year {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }
}

.profile-education-title {
  font-size: 0.9rem;
  color: var(--profile-text);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .profile-education-title {
    font-size: 1rem;
    line-height: 1.6;
  }
}
