/* Base Footer Styles 
 * Main footer container with red background and spacing
 * z-index ensures footer stays above other content
 */
.footer {
    background-color: #d31a35;
    position: relative;
    z-index: 2;
    padding-top: 80px;
}

/* Corner Decorations 
 * Decorative corner images that appear at bottom left/right of footer
 * Uses absolute positioning to maintain placement regardless of content
 */
.left_corner,
.right_corner {
    position: absolute;
    object-fit: contain;
    bottom: 5px;
    overflow: hidden;
    width: 158px;
    height: 158px;
    z-index: 1;
}

.left_corner {
    left: 5px;
}

.right_corner {
    right: 5px;
    transform: scaleX(-1); /* Flips the image horizontally */
}

/* Typography 
 * Defines text styles for footer headings and content
 * Includes decorative underline for h3 elements
 */
.footer h3 {
    font-size: 28px;
    letter-spacing: 0.56px;
    position: relative;
    margin-bottom: 30px;
}

/* Decorative underline for section headings */
.footer h3:after {
    content: "";
    display: block;
    position: relative;
    width: 40px;
    height: 3px;
    background-color: #fff;
    margin-top: 10px;
    border-radius: 3px;
}

/* Standard text styles for footer content */
.footer p, 
.footer address,
.footer ul li {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
}

/* Lists and Links 
 * Styles for navigation lists and interactive elements
 */
.footer ul {
    margin-bottom: 0;
}

.footer ul li a {
    color: #fff;
}

/* Hover states for links */
.footer .copyright p a:hover, 
.footer ul li a:hover {
    text-decoration: underline;
}

/* Contact Section 
 * Styles for contact information and related elements
 */
.footer .contact_us ul li a {
    margin-left: 10px;
}

.footer .contact_us p {
    margin-bottom: 15px;
}

/* Quick Links 
 * Two-column layout for footer navigation
 * Uses CSS columns for responsive layout
 */
.footer .quick_links ul {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
    column-gap: 3px;
}

.footer .quick_links ul li {
    margin-bottom: 15px;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.footer .quick_links ul li a {
    display: inline-block;
}

/* Newsletter 
 * Styles for newsletter signup form
 * Includes custom styling for input and submit button
 */
.footer .newsletter {
    position: relative;
    margin-bottom: 50px;
}

.footer .newsletter input[type="search"] {
    padding-right: 65px; /* Space for submit button */
}

/* Submit button styling */
.footer .newsletter button[type="submit"] {
    position: absolute;
    right: -1px;
    top: 0;
    z-index: 2;
    border: none;
    box-shadow: none;
    color: #fff !important;
    height: 100%;
    min-width: 62px;
    font-size: 24px;
    -webkit-border-radius: 0 28px 28px 0;
    -moz-border-radius: 0 28px 28px 0;
    -o-border-radius: 0 28px 28px 0;
    border-radius: 0 28px 28px 0;
    border: 1px solid #007436;
    padding: 0;
    line-height: 1;
    text-align: center;
    opacity: 1;
}

/* Button hover and focus states */
.footer .newsletter button[type="submit"]:hover,
.footer .newsletter button[type="submit"]:focus {
    color: #007436 !important;
    background-color: #fff;
}

.footer .newsletter button[type="submit"] i {
    margin-right: 5px;
}

/* Social Media */
.footer .social_media {
    display: block;
}

/* Mailing Box 
 * Container for mailing list signup
 */
.mailing_box {
    margin-bottom: 50px;
    padding-left: 30px;
}

/* Copyright 
 * Footer copyright section with top border
 */
.footer .copyright {
    margin-top: 70px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 25px 0;
}

.footer .copyright p {
    margin-bottom: 0;
    font-size: 1rem;
}

.footer .copyright p a {
    color: #fff;
}

/* Site Footer 
 * Alternative footer style with light background
 */
.site-footer {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: center;
}

.site-footer a {
    color: #333;
    text-decoration: none;
}

.site-footer a:hover {
    color: #007436;
}

/* Footer Address 
 * Styles for structured address information
 * Uses flexbox for vertical alignment
 */
.footer-address {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 20px;
}

.footer-address .org {
    font-weight: 700;
}

.footer-address .slogan {
    font-size: 0.9em;
    color: #fff;
    margin-bottom: 0.8rem;
    font-style: italic;
    max-width: 200px;
    white-space: normal;
    overflow-wrap: break-word;
}

.footer-address .adr {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

/* Address line formatting */
.footer-address .street-address,
.footer-address .extended-address {
    display: block;
    font-weight: 600;
}

.footer-address .address-line {
    display: inline-block;
    white-space: nowrap;
}

/* Adds comma after city name */
.footer-address .locality:after {
    content: ", ";
}

/* Adds space after region/state */
.footer-address .region:after {
    content: " ";
}

.footer-address .email,
.footer-address .tel {
    display: block;
    line-height: 1.4;
}

.footer-address a {
    text-decoration: none;
}

.footer-address a:hover {
    text-decoration: underline;
}

/* Responsive Footer Styles 
 * Breakpoints for different screen sizes
 */

/* Large screens - 1199px and below */
@media (max-width: 1199px) {
    /* Reduced padding and font sizes */
    .footer {
        padding-top: 60px;
    }
    .footer h3 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    .footer p,
    .footer ul li {
        font-size: 17px;
        line-height: 1.5;
    }
    /* Adjusted spacing */
    .mailing_box {
        margin-bottom: 40px;
        padding-left: 0px;
    }
    .footer .social_media {
        padding-left: 0px;
    }
    .footer .copyright {
        margin-top: 70px;
        padding: 20px 0;
    }
    /* Smaller corner images */
    .left_corner,
    .right_corner {
        width: 100px;
        height: 100px;
    }
    .footer .quick_links ul li {
        margin-bottom: 12px;
    }
}

/* Medium screens - 991px and below */
@media (max-width: 991px) {
    /* Further reduced sizes and spacing */
    .footer {
        padding-top: 60px;
    }
    .footer h3 {
        font-size: 21px;
        margin-bottom: 20px;
    }
    .footer h3::after {
        width: 35px;
        height: 2px;
        margin-top: 8px;
    }
    .footer p, .footer ul li {
        font-size: 16px;
        line-height: 1.4;
    }
    .footer .contact_us p {
        margin-bottom: 10px;
    }
    .footer .copyright {
        margin-top: 50px;
        padding: 16px 0;
    }
    /* Even smaller corner images */
    .left_corner,
    .right_corner {
        width: 80px;
        height: 80px;
    }
    /* Adjusted newsletter button */
    .footer .newsletter button[type="submit"] {
        width: 58px;
        font-size: 21px;
    }
    .footer .newsletter input[type="search"] {
        padding-right: 62px;
    }
    /* Added spacing for stacked sections */
    .contact_us,
    .quick_links{
        margin-bottom: 30px;
    }
    .footer .newsletter {
        margin-bottom: 40px;
    }
    .footer-address .slogan {
        max-width: 100%;
    }
}

/* Small screens - 767px and below */
@media (max-width: 767px) {
    /* Mobile-optimized layout */
    .footer {
        padding-top: 50px;
        text-align: center;
    }
    .footer h3 {
        font-size: 20px;
        margin-bottom: 18px;
    }
    /* Centered decorative lines */
    .footer h3::after {
        margin: 8px auto 0;
    }
    .footer p, .footer ul li {
        font-size: 15px;
        line-height: 1.3;
    }
    .footer .copyright {
        margin-top: 40px;
    }
    /* Minimal corner images */
    .left_corner,
    .right_corner {
        width: 70px;
        height: 70px;
    }
    /* Centered newsletter form */
    .footer .newsletter {
        max-width: 400px;
        margin: 0 auto 40px;
    }
    .footer .newsletter button[type="submit"] {
        width: 56px;
    }
    .footer .newsletter input[type="search"] {
        padding-right: 60px;
    }
}

/* Extra small screens - 400px and below */
@media (max-width: 467px) {
    /* Single column quick links */
    .footer .quick_links ul {
        -webkit-column-count: 1;
        -moz-column-count: 1;
        column-count: 1;
    }
    /* Smallest corner images */
    .left_corner,
    .right_corner {
        width: 60px;
        height: 60px;
    }
    
}

