/* === VARIABLES === */
:root {
    --blue: #0039A6;
    --blue-dark: #002B7F;
    --blue-light: #E8EFF8;
    --gold: #C8A951;
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-400: #ADB5BD;
    --gray-600: #6C757D;
    --gray-800: #343A40;
    --gray-900: #212529;
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Open Sans', Arial, sans-serif;
    --max-width: 1100px;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-800);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--blue-dark);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--gray-900);
    line-height: 1.3;
}

/* === LAYOUT === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER === */
.header {
    background: var(--white);
    border-bottom: 3px solid var(--blue);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-900);
    text-decoration: none;
}

.header__logo:hover {
    color: var(--blue);
}

.header__coat {
    flex-shrink: 0;
}

.header__name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.header__subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.2;
}

.header__nav {
    display: flex;
    gap: 32px;
}

.header__link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.header__link:hover,
.header__link--active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.header__burger span {
    display: block;
    height: 2px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: all 0.3s;
}

/* === HERO === */
.hero {
    background-color: var(--blue-dark);
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 43, 127, 0.82) 0%, rgba(0, 57, 166, 0.75) 100%);
    z-index: 1;
}

.hero > .container {
    position: relative;
    z-index: 2;
}

.hero__title {
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 16px;
}

.hero__text {
    font-size: 1.1rem;
    max-width: 680px;
    margin: 0 auto;
    opacity: 0.92;
    line-height: 1.8;
}

/* === CITY FACTS === */
.city-facts {
    padding: 40px 0;
    background: var(--white);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.fact-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--blue-light);
    border-radius: var(--radius);
    border-top: 3px solid var(--blue);
}

.fact-card__number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 4px;
}

.fact-card__label {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === SECTION TITLE === */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 28px;
    text-align: center;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--blue);
    border-radius: 2px;
}

/* === MAP === */
.map-section {
    padding: 50px 0;
    background: var(--gray-50);
}

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

.map-wrap iframe {
    display: block;
    width: 100%;
    height: 450px;
    border: none;
}

/* === NEWS === */
.news {
    padding: 50px 0;
    background: var(--gray-50);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.news-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card__date {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.news-card__title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    flex: 1;
}

.news-card__title a {
    color: var(--gray-900);
}

.news-card__title a:hover {
    color: var(--blue);
}

.news-card__desc {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.news-source {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.news-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}

/* === ABOUT === */
.about {
    padding: 50px 0;
}

.about__text p {
    margin-bottom: 16px;
}

.btn {
    display: inline-block;
    margin-top: 8px;
    padding: 12px 28px;
    background: var(--blue);
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.btn:hover {
    background: var(--blue-dark);
    color: var(--white);
}

/* === PAGE HERO === */
.page-hero {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: var(--white);
    padding: 48px 0;
    text-align: center;
}

.page-hero__title {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 8px;
}

.page-hero__text {
    font-size: 1.05rem;
    opacity: 0.9;
}

/* === ARTICLE NAV === */
.article-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 84px;
    z-index: 50;
    box-shadow: var(--shadow);
}

.article-nav__list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 12px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.article-nav__list a {
    display: block;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 20px;
    background: var(--blue-light);
    color: var(--blue);
    transition: all 0.2s;
}

.article-nav__list a:hover {
    background: var(--blue);
    color: var(--white);
}

/* === ARTICLES === */
.article {
    padding: 50px 0;
}

.article--alt {
    background: var(--gray-50);
}

.article__title {
    font-size: 1.7rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--blue);
    display: inline-block;
}

.article__body h3 {
    font-size: 1.15rem;
    margin: 24px 0 10px;
    color: var(--blue-dark);
}

.article__body p {
    margin-bottom: 14px;
}

/* === ARTICLE HERO IMAGE === */
.article__hero-img {
    margin: 0 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.article__hero-img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.article__hero-img figcaption {
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-align: center;
    background: var(--gray-50);
}

/* === ARTICLE INLINE PHOTO === */
.article__photo-inline {
    float: right;
    margin: 0 0 20px 24px;
    max-width: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article__photo-inline img {
    width: 100%;
    height: auto;
    display: block;
}

.article__photo-inline figcaption {
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-align: center;
    background: var(--white);
}

/* === END GALLERY === */
.article__end-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.article__end-gallery figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article__end-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article__end-gallery figcaption {
    padding: 8px 12px;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-align: center;
    background: var(--white);
}

/* === PERSON GRID === */
.person-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.person-card {
    background: var(--white);
    padding: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--blue);
    display: flex;
    overflow: hidden;
}

.person-card__photo {
    width: 120px;
    min-height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

.person-card__info {
    padding: 18px 20px;
}

.person-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.person-card__role {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.person-card p:last-child {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

/* === SIGHTS === */
.sights-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.sight-item {
    padding: 24px;
    background: var(--blue-light);
    border-radius: var(--radius);
    border-top: 3px solid var(--blue);
}


.sight-item h3 {
    margin-bottom: 8px;
    color: var(--blue-dark);
}

.sight-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* === FACTS LIST === */
.facts-list {
    max-width: 800px;
}

.fact-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--gray-200);
}

.fact-item:last-child {
    border-bottom: none;
}

.fact-item__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.fact-item h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--blue-dark);
}

.fact-item p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

/* === GALLERY === */
.gallery {
    padding: 50px 0;
    background: var(--gray-50);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.gallery-item--wide {
    grid-column: span 2;
}

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

.gallery-item--wide img {
    height: 280px;
}

.gallery-item figcaption {
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    text-align: center;
}

/* === FOOTER === */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 24px 0;
}

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

.footer__brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--white);
    margin-right: 12px;
}

.footer__copy {
    font-size: 0.85rem;
}

.footer__nav {
    display: flex;
    gap: 20px;
}

.footer__nav a {
    color: var(--gray-400);
    font-size: 0.85rem;
}

.footer__nav a:hover {
    color: var(--white);
}

/* === MOBILE === */
@media (max-width: 768px) {
    .header__burger {
        display: flex;
    }

    .header__nav {
        display: none;
        position: absolute;
        top: 84px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 20px;
        gap: 0;
        border-bottom: 3px solid var(--blue);
        box-shadow: var(--shadow-lg);
    }

    .header__nav--open {
        display: flex;
    }

    .header__link {
        padding: 12px 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .header__link:last-child {
        border-bottom: none;
    }

    .hero {
        padding: 40px 0;
    }

    .hero__title {
        font-size: 1.6rem;
    }

    .hero__text {
        font-size: 1rem;
    }

    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fact-card__number {
        font-size: 1.4rem;
    }

    .map-wrap iframe {
        height: 300px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .page-hero__title {
        font-size: 1.5rem;
    }

    .article-nav__list {
        gap: 6px;
    }

    .article-nav__list a {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .article__title {
        font-size: 1.3rem;
    }

    .article__photo-inline {
        float: none;
        max-width: 100%;
        margin: 0 0 20px 0;
    }

    .article__end-gallery {
        grid-template-columns: 1fr;
    }

    .article__hero-img img {
        height: 200px;
    }

    .person-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .person-card {
        flex-direction: column;
    }

    .person-card__photo {
        width: 100%;
        height: 200px;
        min-height: auto;
        object-position: top;
    }

    .sights-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fact-item {
        gap: 14px;
        padding: 18px 0;
    }

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

    .gallery-item--wide {
        grid-column: span 1;
    }

    .gallery-item img,
    .gallery-item--wide img {
        height: 200px;
    }

    .footer__inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .facts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fact-card {
        padding: 16px 10px;
    }

    .fact-card__number {
        font-size: 1.2rem;
    }
}
