/* ============================================================
   COMPANY STYLES — company_styles.css
   Prefix: company-
   Depends on: osnova_styles.css (--ewi-* variables)
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */
.company-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  padding: 2.5rem 0 3rem;
  color: #fff;
}

.company-hero__inner { }

.company-hero__head {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

/* Logo */
.company-hero__logo {
  flex-shrink: 0;
}

.company-hero__logo img,
.company-hero__logo span {
  width: 96px;
  height: 96px;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
}

.company-hero__logo img {
  object-fit: contain;
  background: #fff;
}

/* Info */
.company-hero__info { flex: 1; min-width: 0; }

.company-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .75rem;
}

.company-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 .5rem;
  color: #fff;
}

.company-hero__desc {
  font-size: 1rem;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: 1rem;
}

/* Stats row */
.company-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: .5rem;
}

.company-hero__stat {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: .75rem;
  padding: .45rem .85rem;
  font-size: .82rem;
  color: rgba(255,255,255,.9);
}

.company-hero__stat svg { opacity: .8; flex-shrink: 0; }
.company-hero__stat strong { font-weight: 700; }
.company-hero__stat span { opacity: .7; }

/* Badge gold */
.ewi-badge--gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.company-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ewi-dark);
  margin-bottom: 1.5rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--ewi-border);
}

/* ============================================================
   PROGRAMS SECTION
   ============================================================ */
.company-programs-section {
  padding: 3rem 0;
  background: var(--ewi-bg);
}

.company-programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .company-programs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .company-programs-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PROGRAM CARD
   ============================================================ */
.program-card {
  background: #fff;
  border: 1px solid var(--ewi-border);
  border-radius: var(--ewi-radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow .2s, transform .2s;
}

.program-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

/* Card header */
.program-card__head { }

.program-card__name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ewi-dark);
  margin: .4rem 0 0;
  line-height: 1.35;
}

/* Stats row */
.program-card__stats {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.program-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ewi-bg);
  border: 1px solid var(--ewi-border);
  border-radius: .6rem;
  padding: .5rem .75rem;
  min-width: 60px;
  text-align: center;
}

.program-stat__val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ewi-dark);
  line-height: 1.1;
}

.program-stat__label {
  font-size: .65rem;
  color: var(--ewi-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .15rem;
}

/* Price block */
.program-card__price {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  border-top: 1px solid var(--ewi-border);
  padding-top: .75rem;
}

.program-card__price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--ewi-text-muted);
}

.program-card__price-row strong { color: var(--ewi-dark); font-weight: 600; }

.program-card__price-row--highlight {
  background: #fff7ed;
  border-radius: .4rem;
  padding: .2rem .4rem;
  margin: 0 -.4rem;
}
.program-card__price-row--highlight strong { color: #c2410c; }

.program-card__price-row--total {
  border-top: 1px dashed var(--ewi-border);
  padding-top: .35rem;
  margin-top: .1rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ewi-dark) !important;
}
.program-card__price-row--total strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ewi-accent);
}

/* CTA button */
.program-card__btn {
  display: block;
  text-align: center;
  padding: .65rem;
  background: var(--ewi-accent);
  color: #fff;
  border-radius: .6rem;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .15s;
  margin-top: auto;
}
.program-card__btn:hover {
  background: #c43c12;
  transform: translateY(-1px);
}

/* ============================================================
   PROS / CONS
   ============================================================ */
.company-pros-cons-section {
  padding: 2.5rem 0 3rem;
  background: #fff;
}

.company-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .company-pros-cons { grid-template-columns: 1fr; }
}

.company-pros,
.company-cons {
  background: var(--ewi-bg);
  border: 1px solid var(--ewi-border);
  border-radius: var(--ewi-radius);
  padding: 1.25rem;
}

.company-pros { border-left: 3px solid #22c55e; }
.company-cons { border-left: 3px solid #ef4444; }

.company-pros h3,
.company-cons h3 {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--ewi-border);
}

.company-pros h3 { color: #16a34a; }
.company-pros h3 svg { color: #22c55e; }
.company-cons h3 { color: #dc2626; }
.company-cons h3 svg { color: #ef4444; }

.company-pros ul,
.company-cons ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.company-pros ul li,
.company-cons ul li {
  font-size: .88rem;
  color: var(--ewi-text);
  line-height: 1.5;
  padding-left: .75rem;
  position: relative;
}

.company-pros ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
}

.company-cons ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ef4444;
}

/* ============================================================
   CATEGORY DETAIL PAGE — filters + header
   ============================================================ */
.category-hero {
  background: linear-gradient(135deg, #333 0%, #000 60%, #333 100%);
  padding: 2.5rem 0 3rem;
  color: #fff;
}

.category-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 .5rem;
}

.category-hero__desc {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  max-width: 1200px;
  line-height: 1.6;
}

.category-filters-section {
  background: #fff;
  border-bottom: 1px solid var(--ewi-border);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.category-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.category-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .9rem;
  border-radius: 2rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ewi-text-muted);
  background: var(--ewi-bg);
  border: 1.5px solid var(--ewi-border);
  text-decoration: none;
  transition: all .18s;
}

.category-filter-btn:hover {
  border-color: var(--ewi-accent);
  color: var(--ewi-accent);
}

.category-filter-btn--active {
  background: var(--ewi-accent);
  border-color: var(--ewi-accent);
  color: #fff;
}

/* Companies catalog grid */
.companies-catalog-section {
  padding: 2.5rem 0 3rem;
}

/* ============================================================
   REVIEWS
   ============================================================ */
.company-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.company-review {
  background: #fff;
  border: 1px solid var(--ewi-border);
  border-radius: var(--ewi-radius);
  padding: 1.25rem;
}

.company-review__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.company-review__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ewi-accent);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.company-review__author {
  font-size: .9rem;
  color: var(--ewi-dark);
  display: block;
}

.company-review__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .15rem;
}

.company-review__stars {
  font-size: .95rem;
  color: #f59e0b;
  letter-spacing: .05em;
}

.company-review__date {
  font-size: .75rem;
  color: var(--ewi-text-muted);
}

.company-review__body {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ewi-text);
  margin: 0;
}

/* Review form */
.company-review-form-wrap {
  background: #fff;
  border: 1px solid var(--ewi-border);
  border-radius: var(--ewi-radius);
  padding: 1.5rem;
}

.company-review-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.company-review-form button[type=submit] {
  align-self: flex-start;
  text-align: center;
}

.review-form__field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.review-form__label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ewi-dark);
}

.review-form__input,
.review-form__textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px solid var(--ewi-border);
  border-radius: .5rem;
  font-size: .88rem;
  font-family: inherit;
  color: var(--ewi-dark);
  background: #fff;
  transition: border-color .15s;
  box-sizing: border-box;
}
.review-form__input:focus,
.review-form__textarea:focus {
  outline: none;
  border-color: var(--ewi-accent);
}
.review-form__input--sm { max-width: 120px; }
.review-form__textarea { resize: vertical; }

.review-form__error {
  font-size: .78rem;
  color: #dc2626;
}

/* Star rating */
.review-rating {
  display: flex;
  flex-direction: row-reverse;
  gap: .1rem;
  width: fit-content;
}

.review-rating__star {
  font-size: 1.75rem;
  color: #d1d5db;
  cursor: pointer;
  transition: color .12s;
  line-height: 1;
}

.review-rating__star--selected,
.review-rating__star:hover,
.review-rating__star:hover ~ .review-rating__star {
  color: #f59e0b;
}

/* Success message */
.company-review-success {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--ewi-radius);
  padding: 1rem 1.25rem;
  color: #16a34a;
  font-weight: 600;
  font-size: .9rem;
}

/* ============================================================
   RESPONSIVE: hero layout
   ============================================================ */
@media (max-width: 640px) {
  .company-hero__head {
    flex-direction: column;
    gap: 1rem;
  }

  .company-hero__logo img,
  .company-hero__logo span {
    width: 72px;
    height: 72px;
    font-size: 1.4rem;
  }
}

/* ============================================================
   ГОРОДА — city_list, city_detail
   ============================================================ */

/* Список городов */
.city-catalog {
  padding: 2.5rem 0 3.5rem;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.city-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  background: var(--ewi-card-bg, #fff);
  border: 1px solid var(--ewi-border);
  border-radius: 12px;
  text-decoration: none;
  transition: box-shadow .18s, border-color .18s, transform .15s;
}

.city-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.09);
  border-color: var(--ewi-accent);
  transform: translateY(-2px);
}

.city-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ewi-text);
  margin: 0 0 .2rem;
}

.city-card__count {
  font-size: .78rem;
  color: var(--ewi-text-muted);
  margin: 0;
}

.city-card__arrow {
  color: var(--ewi-text-muted);
  flex-shrink: 0;
  margin-left: .5rem;
  transition: color .18s;
}

.city-card:hover .city-card__arrow { color: var(--ewi-accent); }

/* Страница города — компании */
.city-companies-section {
  padding: 2.5rem 0;
}

/* Описание города */
.city-text-section {
  padding: 2rem 0 2.5rem;
  background: var(--ewi-bg);
}

.city-text-content {
  max-width: 800px;
  font-size: .95rem;
  line-height: 1.75;
  color: var(--ewi-text);
}

.city-text-content p {
  margin-bottom: 1rem;
  font-weight: 400;
}

.city-text-content strong,
.city-text-content b {
  font-weight: 600;
}

.city-text-content h2 {
  font-weight: 700;
  font-size: 1.45rem;
  margin-top: 2rem;
  margin-bottom: .8rem;
  color: var(--ewi-dark);
}

.city-text-content h3 {
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: .6rem;
  color: var(--ewi-dark);
}

.city-text-content h4 {
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1.2rem;
  margin-bottom: .5rem;
  color: var(--ewi-dark);
}

.city-text-content a {
  color: var(--ewi-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.city-text-content a:hover {
  text-decoration: none;
}

.city-text-content ul {
  list-style: none;
  padding: 0;
  margin: .8rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.city-text-content ul li {
  padding-left: 1.4rem;
  position: relative;
  font-weight: 400;
  font-size: .93rem;
  line-height: 1.65;
}

.city-text-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--ewi-accent);
  font-weight: 700;
}

.city-text-content ol {
  list-style: none;
  counter-reset: city-ol;
  padding: 0;
  margin: .8rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.city-text-content ol li {
  counter-increment: city-ol;
  padding-left: 2rem;
  position: relative;
  font-weight: 400;
  font-size: .93rem;
  line-height: 1.65;
}

.city-text-content ol li::before {
  content: counter(city-ol);
  position: absolute;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--ewi-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(.05rem);
}

.city-text-content blockquote {
  border-left: 3px solid var(--ewi-accent);
  margin: 1.5rem 0;
  padding: .75rem 1.25rem;
  background: var(--ewi-bg);
  border-radius: 0 var(--ewi-radius) var(--ewi-radius) 0;
  font-style: italic;
  color: var(--ewi-text-muted);
}

.city-text-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ewi-radius);
  margin: 1rem 0;
}

/* Другие города — таблетки */
.city-other-section {
  padding: 2.5rem 0 3rem;
}

.city-other__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  color: var(--ewi-text);
}

.city-other-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.city-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  background: var(--ewi-bg);
  border: 1px solid var(--ewi-border);
  border-radius: 20px;
  font-size: .85rem;
  color: var(--ewi-text);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}

.city-pill:hover {
  background: var(--ewi-accent);
  border-color: var(--ewi-accent);
  color: #fff;
}

.city-pill__count {
  font-size: .72rem;
  font-weight: 600;
  background: rgba(0,0,0,.08);
  border-radius: 10px;
  padding: .1rem .4rem;
}

.city-pill:hover .city-pill__count {
  background: rgba(255,255,255,.25);
}

@media (max-width: 600px) {
  .city-grid {
    grid-template-columns: 1fr 1fr;
  }
}
