:root {
    --gold: #ffc600;
    --gold-dark: #e0ac00;
    --yellow: #fff200;
    --navy: #0c2f53;
    --navy-light: #1b4a78;
    --cream: #fdfaf3;
    --text: #2b2b2b;
}

@font-face {
    font-family: 'Sukhumvit Set';
    src: url('assets/fonts/sukhumvit/SukhumvitSet-Thin.ttf') format('truetype');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Sukhumvit Set';
    src: url('assets/fonts/sukhumvit/SukhumvitSet-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Sukhumvit Set';
    src: url('assets/fonts/sukhumvit/SukhumvitSet-Text.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Sukhumvit Set';
    src: url('assets/fonts/sukhumvit/SukhumvitSet-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Sukhumvit Set';
    src: url('assets/fonts/sukhumvit/SukhumvitSet-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Sukhumvit Set';
    src: url('assets/fonts/sukhumvit/SukhumvitSet-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Sukhumvit Set', 'Sarabun', 'Segoe UI', 'Tahoma', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
}

.ribbon-corner {
    position: fixed;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    z-index: 9999;
    pointer-events: none;
}

.ribbon-corner::before {
    content: "";
    position: absolute;
    top: 30px;
    right: -70px;
    width: 300px;
    height: 20px;
    background: black;
    transform: rotate(45deg);
}

.ribbon-icon {
    position: absolute;
    top: 39px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ribbon-icon img {
    width: 100%;
}

.hero {
    position: relative;
    background: radial-gradient(circle at 50% 0%, var(--navy-light) 0%, var(--navy) 70%);
    color: var(--gold);
    text-align: center;
    padding: 4.5rem 1rem 3.5rem;
    border-bottom: 4px solid var(--gold);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 242, 0, 0.16) 0%, transparent 60%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.emblem {
    font-size: 2.75rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 24px rgba(255, 198, 0, 0.5);
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0.2rem 0;
    letter-spacing: 0.5px;
}

.hero-sub {
    font-size: 1.15rem;
    color: #f3e6b8;
    margin-top: 0.5rem;
}

.container {
    max-width: 1100px;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
}

.card {
    background: #fff;
    border: 1px solid #e8ddb8;
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(11, 37, 69, 0.08);
}

.card form {
    max-width: 640px;
    margin: 0 auto;
}

.card h2 {
    color: var(--navy);
    text-align: center;
    margin-top: 0;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.card h2::after {
    content: '';
    display: block;
    width: 120px;
    height: 2px;
    margin: 0.75rem auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.gallery-section {
    max-width: 1100px;
    margin: 2.5rem auto;
    background: linear-gradient(180deg, #fffdf7 0%, #fff 100%);
    border: 1px solid #e2d5a0;
    border-radius: 20px;
    padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
    box-shadow: 0 16px 40px rgba(11, 37, 69, 0.1);
}

.gallery-section h2 {
    color: var(--navy);
    text-align: center;
    margin-top: 0;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.gallery-section h2::after {
    content: '';
    display: block;
    width: 120px;
    height: 2px;
    margin: 0.75rem auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.royal-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2d5a0;
    box-shadow: 0 4px 14px rgba(11, 37, 69, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(168, 132, 42, 0.25);
}

.gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.gallery-item img.active {
    opacity: 1;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #eef1f6, #dde5f0);
    border: 1px dashed #c3cede;
    color: #8b93a1;
}

.gallery-placeholder svg {
    width: 32px;
    height: 32px;
}

.gallery-placeholder span {
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .gallery-section {
        margin: 1.5rem 1rem;
    }

    .royal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

form label {
    display: block;
    margin: 1rem 0 0.3rem;
    font-weight: 600;
    color: var(--navy);
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 198, 0, 0.25);
}

form button {
    margin-top: 1.25rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    border: none;
    padding: 0.75rem 1.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(168, 132, 42, 0.35);
}

.alert {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #eaf7ec;
    color: #1e6b30;
    border: 1px solid #b9e3bf;
    text-align: center;
}

.alert-error {
    background: #fdecec;
    color: #a32626;
    border: 1px solid #f3bcbc;
}

.alert-error ul {
    margin: 0;
    padding-left: 1.2rem;
}

.hero-banner {
    border-bottom: 4px solid var(--gold);
    line-height: 0;
}

.hero-banner img {
    width: 100%;
    display: block;
}

.site-footer {
    text-align: center;
    color: var(--navy);
    font-size: 0.9rem;
    line-height: 0;
}

.footer-logo {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }
}
