:root {
    --color-1: #e8f5f9;
    --color-2: #d4e4f7;
    --color-3: #8eb4e3;
    --color-4: #4a76a8;
    --color-5: #26517b;
    --white: #ffffff;
    --text-dark: #1a2d3d;
    --text-light: #4a5568;
    --shadow-sm: 0 2px 10px rgba(38, 81, 123, 0.08);
    --shadow-md: 0 8px 30px rgba(38, 81, 123, 0.12);
    --shadow-lg: 0 15px 40px rgba(38, 81, 123, 0.18);
    --border: #c8d9e8;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--color-1);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header - УВЕЛИЧЕННЫЙ */
.header {
    background: linear-gradient(160deg, var(--color-5) 0%, #1e4370 40%, var(--color-4) 100%);
    color: white;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(38, 81, 123, 0.3);
}

/* Волнистый эффект */
.header-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 80px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.header-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

.header-top {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    padding: 28px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 2;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

/* Логотип - НЕ кликабельный, УВЕЛИЧЕННЫЙ */
.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

.logo-icon {
    width: 92px;
    height: 92px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.logo-img {
    width: 110%;
    height: 110%;
    object-fit: contain;
    padding: 8px;
    filter: brightness(1.05) contrast(1.05);
}

.logo-text {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: lowercase;
}

/* Контакты */
.contact-info {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

/* Статичные элементы (телефон и почта) - не кликабельны */
.contact-item-static {
    cursor: default;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.contact-item-static:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-nav {
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 36px;
}

.nav-title {
    font-size: 19px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
}

/* Hero */
.hero {
    background: linear-gradient(160deg, var(--color-5), var(--color-4), var(--color-3));
    color: white;
    padding: 90px 0 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255,255,255,0.04) 0%, transparent 50%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 36px 40px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 19px;
    opacity: 0.92;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Волна под hero */
.hero-wave {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
    margin-top: -2px;
}

.hero-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Countries Section */
.countries-section {
    max-width: 1400px;
    margin: 50px auto;
    padding: 0 36px;
}

.section-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--color-5);
    margin-bottom: 40px;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-4);
    margin: 16px auto 0;
    border-radius: 2px;
}

.countries-grid {
    display: grid;
    gap: 24px;
}

/* Country Card */
.country-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.country-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.country-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--color-2);
}

.country-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.country-card:hover .country-card-image img {
    transform: scale(1.06);
}

.country-card-body {
    padding: 24px;
}

.country-card-name {
    font-size: 23px;
    font-weight: 700;
    color: var(--color-5);
    margin-bottom: 8px;
}

.country-card-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 18px;
}

.country-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.visa-badge {
    background: var(--color-2);
    color: var(--color-5);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.arrow {
    color: var(--color-4);
    font-size: 24px;
    transition: transform 0.3s ease;
}

.country-card:hover .arrow {
    transform: translateX(4px);
}

/* Country Page */
.country-page {
    display: none;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 36px;
}

.country-page.active {
    display: block;
}

.country-page-header {
    background: linear-gradient(135deg, var(--color-5), var(--color-4));
    color: white;
    padding: 48px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    position: relative;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 24px;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    transition: background 0.3s ease;
    cursor: pointer;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.28);
}

.country-page-title {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 10px;
}

.country-page-subtitle {
    font-size: 19px;
    opacity: 0.9;
}

.country-page-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 30px;
}

.country-description {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.country-description h2 {
    color: var(--color-5);
    margin-bottom: 18px;
    font-size: 26px;
}

.country-description p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 14px;
}

.country-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--white);
    padding: 26px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-left: 4px solid var(--color-4);
}

.info-card h3 {
    color: var(--color-5);
    margin-bottom: 14px;
    font-size: 19px;
}

.info-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 4px;
}

/* Gallery */
.photo-gallery {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
    background: var(--color-2);
}

.gallery-image:hover {
    transform: scale(1.04);
}

/* Apply Section */
.apply-section {
    text-align: center;
    margin: 30px 0;
}

.apply-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-5), var(--color-4));
    color: white;
    padding: 18px 42px;
    border-radius: 60px;
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(38, 81, 123, 0.3);
}

.apply-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(38, 81, 123, 0.42);
}

/* Модальное окно (стиль сайта) */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(38, 81, 123, 0.85);
    backdrop-filter: blur(6px);
}

.modal-content {
    background: linear-gradient(135deg, var(--white), var(--color-1));
    max-width: 520px;
    width: calc(100% - 40px);
    margin: 40px auto;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(38, 81, 123, 0.3);
    border: 1px solid var(--color-2);
}

.close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 32px;
    cursor: pointer;
    color: var(--color-4);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-1);
    transition: all 0.3s ease;
    border: none;
}

.close:hover {
    background: var(--color-2);
    color: var(--color-5);
}

.modal h2 {
    color: var(--color-5);
    margin-bottom: 8px;
    font-size: 28px;
}

.modal-country-name {
    color: var(--color-4);
    font-size: 17px;
    margin-bottom: 28px;
}

.modal-contacts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--white);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-5);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    cursor: pointer;
}

.modal-contact-method:hover {
    background: var(--color-1);
    border-color: var(--color-3);
    transform: translateX(6px);
}

.modal-contact-static {
    cursor: default;
    pointer-events: none;
    user-select: none;
}

.modal-contact-static:hover {
    background: var(--white);
    transform: none;
}

.modal-contact-icon {
    font-size: 26px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-1);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    color: var(--color-4);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--color-5), var(--color-4));
    color: white;
    padding: 44px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info p,
.footer-contacts p {
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.8;
}

/* Кнопка "Наверх" */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-4);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    border: none;
    font-size: 24px;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--color-5);
    transform: translateY(-3px);
}

/* ===== АДАПТИВНАЯ ВЁРСТКА ===== */

/* Очень маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .header-top {
        padding: 8px 0;
    }
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    .logo-text {
        font-size: 16px;
    }
    .contact-item {
        padding: 4px 10px;
        font-size: 10px;
    }
    .header-nav {
        padding: 6px 0;
    }
    .nav-title {
        font-size: 11px;
    }
    .hero h1 {
        font-size: 28px;
    }
    .hero p {
        font-size: 15px;
        padding: 0 10px;
    }
    .section-title {
        font-size: 26px;
    }
    .countries-section {
        padding: 0 20px;
    }
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .country-page {
        padding: 0 20px;
    }
    .country-page-header {
        padding: 25px 20px;
    }
    .country-page-title {
        font-size: 28px;
    }
    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .apply-button {
        padding: 14px 28px;
        font-size: 17px;
        width: 100%;
        max-width: 300px;
    }
    .modal-content {
        padding: 32px 20px;
        margin: 20px auto;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
    }
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/* Маленькие телефоны (481px - 576px) */
@media (min-width: 481px) and (max-width: 576px) {
    .header-top {
        padding: 10px 0;
    }
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    .logo-text {
        font-size: 20px;
    }
    .contact-item {
        padding: 6px 12px;
        font-size: 11px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Средние телефоны (577px - 768px) — 2 колонки карточек */
@media (min-width: 577px) and (max-width: 768px) {
    .header-top {
        padding: 12px 0;
    }
    .logo-icon {
        width: 56px;
        height: 56px;
    }
    .logo-text {
        font-size: 24px;
    }
    .hero h1 {
        font-size: 36px;
    }
    .countries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .apply-button {
        padding: 16px 38px;
        font-size: 18px;
    }
}

/* Планшеты (769px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .countries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .country-page-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

/* Маленькие ноутбуки (993px - 1200px) — 3 колонки */
@media (min-width: 993px) and (max-width: 1200px) {
    .countries-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* Десктопы (1201px - 1600px) — 3 колонки */
@media (min-width: 1201px) and (max-width: 1600px) {
    .countries-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }
}

/* Широкие мониторы (>1600px) — 4 колонки */
@media (min-width: 1601px) {
    .countries-section {
        max-width: 1600px;
    }
    .countries-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}