/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f7c948;
    --primary-dark: #dba629;
    --secondary-color: #fff3d4;
    --secondary-dark: #f1d89c;
    --accent-color: #ff8c64;
    --brand-yellow: #fbe182;
    --brand-blue: #fff9e8;
    --brand-navy: #d89a1d;
    --brand-cream: #fffdf5;
    --text-dark: #3a2a0f;
    --text-light: #907341;
    --bg-light: #fff9ec;
    --bg-white: #ffffff;
    --border-color: #f2e3c5;
    --shadow: 0 2px 14px rgba(217, 166, 41, 0.12);
    --shadow-lg: 0 18px 40px rgba(169, 118, 15, 0.18);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    z-index: 0;
}

body::before,
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 150px;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 5;
    animation: sparkleShift 28s linear infinite;
}

body::before {
    top: 0;
    background-image:
        radial-gradient(circle, rgba(255, 236, 179, 0.85) 0 5px, transparent 6px),
        radial-gradient(circle, rgba(255, 214, 120, 0.55) 0 7px, transparent 8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 3px, transparent 4px);
    background-size: 140px 100%, 210px 100%, 110px 100%;
    background-repeat: repeat-x;
    background-position: 0 25px, 60px 12px, 30px 48px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

body::after {
    bottom: 0;
    background-image:
        radial-gradient(circle, rgba(255, 236, 179, 0.85) 0 5px, transparent 6px),
        radial-gradient(circle, rgba(255, 214, 120, 0.55) 0 7px, transparent 8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 3px, transparent 4px);
    background-size: 160px 100%, 220px 100%, 120px 100%;
    background-repeat: repeat-x;
    background-position: 30px 75px, 90px 92px, 50px 60px;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

@keyframes sparkleShift {
    0% {
        background-position: 0 25px, 60px 12px, 30px 48px;
    }
    50% {
        background-position: 80px 35px, 20px 8px, 60px 38px;
    }
    100% {
        background-position: 160px 25px, -40px 12px, 120px 48px;
    }
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* Prevent horizontal scroll */
    * {
        max-width: 100%;
    }
    
    /* Improve tap highlighting */
    a, button, input, textarea, select {
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
    }
    
    /* Improve scrolling on iOS */
    .container,
    .form-wrapper,
    section {
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        flex: 1;
        justify-content: center;
        flex-wrap: nowrap;
    }
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 88%;
    margin: 0 auto;
    padding: 0 24px;
}
    
@media (max-width: 992px) {
    .container {
        width: 92%;
        padding: 0 16px;
    }
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-light);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: 'Sarabun', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--brand-navy));
    color: var(--bg-white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--brand-navy), var(--secondary-color));
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn i {
    margin-right: 8px;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 1px solid var(--primary-dark);
    color: var(--bg-white);
    padding: 10px 26px;
    border-radius: 999px;
    font-weight: 500;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-dark);
    color: var(--primary-dark);
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 500;
}

.btn-outline:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.hero-outline {
    color: var(--primary-dark);
    border-color: rgba(217, 166, 41, 0.4);
}

.hero-outline:hover {
    background: rgba(217, 166, 41, 0.1);
    color: var(--primary-dark);
}

/* ============================================
   Navigation
   ============================================ */
.hero-header {
    background: linear-gradient(180deg, #ffffff 0%, var(--brand-cream) 55%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

.navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    padding: 18px 0;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 30px rgba(217, 166, 41, 0.18);
    border-bottom: 1px solid rgba(217, 166, 41, 0.25);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}

.logo i {
    font-size: 1.7rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
    padding: 6px 0;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-dark);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 80px 0 70px;
    color: var(--text-dark);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(247, 201, 72, 0.28));
    z-index: 1;
}

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

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    box-shadow: 0 24px 60px rgba(217, 166, 41, 0.18);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 232, 0.92));
    padding: 48px;
}

.hero-slide {
    display: none;
    align-items: center;
    gap: 48px;
    min-height: 360px;
    justify-content: center;
}

.hero-slide.active {
    display: flex;
}

.hero-slide-image {
    flex: 0 0 420px;
    max-width: 420px;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(217, 166, 41, 0.25);
}

.hero-slide-content {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #f7c948 0%, #d9a629 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 10px 26px;
    border-radius: 999px;
    font-size: 0.95rem;
    text-transform: uppercase;
    box-shadow: 0 12px 25px rgba(217, 166, 41, 0.26);
}

.hero-slide-badge i {
    font-size: 1.05rem;
}

.hero-slide-content h1 {
    line-height: 1.2;
    color: var(--text-dark);
}

.hero-slide-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 600px;
}

.hero-slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
}

.hero-slider-control:hover {
    background: var(--primary-dark);
    color: #fff;
}

.hero-slider-control.prev {
    left: 24px;
}

.hero-slider-control.next {
    right: 24px;
}

.hero-slider-dots {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-slider-dots button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(217, 166, 41, 0.35);
    cursor: pointer;
    transition: var(--transition);
}

.hero-slider-dots button.active {
    background: var(--primary-dark);
    transform: scale(1.15);
}

@media (max-width: 992px) {
    .hero-slider {
        padding: 36px;
    }

    .hero-slide {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }

    .hero-slide-image,
    .hero-slide-content {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .hero-slide-content p {
        max-width: none;
    }

    .hero-slider-control {
        display: none;
    }

    .hero-slider-dots {
        bottom: 18px;
    }

    .hero-slide-image {
        flex: 0 0 65vw;
        max-width: 480px;
        height: 60vw;
        max-height: 480px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 70px 0 40px;
    }

    .hero-slider {
        padding: 28px 20px 36px;
        border-radius: 28px;
    }

    .hero-slide-content h1 {
        font-size: 2rem;
    }

    .hero-slide-content p {
        font-size: 0.95rem;
    }

    .hero-slide-badge {
        font-size: 0.85rem;
        padding: 8px 22px;
    }

    .hero-slide-image {
        flex: 0 0 80vw;
        height: 70vw;
        max-width: 420px;
        max-height: 360px;
    }
}

/* ============================================
   Section Styles
   ============================================ */
section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.title-decoration {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--brand-yellow));
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Compact Section Header for Merit Form */
.section-header-compact {
    margin-bottom: 30px !important;
}

.section-title-compact {
    font-size: 2rem !important;
    margin-bottom: 0 !important;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 60, 125, 0.25), rgba(5, 31, 68, 0.25));
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

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

.benefit-item {
    text-align: center;
    padding: 26px 18px;
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.benefit-item i {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.benefit-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works-section {
    background: var(--bg-white);
}

.how-it-works-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 32px;
}

.how-card {
    background: var(--bg-light);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 32px rgba(217, 166, 41, 0.12);
    text-align: center;
    transition: var(--transition);
}

.how-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(217, 166, 41, 0.18);
}

.how-card-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    box-shadow: var(--shadow);
}

.how-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.how-card p {
    color: var(--text-light);
    line-height: 1.65;
    font-size: 0.98rem;
}

@media (max-width: 768px) {
    .how-it-works-cards {
        gap: 20px;
    }

    .how-card {
        padding: 24px;
    }
}

/* ============================================
   Merit Start Section
   ============================================ */
.merit-start-section {
    text-align: center;
    padding: 60px 20px;
}

.merit-start-content {
    max-width: 500px;
    margin: 0 auto;
}

.merit-start-content i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.merit-start-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.merit-start-content p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.merit-start-content .btn {
    min-width: 200px;
}

/* ============================================
   Merit Form Section
   ============================================ */

.form-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.merit-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary-color);
}

.required {
    color: var(--accent-color);
}

.form-control {
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Sarabun', sans-serif;
    transition: var(--transition);
    background: var(--bg-white);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Prevent zoom on iOS when focusing input */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control.error {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.field-error {
    color: var(--accent-color);
    font-size: 0.875rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.field-error::before {
    content: "⚠";
    font-size: 1rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

textarea.form-control-compact {
    min-height: 60px;
    resize: vertical;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.form-help-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

#certificate-option {
    transition: opacity 0.3s ease;
    padding: 12px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

#certificate-option .checkbox-label {
    margin-bottom: 4px;
}

#certificate-option .checkbox-label i {
    color: var(--primary-color);
    margin-right: 6px;
}

.btn-submit {
    width: 100%;
    margin-top: 10px;
}

/* ============================================
   Form Sections & New Form Styles
   ============================================ */
.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Compact Form Styles */
.form-section-compact {
    margin-bottom: 25px;
    padding-bottom: 20px;
}

.form-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.form-group-compact {
    display: flex;
    flex-direction: column;
}

.form-section-title-small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: block;
}

.form-control-large {
    font-size: 1.1rem;
    padding: 18px 20px;
    font-weight: 500;
}

.form-control-compact {
    min-height: auto;
    resize: vertical;
}

.checkbox-group-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group-compact .checkbox-label {
    margin: 0;
}

/* Accordion Styles */
.accordion-section {
    margin-bottom: 25px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-white);
}

.accordion-header {
    cursor: pointer;
    user-select: none;
}

.accordion-header .donor-header {
    margin: 0;
    border-radius: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 18px 25px;
    transition: var(--transition);
}

.accordion-header:hover .donor-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.accordion-header .donor-header i:last-child {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.accordion-header.active .donor-header i:last-child {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 25px;
}

.accordion-content.active {
    max-height: 5000px;
    padding: 25px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Payment Methods */
.payment-methods {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-radio {
    display: none;
}

.payment-method-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-dark);
}

.payment-method-btn i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.payment-method-btn:hover {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
}

.payment-radio:checked + .payment-method-btn,
.payment-method-active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-white);
}

.payment-radio:checked + .payment-method-btn i,
.payment-method-active i {
    color: var(--bg-white);
}

/* Intention Options */
.intention-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.intention-radio {
    display: none;
}

.intention-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
    color: var(--text-dark);
}

.intention-btn:hover {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
}

.intention-radio:checked + .intention-btn,
.intention-active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-white);
}

/* Donor Header */
.donor-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-white);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-weight: 500;
}

.donor-header i:first-child {
    font-size: 1.2rem;
}

.donor-header i:last-child {
    margin-left: auto;
    font-size: 0.9rem;
}

/* Receipt Info Section */
.receipt-info-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
    display: none;
}

.receipt-info-section.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.receipt-info-section .form-row {
    gap: 20px;
}

.receipt-info-section .form-group {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.char-count {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: right;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.btn-cancel {
    flex: 1;
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Sarabun', sans-serif;
}

.btn-cancel:hover {
    background: var(--bg-light);
    border-color: var(--text-light);
}

.btn-submit {
    flex: 1;
    margin-top: 0;
}

/* Remove icon from form group labels when not needed */
.form-section .form-group label {
    display: block;
}

.form-section .form-group label i {
    display: none;
}

/* ============================================
   Merit Package Selection
   ============================================ */
.merit-packages {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.merit-package-item {
    position: relative;
}

.package-radio {
    display: none;
}

.package-label {
    display: block;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
}

.package-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    text-align: left;
}

.project-thawarattanamanee .package-card.custom-no-image {
    align-items: center;
}

.package-card-media {
    display: grid;
    grid-template-columns: minmax(140px, 180px) 1fr;
    align-items: center;
    gap: 20px;
    padding: 18px;
    width: 100%;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.05));
    min-height: 160px;
}

.package-featured-image {
    width: 100%;
    height: 100%;
    max-height: 180px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: 0 12px 24px rgba(212, 175, 55, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.package-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.package-featured-image.placeholder {
    font-size: 2.4rem;
    color: var(--primary-color);
}

.project-thawarattanamanee .package-card.custom-no-image .package-card-media {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 30px;
}

.package-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.project-thawarattanamanee .package-card.custom-no-image .package-card-body {
    align-items: center;
    text-align: center;
    width: 100%;
}

.project-thawarattanamanee .package-card.custom-no-image .package-card-body .package-card-title,
.project-thawarattanamanee .package-card.custom-no-image .package-card-body .package-card-description {
    width: 100%;
}

.project-thawarattanamanee .package-card.custom-no-image .package-card-body .package-card-badge {
    margin-top: 12px;
    align-self: center;
}

.package-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
}

.package-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.package-card-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.project-thawarattanamanee .merit-start-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.project-thawarattanamanee .merit-start-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    padding: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.package-label:hover {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.package-radio:checked + .package-label {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(139, 69, 19, 0.1));
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.package-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.package-badge {
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.package-price {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.form-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    border-radius: 5px;
    margin-top: 20px;
    color: var(--text-dark);
}

.form-note i {
    color: #ffc107;
    font-size: 1.2rem;
}

/* ============================================
   Quantity Control
   ============================================ */
.quantity-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}

.quantity-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: var(--bg-white);
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Sarabun', sans-serif;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-white);
    font-family: 'Sarabun', sans-serif;
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ============================================
   QR Code Payment Section
   ============================================ */
.project-thawarattanamanee .payment-merit-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    max-width: 880px;
    width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
}

.project-thawarattanamanee .payment-left,
.project-thawarattanamanee .payment-right {
    flex: 0 0 360px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 22px;
    padding: 24px 26px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.project-thawarattanamanee .payment-qr-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.project-thawarattanamanee .qr-code-placeholder {
    width: 200px;
    height: 200px;
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.project-thawarattanamanee .qr-code-placeholder i {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.project-thawarattanamanee .qr-code-placeholder p {
    font-size: 0.75rem;
    margin: 0;
}

.project-thawarattanamanee .qr-code-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.project-thawarattanamanee .static-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.97);
    padding: 0px 5px;
    border-radius: 24px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 360px;
}

.project-thawarattanamanee .qr-code-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: none;
    display: block;
}

.project-thawarattanamanee .static-qr-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.static-qr-caption {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.project-thawarattanamanee .payment-details-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-thawarattanamanee .payment-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.project-thawarattanamanee .payment-info-item i {
    font-size: 1.4rem;
    color: var(--primary-color);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.project-thawarattanamanee .payment-info-item > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.project-thawarattanamanee .payment-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.project-thawarattanamanee .payment-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.project-thawarattanamanee .total-amount-display {
    text-align: left;
    padding: 18px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(139, 69, 19, 0.1));
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.2);
}

.project-thawarattanamanee .package-select-wrapper,
.project-thawarattanamanee .package-description,
.project-thawarattanamanee .custom-amount-note {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 20px rgba(0, 0, 0, 0.04);
}

.project-thawarattanamanee .package-description {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.55;
}

.project-thawarattanamanee .custom-amount-note {
    display: flex;
    align-items: center;
    gap: 14px;
}

.project-thawarattanamanee .total-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
}

.project-thawarattanamanee .total-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.package-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.package-select-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-select-label i {
    color: var(--primary-color);
}

.package-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Sarabun', sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.package-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.package-select:hover {
    border-color: var(--primary-color);
}

.payment-amount {
    color: var(--primary-color) !important;
    font-size: 1.1rem !important;
}

.quantity-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}

.quantity-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: var(--bg-white);
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Sarabun', sans-serif;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-white);
    font-family: 'Sarabun', sans-serif;
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Compact form section */
.form-section-compact {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.form-section-compact:last-of-type {
    border-bottom: none;
}

.form-section-title-small {
    font-size: 1.1rem !important;
    margin-bottom: 15px !important;
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--bg-white);
    margin: auto;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px 10px;
    transition: var(--transition);
    border-radius: 5px;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Upload Area
   ============================================ */
.upload-area {
    position: relative;
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-light);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
}

.upload-label i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.upload-label span {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 500;
}

.upload-label small {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ============================================
   Payment Upload & Donor Info Layout
   ============================================ */
.payment-donor-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* ซ้ายเล็กกว่า ขวาใหญ่กว่า */
    gap: 25px;
    align-items: start;
}

.payment-upload-left {
    display: flex;
    flex-direction: column;
}

.donor-info-right {
    display: flex;
    flex-direction: column;
}

.image-preview {
    position: relative;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    max-width: 100%;
}

.image-preview img {
    width: 100%;
    max-width: 300px; /* จำกัดขนาดภาพไม่ให้ใหญ่เกินไป */
    height: auto;
    display: block;
    object-fit: contain;
}

/* Responsive: Payment-Donor Layout */
@media (max-width: 768px) {
    .payment-donor-container {
        grid-template-columns: 1fr; /* แสดงแบบ vertical บน mobile */
        gap: 20px;
    }
    
    .image-preview img {
        max-width: 100%; /* บน mobile ให้ใช้ความกว้างเต็ม */
    }
}

.ocr-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    margin-top: 15px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.ocr-status i {
    font-size: 1.2rem;
}

.ocr-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    margin-top: 15px;
    color: #c33;
    font-size: 0.9rem;
}

.ocr-error i {
    font-size: 1.2rem;
    color: #c33;
}

.ocr-error span {
    flex: 1;
    line-height: 1.5;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-image:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery-section {
    background: var(--bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay i {
    font-size: 2.5rem;
    color: var(--bg-white);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    background: var(--bg-white);
    padding: 60px 0;
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: var(--transition);
}

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

.contact-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.2rem;
    color: var(--bg-white);
}

.contact-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.contact-details p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: #ffffff;
        width: 100%;
        padding: 2rem;
        box-shadow: 0 25px 45px rgba(217, 166, 41, 0.25);
        transition: var(--transition);
        height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        text-align: center;
        color: var(--text-dark);
    }
    
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-copy {
        margin: 0 auto;
        align-items: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 400px;
    }

    .hero-media {
        order: -1;
    }

    .hero-media-frame {
        max-width: 85%;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid,
    .steps-grid,
    .features-section {
        grid-template-columns: 1fr;
    }
    
    /* Steps for tablet */
    .steps-grid {
        gap: 35px;
        margin-bottom: 50px;
    }
    
    .step-item {
        padding: 35px 20px;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .step-icon {
        width: 85px;
        height: 85px;
    }
    
    .step-icon i {
        font-size: 2.2rem;
    }
    
    .step-item h3 {
        font-size: 1.2rem;
    }
    
    .step-item p {
        font-size: 0.95rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .form-wrapper {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 70px 0 35px;
        min-height: auto;
    }

    .hero-announcement {
        gap: 12px;
        padding: 12px 0 28px;
    }

    .announcement-banner figcaption {
        padding: 18px 16px 24px;
    }

    .announcement-banner figcaption p {
        font-size: 0.95rem;
    }
    
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .hero-copy {
        align-items: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        max-width: 420px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        gap: 12px;
    }
    
    .hero-media {
        order: -1;
    }
    
    .hero-media-frame {
        max-width: 90%;
        margin: 0 auto;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* Form Responsive */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-row-compact {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .payment-methods,
    .intention-options {
        flex-direction: column;
    }
    
    .payment-method-btn,
    .intention-btn {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-wrapper {
        padding: 30px 20px;
    }
    
    .accordion-content.active {
        padding: 20px 15px;
    }
    
    .receipt-info-section .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Merit Package Responsive */
    .merit-packages {
        gap: 12px;
    }
    
    .package-label {
        padding: 15px;
    }
    
    .package-title {
        font-size: 1rem;
    }
    
    .package-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .project-thawarattanamanee .payment-merit-layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    
    .project-thawarattanamanee .payment-qr-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .project-thawarattanamanee .qr-code-wrapper {
        text-align: center;
    }
    
    .project-thawarattanamanee .qr-code-placeholder {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }
    
    .project-thawarattanamanee .qr-code-wrapper img {
        width: 180px;
        margin: 0 auto;
    }
    
    .project-thawarattanamanee .payment-details-column {
        width: 100%;
    }
    
    .project-thawarattanamanee .payment-info-item,
    .project-thawarattanamanee .total-amount-display {
        width: 100%;
    }
    
    .package-select {
        width: 100%;
    }
    
    .merit-start-section {
        padding: 40px 15px;
    }
    
    .merit-start-content i {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .merit-start-content h3 {
        font-size: 1.3rem;
    }
    
    .merit-start-content p {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .merit-start-content .btn {
        min-width: 180px;
        width: 100%;
    }
    
    .form-section-title-small {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
    }
    
    .upload-label {
        padding: 20px 12px;
    }
    
    .upload-label i {
        font-size: 2rem;
    }
    
    .upload-label span {
        font-size: 0.85rem;
    }
    
    /* Modal Responsive */
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    /* Upload Area Responsive */
    .upload-label {
        padding: 30px 15px;
    }
    
    .upload-label i {
        font-size: 2.5rem;
    }
    
    .upload-label span {
        font-size: 0.9rem;
    }
    
    /* Contact Responsive */
    .contact-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    .contact-section {
        padding: 40px 0;
    }
}

/* Mobile First - Extra Small Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-title-compact {
        font-size: 1.75rem !important;
    }
    
    .section-header-compact {
        margin-bottom: 25px !important;
    }
    
    .merit-form-section {
        padding: 30px 0;
    }
    
    .form-wrapper {
        padding: 30px 20px;
    }
    
    /* Navigation */
    .logo span {
        font-size: 0.9rem;
    }
    
    .nav-menu {
        padding: 1rem;
    }
    
    .nav-link {
        padding: 10px 0;
        font-size: 0.95rem;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 14px 30px;
        font-size: 1rem;
        width: 100%;
    }
    
    /* Hero Section */
    .hero {
        min-height: 80vh;
        padding-top: 70px;
    }
    
    /* Sections */
    section {
        padding: 40px 0;
    }
    
    /* About Section */
    .about-content {
        gap: 30px;
    }
    
    .about-image img {
        height: 300px;
    }
    
    .benefits-grid {
        gap: 20px;
    }
    
    .benefit-item {
        padding: 20px 15px;
    }
    
    /* Form */
    .form-wrapper {
        padding: 25px 15px;
    }
    
    .form-section {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-control-large {
        padding: 15px 18px;
        font-size: 16px;
    }
    
    textarea.form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .payment-method-btn,
    .intention-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .donor-header {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .accordion-content.active {
        padding: 15px;
    }
    
    /* Contact */
    .contact-item {
        padding: 15px;
        gap: 12px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon i {
        font-size: 1rem;
    }
    
    .contact-details h3 {
        font-size: 0.95rem;
    }
    
    .contact-details p {
        font-size: 0.85rem;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    /* Gallery */
    .gallery-grid {
        gap: 15px;
    }
    
    /* Steps */
    .steps-grid {
        gap: 25px;
        margin-bottom: 40px;
    }
    
    .step-item {
        padding: 25px 15px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        top: -15px;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
        margin: 0 auto 15px;
    }
    
    .step-icon i {
        font-size: 1.8rem;
    }
    
    .step-item h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .step-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Features */
    .features-section {
        gap: 20px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    .feature-icon i {
        font-size: 1.8rem;
    }
}

/* Very Small Devices (iPhone SE, etc.) */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-title-compact {
        font-size: 1.5rem !important;
    }
    
    .section-header-compact {
        margin-bottom: 20px !important;
    }
    
    .form-wrapper {
        padding: 20px 12px;
    }
    
    .btn-large {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    /* Steps for very small devices */
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: -12px;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto 12px;
    }
    
    .step-icon i {
        font-size: 1.5rem;
    }
    
    .step-item h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .step-item p {
        font-size: 0.85rem;
    }
    
    .steps-grid {
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .step-item {
        padding: 20px 12px;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    /* Steps in landscape */
    .steps-grid {
        gap: 20px;
    }
    
    .step-item {
        padding: 20px 10px;
    }
    
    .step-icon {
        width: 65px;
        height: 65px;
    }
    
    .step-icon i {
        font-size: 1.6rem;
    }
    
    .step-item h3 {
        font-size: 1rem;
    }
    
    .step-item p {
        font-size: 0.85rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .btn,
    .payment-method-btn,
    .intention-btn,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .checkbox-label,
    .accordion-header {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .contact-item:hover {
        transform: none;
    }
    
    .benefit-item:hover,
    .feature-card:hover {
        transform: none;
    }
}

.donation-list-section {
    background: var(--bg-light);
    padding: 70px 0;
}

.donation-list-section .section-description {
    max-width: 680px;
    margin: 16px auto 0;
}

.donation-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.donation-card {
    background: var(--bg-white);
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(217, 166, 41, 0.12);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.donation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(217, 166, 41, 0.18);
}

.donation-card-image {
    flex: 0 0 120px;
    width: 120px;
    height: 90px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(217, 166, 41, 0.15);
}

.donation-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.donation-card-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.donation-card-content h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.donation-card-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.donation-card-content h3 a:hover {
    color: var(--primary-dark);
}

.donation-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(217, 166, 41, 0.25);
}

.donation-card-btn i {
    font-size: 1rem;
}

.donation-card-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(217, 166, 41, 0.3);
}

.donation-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(217, 166, 41, 0.25);
    align-self: flex-start;
}

.donation-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 166, 41, 0.35);
}

.donation-card-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.donation-card-btn:hover i {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .donation-cards {
        gap: 16px;
        margin-top: 32px;
    }

    .donation-card {
        padding: 14px 16px;
        gap: 14px;
    }

    .donation-card-image {
        flex: 0 0 96px;
        width: 96px;
        height: 72px;
    }

    .donation-card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .donation-card-btn {
        width: auto;
        padding: 9px 18px;
        font-size: 0.9rem;
    }
}

.project-page {
    background: var(--bg-light);
    color: var(--text-dark);
}

.project-page-simple {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-light);
    background-image: url('../images/001.png');
    background-repeat: no-repeat;
    background-size: auto;
    background-position: center top;
    background-attachment: fixed;
}

.project-page-simple::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 246, 227, 0.75));
    backdrop-filter: blur(6px);
    z-index: 0;
}

.simple-back-wrapper {
    display: flex;
    justify-content: flex-end;
    padding: 24px 32px 0;
    position: relative;
    z-index: 1;
}

.simple-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(217, 166, 41, 0.12);
    color: var(--primary-dark);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 6px 14px rgba(217, 166, 41, 0.15);
}

.simple-back-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 10px 20px rgba(217, 166, 41, 0.25);
}

.simple-project-main {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.project-intro-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    padding: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
    position: relative;
}

.project-intro-media {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-intro-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.15);
}

.project-intro-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

.project-intro-text h1 {
    font-size: clamp(2.2rem, 3.5vw, 3rem);
    color: var(--primary-dark);
}

.project-intro-text p {
    color: var(--text-light);
    line-height: 1.8;
}

.project-thawarattanamanee {
    background-color: var(--bg-light);
    background-image: url("../images/S__4489275.jpg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: top center;
    background-attachment: scroll;
}

.project-thawarattanamanee .project-content-compact {
    gap: 20px;
    max-width: 760px;
}

.project-thawarattanamanee .form-wrapper {
    max-width: 680px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.74);
    padding: 22px 26px;
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.project-thawarattanamanee .merit-form {
    gap: 18px;
}

.project-thawarattanamanee .package-description {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(247, 201, 72, 0.12);
    border-radius: 14px;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.project-thawarattanamanee .custom-amount-group {
    margin-top: 18px;
}

.project-thawarattanamanee .custom-amount-group .form-control {
    font-size: 1rem;
}

.project-thawarattanamanee .gem-selection-section {
    margin-top: 22px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed rgba(217, 166, 41, 0.35);
    border-radius: 18px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.project-thawarattanamanee .gem-selection-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.project-thawarattanamanee .gem-random-btn {
    align-self: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(217, 166, 41, 0.5);
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.project-thawarattanamanee .gem-random-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.project-thawarattanamanee .gem-selection-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.project-thawarattanamanee .gem-selection-header p {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.project-thawarattanamanee .gem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.project-thawarattanamanee .gem-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-thawarattanamanee .gem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.project-thawarattanamanee .gem-card.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.project-thawarattanamanee .gem-image img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.08);
    padding: 10px;
}

.project-thawarattanamanee .gem-name {
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.project-thawarattanamanee .gem-meaning {
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-light);
    line-height: 1.4;
}

.project-thawarattanamanee .gem-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-thawarattanamanee .gem-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(217, 166, 41, 0.15);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.project-thawarattanamanee .gem-qty-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.project-thawarattanamanee .gem-qty-btn:disabled {
    background: rgba(180, 180, 180, 0.3);
    color: rgba(80, 80, 80, 0.5);
    cursor: not-allowed;
    transform: none;
}

.project-thawarattanamanee .gem-qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(217, 166, 41, 0.25);
    border-radius: 12px;
    padding: 6px 0;
    font-weight: 600;
    color: var(--primary-dark);
}

.project-thawarattanamanee .gem-selection-summary {
    font-size: 0.95rem;
    color: var(--primary-dark);
    font-weight: 500;
    text-align: center;
}

.project-thawarattanamanee .gem-reference-panel {
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-thawarattanamanee .gem-reference-panel h4,
.project-thawarattanamanee .gem-reference-panel h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.project-thawarattanamanee .gem-reference-intro {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.project-thawarattanamanee .gem-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 14px;
}

.project-thawarattanamanee .gem-reference-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.project-thawarattanamanee .gem-reference-image img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
}

.project-thawarattanamanee .gem-reference-name {
    font-size: 0.9rem;
    text-align: center;
    color: var(--primary-dark);
}

.project-thawarattanamanee .gem-reference-meaning {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    line-height: 1.4;
}

.project-thawarattanamanee .custom-amount-note {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(217, 166, 41, 0.1);
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.project-thawarattanamanee .custom-amount-note i {
    font-size: 1.4rem;
}

.project-thawarattanamanee .custom-amount-note p {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.project-thawarattanamanee .modal-gem-reference {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.92);
}

.project-thawarattanamanee .modal-gem-reference .gem-reference-grid {
    gap: 12px;
}

@media (max-width: 768px) {
    .project-thawarattanamanee .gem-reference-panel {
        padding: 16px;
    }

    .project-thawarattanamanee .gem-reference-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .project-thawarattanamanee .gem-selection-footer {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .project-thawarattanamanee .form-wrapper {
        padding: 18px 16px;
    }

    .project-thawarattanamanee .gem-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }

    .project-thawarattanamanee .gem-card {
        padding: 12px;
    }
}

.project-hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.25), rgba(255, 255, 255, 0.85));
    overflow: hidden;
}

.project-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 60%);
}

.project-nav {
    position: relative;
    margin-bottom: 40px;
}

.project-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}

.project-back:hover {
    color: var(--primary-color);
}

.project-hero-content {
    position: relative;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.project-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-dark);
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
}

.project-hero-content h1 {
    font-size: clamp(2.4rem, 4vw, 3.4rem);
}

.project-hero-content p {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
}

.project-main {
    padding: 60px 0 90px;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.project-section h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.project-section p {
    color: var(--text-light);
    line-height: 1.7;
}

.project-content-compact {
    gap: 32px;
}

.project-summary-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 12px 28px rgba(217, 166, 41, 0.12);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.project-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 20px;
    color: var(--text-light);
}

.project-highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.98rem;
}

.project-highlights i {
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.project-simple-steps h2 {
    margin-bottom: 18px;
}

.project-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.project-step {
    background: var(--bg-white);
    border-radius: 18px;
    padding: 22px 20px;
    box-shadow: 0 8px 20px rgba(217, 166, 41, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 6px 14px rgba(217, 166, 41, 0.2);
}

.project-step h3 {
    margin: 0;
    font-size: 1.1rem;
}

.project-step p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.project-cta-card {
    position: relative;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 22px;
    padding: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 12px 28px rgba(217, 166, 41, 0.18);
}

.project-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.25), transparent 60%);
    opacity: 0.8;
    z-index: -1;
}

.project-cta-card p {
    color: var(--text-light);
    margin: 6px 0 0;
}

.project-timeline {
    list-style: none;
    display: grid;
    gap: 20px;
}

.project-timeline li {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.timeline-time {
    font-weight: 600;
    color: var(--primary-dark);
}

.project-donations {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.project-donations article {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.project-bank {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.project-bank-info {
    flex: 1 1 320px;
}

.project-bank-qr {
    flex: 0 0 220px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.project-bank-qr img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-cta {
    text-align: center;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.15), rgba(255, 255, 255, 0.9));
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: var(--shadow);
}

.project-footer {
    background: rgba(0, 0, 0, 0.05);
    padding: 24px 0;
    text-align: center;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .project-hero {
        padding: 80px 0 60px;
    }

    .simple-back-wrapper {
        padding: 18px 20px 0;
    }

    .project-timeline li {
        grid-template-columns: 1fr;
    }

    .project-highlights {
        grid-template-columns: 1fr;
    }

    .project-steps {
        grid-template-columns: 1fr;
    }

    .project-cta-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-cta-card::before {
        opacity: 0.9;
    }

    .project-page-simple {
        background-attachment: scroll;
    }
}

.merit-success-card {
    text-align: center;
    padding: 70px 40px;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(212, 175, 55, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.merit-success-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.25), rgba(212, 175, 55, 0.45));
    color: var(--primary-dark);
    font-size: 2.5rem;
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.3);
}

.merit-success-card h2 {
    font-size: 1.9rem;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.merit-success-card p {
    color: var(--text-light);
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.merit-success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.merit-success-actions .btn {
    min-width: 200px;
}

@media (max-width: 768px) {
    .merit-success-card {
        padding: 50px 24px;
    }

    .merit-success-card h2 {
        font-size: 1.6rem;
    }

    .merit-success-actions {
        flex-direction: column;
        gap: 12px;
    }

    .merit-success-actions .btn {
        width: 100%;
    }
}

