
@font-face {
    font-family: "Kantumruy Pro";
    src: url("fonts/KantumruyPro-SemiBold.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Kantumruy Pro";
    src: url("fonts/KantumruyPro-SemiBold.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Kantumruy Pro";
    src: url("fonts/KantumruyPro-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Kantumruy Pro";
    src: url("fonts/KantumruyPro-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #0b2c5c;
    --gold: #f5b91a;
    --bg: #f7f8fb;
    --card: #ffffff;
    --text: #1a1d24;
    --muted: #5c6475;
    --radius: 14px;
    --shadow: 0 12px 40px rgba(11, 44, 92, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Kantumruy Pro", system-ui, -apple-system, sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

.latin {
    font-family: "Kantumruy Pro", system-ui, sans-serif;
}

@keyframes logo-gentle {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: brightness(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    }

    50% {
        transform: translateY(-4px) scale(1.02);
        filter: brightness(1.07) drop-shadow(0 6px 20px rgba(245, 185, 26, 0.28));
    }
}

header {
    background: linear-gradient(135deg, var(--navy) 0%, #123a75 100%);
    color: #fff;
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: 0 4px 20px rgba(11, 44, 92, 0.25);
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.header-logo {
    display: block;
    flex-shrink: 0;
    line-height: 0;
    border-radius: 4px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.header-logo:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.header-logo img {
    display: block;
    width: auto;
    height: auto;
    max-height: clamp(52px, 12vw, 76px);
    max-width: min(520px, 85vw);
    object-fit: contain;
    animation: logo-gentle 5s ease-in-out infinite;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.header-logo:hover img,
.header-logo:focus-visible img {
    animation-play-state: paused;
    transform: scale(1.04) translateY(-2px);
    filter: brightness(1.1) drop-shadow(0 8px 24px rgba(245, 185, 26, 0.35));
}

.header-phones {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    align-items: flex-end;
}

.header-phones a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.82rem, 2vw, 0.95rem);
    white-space: nowrap;
}

.header-phones a:hover {
    color: var(--gold);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 0.65rem;
    }

    .header-phones {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        align-self: stretch;
        gap: 0.35rem 0.65rem;
        padding-top: 0;
    }

    .header-phones a {
        font-size: clamp(0.68rem, 2.9vw, 0.88rem);
    }

    .header-logo img {
        max-width: min(100%, 420px);
    }
}

@media (max-width: 360px) {
    .header-phones {
        flex-wrap: wrap;
        row-gap: 0.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-logo img {
        animation: none;
        transition: none;
    }

    .header-logo:hover img,
    .header-logo:focus-visible img {
        transform: none;
        filter: none;
    }
}

main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

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

.leaflet-wrap {
    background: var(--card);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.leaflet-wrap img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 4px);
}

.intro-heading {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    line-height: 1.35;
}

.intro-heading__icon {
    flex-shrink: 0;
    width: 1.2em;
    height: 1.2em;
    color: var(--gold);
    margin-top: 0.14em;
}

.intro-heading__text {
    min-width: 0;
}

.scholarship-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem 1.5rem;
    box-shadow: var(--shadow);
}

.scholarship-card .intro-heading {
    margin: 0 0 1.25rem;
}

.scholarship-card .dates-row {
    margin-bottom: 0;
}

.scholarship-card .date-card {
    background: var(--bg);
    box-shadow: 0 2px 14px rgba(11, 44, 92, 0.07);
}

.intro p {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 1rem;
}

.section-title {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    line-height: 1.35;
}

.section-title svg {
    flex-shrink: 0;
    width: 1.2em;
    height: 1.2em;
    color: var(--gold);
    margin-top: 0.14em;
}

.dates-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.intro .contact-section {
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .dates-row {
        grid-template-columns: 1fr;
    }
}

.date-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    border-left: 4px solid var(--gold);
    border-right: 4px solid var(--gold);
    box-shadow: 0 4px 18px rgba(11, 44, 92, 0.08);
}

.date-card.open {
    border-color: #2e8b57;
}

.date-card.close {
    border-color: #c0392b;
}

.date-card .label {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.date-card .label.latin {
    font-size: 0.78rem;
}

.date-card .kh {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
}

.date-card .en {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
}

.contact-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: var(--shadow);
}

address {
    font-style: normal;
}

.contact-block {
    margin-bottom: 1.25rem;
}

.contact-block:last-of-type {
    margin-bottom: 0;
}

.contact-block h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--navy);
}

.contact-block p {
    margin: 0;
    font-size: 0.98rem;
}

.phones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 0.5rem;
}

.phones a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--gold);
    transition: color 0.15s ease;
}

.phones a:hover {
    color: #123a75;
}

.header-phones a[href="tel:+85568434398"],
.phones a[href="tel:+85568434398"] {
    border-bottom: none;
    background-image: linear-gradient(90deg, #ff416c 0%, #ff0000 50%, #b71c1c 100%);
    background-repeat: no-repeat;
    background-size: 100% 2px;
    background-position: 0 100%;
    padding-bottom: 2px;
    text-decoration: none;
}

.header-phones a[href="tel:+85568434398"]:hover,
.phones a[href="tel:+85568434398"]:hover {
    background-size: 100% 3px;
    text-decoration: none;
}

.header-phones a[href="tel:+855966434398"],
.phones a[href="tel:+855966434398"] {
    border-bottom: none;
    background-image: linear-gradient(90deg, #43e97b 0%, #38c172 50%, #1b8a3a 100%);
    background-repeat: no-repeat;
    background-size: 100% 2px;
    background-position: 0 100%;
    padding-bottom: 2px;
    text-decoration: none;
}

.header-phones a[href="tel:+855966434398"]:hover,
.phones a[href="tel:+855966434398"]:hover {
    background-size: 100% 3px;
    text-decoration: none;
}

.header-phones a[href="tel:+85589434398"],
.phones a[href="tel:+85589434398"] {
    border-bottom: none;
    background-image: linear-gradient(90deg, #ffd200 0%, #ffae00 50%, #ff7a00 100%);
    background-repeat: no-repeat;
    background-size: 100% 2px;
    background-position: 0 100%;
    padding-bottom: 2px;
    text-decoration: none;
}

.header-phones a[href="tel:+85589434398"]:hover,
.phones a[href="tel:+85589434398"]:hover {
    background-size: 100% 3px;
    text-decoration: none;
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-top: 0.75rem;
}

.links-row a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.links-row a:hover {
    text-decoration: underline;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .action-row {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        margin: 0;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: saturate(180%) blur(10px);
        -webkit-backdrop-filter: saturate(180%) blur(10px);
        border-top: 1px solid rgba(11, 44, 92, 0.08);
        box-shadow: 0 -8px 24px rgba(11, 44, 92, 0.12);
        justify-content: center;
        align-items: center;
        gap: 0.6rem;
        flex-wrap: nowrap;
    }

    .action-row .map-btn,
    .action-row .telegram-btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        text-align: center;
        padding: 0.7rem 0.9rem;
        font-size: clamp(0.9rem, 2.6vw, 1rem);
        white-space: nowrap;
    }

    main {
        padding-bottom: 0.5rem;
    }

    footer {
        padding-top: 0.75rem;
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 480px) {
    .action-row {
        padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
        gap: 0.5rem;
    }

    .action-row .map-btn,
    .action-row .telegram-btn {
        padding: 0.65rem 0.6rem;
        font-size: clamp(0.85rem, 3.5vw, 0.95rem);
    }

    .telegram-btn {
        gap: 0.35rem;
    }
}

.map-btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: transparent;
    color: var(--navy);
    font-weight: 700;
    border: 2px solid var(--gold);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(245, 185, 26, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.map-btn:hover,
.map-btn:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #ffd45a 0%, var(--gold) 50%, #d99a00 100%);
    border-color: transparent;
    color: var(--navy);
    box-shadow: 0 8px 22px rgba(245, 185, 26, 0.5);
}

.map-btn:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: transparent;
    color: #229ed9;
    font-weight: 700;
    border: 2px solid #229ed9;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(34, 158, 217, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.telegram-btn svg {
    flex-shrink: 0;
}

.telegram-btn:hover,
.telegram-btn:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #2aabee 0%, #229ed9 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(34, 158, 217, 0.5);
}

.telegram-btn:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}

footer {
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.footer-line {
    margin: 0;
    line-height: 1.6;
}

.footer-line--detail {
    margin-top: 0.65rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 1cm;
}

footer .latin {
    display: block;
    margin-top: 0.35rem;
}