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

/* Screen Reader Only - for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    color: #4D4D4D;
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #000000;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #000000;
    font-size: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #000000;
    font-size: 1.5rem;
    ;
    margin-bottom: 0.5rem;
}

h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #000000;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    color: #4D4D4D;
    margin-bottom: 1rem;
}

/* Header */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.25rem 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 100%;
    max-width: 220px;
    min-width: 140px;
    height: auto;
    display: block;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
    background: #fff;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.language-selector label {
    color: #666;
    font-weight: 400;
}

.language-selector select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .header {
        min-height: 48px;
        padding: 0.25rem 0;
    }

    .logo img {
        max-width: 160px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Banner */
.banner {
    position: relative;
    height: 270px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image {
    width: 100vw;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0.18;
    filter: brightness(1.1) grayscale(10%) contrast(1.1);
    transition: opacity 0.3s;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

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

.banner-logo {
    width: 100%;
    max-width: 600px;
    padding: 0 24px;
    margin: 0 auto;
}

.banner-logo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: transparent;
    padding: 0 8px;
}

@media (max-width: 768px) {
    .banner {
        height: 180px;
    }

    .banner-logo {
        max-width: 400px;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .banner {
        height: 120px;
    }

    .banner-logo {
        max-width: 260px;
        padding: 0 4px;
    }

    .banner-logo img {
        padding: 0 2px;
    }
}

/* Navigation */
.navigation {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: #006BA6;
    color: #ffffff;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 400px);
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    margin-bottom: 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    font-size: clamp(1.1rem, 4vw, 2.2rem);
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    text-align: center;
    line-height: 1.15;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .welcome-section h2 {
        font-size: clamp(1rem, 5vw, 1.2rem);
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Changed from 3 to 4 for four buttons */
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1000px;
    /* Slightly increased for four buttons */
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.feature-card .btn {
    display: none;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* About Section */
.about-section {
    margin-top: 100px;
    margin-bottom: 3rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about-feature {
    text-align: center;
    padding: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.btn-primary {
    background-color: #006BA6;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #004d87;
}

.btn-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* FAQ Styles */
.faq-section {
    margin-top: 2rem;
}

.faq-search {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.faq-search input {
    flex: 1;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 16px 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.faq-search input:focus {
    outline: none;
    border-color: #006BA6;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 107, 166, 0.1);
}

.faq-search input::placeholder {
    color: #999;
    font-weight: 300;
}

.faq-search button {
    padding: 0.75rem 1.5rem;
    background-color: #006BA6;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.faq-search button:hover {
    background-color: #004d87;
    box-shadow: 0 2px 8px rgba(0, 107, 166, 0.2);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    background-color: #f8f9fa;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #e9ecef;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: none;
}

.faq-tips-list {
    padding-left: 2.2em;
    margin-bottom: 1.2em;
}

.faq-tips-list li {
    margin-bottom: 0.7em;
    text-indent: 0;
}

/* Enhanced Search Features */
.search-highlight {
    background-color: #ffeb3b;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 500;
}

.no-results-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

.no-results-message p {
    margin-bottom: 0.5rem;
}

.no-results-message p:last-child {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #999;
}

/* Video Section */
.video-section {
    margin-bottom: 3rem;
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
}

.video-placeholder {
    background-color: #f8f9fa;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.video-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Form Styles */
.feedback-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.feedback-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

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

/* Readonly field styling */
.form-group input[readonly],
.form-group select[readonly],
.form-group textarea[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Required field indicator styling */
.required-indicator {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0rem;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    background-color: #f0f0f0;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.submission-status {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

/* Instructions Styles */
.instructions-nav {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.instructions-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.instruction-link {
    color: #006BA6;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.instruction-link:hover {
    background-color: #006BA6;
    color: white;
}

.instruction-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.instruction-steps {
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.step-number {
    background-color: #006BA6;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.requirement-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.requirement-card ul {
    list-style-type: none;
    padding: 0;
}

.requirement-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.requirement-card li:last-child {
    border-bottom: none;
}

.test-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.test-type {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.result-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.result-category {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.result-category.normal {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.result-category.attention {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.result-category.immediate {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.troubleshooting-items {
    margin-top: 2rem;
}

.trouble-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.trouble-item ul {
    margin-top: 1rem;
}

.trouble-item li {
    margin-bottom: 0.5rem;
}

.best-practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.practice-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.practice-card ul {
    margin-top: 1rem;
}

.practice-card li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: #ffffff;
    color: #333;
    padding: 1.5rem 0;
    margin-top: -25px;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-left img {
    height: 40px;
    width: auto;
}

.footer-left span {
    font-size: 0.85rem;
    color: #666;
}

.footer-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.footer-center .version {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-right a {
    color: #006BA6;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.85rem;
}

.footer-right a:hover {
    color: #004d87;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .banner-title {
        font-size: 2rem;
    }

    .banner-subtitle {
        font-size: 1rem;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #f8f9fa;
        border-top: 1px solid #e0e0e0;
        padding: 1rem;
        gap: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
    }

    .test-types {
        grid-template-columns: 1fr;
    }

    .result-categories {
        grid-template-columns: 1fr;
    }

    .best-practices-grid {
        grid-template-columns: 1fr;
    }

    .instructions-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-center {
        position: static;
        transform: none;
        order: 2;
    }

    .footer-left {
        order: 1;
        justify-content: center;
    }

    .footer-right {
        order: 3;
        justify-content: center;
    }

    .faq-search {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .banner {
        height: 300px;
    }

    .banner-title {
        font-size: 1.5rem;
    }

    .banner-subtitle {
        font-size: 0.9rem;
    }

    .feedback-form {
        padding: 1rem;
    }

    .step {
        padding: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* Form Submission States */
.submission-loading {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.3s ease-in;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #2E86AB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submission-loading h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #333333;
}

.submission-loading p {
    margin: 0;
    font-size: 0.95rem;
    color: #4D4D4D;
    font-weight: 300;
}

/* Error State Styles */
.submission-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.submission-error h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #721c24;
}

.submission-error p {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: #721c24;
    font-weight: 300;
}

.submission-error p:last-child {
    margin-bottom: 0;
}

.status-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
    color: #721c24;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

.status-error strong {
    font-weight: 500;
}

/* Enhanced Success State Styles */
.submission-status {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
    position: relative;
    overflow: hidden;
}

.submission-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s ease-in-out;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.submission-status h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: #155724;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submission-status h3::before {
    content: '✓';
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    line-height: 30px;
    font-size: 1rem;
    font-weight: bold;
}

.submission-status p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #155724;
    font-weight: 400;
}

.submission-status p:last-child {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #0f5132;
}

/* Form Validation Error Styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
    background-color: #ffeaea;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.1);
    transition: all 0.3s ease;
}

.form-group.error input:focus,
.form-group.error select:focus,
.form-group.error textarea:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 0.25rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: slideDown 0.3s ease-in;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group .error-message::before {
    content: '⚠';
    color: #dc3545;
    font-weight: bold;
}

.form-group label.required::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

/* Global Form Error Summary */
.form-errors-summary {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease-in;
}

.form-errors-summary h4 {
    margin: 0 0 1rem 0;
    color: #721c24;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-errors-summary h4::before {
    content: '⚠';
    color: #dc3545;
    font-size: 1.2rem;
}

.form-errors-summary ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #721c24;
}

.form-errors-summary li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.form-errors-summary li:last-child {
    margin-bottom: 0;
}

/* Form State Transitions */
.feedback-form {
    transition: opacity 0.3s ease-in-out;
}

.feedback-form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

.form-group input,
.form-group select,
.form-group textarea {
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn {
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #6c757d;
}

.btn:disabled:hover {
    background-color: #6c757d;
    transform: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: buttonSpin 1s linear infinite;
}

@keyframes buttonSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.btn.loading span {
    opacity: 0;
}

/* Print Styles */
@media print {

    .header,
    .navigation,
    .footer,
    .form-actions {
        display: none;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1,
    h2,
    h3,
    h4 {
        page-break-after: avoid;
    }

    .faq-item,
    .step,
    .feature-card {
        page-break-inside: avoid;
    }

    .submission-loading,
    .submission-error,
    .submission-status,
    .form-errors-summary {
        display: none;
    }
}

/* Completion Indicators */
.form-group {
    position: relative;
}

.completion-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background-color: #28a745;
    border: 2px solid #1e7e34;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Accessibility improvements */
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.completion-indicator:focus {
    outline: 2px solid #2E86AB;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .completion-indicator {
        background-color: #000000;
        color: #ffffff;
        border: 3px solid #ffffff;
    }

    .completion-indicator svg {
        fill: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .completion-indicator {
        transition: none;
    }

    @keyframes checkmarkBounce {

        from,
        to {
            transform: scale(1);
            opacity: 1;
        }
    }
}

.completion-indicator.show {
    display: flex;
    animation: checkmarkBounce 0.4s ease-out;
}

.completion-indicator svg {
    width: 16px;
    height: 16px;
    fill: white;
}

@keyframes checkmarkBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Adjust form-group positioning for indicators */
.form-group label {
    padding-right: 30px;
}

/* Special positioning for radio groups */
.radio-group {
    position: relative;
}

.radio-group .completion-indicator {
    top: -5px;
    right: -5px;
}

/* Special positioning for email and phone number fields */
/* These fields have H3 headings outside the form-group, so we need to center relative to the input */
#emailConfirmation-indicator,
#submitterPhone-indicator {
    top: 50%;
    transform: translateY(-50%);
}

/* Remove divider lines and reduce spacing for Email and Phone Number sections */
.form-section:has(#emailConfirmation),
.form-section:has(#submitterPhone) {
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

/* Fallback for browsers that don't support :has() selector */
.form-section:nth-child(1),
/* Email section */
.form-section:nth-child(2) {
    /* Phone section */
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}