/* date reviewed: 2025-11-07 */
/* score: 8.0 */
/* To-Do: [Good] footer with grid layout, login form, links, responsive; [Enhancement] add social icons animation, newsletter signup; [Responsive] good mobile breakpoints; [Performance] 578 lines; [Feature] footer login (unique); [Testing] visual + responsive tests. */

/* Footer */
.footer {
    background: var(--blue-de-france);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-left {
    display: flex;
    flex-direction: column;
}

.footer-main-heading {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    margin-bottom: 30px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

/* Footer Login Form */
.footer-login {
    margin-bottom: 30px;
}

.footer-login-heading {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-login-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    margin-bottom: 20px;
}

.footer-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 320px;
}

.footer-login-input {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    color: white;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.footer-login-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.footer-login-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.footer-login-input:hover {
    border-color: rgba(255, 255, 255, 0.7);
}

/* Footer Login Button - 3D Secondary Button Overrides */
.footer-login-form .btn-secondary-3d {
    width: 50%;
    max-width: 200px;
    display: block;
    margin: 0 auto;
}

.footer-login-form .btn-secondary-3d__content {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-login-form .btn-secondary-3d__text {
    font-size: 14px;
    display: block;
    text-align: center;
    transform: translate3d(0, 0, 0) !important;
    line-height: 1;
}

.footer-login-note {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    padding: 6px 0;
    display: inline-block;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.footer-column a:hover {
    opacity: 1;
    text-decoration: underline;
    color: white !important;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
}

.footer-cta-btn {
    margin-top: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    font-size: 14px;
}

/* Footer Contact Form */
.form-heading {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.form-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.footer-contact-form {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
}

.footer-contact-form .form-field-message {
    grid-column: 1 / -1;
}

.footer-contact-form .form-submit-wrapper {
    grid-column: 1 / -1;
}

.form-field {
    margin-bottom: 0;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.required-indicator {
    color: var(--aerospace-orange);
    font-weight: 700;
}

.form-help-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 6px;
    margin-bottom: 0;
    font-style: italic;
}

.form-submit-wrapper {
    margin-top: 12px;
    padding-top: 0;
}

/* Footer Submit Button - 3D Secondary Button Overrides */
.form-submit-wrapper .btn-secondary-3d {
    width: 50%;
    max-width: 250px;
    display: block;
    margin: 0 auto;
}

.form-submit-wrapper .btn-secondary-3d__content {
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-submit-wrapper .btn-secondary-3d__text {
    font-size: 15px;
    display: block;
    text-align: center;
    transform: translate3d(0, 0, 0) !important;
    line-height: 1;
}

.form-privacy-notice {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    margin-top: 12px;
    text-align: center;
    line-height: 1.4;
}

.form-privacy-notice a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.form-privacy-notice a:hover {
    color: white;
}

.form-noscript-notice {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    font-size: 13px;
    color: white;
    line-height: 1.5;
}

.form-noscript-notice a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.form-noscript-notice a:hover {
    text-decoration: none;
}

/* Form Inputs */
.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    min-height: 48px;
    margin-bottom: 5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    border-radius: 4px;
    font-size: 16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-input.valid,
.form-textarea.valid {
    border-color: rgba(76, 175, 80, 0.6);
    background: rgba(76, 175, 80, 0.05);
}

.form-input.invalid,
.form-textarea.invalid {
    border-color: rgba(244, 67, 54, 0.6);
    background: rgba(244, 67, 54, 0.05);
}

.form-input:required:not(:focus):not(.valid),
.form-textarea:required:not(:focus):not(.valid) {
    background-image: linear-gradient(to right, rgba(255, 78, 0, 0.2) 0%, transparent 8px);
    background-repeat: no-repeat;
    background-position: left top;
    background-size: 3px 100%;
}

/* Show checkmark for valid fields */
.form-input.valid {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

.form-textarea.valid {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px top 12px;
    background-size: 20px;
    padding-right: 45px;
}

/* Show error icon for invalid fields */
.form-input.invalid {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f44336' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='10'%3e%3c/circle%3e%3cline x1='15' y1='9' x2='9' y2='15'%3e%3c/line%3e%3cline x1='9' y1='9' x2='15' y2='15'%3e%3c/line%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

.form-textarea.invalid {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f44336' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='10'%3e%3c/circle%3e%3cline x1='15' y1='9' x2='9' y2='15'%3e%3c/line%3e%3cline x1='9' y1='9' x2='15' y2='15'%3e%3c/line%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px top 12px;
    background-size: 20px;
    padding-right: 45px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

/* Better autocomplete styling */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0 1000px rgba(13, 133, 216, 0.2) inset;
    box-shadow: 0 0 0 1000px rgba(13, 133, 216, 0.2) inset;
    border-color: rgba(255, 255, 255, 0.5);
    transition: background-color 5000s ease-in-out 0s;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
    font-family: inherit;
}

/* Field error messages */
.field-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 12px;
    display: none;
    padding-left: 4px;
    animation: slideDown 0.2s ease;
}

.field-error.show {
    display: block;
}

.field-error::before {
    content: "⚠ ";
}

/* Character counter */
.char-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-align: right;
    margin-top: 4px;
    margin-bottom: 12px;
    display: none;
}

.char-counter.show {
    display: block;
}

.char-counter.warning {
    color: #ffc107;
}

.char-counter.error {
    color: #ff6b6b;
}

/* Honeypot field - hidden from real users but visible to bots */
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Form feedback messages */
.form-message {
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: rgba(200, 230, 201, 0.95);
    color: #1b5e20;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.form-message.error {
    background: rgba(255, 205, 210, 0.95);
    color: #b71c1c;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

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

/* Touch-friendly for mobile */
@media (max-width: 768px) {
    .footer-column a {
        padding: 12px 0;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }

    .form-input,
    .form-textarea {
        padding: 16px 18px;
        min-height: 52px;
        font-size: 17px;
    }

    .form-textarea {
        min-height: 100px;
    }

    .btn-submit {
        padding: 16px 40px;
        min-height: 52px;
        font-size: 17px;
    }

    .btn-submit:hover {
        transform: none;
    }

    .btn-submit:active {
        transform: scale(0.98);
    }

    /* Footer mobile */
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-column h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .footer-main-heading {
        font-size: 20px;
    }

    .footer-login {
        margin-bottom: 30px;
    }

    .footer-login-form {
        max-width: 100%;
    }

    .footer-login-input {
        padding: 14px 18px;
        font-size: 16px;
    }
    
    /* Form mobile improvements */
    .footer-contact-form {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .footer-contact-form .form-field-message {
        grid-column: 1;
    }
    
    .footer-contact-form .form-submit-wrapper {
        grid-column: 1;
    }
    
    .form-heading {
        font-size: 20px;
    }
    
    .form-description {
        font-size: 13px;
        margin-bottom: 20px;
    }
}

