/* style.css — ПОЛНАЯ ФИНАЛЬНАЯ ВЕРСИЯ */
/* www.epstein.de — все 7 страниц */
:root {
  --primary: #1653FA;
  --accent: #00D1FF;
  --purple: #7C3AED;
  --bg-dark: #0F172A;
  --bg-light: #F8FAFC;
  --text-light: #E2E8F0;
  --text-dark: #1E293B;
  --yellow: #FFD700;
  --yellow-gradient: linear-gradient(135deg, #FFD700, #FFC107, #FFA000);
  --gradient: linear-gradient(135deg, #1653FA, #00D1FF, #7C3AED);
  --gradient-left: linear-gradient(135deg, rgba(22,83,250,0.9), rgba(0,209,255,0.8), rgba(124,58,237,0.7));
  --radius: 12px;
  --shadow: 0 4px 15px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
/* === HEADER === */
header {
  background: var(--bg-dark);
  color: white;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.logo {
  display: block;
  transition: transform 0.3s ease;
}
.logo:hover { transform: scale(1.05); }
.logo img {
  display: block;
  height: 70px;
  border-radius: 10px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
  flex-wrap: wrap;
}
nav a {
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.95rem;
}
nav a:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  transform: translateY(-2px);
}
nav a.active {
  background: rgba(255,255,255,0.25);
  border-color: white;
}
.dropdown {
  position: relative;
}
.dropdown:hover .submenu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-dark);
  min-width: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition);
}
.submenu a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border: none;
}
.submenu a:hover {
  background: var(--primary);
}
/* === MAIN === */
main {
  padding: 1rem 5% 0;
  max-width: 1400px;
  margin: 0 auto;
}
h1 {
  text-align: center;
  font-size: 2.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 1rem 0;
  animation: fadeInDown 1s ease-out;
  font-weight: 700;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
/* === FADE SLIDER === */
.slider-container {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  margin-bottom: 1.5rem;
}
.slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: white;
  font-weight: 500;
  font-size: 1.3rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}
.slide.active {
  opacity: 1;
  z-index: 1;
}
.slide::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.slide span {
  position: relative;
  z-index: 2;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: translateY(-50%) scale(1.1);
}
.prev { left: 20px; }
.next { right: 20px; }
.pause-btn {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}
.pause-btn:hover {
  background: rgba(0,0,0,0.7);
}
/* === INFO GRID === */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}
.info-table {
  background: white;
  padding: 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  color: white;
}
.info-table::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gradient-left);
  z-index: 0;
}
.info-table:nth-child(2)::before {
  background: var(--yellow-gradient);
}
.info-table > * {
  position: relative;
  z-index: 1;
}
.info-table ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.info-table ul li {
  padding: 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 500;
  position: relative;
  padding-left: 1.2rem;
  color: var(--yellow);
}
.info-table ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--yellow);
  font-weight: bold;
}
/* ПРАВАЯ ТАБЛИЦА — ОТЦЕНТРИРОВАНА ПО ВЫСОТЕ */
.info-table:nth-child(2) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.widget-cell {
  background: #1E40AF;
  padding: 0.6rem;
  border-radius: 8px;
  text-align: center;
  margin: 0.8rem auto 0;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.675rem;
  line-height: 1.3;
  width: 25%;
  min-width: 80px;
  max-width: 120px;
}
.widget-cell p {
  margin: 0;
  font-weight: 600;
  color: #FFD700;
}
/* === LOGOS GRID === */
.logos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin: 1.2rem 0;
}
.logo-item {
  background: white;
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}
.logo-item:hover {
  transform: translateY(-5px);
}
.logo-item img {
  max-width: 80px;
  max-height: 50px;
  object-fit: contain;
}
/* === QUOTE === */
.quote {
  text-align: center;
  font-style: italic;
  color: #64748B;
  margin: 1rem 0 0 0;
  padding: 0.8rem;
  font-size: 0.95rem;
  background: #F1F5F9;
  border-radius: var(--radius);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
  line-height: 1.4;
}
/* === FOOTER === */
footer {
  background: var(--bg-dark);
  color: var(--text-light);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  margin-top: 0;
}
/* === TIMELINE — ТАБЛИЦЫ ОДНА ПОД ДРУГОЙ === */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1rem 0;
}
.timeline-item {
  background: white;
  padding: 1.8rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  color: white;
  transition: transform 0.3s ease;
}
.timeline-item:hover {
  transform: translateY(-5px);
}
.timeline-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gradient-left);
  opacity: 0.9;
  z-index: 0;
}
.timeline-item:nth-child(1)::before { background: linear-gradient(135deg, #1653FA, #00D1FF); }
.timeline-item:nth-child(2)::before { background: linear-gradient(135deg, #7C3AED, #EC4899); }
.timeline-item:nth-child(3)::before { background: linear-gradient(135deg, #10B981, #34D399); }
.timeline-item:nth-child(4)::before { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.timeline-item:nth-child(5)::before { background: linear-gradient(135deg, #EF4444, #F87171); }
.timeline-item > * {
  position: relative;
  z-index: 1;
}
.timeline-item h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.timeline-item p,
.timeline-item ul {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}
.timeline-item ul {
  list-style: none;
  padding: 0;
}
.timeline-item ul li {
  padding: 0.4rem 0;
  position: relative;
  padding-left: 1.2rem;
}
.timeline-item ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.8);
  font-weight: bold;
}
.lang-list,
.hobby-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  font-weight: 600;
}
.lang-list li,
.hobby-list li {
  background: rgba(255,255,255,0.15);
  padding: 0.6rem;
  border-radius: 8px;
  text-align: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
}
/* === KONTAKT СТРАНИЦА === */
.info-block {
  background: white;
  padding: 1.6rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1rem 0 1.5rem;
  position: relative;
  overflow: hidden;
  color: white;
}
.info-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  opacity: 0.9;
  z-index: 0;
}
.info-block > * {
  position: relative;
  z-index: 1;
}
.info-block h2 {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
  font-weight: 700;
}
.info-block p {
  margin: 0;
  line-height: 1.6;
  font-size: 1.05rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.contact-card {
  background: white;
  padding: 1.6rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  color: white;
}
.contact-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #1653FA, #00D1FF);
  opacity: 0.9;
  z-index: 0;
}
.contact-card:nth-child(2)::before {
  background: linear-gradient(135deg, #10B981, #34D399);
}
.contact-card > * {
  position: relative;
  z-index: 1;
}
.contact-card h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 700;
}
.contact-card p {
  margin: 0;
  line-height: 1.7;
  font-size: 1.05rem;
}
.map-container {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
/* === WÄHRUNGSRECHNER — КРАСИВАЯ ТАБЛИЦА === */
.currency-table-container {
  max-width: 500px;
  margin: 2rem auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.currency-table {
  width: 100%;
  border-collapse: collapse;
}
.currency-table th {
  background: linear-gradient(135deg, #10B981, #34D399);
  color: white;
  padding: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}
.currency-converter {
  padding: 1.5rem;
  background: rgba(255,255,255,0.95);
  color: #1E293B;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.input-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}
.input-group select,
.input-group input {
  padding: 0.7rem;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: border-color 0.3s ease;
}
.input-group select:focus,
.input-group input:focus {
  outline: none;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.result {
  background: #F9FAFB;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin: 1rem 0;
  border: 1px solid #E5E7EB;
}
#convert-btn {
  background: linear-gradient(135deg, #10B981, #34D399);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  margin-top: 0.5rem;
}
#convert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
#convert-btn:active {
  transform: translateY(0);
}
/* === СТРАНИЦА VIDEO — ПО ОДНОМУ В РЯД === */
.video-page-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 900px;
  padding: 0 1rem;
}
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.video-wrapper:hover {
  transform: translateY(-5px);
}
.video-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  color: #ccc;
  font-size: 1rem;
  text-align: center;
  z-index: 1;
}
.video-placeholder p {
  margin: 0;
  padding: 1rem;
}

/* === СТРАНИЦА FOTOS — БЕЗ ПРОБЕЛОВ, С ‹ › === */
.fotos-controls {
  text-align: center;
  padding: 0 5% 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.fotos-controls input,
.fotos-controls button {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid #D1D5DB;
  background: white;
  color: #1E293B;
  font-family: inherit;
  font-size: 0.95rem;
}
.fotos-controls input {
  width: 90px;
}
.fotos-controls button {
  background: var(--yellow);
  color: #1E293B;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.fotos-controls button:hover {
  background: #FFA000;
  transform: translateY(-2px);
}

/* ГАЛЕРЕЯ — БЕЗ НИЖНЕГО ОТСТУПА */
.fotos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  padding: 0 5% 0;     /* УБРАН НИЖНИЙ PADDING */
  margin-bottom: 0;    /* УБРАН MARGIN */
}
.fotos-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  background: #111;
}
.fotos-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(255,215,0,0.4);
}
.fotos-gallery img.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ПАГИНАЦИЯ — БЕЗ ВЕРХНЕГО ОТСТУПА */
.fotos-pagination {
  text-align: center;
  padding: 0.8rem 5% 1.5rem;  /* УМЕНЬШЕН ВЕРХНИЙ PADDING */
  margin-top: 0;              /* УБРАН MARGIN */
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.fotos-page-btn {
  padding: 0.6rem 1rem;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fotos-page-btn.active,
.fotos-page-btn:hover {
  background: var(--yellow);
  color: #1E293B;
  font-weight: 600;
}

/* === МОДАЛЬНОЕ ОКНО — СИМВОЛЫ ‹ › === */
.fotos-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.97);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  overflow: auto;
}
.fotos-modal-content {
  position: relative;
  max-width: 92%;
  max-height: 85vh;
  text-align: center;
}
.fotos-modal img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 15px;
  box-shadow: 0 0 40px rgba(255,215,0,0.5);
  display: block;
  margin: 0 auto;
}
.fotos-close {
  position: absolute;
  top: -10px; right: -10px;
  background: rgba(0,0,0,0.7);
  color: var(--yellow);
  font-size: 36px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 0 15px rgba(0,0,0,0.8);
}
.fotos-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: var(--yellow);
  font-size: 36px;
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
  transition: var(--transition);
}
.fotos-nav-arrow:hover {
  background: var(--yellow);
  color: #1E293B;
  transform: translateY(-50%) scale(1.1);
}
.fotos-left { left: 20px; }
.fotos-right { right: 20px; }
.fotos-caption {
  margin-top: 1rem;
  background: rgba(0,0,0,0.7);
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  color: var(--yellow);
  font-style: italic;
  font-size: 1.1rem;
  display: inline-block;
  max-width: 90%;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 992px) {
  .info-grid { grid-template-columns: 1fr; gap: 1rem; }
  .logos-grid { grid-template-columns: repeat(3, 1fr); }
  .slider-container { height: 350px; }
  h1 { font-size: 2.1rem; }
  .widget-cell { width: 35%; }
}
@media (max-width: 768px) {
  header { flex-direction: column; gap: 1rem; }
  nav ul { justify-content: center; gap: 0.8rem; }
  nav a { font-size: 0.9rem; padding: 0.4rem 0.8rem; }
  .logos-grid { grid-template-columns: repeat(2, 1fr); }
  .slider-container { height: 300px; }
  .slide { font-size: 1.1rem; padding: 1.2rem; }
  .widget-cell { width: 50%; }
  .contact-grid { grid-template-columns: 1fr; }
  .info-block,
  .contact-card { padding: 1.4rem; }
  .timeline-item { padding: 1.4rem; }
  .timeline-item h2 { font-size: 1.4rem; }
  .lang-list,
  .hobby-list { grid-template-columns: 1fr; }

  .currency-table-container { margin: 1rem; }
  .currency-converter { padding: 1.2rem; }

  .fotos-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  .fotos-gallery img {
    height: 160px;
  }
  .fotos-controls input {
    width: 70px;
  }
  .fotos-nav-arrow {
    width: 40px; height: 40px; font-size: 30px;
  }
  .fotos-left { left: 10px; }
  .fotos-right { right: 10px; }
}
@media (max-width: 480px) {
  .logos-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.8rem; }
  .logo img { height: 55px; }
  .widget-cell { width: 70%; }

  .fotos-gallery img {
    height: 150px;
  }
  .fotos-close {
    width: 36px; height: 36px; font-size: 30px; top: 10px; right: 10px;
  }
}

