/* ============ CSS Variables ============ */
:root {
    /* Light Theme */
    --color-primary: #D4A574;
    --color-secondary: #2C3E50;
    --color-accent: #E8D5C4;
    --color-bg: #FAF8F5;
    --color-bg-alt: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-muted: #7F8C8D;
    --color-border: #E8E8E8;
    
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

[data-theme="dark"] {
    --color-bg: #1a1a2e;
    --color-bg-alt: #16213e;
    --color-text: #EAEAEA;
    --color-text-muted: #A0A0A0;
    --color-border: #2C3E50;
    --color-accent: #3D3D5C;
}

/* ============ Reset & Base ============ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

/* ============ Utilities ============ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 16px;
}

.section-divider {
    text-align: center;
    margin-bottom: 48px;
    font-size: 1.5rem;
}

.section-divider span {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* В тёмной теме при hover фон прозрачный — текст должен быть виден */
[data-theme="dark"] .btn-primary:hover {
    color: var(--color-primary);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.8rem;
}

/* Кнопка в футере на тёмном фоне */
.footer .btn-outline {
    color: #ffffff;
    border-color: var(--color-primary);
}

.footer .btn-outline:hover {
    background: var(--color-primary);
    color: #ffffff;
}

/* ============ Theme Toggle ============ */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ============ Hero Section ============ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-bg) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/hero.jpg') center/cover no-repeat;
    opacity: 0.15;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--color-bg) 70%);
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 20px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero-title .name {
    display: inline-block;
}

.hero-title .ampersand {
    display: inline-block;
    margin: 0 16px;
    color: var(--color-primary);
    font-style: italic;
}

.hero-date {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.7s;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.9s;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.countdown-value {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    color: var(--color-primary);
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-top: 8px;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 1s ease forwards 1.1s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-text-muted);
    border-radius: 25px;
    opacity: 0.5;
}

.scroll-indicator span {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
}

/* ============ Navigation ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.nav.scrolled {
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-normal);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

/* Явный цвет для nav-toggle span в тёмной теме */
[data-theme="dark"] .nav-toggle span {
    background: var(--color-text);
}

/* ============ Story Section ============ */
.story {
    background: var(--color-bg-alt);
}

.story-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.story-content-wide {
    max-width: 1100px;
}

.story-text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1.8;
    font-style: italic;
    color: var(--color-text-muted);
}

.story-text-wide {
    max-width: 780px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* ============ Story Slider ============ */
.story-slider {
    position: relative;
    max-width: 1040px;
    margin: 0 auto 40px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.slider-container {
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-slide {
    min-width: 100%;
    position: relative;
}

.slider-slide img {
    width: 100%;
    height: 620px;
    object-fit: cover;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-text);
    transition: all var(--transition-normal);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.slider-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn-prev {
    left: 20px;
}

.slider-btn-next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.2);
}

.slider-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 420px;
    background: var(--color-accent);
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* ============ Timeline Section ============ */
.timeline-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.timeline-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 40px;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-body);
    color: var(--color-text); /* явно задаём цвет текста */
}

.timeline-tab:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.timeline-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.timeline-tab .tab-icon {
    font-size: 2rem;
}

.timeline-tab .tab-text {
    font-weight: 600;
    font-size: 1rem;
}

.timeline-tab .tab-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

.timeline-content {
    display: none;
}

.timeline-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.timeline-day-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 32px;
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 600px;
    margin: 0 auto 48px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.timeline-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.timeline-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.timeline-time {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--color-primary);
    min-width: 80px;
}

.timeline-info h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.timeline-info p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.timeline-note {
    text-align: center;
    padding: 20px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* ============ Location Section ============ */
.location {
    background: var(--color-bg-alt);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.location-name {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 8px;
}

.location-address {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.location-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.location-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.location-card:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-alt);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.location-card:active {
    transform: translateY(0);
}

.location-card.active {
    border-color: var(--color-primary);
    background: rgba(212, 165, 116, 0.1);
}

.location-card-icon {
    font-size: 1.5rem;
}

.location-card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.location-card-info strong {
    font-size: 0.85rem;
    color: var(--color-text);
}

.location-card-info span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.location-card-arrow {
    font-size: 1rem;
    color: var(--color-primary);
    opacity: 0;
    transform: translateX(-5px);
    transition: all var(--transition-fast);
}

.location-card:hover .location-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.location-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.location-map iframe {
    display: block;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.legend-item:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* Yandex Map Balloon Styles */
.map-balloon {
    padding: 10px;
    max-width: 250px;
}

.map-balloon-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #333;
}

.map-balloon-address {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.map-balloon-link {
    display: inline-block;
    padding: 8px 16px;
    background: #D4A574;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.map-balloon-link:hover {
    background: #c49564;
}

/* ============ Dresscode Section ============ */
.dresscode-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.dresscode-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* ============ FAQ Section ============ */
.faq {
    background: var(--color-bg-alt);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: color var(--transition-fast);
}

/* faq-question в тёмной теме */
[data-theme="dark"] .faq-question {
    color: var(--color-text);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ============ RSVP & Forms ============ */
.rsvp {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-bg) 100%);
}

.rsvp-form,
.question-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-bg-alt);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 22px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 20px;
}

.form-actions .btn {
    flex: 1;
    min-width: 220px;
}

.family-key-hint {
    margin: 8px 0 24px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.family-key-hint.active {
    border-style: solid;
    border-color: rgba(39, 174, 96, 0.4);
    color: #1f7d49;
    background: rgba(39, 174, 96, 0.08);
}

.family-members-block {
    margin-top: 20px;
}

.family-members-block h4 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.family-members-list {
    display: grid;
    gap: 10px;
}

.family-members-empty {
    margin: 0;
    color: var(--color-text-muted);
}

.family-member-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.family-member-main {
    display: grid;
    gap: 4px;
}

.family-member-main span {
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.family-member-actions {
    margin-bottom: 0;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.family-member-actions .btn {
    flex: 0 0 auto;
    min-width: 0;
}

.family-member-icon-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    border-radius: 10px;
}

input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

input[type="file"]:hover,
input[type="file"]:focus {
    border-color: var(--color-primary);
    color: var(--color-text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.radio-label:hover {
    border-color: var(--color-primary);
}

.radio-label input {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-fast);
}

.radio-label input:checked + .radio-custom {
    border-color: var(--color-primary);
}

.radio-label input:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
}

.conditional-fields {
    display: none;
}

.conditional-fields.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ============ RSVP New Form ============ */
.rsvp-step-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--color-primary);
    text-align: center;
}

.btn-add-member {
    width: 100%;
    margin-top: 8px;
    border-style: dashed;
    font-size: 0.95rem;
}

/* Family member card */
.family-member-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.family-member-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.family-member-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

.family-member-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    line-height: 1;
}

.family-member-remove:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
}

/* Role selector */
.role-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.role-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text); /* явно задаём цвет */
    transition: all var(--transition-normal);
    text-align: center;
}

.role-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
}

.role-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff; /* белый текст на цветном фоне */
}

.member-fields {
    animation: fadeIn 0.3s ease;
}

@media (max-width: 480px) {
    .role-selector {
        flex-direction: column;
    }
}

/* ============ Questions Section ============ */
.questions {
    background: var(--color-bg-alt);
}

/* ============ Gallery Section ============ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* ============ Footer ============ */
.footer {
    background: var(--color-secondary);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 8px;
}

.footer-date {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 32px;
}

.footer-contacts {
    margin-bottom: 24px;
}

.footer-contacts p,
.footer-contacts a {
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
    display: block;
}

.footer-contacts a:hover {
    color: white;
}

.footer-hashtag {
    margin-top: 32px;
    font-size: 1.2rem;
    color: var(--color-primary);
}

.footer-date a {
    color: inherit;
    transition: color var(--transition-fast);
}

.footer-date a:hover {
    color: #ff0000;
}

/* ============ Toast Notification ============ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-secondary);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: #27AE60;
}

.toast.error {
    background: #E74C3C;
}

/* ============ Animations ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes scrollBounce {
    0%, 100% { top: 10px; opacity: 1; }
    50% { top: 25px; opacity: 0.3; }
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .location-content {
        grid-template-columns: 1fr;
    }
    
    .location-info {
        text-align: center;
    }
    
    .location-actions {
        justify-content: center;
    }
    
    .location-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        transform: translateX(100%);
        transition: transform var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu a {
        font-size: 1.2rem;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 101;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .countdown {
        gap: 16px;
    }
    
    .countdown-item {
        min-width: 60px;
    }
    
    .timeline-item {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .timeline-time {
        min-width: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .rsvp-form,
    .question-form {
        padding: 32px 24px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        min-width: 100%;
    }

    .family-member-item {
        flex-direction: column;
        align-items: stretch;
    }

    .family-member-actions {
        justify-content: flex-start;
    }
    
    .theme-toggle {
        top: 10px;
        right: 70px;
        width: 44px;
        height: 44px;
    }
    
    .timeline-tabs {
        flex-direction: column;
        gap: 12px;
    }
    
    .timeline-tab {
        flex-direction: row;
        padding: 16px 24px;
        gap: 12px;
    }
    
    .timeline-tab .tab-icon {
        font-size: 1.5rem;
    }
    
    .slider-slide img {
        height: 430px;
    }
    
    .slider-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .slider-btn-prev {
        left: 8px;
    }
    
    .slider-btn-next {
        right: 8px;
    }
    
    .map-legend {
        gap: 12px;
        padding: 12px;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
    
    .location-card-arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title .ampersand {
        display: block;
        margin: 8px 0;
    }
    
    .countdown-item {
        min-width: 50px;
    }
    
    .countdown-value {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.8rem;
    }
    
    .slider-slide img {
        height: 340px;
    }
    
    .slider-dots {
        bottom: 12px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
}
