/* Custom Properties (Variables) */
:root {
    --bg-color-dark: #1a1a1a;
    --bg-color-medium: #2a2a2a; /* Used for form inputs */
    --text-color-light: #ffffff;
    --text-color-gray: #b0b0b0;
    --accent-color-orange: #e56a1b; /* Submit button */
    --header-bg-gradient-start: #333333;
    --header-bg-gradient-end: #1a1a1a;
    --form-bg-color: #24140b; /* Dark brown/orange background */
    --form-border-color: #4a2d1a; /* Darker border for inputs */
    --border-radius: 4px;
    --font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-family-poppins: 'Poppins', sans-serif;
    --max-width-content: 900px;
    --padding-sides: 1.5rem;
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color-light);
    background-color: var(--bg-color-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    font-size: 0.9rem;
    color: var(--text-color-gray);
    line-height: 1.4;
    cursor: pointer;
    text-decoration: underline;
}

/* Header */
.main-header {
    display: flex;
    /* Changed to justify-content: center for single column (mobile) and
       space-between for multiple columns (desktop) */
    justify-content: center; /* Default center on mobile */
    align-items: center;
    padding: 1rem var(--padding-sides);
    background: linear-gradient(to right, var(--header-bg-gradient-start), var(--header-bg-gradient-end));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* Needed for absolute positioning of sponsor-info on desktop */
    min-height: 60px; /* Ensure enough space for logo and sponsor */
}

.sponsor-info {
    font-size: 0.9rem;
    color: var(--text-color-gray);
    /* Position for mobile, will be overridden for desktop */
    position: absolute; /* Allows centering of logo while sponsor stays left */
    left: var(--padding-sides);
    top: 50%;
    transform: translateY(-50%);
    /* Hide on very small screens if necessary, or just let it push content */
    display: none; /* Hide by default on mobile, show on larger screens */
}

.sponsor-name {
    font-weight: bold;
    color: var(--text-color-light);
}

/* Logo Image Styling */
.logo-container {
    display: flex; /* Helps in centering the image */
    justify-content: center;
    align-items: center;
    height: 40px; /* Define a height for the container */
}

.logo-image {
    max-height: 40px; /* Control image height to match original mockup */
    width: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below image */
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem var(--padding-sides);
    background-image: radial-gradient(circle at center, rgba(139, 69, 19, 0.3) 0%, rgba(26, 26, 26, 0.8) 70%, rgba(26, 26, 26, 1) 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 2rem;
    max-width: var(--max-width-content);
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color-light);
    line-height: 1.2;
}

.hero-section .tagline {
    font-size: 1rem;
    color: var(--text-color-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Form Section */
.form-section {
    width: 100%;
    max-width: 800px; /* Increased max-width for a wider form area */
    background-color: var(--form-bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

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

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

.form-group label {
    font-size: 0.9rem;
    color: var(--text-color-gray);
    margin-bottom: 0.5rem;
}

.form-group label .required {
    color: var(--accent-color-orange);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.9rem 1rem;
    background-color: var(--bg-color-medium);
    border: 1px solid var(--form-border-color);
    border-radius: var(--border-radius);
    color: var(--text-color-light);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    border-color: var(--accent-color-orange);
    box-shadow: 0 0 0 2px rgba(229, 106, 27, 0.3);
}

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: flex-start; /* Align checkbox to the top of text */
    margin-bottom: 1rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    appearance: none; /* Hide default checkbox */
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--accent-color-orange);
    border-radius: var(--border-radius);
    background-color: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    margin-right: 0.8rem;
    top: 2px; /* Slight adjustment for visual alignment with text */
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--accent-color-orange);
    border-color: var(--accent-color-orange);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '\2713'; /* Checkmark character */
    font-size: 0.9rem;
    color: var(--text-color-light);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1; /* Adjust line-height to center vertically */
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-color-gray);
    line-height: 1.4;
    cursor: pointer;
}

/* Submit Button */
.submit-button {
    background-color: var(--accent-color-orange);
    color: var(--text-color-light);
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-top: 1.5rem;
    width: fit-content; /* Adjust button width to content */
    align-self: center; /* Center the button in the flex container */
}

.submit-button:hover {
    background-color: #cf5e16; /* Slightly darker orange */
    transform: translateY(-2px);
}

/* Mobile Breakpoints */

/* Small Phones (e.g., up to 480px) */
@media (max-width: 480px) {
    .main-header {
        padding: 0.8rem var(--padding-sides);
        justify-content: center; /* Ensure logo is centered */
    }

    .sponsor-info {
        display: none; /* Hide sponsor info on very small screens to simplify header */
    }

    .logo-container {
        height: 35px; /* Slightly smaller logo on mobile */
    }

    .logo-image {
        max-height: 35px;
    }

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

    .hero-section .tagline {
        font-size: 0.9rem;
    }

    .form-section {
        padding: 1.5rem;
        max-width: 95%; /* Allow it to be wider on small screens */
    }

    .form-grid {
        grid-template-columns: 1fr; /* Stack columns on small screens */
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .form-group input {
        padding: 0.8rem 0.9rem;
        font-size: 0.9rem;
    }

    .checkbox-group label {
        font-size: 0.85rem;
    }

    .submit-button {
        width: 100%; /* Full width button on small screens */
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
}

/* Tablets (e.g., 481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .main-header {
        justify-content: center; /* Still center logo, sponsor info can be hidden or shifted */
    }

    .sponsor-info {
        display: block; /* Show sponsor info */
        position: absolute;
        left: var(--padding-sides);
        right: auto;
        transform: translateY(-50%);
        font-size: 0.85rem;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section .tagline {
        font-size: 0.95rem;
    }

    .form-section {
        padding: 2rem;
        max-width: 90%; /* Allow it to be wider on tablets */
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
    }
}

/* Desktops (e.g., 769px and up) */
@media (min-width: 769px) {
    .main-header {
        flex-direction: row;
        justify-content: space-between; /* Space out items */
        padding: 1rem var(--padding-sides);
    }

    .sponsor-info {
        display: block; /* Ensure sponsor info is visible */
        position: static; /* Reset positioning for desktop */
        transform: none;
        margin-bottom: 0;
        order: -1; /* Place sponsor info first in flex order */
        flex-grow: 1; /* Allow it to take available space */
    }

    .logo-container {
        flex-grow: 1; /* Allow it to take available space for centering */
        text-align: center; /* Center the image within its flex item */
        margin-left: -10%; /* Counteract sponsor-info pushing it too far right */
        margin-right: -10%; /* For perfect visual centering, fine-tune as needed */
        order: 0;
    }

    .logo-image {
        max-height: 40px; /* Original size on desktop */
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-section .tagline {
        font-size: 1.1rem;
    }

    .form-section {
        padding: 3rem;
        max-width: 800px; /* Maintain the desired desktop width */
    }

    .form-grid {
        gap: 2rem;
    }
}