/* --- Global Theme Color Palette (Blue) --- */
:root {
    --primary-blue: #007bff; /* A vibrant, standard blue */
    --light-blue: #e0f2ff; /* Very light blue for backgrounds and secondary elements */
    --dark-blue: #0056b3; /* Darker blue for hover states */
    --text-color-dark: #333; /* Dark gray for main text */
    --text-color-light: #666; /* Lighter gray for secondary text */
    --border-color: #cce5ff; /* Light blue for borders */
    --success-bg: #d4edda; /* Light green for success messages (can override to blue if preferred) */
    --success-text: #155724; /* Dark green for success text */
    --error-color: #e74c3c; /* Red for error messages */
    --neutral-gray: #6c757d; /* For secondary buttons, etc. */
    --dark-gray-bg: #333; /* For footer */
    --white: #fff;
    --light-gray-bg: #f5f7fa; /* General body background */
}

/* --- Base HTML and Body Styles --- */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-gray-bg);
    color: var(--text-color-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    margin-bottom: 60px; /* For footer spacing */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Styling --- */
.main-header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border-bottom: 1px solid #eee;
}

.header-content {
    display: flex;
    justify-content: space-between; /* Pushes left and right content to opposite ends */
    align-items: center; /* Vertically centers content */
}

.header-left {
    display: flex; /* To align logo image and text */
    align-items: center;
}

.logo {
    display: flex; /* Ensures image and text align */
    align-items: center;
    text-decoration: none;
    color: var(--primary-blue); /* Logo text color */
}

.logo-image {
    height: 80px; /* Adjust as needed for your logo size */
    margin-right: 10px; /* Space between logo image and text */
    vertical-align: middle; /* Align image with text baseline */
}

.logo-text {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Statistics Section Styling */
.header-right {
    display: flex;
    align-items: center;
}

.statistics {
    display: flex;
    gap: 30px; /* Space between individual stat items */
}

.stat-item {
    text-align: center;
    color: var(--text-color-light);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-blue); /* Highlight numbers with brand color */
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 14px;
    margin-top: 2px;
    color: var(--text-color-light);
}

/* --- Main Content Area --- */
.main-content {
    padding: 40px 20px;
    display: flex;
    justify-content: center; /* Center the form/content */
    align-items: flex-start;
    min-height: calc(100vh - 120px); /* Adjust based on header/footer height */
}

/* --- Registration Form Specific Styling --- */
.registration-container {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px; /* Keep the form compact */
    box-sizing: border-box;
}

.form-title {
    text-align: center;
    color: var(--text-color-dark);
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.registration-form .form-group {
    margin-bottom: 20px;
}

.registration-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color-light);
    font-size: 15px;
}

.registration-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box; /* Include padding in width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .registration-form .form-control:focus {
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); /* Shadow with primary blue */
        outline: none;
    }

.registration-form .btn-primary {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 25px;
}

    .registration-form .btn-primary:hover {
        background-color: var(--dark-blue);
        transform: translateY(-2px);
    }

.text-danger {
    color: var(--error-color); /* Strong red for error messages */
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.result-message {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    border-radius: 6px;
    background-color: var(--light-blue); /* Light blue for success messages */
    color: var(--dark-blue); /* Darker blue text */
    border: 1px solid var(--border-color);
    font-size: 16px;
}

/* --- Thanks Page Specific Styles --- */
.thank-you-container {
    background-color: var(--white);
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    margin: 50px auto; /* Center the container on the page */
}

.thank-you-title {
    color: var(--primary-blue);
    font-size: 38px;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
}

.thank-you-message {
    font-size: 18px;
    color: var(--text-color-dark);
    line-height: 1.6;
    margin-bottom: 30px;
}

.highlight-email {
    font-weight: 600;
    color: var(--primary-blue);
}

.qr-code-section {
    margin: 40px 0;
    text-align: center;
}

.qr-code-message {
    font-size: 17px;
    color: var(--text-color-light);
    margin-bottom: 15px;
}

.qr-code-wrapper {
    display: inline-block; /* Allows text-align: center to work */
    padding: 15px;
    background-color: var(--light-blue); /* Light blue background for the QR code area */
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.qr-code-image {
    max-width: 250px; /* Limit QR code size for better display */
    height: auto;
    display: block; /* Remove extra space below image */
}

.qr-instruction {
    font-size: 15px;
    color: var(--text-color-light);
    margin-top: 30px;
    padding: 15px 20px;
    background-color: var(--light-blue);
    border-left: 5px solid var(--primary-blue); /* Blue left border for a note effect */
    border-radius: 5px;
}

.error-message {
    color: var(--error-color);
    background-color: #f8d7da; /* Light red background for errors */
    border-left-color: var(--error-color);
}

/* Secondary Button Style (for "Back to Home" button) */
.btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    margin-top: 40px;
    background-color: var(--neutral-gray); /* A neutral gray */
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none; /* Remove underline from link */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

    .btn-secondary:hover {
        background-color: #5a6268;
        transform: translateY(-2px);
    }

/* --- Footer Styling --- */
.footer {
    background-color: var(--dark-gray-bg);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    position: absolute; /* Stick to bottom if content is short */
    bottom: 0;
    width: 100%;
}


/* --- Override default Bootstrap-like styles (if applicable) --- */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--white), 0 0 0 0.25rem var(--primary-blue);
}

/* For forms with floating labels (if you use them) */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--text-color-light); /* Using our defined light text color */
    text-align: end; /* Original behavior preserved */
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start; /* Original behavior preserved */
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column; /* Stack logo and stats vertically on smaller screens */
        gap: 15px; /* Space between stacked items */
    }

    .header-left {
        width: 100%;
        justify-content: center; /* Center logo when stacked */
    }

    .header-right {
        width: 100%;
        justify-content: center; /* Center stats when stacked */
    }

    .statistics {
        flex-wrap: wrap; /* Allow stats to wrap if too many */
        justify-content: center;
        gap: 20px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 12px;
    }

    .logo-image {
        height: 35px;
    }

    .logo-text {
        font-size: 24px;
    }

    .thank-you-container {
        padding: 30px;
        margin: 30px 15px;
    }

    .thank-you-title {
        font-size: 30px;
    }

    .thank-you-message {
        font-size: 16px;
    }

    .qr-code-image {
        max-width: 180px; /* Smaller QR code on small screens */
    }
}
