/* ===== RESET & БАЗА ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Шрифт для всех заголовков */
h1, h2, h3, h4, h5, h6,
.hero h1,
.section-header h2,
.timeline-card h3,
.modal-title,
.switcher-btn span,
.flag-label-top {
    font-family: 'Geologica', 'Playfair Display', serif;
    font-weight: 600;
}

/* Особо крупные заголовки можно сделать жирнее */
.hero h1 {
    font-weight: 700;
}

.section-header h2 {
    font-weight: 600;
}

.timeline-card h3 {
    font-weight: 500;
}

.modal-title {
    font-family: 'Geologica', 'Playfair Display', serif;
    font-weight: 600;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #fffefd;
    color: #1e2f2c;
    line-height: 1.5;
    scroll-behavior: smooth;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    background-image: url('img/shapka.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 85vh;
    display: flex;
    align-items: center;
    color: rgb(255, 255, 255);
    text-align: center;
    overflow: hidden;
}

.hero-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7); 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}


/* Затемнение поверх картинки */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* чёрное затемнение 50% */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}


.hero-content {
    position: relative;
    z-index: 2;
    max-width: 880px;
    margin: 0 auto;
}

.hero-prelude {
    display: inline-block;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 115, 0, 0.2);
    backdrop-filter: blur(4px);
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Geologica', 'Playfair Display', serif;
}

.hero h1 {
    font-family: 'Geologica', 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 680px;
    margin: 0 auto 2rem;
    color: rgb(255, 255, 255);
}

.btn-hero {
    display: inline-block;
    background: #c73f1e;
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-hero:hover {
    background: #a83214;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}



/* ===== НАВИГАЦИЯ И БУРГЕР МЕНЮ ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(30, 47, 44, 0.75); 
    backdrop-filter: blur(12px);     
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Geologica', sans-serif;
    
    display: inline-flex;
    align-items: center;
    gap: 8px; 
}

.logo-icon {
    height: 24px;      
    width: auto;       
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 30px; 
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* СТИЛЬ ДЛЯ ОБВОДКИ АКТИВНОЙ СТРАНИЦЫ */
.nav-links a.active-page {
    color: #fff;
    border-color: #cda45e; 
    background: rgba(205, 164, 94, 0.1); 
    font-weight: 600;
}

/* Кнопка бургера (для мобильных) */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102;
}

.burger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.hero {
    padding-top: 120px;
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ФЛАГИ / ГЕРБЫ ===== */
.switcher-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.symbol-switcher {
    display: flex;
    gap: 20px;
    background: white;
    padding: 10px 20px;
    border-radius: 60px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.switcher-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #5d4a3a;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.switcher-icon {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 6px;
}

.switcher-btn.active {
    background: #c73f1e;
    color: white;
    box-shadow: 0 4px 12px rgba(199, 63, 30, 0.3);
}

.switcher-btn:hover:not(.active) {
    background: #f1ede4;
    transform: translateY(-2px);
}

/* ===== TIMELINE ===== */
.timeline-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #d4a01c00 0%, #b12e0e0c 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: 'Geologica', 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #2c422c;
}

/* КАРТОЧКА */
.timeline-card {
    background: rgb(252, 242, 227);
    border-radius: 30px;
    padding: 24px;
    border: 1px solid #eee;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Верхняя надпись (тип знамени) */
.flag-label-top {
    display: block;
    text-align: center;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #5d4a3a;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Центрированная дата */
.card-number-center {
    font-size: 1rem;
    font-weight: 700;
    color: #c73f1e;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Блок изображения */
.flag-preview-img {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f8f8f8;

    border: 2px solid #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flag-preview-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;

}

.timeline-card:hover .flag-preview-img img {
    transform: scale(1.05);
}

.heraldic-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.timeline-card h3 {
    font-family: 'Geologica', 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #1a2a2a;
}

.timeline-card p {
    font-size: 0.95rem;
    color: #4a5b52;
    flex-grow: 1;
}

.coat-mini {
    background: #f8e6c7;
    padding: 12px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border-left: 4px solid #c1723a;
    color: #3a2c23;
    margin-top: 12px;
}

.note {
    margin-top: 12px;
    font-size: 0.75rem;
    color: #705439;
    font-weight: 500;
    background: #f3cea6b2;
    border-radius: 18px;
    padding: 6px 12px;
    text-align: center;
}

.info-block {
    background: #f1ede4;
    padding: 64px 0;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 40px;
}

.heraldry-detail h3, .facts h3 {
    font-family: 'Geologica', 'Playfair Display', serif;
    font-size: 1.7rem;
    margin-bottom: 20px;
    color: #1d3528;
}

.heraldry-detail p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.55;
    color: #2e3b36;
}

.facts ul {
    list-style: none;
    padding-left: 0;
}

.facts li {
    padding-left: 1.7rem;
    position: relative;
    margin-bottom: 0.85rem;
    font-size: 0.98rem;
    line-height: 1.45;
}

.facts li::before {
    content: "⚡";
    position: absolute;
    left: 0;
    color: #c5421e;
    font-size: 1rem;
}

/* ===== ЦИТАТА ===== */
.fullwidth-russian {
    background: #231f1b;
    color: #ffe9cf;
    padding: 70px 20px;
    text-align: center;
}

.center-quote p {
    font-size: 1.8rem;
    font-family: 'Geologica', 'Playfair Display', serif;
    max-width: 860px;
    margin: 0 auto 20px;
    line-height: 1.4;
    font-weight: 400;
    quotes: "«" "»";
}

.center-quote span {
    font-size: 0.95rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ===== FOOTER ===== */
footer {
    background: #1c2a22;
    color: #cfd8ce;
    padding: 40px 0;
    border-top: 1px solid #3c4e3a;
}

.footer-inner {
    text-align: center;
}

.footer-inner p {
    margin: 8px 0;
    font-size: 0.85rem;
}

.footer-nav {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 32px;
}

.footer-nav a {
    color: #ecc897;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #ffd58c;
    text-decoration: underline;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.modal.show {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: rgb(255, 248, 237);
    border-radius: 30px 30px 0 0;
    padding: 40px 30px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.modal.show .modal-content {
    transform: translateX(-50%) translateY(0);
    top: 10vh;
    bottom: auto;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #666;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f07f34;
}

.modal-close:hover {
    color: #c73f1e;
    background: #e0e0e0;
}

.gallery-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.gallery-nav {
    background: #f07f34;
    border: none;
    color: #333;
    font-size: 28px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gallery-nav:hover {
    background: #c73f1e;
    color: white;
    transform: scale(1.05);
}

.gallery-nav.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gallery-nav.disabled:hover {
    background: #f0f0f0;
    color: #333;
    transform: none;
}

.gallery-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

#modalImage {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
    border-radius: 16px;
    border: 3px solid #000000;
    background-color: #8b0000;
}

.gallery-caption {
    text-align: justify;  
    text-align-last: center;  
    color: #333;
    font-size: 1.15rem;
    line-height: 1.6;
    padding: 5px 20px 0 20px;
}

.gallery-caption p {
    font-size: 1.15rem;
    line-height: 1.6;
    text-align: justify;
    text-align-last: center;
}

.detail-btn {
    background: #c73f1e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    width: 100%;
}

.detail-btn:hover {
    background: #a83214;
    transform: translateY(-2px);
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.modal-title {
    font-family: 'Geologica', 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    color: #c73f1e;
    margin: 10px 0 0px 0;
    padding: 0 px;
    letter-spacing: 0.5px;
}

html {
    overflow-x: hidden;
    margin-right: calc(-1 * (100vw - 100%));
    scroll-behavior: smooth;
}

.flag-preview-img.coat-img {
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    margin-bottom: 0;
}

.flag-preview-img.coat-img img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: none;
    box-shadow: none;
    background: transparent;
}

.timeline-card.coat-card:hover .flag-preview-img img {
    transform: none;
    scale: none;
}

.timeline-card.coat-card:hover .flag-preview-img {
    transform: none;
}

.flag-preview-img.coat-img img:hover {
    transform: none;
    scale: none;
}

.timeline-grid.flags-mode {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-content: center;
}

.timeline-grid.flags-mode .timeline-card {
    width: 100%; 
    max-width: 420px;
    margin: 0 auto;
}

.timeline-grid.coats-mode {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.timeline-grid.coats-mode .timeline-card {
    width: calc(25% - 18px); 
    max-width: 340px;
    min-width: 280px;
    flex-grow: 0;
    flex-shrink: 0;
}



/* Стили для карточек гербов */
.timeline-card.coat-card {
    padding: 24px 24px 20px 24px;
}

.timeline-card.coat-card .year-badge-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.timeline-card.coat-card .coat-year-badge {
    display: inline-block;
    background: #ffffff;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #c73f1e;
    text-align: center;
    letter-spacing: 0.5px;
}

.timeline-card.coat-card .flag-label-top,
.timeline-card.coat-card .coat-mini,
.timeline-card.coat-card .detail-btn {
    display: none;
}

.timeline-card.coat-card .flag-preview-img {
    margin-bottom: 0;
}


/* ===== ТЕНИ ДЛЯ КАРТОЧЕК ===== */

.timeline-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.timeline-card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.timeline-card:hover {
    transform: translateY(-6px);
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ-СПРАВОЧНИКА С ТАБЛИЦЕЙ ===== */

.hero-prelude-sprav {
    display: inline-block;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #ffe7c4;
    backdrop-filter: blur(4px);
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Geologica', 'Playfair Display', serif;
}

.page-handbook {
    padding-top: 80px;
    padding-bottom: 60px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.192);
    border-radius: 12px;
    background: #fff7e9;
    border: 1px solid #eef2f0;
}

.heraldry-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
    color: #2c3e35;
    min-width: 700px;
}

.heraldry-table th {
    background-color: #ffe7c4; 
    color: #000000;
    padding: 16px 20px;
    font-family: 'Geologica', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.heraldry-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f0;
    line-height: 1.6;
    vertical-align: middle;
}

.heraldry-table .table-group-title td {
    background-color: #f4f7f5;
    color: #1e2f2c;
    font-weight: 700;
    font-family: 'Geologica', sans-serif;
    font-size: 1rem;
    padding: 12px 20px;
    border-bottom: 2px solid #dbe3e0;
}

.heraldry-table tbody tr:not(.table-group-title):hover {
    background-color: #fafcfa;
}

.color-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.color-white { background-color: #ffffff; }
.color-blue  { background-color: #0039a6; }
.color-red   { background-color: #d52b1e; }
.color-gold  { background-color: #f4b41a; }

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ КОНТАКТОВ ===== */

.page-contacts {
    padding-top: 120px; 
    padding-bottom: 60px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: stretch;
    margin-top: 30px;
}

.contacts-info-card {
    background: #fff7e9;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.192);
    border: 1px solid #eef2f0;
}

.contacts-info-card h3 {
    font-size: 1.5rem;
    color: #1e2f2c;
    margin-bottom: 5px;
}

.museum-branch {
    color: #aa7e31;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 24px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    font-size: 1.3rem;
    padding: 8px;
    border-radius: 8px;
    line-height: 1;
}

.info-item strong {
    display: block;
    font-size: 0.9rem;
    color: #7a8a82;
    margin-bottom: 4px;
}

.info-item p, .info-item a {
    font-size: 1rem;
    color: #1e2f2c;
    text-decoration: none;
    line-height: 1.5;
}

.info-item a:hover {
    color: #cda45e;
}

/* Контейнер для Яндекс Карты */
.map-container {
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.199);
    border-radius: 30px;
    border: 1px solid #eef2f0;
    background: #f4f7f5;
    overflow: hidden;
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ С ФОРМОЙ ЗАПИСИ ===== */

.page-form {
    padding-top: 120px; 
    padding-bottom: 60px;
}

.form-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.205);
    border: 1px solid #eef2f0;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f4f7f5;
}

.form-section h3 {
    font-size: 1.15rem;
    color: #1e2f2c;
    margin-bottom: 18px;
    font-family: 'Geologica', sans-serif;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #5c6e65;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1e2f2c;
    background-color: #fff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #cda45e;
    box-shadow: 0 0 0 3px rgba(205, 164, 94, 0.15);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.form-notice {
    font-size: 0.8rem;
    color: #7a8a82;
    margin-top: -10px;
    font-style: italic;
}

.form-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #1e2f2c;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: #cda45e;
}

.submit-btn {
    background-color: #1e2f2c;
    color: #fff;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    font-family: 'Geologica', sans-serif;
    text-align: center;
}

.submit-btn:hover {
    background-color: #2c423e;
}

.submit-btn:active {
    transform: scale(0.98);
}

.success-card {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #f0f7f4;
    color: #2e7d32;
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.success-card h3 {
    font-size: 1.4rem;
    color: #1e2f2c;
    margin-bottom: 10px;
    font-family: 'Geologica', sans-serif;
}

.success-card p {
    color: #5c6e65;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.secondary-btn {
    background: transparent;
    border: 1px solid #1e2f2c;
    color: #1e2f2c;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #f4f7f5;
}



/* ===== АДАПТИВНЫЕ СТИЛИ ===== */

/* Планшеты и небольшие ноутбуки (до 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .timeline-grid.coats-mode .timeline-card {
        width: calc(33.333% - 16px);
        
    }
}

/* Планшеты (768px - 992px) */
@media (max-width: 992px) {

    .container {
        padding: 0 20px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
    }

    .contacts-info-card {
        padding: 30px;
    }

    .map-container{
        margin-bottom: 10%;
    }

    .page-handbook {
        padding-top: 60px;
        padding-bottom: 60px;
    }   
    
    .hero h1 {
        font-size: 2.3rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-prelude {
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    /* Карточки флагов */
    .timeline-card {
        padding: 20px;
    }
    
    .timeline-card h3 {
        font-size: 1.2rem;
    }
    
    .timeline-card p {
        font-size: 0.9rem;
    }
    
    .flag-preview-img {
        height: 160px;
    }
    
    .flag-preview-img.coat-img {
        height: 200px;
    }
    
    .coat-year-badge {
        font-size: 0.8rem;
        padding: 6px 16px;
    }
    
    /* Модальное окно */
    .modal-content {
        padding: 40px 16px;
        width: 95%;
        transition: min-height 0.2s ease;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .gallery-caption {
        font-size: 1rem;
        padding: 5px 15px 0 15px;
    }
    
    .gallery-caption p {
        font-size: 1rem;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .gallery-main {
        min-height: 350px;
    }
    
    /* Секция с интересными фактами */
    .split-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .heraldry-detail h3, .facts h3 {
        font-size: 1.5rem;
    }
    
    /* Цитата */
    .center-quote p {
        font-size: 1.4rem;
    }
}

/* Мобильные телефоны (576px - 768px) */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-hero {
        padding: 0.7rem 1.6rem;
        font-size: 0.9rem;
    }
    
    .hero-date {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .burger-menu {
        display: flex;
    }

    .nav-links {
      
        position: fixed;
        left: 0;
        top: 0;
        width: 100vw;
        height: 0;
        overflow: hidden; 
        opacity: 0; 
        visibility: hidden;
        
       
        display: flex; 
        flex-direction: column;
        align-items: center;
        justify-content: center;
        
        background: rgba(28, 42, 34, 0.98); 
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        
        gap: 25px;
        z-index: 101; 
        
       
        transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                    opacity 0.3s ease, 
                    visibility 0.3s ease;
        
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.open {
        height: 320px; 
        opacity: 1; 
        visibility: visible; 
        padding-top: 50px; 
    }

    .nav-links a {
        font-size: 1.2rem;
        color: #cfd8ce;
        width: 100%;
        text-align: center;
        padding: 5px 20px;
        display: block;
    }

    .burger-menu.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .burger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .timeline-section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .timeline-grid.flags-mode {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .timeline-grid.flags-mode .timeline-card,
    .timeline-grid.coats-mode .timeline-card {
        width: 100%;
        max-width: 400px;
    }
    
    .timeline-card {
        padding: 18px;
    }
    
    .timeline-card h3 {
        font-size: 1.1rem;
    }
    
    .timeline-card p {
        font-size: 0.85rem;
    }
    
    .flag-preview-img {
        height: 140px;
    }
    
    .flag-preview-img.coat-img {
        height: 180px;
    }
    
    .flag-label-top {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    .coat-mini {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    
    .coat-year-badge {
        font-size: 0.75rem;
        padding: 5px 14px;
    }
    
    /* Переключатель */
    .switcher-wrapper {
        margin-bottom: 30px;
    }
    
    .symbol-switcher {
        padding: 6px 12px;
        gap: 10px;
    }
    
    .switcher-btn {
        padding: 6px 16px;
        font-size: 0.9rem;
    }
    
    .switcher-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Модальное окно */
    .modal-content {
        padding: 30px 12px;
        width: 95%;
    }
    
    .modal-title {
        font-size: 1rem;
        margin: 10px 0 5px 0;
    }
    
    .gallery-caption {
        font-size: 0.85rem;
        padding: 5px 10px 0 10px;
    }
    
    .gallery-caption p {
        font-size: 0.85rem;
    }
    
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .gallery-main {
        min-height: 280px;
    }
    
    .gallery-container {
        gap: 10px;
    }
    
    .modal-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 28px;
    }
    
    .center-quote p {
        font-size: 1.2rem;
    }
    
    .center-quote span {
        font-size: 0.8rem;
    }
    
    .footer-inner p {
        font-size: 0.7rem;
    }

    .page-form {
        padding-top: 100px;
    }
    
    .form-wrapper {
        padding: 25px 20px;
    }

    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr; 
        gap: 0;
    }

    .page-contacts {
        padding-top: 100px;
    }
    
    .map-container {
        height: 320px;
        min-height: auto;
    }

    .timeline-card {
        background: rgba(255, 248, 237, 0.92);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .symbol-switcher {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* Маленькие телефоны (до 576px) */
@media (max-width: 576px) {

    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.8rem;
    }
    
    .btn-hero {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .section-header p {
        font-size: 0.85rem;
    }
    
    .timeline-card {
        padding: 15px;
    }
    
    .timeline-card h3 {
        font-size: 1rem;
    }
    
    .flag-preview-img {
        height: 120px;
    }
    
    .flag-preview-img.coat-img {
        height: 160px;
    }
    
    .coat-year-badge {
        font-size: 0.7rem;
        padding: 4px 12px;
    }
    
    .switcher-btn {
        padding: 4px 12px;
        font-size: 0.8rem;
    }
    
    .gallery-main {
        min-height: 220px;
    }
    
    #modalImage {
        max-height: 45vh;
    }
    
    .center-quote p {
        font-size: 1rem;
    }

    .page-form {
        padding-top: 140px !important; 
    }

    .page-contacts {
        padding-top: 140px !important;
    }

    .section-header {
        margin-bottom: 25px;
    }

    .page-handbook{
        padding-top: 100px !important;
    }
    
    .section-header h2 {
        font-size: 1.5rem; 
        line-height: 1.3;
    }
}

/* Для экранов с высоким разрешением */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .timeline-grid.flags-mode .timeline-card {
        max-width: 460px;
    }
    
    .timeline-grid.coats-mode .timeline-card {
        max-width: 360px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .section-header h2 {
        font-size: 2.8rem;
    }
}

/* Альбомная ориентация на мобильных */
@media (max-width: 900px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .timeline-grid.flags-mode .timeline-card,
    .timeline-grid.coats-mode .timeline-card {
        width: calc(50% - 12px);
    }
    
    .gallery-main {
        min-height: 300px;
    }
}

