/* Enhanced styling loaded after critical CSS with cross-browser compatibility */

/* Message styling with strong patriotic theme */
.farewell-message,
.closure-details,
.gratitude-message {
    font-size: 1.125rem;
    line-height: 1.625;
    margin-bottom: 2rem;
    padding: 2rem;
    border-left: 8px solid var(--primary-red);
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.1) 0%, 
        rgba(255, 255, 255, 0.9) 30%, 
        rgba(0, 40, 104, 0.1) 100%
    );
    border-radius: 0 15px 15px 0;
    box-shadow: 0 4px 15px rgba(0, 40, 104, 0.2);
    position: relative;
    border-top: 3px solid rgba(220, 20, 60, 0.3);
    border-bottom: 3px solid rgba(0, 40, 104, 0.3);
    /* IE fallback */
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

.farewell-message::before,
.closure-details::before,
.gratitude-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: repeating-linear-gradient(180deg, 
        var(--primary-red) 0px, var(--primary-red) 10px,
        var(--primary-white) 10px, var(--primary-white) 15px,
        var(--primary-navy) 15px, var(--primary-navy) 25px
    );
}

.farewell-message::after,
.closure-details::after,
.gratitude-message::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-navy) 0%, var(--primary-red) 100%);
    border-radius: 0 15px 15px 0;
}

.closure-details {
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.15) 0%, 
        rgba(255, 255, 255, 0.9) 30%, 
        rgba(0, 40, 104, 0.15) 100%
    );
    border-left-color: var(--primary-navy);
    /* IE fallback */
    background: #fef7f7;
}

.gratitude-message {
    background: linear-gradient(135deg, 
        rgba(0, 40, 104, 0.15) 0%, 
        rgba(255, 255, 255, 0.9) 30%, 
        rgba(220, 20, 60, 0.1) 100%
    );
    border-left-color: var(--primary-navy);
}

/* Clean footer with red-dominant gradient fading to body */
footer {
    background: linear-gradient(180deg, 
        var(--primary-red) 0%, 
        rgba(220, 20, 60, 0.8) 30%, 
        rgba(0, 40, 104, 0.3) 70%, 
        rgba(255, 255, 255, 0.1) 100%
    );
    color: var(--primary-white);
    padding: 3rem 1rem 2rem 1rem;
    text-align: center;
    position: relative;
    border: none;
    box-shadow: none;
}

.footer-container {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.copyright {
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    text-align: center;
    line-height: 1.4;
}

.contact-disclaimer {
    line-height: 1.5;
    font-size: 0.95rem;
    color: var(--primary-white);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.contact-disclaimer strong {
    color: var(--primary-white);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}
/* Responsive design with cross-browser support */
@media (max-width: 480px) {
    .company-logo {
        width: 150px;
    }
    
    .header-container {
        padding: 1.5rem 0;
    }
}

@media (min-width: 768px) {
    .header-container {
        padding: 2.5rem 0;
    }
    
    .company-logo {
        width: 250px;
    }
    
    .closure-headline {
        font-size: 2.25rem;
    }
    
    main {
        padding: 4rem 2rem;
    }
    
    .message-content {
        max-width: 700px;
    }
    
    .farewell-message,
    .closure-details,
    .gratitude-message {
        padding: 2.5rem;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .copyright {
        font-size: 1.2rem;
        margin-bottom: 1.8rem;
    }
    
    .contact-disclaimer {
        font-size: 1rem;
        max-width: 700px;
    }
}

@media (min-width: 1024px) {
    .header-container {
        padding: 3rem 0;
    }
    
    .company-logo {
        width: 300px;
    }
    
    .message-content {
        max-width: 800px;
    }
    
    .farewell-message,
    .closure-details,
    .gratitude-message {
        font-size: 1.25rem;
        padding: 3rem;
    }
    
    footer {
        padding: 4rem 2rem 3rem 2rem;
    }
    
    .copyright {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }
    
    .contact-disclaimer {
        font-size: 1.1rem;
        max-width: 800px;
    }
}
/* Enhanced accessibility and cross-browser compatibility */

/* Focus styles for all interactive elements */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
    /* IE fallback */
    border: 2px solid #DC143C;
}

/* Remove default focus outline in favor of custom */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-red);
    /* IE fallback */
    border: 2px solid #DC143C;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-navy: #000000;
        --primary-red: #CC0000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print styles */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    header {
        border-bottom: 2px solid #000000;
        background: #ffffff !important;
    }
    
    .closure-headline {
        color: #000000 !important;
    }
    
    footer {
        background: #ffffff !important;
        color: #000000 !important;
        border-top: 1px solid #000000;
    }
    
    .skip-link {
        display: none;
    }
}

/* IE-specific styles */
@media screen and (-ms-high-contrast: active) {
    .company-logo {
        border: 1px solid;
    }
    
    .closure-headline {
        border-bottom: 2px solid;
    }
}

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
    .company-logo {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Enhanced keyboard navigation */
.keyboard-navigation *:focus {
    outline: 3px solid var(--primary-red) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px rgba(220, 20, 60, 0.3) !important;
}

/* Ensure skip link is always accessible */
.skip-link:focus {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary-navy);
    color: var(--primary-white);
    padding: 8px 12px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 4px;
    font-weight: bold;
}