/* ===== ОБЩИЕ ПЕРЕМЕННЫЕ И СБРОС ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Основная палитра */
  --color-dark: #484c4d;
  --color-accent: #d65a42;
  --color-light: #e5d5c5;

  /* Производные оттенки (смеси для разнообразия) */
  --bg-dark: #484c4d;
  --bg-dark-soft: #53585a; /* чуть светлее тёмного */
  --bg-card: #5d6264;       /* фон карточек на тёмных секциях */
  --bg-light: #e5d5c5;
  --bg-white: #f9f4ed;      /* почти белый, но теплее */
  --text-light: #e5d5c5;
  --text-muted: #b0a89c;    /* приглушённый бежевый */
  --text-dark: #2e3132;
  --text-softdark: #484c4d;

  /* Размеры и отступы */
  --menu-height: 8vh;
  --hero-height: 66.67vh;
  --font-size-xl: clamp(2.5rem, 5vw, 5rem);
  --font-size-l: clamp(1.6rem, 2.5vw, 2.4rem);
  --font-size-m: clamp(1rem, 1.8vw, 1.4rem);
  --font-size-s: clamp(0.85rem, 1.3vw, 1rem);
  --font-size-xs: clamp(0.75rem, 1.1vw, 0.9rem);
  --padding-section: clamp(3rem, 7vh, 8rem) clamp(1.5rem, 6vw, 4rem);
  --gap-grid: clamp(1.5rem, 3vw, 3rem);
  --max-width: 1400px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  font-size: var(--font-size-m);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
}

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 5vw;
  padding-right: 5vw;
}

/* ----- ТИПОГРАФИКА ----- */
h1, h2, h3, h4 {
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h1 {
  font-size: var(--font-size-xl);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h2 {
  font-size: var(--font-size-l);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 60%;
  height: 1px;
  opacity: 0.6;
}

img{
	max-width: 100%;
}

/* ----- ШАПКА ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(72, 76, 77, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(229, 213, 197, 0.15);
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--menu-height);
  min-height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo img {
  height: 70%;
  width: auto;
  max-height: 45px;
  object-fit: contain;
}

.desktop-nav ul {
  display: flex;
  list-style: none;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  align-items: center;
}

.desktop-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.desktop-nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--color-accent);
}

.desktop-nav a:hover::before,
.desktop-nav a:focus-visible::before {
  width: 100%;
}

/* Мобильное меню */
.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: var(--font-size-m);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary::after {
  content: '☰';
  font-size: 1.5rem;
  color: var(--color-accent);
}

.mobile-nav[open] summary::after {
  content: '✕';
}

.mobile-nav nav {
  position: absolute;
  top: 100%;
  right: 0;
  background: #3d4142;
  border: 1px solid rgba(229,213,197,0.15);
  border-radius: 4px;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  min-width: 220px;
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mobile-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: var(--font-size-s);
  letter-spacing: 0.04em;
  display: block;
  padding: 0.3rem 0;
}

/* ----- Начало ----- */
.hero {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--text-light);
    border-bottom: 1px solid rgba(229,213,197,0.1);
    padding: 2rem 5vw;
}

.hero-content {
  max-width: 900px;
}

.hero h1 {
  margin-bottom: 1.2rem;
  line-height: 1.1;
  color: var(--color-accent);
}

.hero .hero-sub {
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    color: var(--bg-dark);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.hero .date {
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  color: var(--bg-dark);
  margin-top: 1rem;
  letter-spacing: 0.04em;
}

/* ----- СЕКЦИИ ----- */
section {
  padding: var(--padding-section);
  border-bottom: 1px solid rgba(72,76,77,0.08);
}

/* Тёмные секции */
.section-dark,
.section-mid {
  background-color: var(--bg-dark);
  color: var(--text-light);
}
.section-dark h2,
.section-mid h2 {
  color: var(--color-accent);
}
.section-dark h2::after,
.section-mid h2::after {
  background: var(--color-accent);
}
.section-mid {
  background-color: var(--bg-dark-soft);
}

/* Светлые секции */
.section-light {
  background-color: var(--bg-light);
  color: var(--text-dark);
}
.section-light h2 {
  color: var(--color-accent);
}
.section-light h2::after {
  background: var(--color-accent);
}

.section-cool {
  background-color: #f5ede4; /* чуть светлее бежевого, для разнообразия */
  color: var(--text-dark);
}
.section-cool h2 {
  color: var(--color-accent);
}
.section-cool h2::after {
  background: var(--color-accent);
}

.section-white {
  background-color: var(--bg-white);
  color: var(--text-dark);
}
.section-white h2 {
  color: var(--text-dark);
}
.section-white h2::after {
  background: var(--color-accent);
}

.text-content {
  max-width: 100%;
  margin: 0 auto;
  font-size: var(--font-size-m);
  line-height: 1.7;
}
.text-content p {
  margin-bottom: 1.5rem;
}

/* ----- ВИДЕО ----- */
.video-placeholder {
  background: #3d4142;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  max-width: 800px;
  margin: 2rem auto;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2vw;
}
.video-placeholder video{
	max-width: 100%;
	height: auto;
}

/*
.video-placeholder::before {
  content: '';
  width: 5vw; height: 5vw;
  min-width: 40px; min-height: 40px;
  max-width: 80px; max-height: 80px;
  background: var(--color-accent);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>') center/contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>') center/contain no-repeat;
  margin-bottom: 1rem;
  opacity: 0.9;
}
*/

/* ----- КАРТОЧКИ ----- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap-grid);
  max-width: 1100px;
  margin: 3rem auto 0;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--color-accent);
  padding: 2.5rem 1.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-dark);
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.card h3 {
  font-size: var(--font-size-m);
  color: var(--text-dark);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card p {
  font-size: var(--font-size-xs);
  color: var(--text-softdark);
  line-height: 1.6;
}

/* ----- ПРОГРАММА ----- */
.schedule {
  max-width: 900px;
  margin: 0 auto;
}

.day-title {
  font-size: var(--font-size-l);
  margin: 2.5rem 0 1.8rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 0.5rem;
  color: var(--color-accent);
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.time {
  font-size: var(--font-size-s);
  color: var(--color-accent);
  min-width: 100px;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.event {
  font-size: var(--font-size-s);
  color: var(--text-dark);
  flex: 1;
}

.event small {
  display: block;
  color: var(--text-softdark);
  font-size: var(--font-size-xs);
  margin-top: 0.2rem;
}

.break {
  color: var(--text-softdark);
  font-style: italic;
}

/* ----- РАСПИсание ruspy ----- */
.schedule table{
    width: 100%;
    border: 1px solid var(--text-softdark);
    font-size: 1.1rem;
    color: var(--text-softdark);
	border-collapse: collapse;
}

.schedule table td{
	text-align: center;
	border: 1px solid var(--text-softdark);
}

.schedule table td:nth-child(1){
  width: 15%;
  font-size: var(--font-size-s);
  color: var(--color-accent);
  min-width: 100px;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.schedule table td:nth-child(2){
  width: 15%;

}
.schedule table td:nth-child(3){
  font-size: var(--font-size-s);
  color: var(--text-dark);
}
.schedule table td:nth-child(3) small{
  color: var(--text-softdark);
  font-size: var(--font-size-xs);
}

/* ----- КОНТАКТЫ ----- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  max-width: 900px;
  margin: 2rem auto 0;
}

.contact-item {
  font-size: var(--font-size-s);
  line-height: 1.7;
  color: var(--text-dark);
}

.contact-item strong {
  display: block;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.accent-text {
  color: var(--color-accent);
  font-weight: 500;
}

/* ----- ФУТЕР ----- */
footer {
  text-align: center;
  padding: 3rem 5vw;
  background-color: #d6c7b6; /* теплый бежевый, чуть темнее основного */
  color: var(--text-dark);
  font-size: var(--font-size-xs);
  border-top: 1px solid rgba(72,76,77,0.1);
}

table{
	width: 100%;
	border-collapse: collapse;
} 
table td, table th{	
	border-collapse: collapse;
	border: 1px solid #fdd2b3;
}
table td img{
	padding: 1em;
}
table.Speakers td:nth-child(1){
	width: 1em;
	text-align: center;
}
table.Speakers td:nth-child(4){
	height: 28vh;
	overflow-y: auto;
	overflow-x: hidden;
	display: block;
	border: none;
}
table.Leaders td:nth-child(3){
	height: 28vh;
	overflow-y: auto;
	overflow-x: hidden;
	display: block;
	border: none;
}

table.Speakers td:nth-child(2){
	text-align: center;
}

.TableWrapper{
	width: 100%;
	overflow-x: scroll;
	position: relative;
}

@keyframes pulse-and-slide {
  0%, 100% {
    opacity: 0.4;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(6px); /* смещение вправо, чтобы намекнуть на направление */
  }
}

.SpeakerContainer, .LeaderContainer{
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
	margin-bottom: 1.5em;
}
.LectureTitle{
	font-weight: bold;
	font-style: italic;
}
.SpeakerName{
	font-weight: bold;
}
.SpeakerNameAndPhoto{
    flex-basis: 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.SpeakerInfoBox{
	flex-basis: 60%;
	display: flex;
	flex-direction: column;
}


/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
  :root {
    --hero-height: 55vh;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 4rem);
  }

  .timeline-item {
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.8rem;
  }

  .time {
    min-width: unset;
  }
  
	.TableWrapper::before{
		content: "⇔";
		position: absolute;
		top: 4vh;
		right: 12px;
		background: rgba(0, 0, 0, 0.6);
		color: #fff;
		font-size: 20px;
		padding: 6px 14px;
		border-radius: 30px;
		font-weight: bold;
		pointer-events: none;
		white-space: nowrap;
		box-shadow: 0 2px 8px rgba(0,0,0,0.2);
		animation: pulse-and-slide 2s ease-in-out infinite;
	}
	.TableWrapper::after{
		content: "⇔";
		position: absolute;
		bottom: 4vh;
		right: 12px;
		background: rgba(0, 0, 0, 0.6);
		color: #fff;
		font-size: 20px;
		padding: 6px 14px;
		border-radius: 30px;
		font-weight: bold;
		pointer-events: none;
		white-space: nowrap;
		box-shadow: 0 2px 8px rgba(0,0,0,0.2);
		animation: pulse-and-slide 2s ease-in-out infinite;
	}
	
	.SpeakerNameAndPhoto, .SpeakerInfoBox{
		flex-basis: 100%;
	}
	.SpeakerContainer{
		background: rgba(0,0,0, 0.1);
		padding: 1em;
	}
}

@media (max-width: 480px) {
  .logo img {
    height: 55%;
  }

  .card {
    padding: 2rem 1.2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}