* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #f9f9f9;
    overflow-y: auto; /* Ensure vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

p {
    margin-bottom: 1rem;
}

header {
    text-align: center;
    padding: 1rem 0;
    background-color: #4285F4; /* Google blue color */
    color: white;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
}

main {
    padding: 0 0 100px 0; /* Bottom padding to prevent content from being hidden behind fixed form */
}

.description {
    padding: 1rem;
    text-align: center;
}

.hero-section {
    position: relative;
    margin-bottom: 2rem;
}

.image-gallery {
    width: 100%;
    overflow: hidden;
}

.image-gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hero-text {
    padding: 1.5rem;
    text-align: center;
    background-color: #f5f5f5;
}

.hero-text h2 {
    margin-top: 0;
    color: #4285F4;
    font-size: 1.8rem;
}

.content-section {
    padding: 1rem;
    margin-bottom: 33vh; /* Space for the fixed form at bottom */
}

.text-block {
    margin-bottom: 2.5rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.text-block h3 {
    color: #4285F4;
    margin-top: 0;
}

.content-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

ul, ol {
    padding-left: 1.5rem;
}

li {
    margin: 0.5rem 0;
}

.form-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 33vh; /* Approximately 1/3 of viewport height */
    max-height: 250px; /* Set a maximum height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.8rem;
    background-color: #f2f2f2;
    border-top: 1px solid #ccc;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: transform 0.3s ease;
    text-align: center;
    overflow-y: auto; /* Allow scrolling if needed */
}

#email-form {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.form-title {
    margin: 0 0 0.5rem 0;
    color: #4285F4;
    font-size: 1.2rem;
}

.form-container p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    font-size: 0.9rem;
}

#email-input {
    flex: 3; /* Takes up 3/4 of the space */
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 8px 0 0 8px; /* Rounded corners only on left side */
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset;
}

#email-form button {
    flex: 1; /* Takes up 1/4 of the space */
    background-color: #4CAF50;
    color: white;
    padding: 0.7rem 0;
    border: none;
    border-radius: 0 8px 8px 0; /* Rounded corners only on right side */
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0;
    white-space: nowrap;
}

#email-form button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#email-form button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.error-message {
    color: #d32f2f;
    margin: 0.3rem auto 0;
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
    clear: both;
}

#qrcode-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    padding: 0.5rem;
    overflow-y: auto;
}

.qrcode-modal {
    background-color: white;
    padding: 1.2rem;
    border-radius: 8px;
    text-align: center;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    max-height: 90vh;
}

.qr-image img {
    margin: 0.5rem auto;
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 220px;
    border: 1px solid #eee;
    padding: 8px;
    background-color: white;
}

#qrcode img {
    margin: 0.5rem auto;
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 220px;
    border: 1px solid #eee;
    padding: 8px;
    background-color: white;
}

#qrcode h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

#qrcode a {
    display: inline-block;
    margin: 1rem 0;
    color: #4285F4;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #4285F4;
    border-radius: 4px;
}

#qrcode a:hover {
    background-color: #4285F4;
    color: white;
}

#qrcode h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
}

.payment-details {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    text-align: left;
    font-size: 0.85rem;
}

.payment-details p {
    margin: 0.3rem 0;
}

.payment-success {
    text-align: center;
    padding: 1rem;
}

.payment-success h3 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

#close-qr {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    max-width: 150px;
}

/* Media Queries for larger screens */
@media (min-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 2.2rem;
    }

    .content-section {
        padding: 2rem;
        max-width: 900px;
        margin: 0 auto 120px;
    }

    .text-block {
        padding: 2rem;
        margin-bottom: 3rem;
    }

    .form-container {
        padding: 1rem 2rem;
        height: auto;
        max-height: none;
    }

    #email-form {
        max-width: 600px;
        margin: 0 auto;
        align-items: center;
    }

    #email-form button {
        min-width: 120px;
    }

    .qrcode-modal {
        max-width: 400px;
        padding: 2rem;
        max-height: 80vh;
    }

    #qrcode h3 {
        font-size: 1.5rem;
    }

    .qr-image img, #qrcode img {
        max-height: 250px;
        margin: 1rem auto;
    }

    .payment-details {
        font-size: 1rem;
        padding: 1rem;
    }

    /* Two-column layout for certain sections */
    .content-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}