/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to right, #17f0ff, #c9fdfd, #80fd61);
    background-size: 200% 200%;
    color: #333;
}

h1 { /* General h1, might be overridden by more specific rules */
    text-align: center;
    margin-top: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

p { /* General p, might be overridden */
    text-align: center;
    color: #f0f0f0; /* Default for paragraphs, form paragraphs have different styling */
}

/* Header Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2575fc;
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header .icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-right: 10px; /* Ensures spacing if elements are side-by-side */
}
.header .icon-container:last-child {
    margin-right: 0; /* No margin for the last icon */
    margin-left: 10px; /* Spacing from marquee */
}


.header .icon-container img {
    width: 30px;
    height: 30px;
}

.header marquee {
    flex-grow: 1; /* Allows marquee to take available space */
    color: yellow;
    font-weight: 800;
}


/* Logo Section */
.logo-section {
    background-color: #15c79b; /* Original background was an image, using color for simplicity */
    /* background-image: url('your-image-path.jpg'); /* Uncomment and replace if you have an image */
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    height: max-content;
    display: flex;
    justify-content: space-between; /* Distributes space between logo, details, and right logo */
    align-items: center; /* Vertically aligns items in the center */
    flex-wrap: wrap; /* Ensure proper wrapping on small devices */
    padding: 20px; /* Increased padding */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.logo { /* Container for the main emblem and its text */
    display: flex;
    flex-direction: column; /* Stack image and text vertically */
    align-items: center; /* Center items horizontally */
    text-align: center;
    margin: 10px;
}

.logo img#logoImage { /* Specific styling for the main emblem */
    max-width: 80px;
    height: auto;
    margin-bottom: 10px; /* Space between emblem and text */
}

.logo_text { /* Container for the "National Cadet Corps" text */
    font-size: 18px;
    color: blue; /* As per original inline style on parent */
}

.logo_text a {
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit color from .logo_text */
}

.logo_text p.h1-logo { /* Styling for the paragraph within .logo_text */
    margin: 0;
    font-size: large;
    font-weight: bold;
    color: #0000DD; /* Making sure it's distinctly blue if not inherited */
}


.logo-details {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    text-align: center;
    font-size: small;
    flex-grow: 1; /* Allows it to take up available space */
    margin: 10px;
}

.logo-details h2 {
    margin: 5px 0;
    font-size: large;
    color: #fff; /* Ensuring visibility on colored background */
}

.logo-details h3 {
    margin: 5px 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #f0f0f0; /* Lighter color for sub-details */
    font-size: 0.9em;
}

.logo-right {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
}

.logo-right img {
    max-width: 100px;
    height: auto;
    border-radius: 7%;
}

/* Nav Bar */
.nav-bar {
    display: flex;
    justify-content: center;
    background-color: #1e1bc5;
    padding: 10px 0;
    flex-wrap: wrap;
}

.nav-bar button, .nav-bar .menu-button {
    background-color: #fff;
    color: #1e1bc5;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.nav-bar button:hover, .nav-bar .menu-button:hover {
    background-color: #ffcc00;
    transform: scale(1.05);
}

.nav-bar button:active, .nav-bar .menu-button:active {
    transform: scale(1);
}

.nav-bar .menu-button {
    display: none; /* Hidden by default, shown in media query */
}

.nav-bar .menu-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}


/* Step Progress Bar */
#progress-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px auto;
    max-width: 1200px;
    padding: 10px;
    background: #f85b00;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.step {
    text-align: center;
    flex: 0 0 auto; /* Don't grow or shrink, base on content */
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.step-circle {
    width: 30px;
    height: 30px;
    margin: 0 auto;
    background: #ccc; /* Default for non-active steps */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

#step-1 .step-circle { /* Active step */
    background: #6a11cb;
}

.step p {
    margin-top: 5px;
    font-size: 14px;
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #ccc;
    margin: 0 10px; /* Add some spacing around the line */
}


/* Info Section */
.info-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.info-section h2 {
    font-size: 22px;
    color: #444;
    margin-bottom: 10px;
    border-bottom: 2px solid #6a11cb;
    padding-bottom: 5px;
}

.info-section p {
    font-size: 16px;
    color: #555; /* Darker text for readability on white background */
    line-height: 1.6;
    text-align: left; /* Overriding general p text-align center */
}

.info-section p strong {
    color: #333;
}

/* --- Form Specific Enhancements --- */

/* Form Container */
form {
    width: 95%;
    max-width: 1000px;
    margin: 30px auto 50px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-left: 6px solid #6a11cb;
    position: relative;
    overflow: hidden;
}

form:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

/* Form Code (Registration Number) Section Specific Styles */
.form-code-section {
    text-align: left; /* Align label to the left */
    margin-bottom: 20px;
}

.form-code-section label[for="formCode"] {
    font-weight: 700; /* Bolder label text */
    color: #333; /* Darker text for readability */
    display: block; /* Ensures it takes its own line */
    margin-bottom: 10px; /* Space below the label */
    font-size: 1.2em; /* Slightly larger font size */
}

#formCode {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    font-weight: bold;
    text-align: left; /* Align text to left */
    padding: 15px;
    font-size: 1.3em;
    border-radius: 10px;
    width: 100%; /* Take full width of its container */
    max-width: 400px; /* Limit max-width */
    margin-top: 0; /* Remove top margin, handled by label's bottom margin */
    margin-bottom: 30px; /* More margin below */
    display: block;
    box-sizing: border-box; /* Include padding in width */
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Form Sections */
.form-section {
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e0e0e0;
}

.form-section:last-of-type { /* Last section might be the submit button container or a section without a bottom border */
    border-bottom: none;
    margin-bottom: 0;
}
/* If submit is directly in form, this might not be needed or adjust if submit has its own section */
form > .form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}


/* Section Headings within Form */
.form-section h1 { /* For the main NCC 3UPEN2528 title */
    text-align: center;
    color: #444; /* Darker for better contrast on white */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px; /* Space below title */
}
.form-section h1 img {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto; /* Space below image */
}


.form-section h2 { /* For sub-sections like Personal Info, Address */
    font-size: 24px;
    color: #2575fc;
    margin-bottom: 25px;
    border-bottom: 3px solid #6a11cb;
    padding-bottom: 10px;
    text-align: center;
    font-weight: 700;
    position: relative;
}

.form-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -3px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #2575fc, #6a11cb);
    border-radius: 2px;
}

/* Form Grid Layout */
.form-section .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Labels */
label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: #555;
    font-size: 1em;
    text-align: left; /* Ensure labels are left-aligned */
}

/* Input Fields and Selects */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select {
    width: 100%;
    padding: 14px;
    margin-top: 4px; /* Reduced top margin as label provides space */
    margin-bottom: 8px; /* Consistent bottom margin */
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1.05em;
    color: #333;
    background-color: #fcfcfc;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
}

/* Focus State */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: #2575fc;
    box-shadow: 0 0 0 4px rgba(37, 117, 252, 0.25);
    outline: none;
    background-color: #ffffff;
}

/* Custom Select Arrow */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%204%205%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M2%200L0%202h4L2%200zM2%205L0%203h4L2%205z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    background-size: 0.7em auto;
    padding-right: 2.5em; /* Ensure space for the arrow */
}

/* Paragraphs within .form-section (like notes) */
.form-section > p { /* Direct child p of .form-section */
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: left;
    font-weight: 500;
}

/* Submit Button */
input[type="submit"] {
    display: block;
    width: 250px;
    padding: 18px 25px;
    background: linear-gradient(to right, #01b610, #17d917);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin: 50px auto 20px auto;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(1, 182, 16, 0.4);
    letter-spacing: 0.5px;
}

input[type="submit"]:hover {
    background: linear-gradient(to right, #1b7eff, #0056b3);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 123, 255, 0.5);
}

input[type="submit"]:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}


/* Animation (if used elsewhere, otherwise can be removed if spin is not used) */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Responsive Adjustments --- */

/* For Logo Section responsiveness */
@media (max-width: 992px) { /* Medium devices (tablets, less than 992px) */
    .logo-section {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    .logo, .logo-details, .logo-right {
        margin-bottom: 15px; /* Add some space when stacked */
        width: 100%; /* Allow them to take full width if needed */
        text-align: center;
    }
    .logo img#logoImage { max-width: 70px; }
    .logo-right img { max-width: 90px; }
    .logo-details h2 { font-size: medium; }
    .logo-details h3 { font-size: 0.85em; }
}


/* For Form responsiveness */
@media (max-width: 992px) {
    .form-section .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    form {
        padding: 30px;
        width: 95%;
    }
}

@media (max-width: 768px) {
    /* General Nav Bar Responsive */
    .nav-bar .menu-items {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100%;
        background-color: #1e1bc5; /* Ensure background for dropdown */
    }
    .nav-bar .menu-items.active { /* Class to show menu */
        display: flex;
    }
    .nav-bar .menu-button {
        display: block; /* Show menu button */
        width: auto; /* Don't make it full width unless desired */
        margin: 5px auto; /* Center it */
    }
    .nav-bar .menu-items button {
        width: 90%; /* Make buttons take more width in column */
        margin: 5px 0;
    }

    /* Logo Section Responsive for 768px */
    .logo-section {
        padding: 10px;
    }
    .logo img#logoImage { max-width: 60px; }
    .logo_text { font-size: 16px; }
    .logo-details h2 { font-size: medium; }
    .logo-details h3 { font-size: small; }
    .logo-right img { max-width: 80px; }

    /* Form Specific Responsive for 768px */
    form {
        padding: 25px;
        margin: 20px auto;
    }
    .form-section h1 { font-size: 1.8em; } /* Adjusting form title */
    .form-section h2 { font-size: 20px; }
    .form-section .form-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }
    input[type="submit"] {
        width: calc(100% - 40px);
        max-width: 300px;
        font-size: 1.1em;
        padding: 16px;
    }
    #formCode {
        max-width: 100%; /* Allow it to be full width in single column */
    }
}

@media (max-width: 480px) {
    /* Header Responsive */
    .header {
        padding: 10px;
        flex-direction: column; /* Stack items if too narrow */
    }
    .header marquee {
        margin: 10px 0; /* Add space when stacked */
    }
    .header .icon-container {
        margin: 5px; /* Adjust margin for stacked layout */
    }


    /* Form Specific Responsive for 480px */
    form {
        padding: 15px;
        margin: 15px auto;
    }
    .form-section h1 { font-size: 1.5em; }
    .form-section h2 { font-size: 18px; }
    label { font-size: 0.9em; }
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="date"],
    select {
        padding: 12px;
        font-size: 0.95em;
    }
    #formCode {
        padding: 12px;
        font-size: 1.1em;
        /* max-width: 250px; /* No longer needed if full width is fine */
    }
    .form-section > p { /* Note paragraphs in form */
        font-size: 0.8em;
    }
    input[type="submit"] {
        font-size: 1em;
        padding: 14px;
    }

    /* Progress Bar Responsive */
    #progress-bar-container {
        padding: 5px;
        margin: 10px auto;
    }
    .step p { font-size: 12px; }
    .step-circle { width: 25px; height: 25px; }
}