/* ===== Тема как «О нас» на главной (index.css) ===== */
:root {
  --bg-dark: #0A0A0A;
  --bg-velvet: #1A0A0A;
  --gold: #C5A572;
  --gold-light: #D4AF37;
  --gold-dark: #8B7355;
  --text-light: #F5F5F5;
  --text-dim: #AAAAAA;
  --border-gold: rgba(197, 165, 114, 0.3);
  
  --ease-slow: cubic-bezier(0.7, 0, 0.3, 1);
  --container-padding: 4vw;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0F0505;
  background-color: #0F0505;
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

p {
  font-size: clamp(0.9rem, 1.1vw, 1.2rem);
  color: var(--text-light);
  line-height: 1.8;
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  color: var(--text-light);
}

/* ===== НАВИГАЦИЯ ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem var(--container-padding);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gold);
  transition: all 0.4s var(--ease-slow);
}

header.scrolled {
  padding: 1rem var(--container-padding);
  background: rgba(10, 10, 10, 0.95);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding: 0.5rem 0;
}

.logo:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-slow);
}

.logo:hover:after {
  transform: scaleX(1);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-links a:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease-slow);
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a:hover:before {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* ===== ГЕРОЙ ===== */
.partners-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 130px var(--container-padding) 90px;
  isolation: isolate;
}

.partners-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* как .about-section на главной */
  background-color: #1A0A0A;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(197, 165, 114, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 0, 0, 0.05) 0%, transparent 50%),
    linear-gradient(135deg, #1A0A0A 0%, #0F0505 100%);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

body.admin-mode .partners-hero-bg {
  cursor: pointer;
}

.partners-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 920px;
  width: 100%;
}

.partners-hero-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.38em;
  color: var(--gold-light);
  margin-bottom: 1.75rem;
  font-weight: 400;
}

.partners-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 300;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.05;
  margin-bottom: 1.75rem;
}

.partners-hero-divider {
  width: 90px;
  height: 2px;
  margin: 0 auto 1.75rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.partners-hero-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  color: rgba(245, 245, 245, 0.9);
  line-height: 1.75;
  max-width: 680px;
  margin: 0 auto;
  font-weight: 300;
}

@media (max-width: 768px) {
  .partners-hero {
    min-height: 72vh;
    padding: 110px var(--container-padding) 70px;
  }
  .partners-hero-kicker {
    letter-spacing: 0.22em;
    font-size: 0.72rem;
  }
}

/* ===== ПОИСК ===== */
.search-section {
  padding: 3rem var(--container-padding);
  background: #0F0505;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.search-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-item label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 500;
}

.search-item input {
  padding: 1rem 1.5rem;
  background: rgba(26, 10, 10, 0.7);
  border: 1px solid var(--border-gold);
  color: var(--text-light);
  font-size: 1rem;
  border-radius: 2px;
}

.search-item input:focus {
  outline: none;
  border-color: var(--gold);
}

/* ===== СЕТКА ПАРТНЁРОВ ===== */
.partners-section {
  padding: 2rem var(--container-padding) 6rem;
  background: #0F0505;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.partner-card {
  background: rgba(26, 10, 10, 0.7);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.4s var(--ease-slow);
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(5px);
}

.partner-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Карточка скрыта (для админа) */
.partner-card.card-hidden {
  opacity: 0.5;
}
.partner-card.card-hidden:hover {
  opacity: 0.8;
}

.partner-card-image {
  height: 260px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  background: #111;
}

.partner-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-slow);
}

.partner-card:hover .partner-card-image img {
  transform: scale(1.05);
}

.partner-card-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.partner-title {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.partner-description {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.partner-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  border-top: 1px solid rgba(197, 165, 114, 0.2);
  padding-top: 1rem;
}

.partner-location, .partner-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.partner-location i, .partner-type i {
  color: var(--gold);
}

.partner-details-link {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--gold);
  border: none;
  color: var(--bg-dark);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
  border-radius: 2px;
  margin-top: auto;
}

.partner-details-link:hover {
  background: var(--gold-light);
}

/* Метка ссылки (видна только в админке) */
.partner-link-label {
  display: none;
  color: #aaa;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  text-align: center;
}
body.admin-mode .partner-link-label {
  display: block;
}

/* Кнопки на карточке (удаление и скрытие) */
.card-delete-btn,
.card-hide-btn {
  position: absolute;
  top: 10px;
  z-index: 20;
  background: rgba(0,0,0,0.7);
  color: #ff6b6b;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 1rem;
}
.card-delete-btn { right: 10px; }
.card-hide-btn { right: 50px; }

body.admin-mode .card-delete-btn,
body.admin-mode .card-hide-btn {
  display: flex;
}
.card-delete-btn:hover {
  background: #ff6b6b;
  color: white;
  transform: scale(1.05);
}
.card-hide-btn:hover {
  background: var(--gold);
  color: black;
}

.add-card-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 15002;
  background: #d4af37;
  color: #000;
  border: none;
  padding: 12px 24px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  gap: 8px;
  align-items: center;
}
.add-card-btn:hover {
  background: #e5c158;
  transform: scale(1.02);
}
body.admin-mode .add-card-btn {
  display: flex;
}

/* ===== ФУТЕР ===== */
footer {
  background: rgb(26 10 10 / 50%);
  padding: 6rem var(--container-padding) 3rem;
  border-top: 1px solid var(--border-gold);
  position: relative;
}

footer:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 5rem;
  margin-bottom: 4rem;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo {
  font-size: 2.5rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
  display: inline-block;
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-logo:hover {
  color: var(--gold-light);
}

.footer-grid > div > p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  color: #dddddd;
  max-width: 350px;
}

.footer-grid h4 {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer-grid h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.footer-grid h4:hover::after {
  width: 80px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 1.2rem;
}

.footer-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  color: var(--gold);
  transform: translateX(8px);
  border-bottom-color: var(--gold);
}

.social-links {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
}

.social-link {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  text-decoration: none;
  transition: all 0.4s ease;
  border-radius: 50%;
  font-size: 1.3rem;
  background: rgba(26, 10, 10, 0.6);
}

.social-link:hover {
  background: var(--gold);
  color: var(--bg-dark);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(197, 165, 114, 0.3);
}

.footer-docs-link {
  color: var(--gold);
  cursor: pointer;
  font-size: 1.2rem;
  border-bottom: 1px dashed var(--gold);
  padding-bottom: 2px;
  transition: all 0.3s;
  display: inline-block;
  margin-top: 0.5rem;
}
.footer-docs-link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid var(--border-gold);
  color: #aaa;
  font-size: 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.02em;
}

.footer-bottom p:first-child {
  margin-bottom: 0.5rem;
  color: #ccc;
}

/* Модальные окна, оферта, политика, форма обратной связи — styles/site-footer.css */

.toast {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: #1a1a1a;
  border: 1px solid var(--gold);
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 15000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.toast-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.toast-close {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-velvet);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-slow);
  border-right: 1px solid var(--border-gold);
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu .nav-links {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  text-align: center;
}
.mobile-menu .nav-links a {
  font-size: 1.5rem;
  color: var(--gold);
  text-decoration: none;
}
.menu-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

#admin-save-bottom {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 15001;
  background: #d4af37;
  color: #000;
  border: none;
  padding: 12px 24px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  display: none;
}
body.admin-mode #admin-save-bottom { display: block; }

.inline-editor {
  position: fixed;
  background: #2a2a2a;
  border: 2px solid #d4af37;
  border-radius: 8px;
  padding: 12px;
  z-index: 20000;
  display: none;
  flex-direction: column;
  gap: 12px;
  min-width: 260px;
}
.inline-editor .editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.inline-editor label { color: #d4af37; font-size: 0.8rem; }
.inline-editor input, .inline-editor select {
  background: #1a1a1a;
  border: 1px solid #d4af37;
  color: #fff;
  padding: 4px;
  border-radius: 4px;
}
.inline-editor button {
  background: #d4af37;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
[data-editable].editing-active {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  background-color: rgba(197, 165, 114, 0.1);
}
#admin-login-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 20001;
}
#admin-login-box {
  background: #1a1a1a;
  border: 2px solid #d4af37;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  border-radius: 8px;
  text-align: center;
}
#admin-login-box h3 { color: #d4af37; margin-bottom: 1.5rem; }
#admin-login-box input {
  width: 100%;
  padding: 0.8rem;
  background: #2a1a1a;
  border: 1px solid #d4af37;
  color: #fff;
  margin-bottom: 1rem;
}
#admin-login-box button {
  background: #d4af37;
  color: #000;
  border: none;
  padding: 0.8rem 2rem;
  cursor: pointer;
}

.link-edit-modal .play-modal {
  max-width: 500px;
}
.link-edit-modal input {
  width: 100%;
  padding: 0.8rem;
  background: rgba(26, 10, 10, 0.7);
  border: 1px solid var(--border-gold);
  color: var(--text-light);
  border-radius: 4px;
  margin: 1rem 0;
}
.link-edit-modal .modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}
.link-edit-modal button {
  padding: 0.6rem 1.5rem;
  background: var(--gold);
  border: none;
  color: #000;
  cursor: pointer;
  border-radius: 4px;
}
.link-edit-modal button.cancel {
  background: #333;
  color: #fff;
}

/* Drag & drop styles */
.partner-card.dragging {
  opacity: 0.5;
  border-color: var(--gold-light);
}
.partner-card.drag-over {
  border-color: var(--gold);
  box-shadow: 0 0 15px var(--gold-light);
}

@media (max-width: 992px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
}
@media (max-width: 768px) {
  .search-grid { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .partner-title { font-size: 1.55rem; }
  .partner-card-content { padding: 1.5rem; }
  .partner-card-image { height: 200px; }
  .footer-grid { grid-template-columns: 1fr; gap: 4rem; }
}
@media (max-width: 480px) {
  .partners-section { padding: 1.5rem var(--container-padding) 4rem; }
  .search-section { padding: 2rem var(--container-padding); }
  .partner-title { font-size: 1.35rem; }
  .partners-hero { min-height: 65vh; padding: 100px 1.25rem 60px; }
}
.fade-in {
  animation: fadeIn 1s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
