/* CSS Variables for Color Scheme */
:root {
    --primary-color: #f52008;
    /* Red */
    --secondary-color: #000000;
    /* Jet Black */
    --light-color: #ecf0f1;
    /* Light Grey */
    --dark-color: #34495e;
    /* Dark Grey */
    --text-color: #333333;
    /* Dark Grey */
    --light-text: #ffffff;
    /* White */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    width: 94%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 10px;
}

#new-footer {
    background-color: #000000 !important;
    color: var(--light-text);
    padding: 70px 0 20px;
    position: relative;
    margin-top: 60px;
    opacity: 1;
}

#new-footer .container {
    padding-left: 8px;
    /* Fine-tuned to match header container padding */
    width: 96%;
    /* Match header container width */
    max-width: 1400px;
    /* Match header container max-width */
}

#new-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    background: linear-gradient(to right, var(--primary-color), #ff7846, var(--primary-color));
}

#new-footer .footer-content {
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    -webkit-justify-content: space-between;
    margin-bottom: 50px;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    align-items: flex-start;
    -webkit-align-items: flex-start;
}

#new-footer .footer-logo {
    flex: 1 1 250px;
    -webkit-flex: 1 1 250px;
    margin-bottom: 30px;
    display: flex;
    display: -webkit-flex;
    flex-direction: column;
    -webkit-flex-direction: column;
    margin-left: 0;
    /* Reset to default and use container padding instead */
    padding-left: 0;
    /* Ensure no padding affects alignment */
    min-width: 0;
    /* Safari flex fix */
}

#new-footer .footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 10px;
    /* Matches header logo size */
}

#new-footer .footer-logo-link {
    display: inline-flex;
    align-items: center;
    height: 60px;
    padding-left: 0;
    /* Ensure no padding pushes logo right */
}

#new-footer .company-description {
    color: #bdc3c7;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 12px 0;
    max-width: 320px;
}

#new-footer .footer-social {
    margin-top: 15px;
}

#new-footer .footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
    color: #fff;
}

#new-footer .footer-social h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

#new-footer .social-icons {
    display: flex;
    display: -webkit-flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
}

#new-footer .footer-links {
    display: flex;
    display: -webkit-flex;
    gap: 40px;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    flex: 2 1 600px;
    -webkit-flex: 2 1 600px;
    min-width: 0;
    /* Safari flex fix */
}

#new-footer .footer-column {
    flex: 1 1 160px;
    -webkit-flex: 1 1 160px;
    min-width: 0;
    /* Safari flex fix */
}

#new-footer .footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: #fff;
}

#new-footer .footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

#new-footer .footer-column ul {
    list-style: none;
    padding: 0;
}

#new-footer .footer-column ul li {
    margin-bottom: 7px;
}

#new-footer .project-list li {
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    -webkit-flex-wrap: nowrap;
}

#new-footer .project-list i {
    color: var(--primary-color);
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

#new-footer .project-list a {
    display: inline;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    flex: 1;
    min-width: 0;
}

#new-footer .footer-column ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

#new-footer .footer-column ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

#new-footer .footer-column ul li a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    color: var(--primary-color);
}

#new-footer .contact-info li {
    display: flex;
    display: -webkit-flex;
    align-items: flex-start;
    -webkit-align-items: flex-start;
    color: #bdc3c7;
    gap: 10px;
    margin-bottom: 10px;
    line-height: 1.5;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
}

#new-footer .contact-info li i {
    color: var(--primary-color);
    margin-top: 4px;
    flex-shrink: 0;
}

#new-footer .contact-info li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s ease;
}

#new-footer .contact-info li a:hover {
    color: var(--primary-color);
}

#new-footer .contact-info li a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    color: var(--primary-color);
}

#new-footer .address-link {
    display: inline-block;
}

#new-footer .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    transition: var(--transition);
    text-decoration: none;
}

#new-footer .social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 32, 8, 0.3);
}

#new-footer .social-icons a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background-color: var(--primary-color);
}

#new-footer .footer-newsletter {
    margin-top: 20px;
}

#new-footer .footer-newsletter h4 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: normal;
}

#new-footer .footer-newsletter-form {
    display: flex;
    gap: 8px;
    max-width: 280px;
    flex-wrap: nowrap;
    align-items: stretch;
}

#new-footer .footer-newsletter-form input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    min-width: 0;
}

#new-footer .footer-newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.15);
}

#new-footer .footer-newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#new-footer .footer-subscribe-btn {
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

#new-footer .footer-subscribe-btn:hover {
    background-color: #ff5a3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 32, 8, 0.3);
}

#new-footer .footer-subscribe-btn:active {
    transform: translateY(0);
}

#new-footer .footer-legal {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

#new-footer .legal-links {
    display: flex;
    display: -webkit-flex;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
}

#new-footer .legal-links span {
    color: #ffffff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    cursor: pointer;
}

#new-footer .legal-links span:hover {
    color: var(--primary-color);
}

#new-footer .legal-links span a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

#new-footer .legal-links span a:hover {
    color: var(--primary-color);
}

#new-footer .legal-links span a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    color: var(--primary-color);
}

#new-footer .legal-links span i {
    color: var(--primary-color);
    font-size: 0.4rem;
}

#new-footer .footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Responsive Styles */

/* Galaxy Tab S4 Specific Optimization (1200px - 1024px) */
@media (max-width: 1200px) and (min-width: 1024px) {
    #new-footer .container {
        padding: 0 20px;
        max-width: 100%;
    }

    #new-footer .footer-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 30px;
    }

    #new-footer .footer-logo {
        flex: 1 1 300px;
        margin-bottom: 20px;
    }

    #new-footer .footer-links {
        flex: 2 1 600px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 30px;
    }

    #new-footer .footer-column {
        min-width: 200px;
    }

    /* Enhanced newsletter form for Galaxy Tab S4 */
    #new-footer .footer-newsletter {
        margin-top: 25px;
    }

    #new-footer .footer-newsletter h4 {
        font-size: 1.05rem;
        margin-bottom: 15px;
        font-weight: 500;
    }

    #new-footer .footer-newsletter-form {
        display: flex;
        flex-direction: row;
        gap: 15px;
        max-width: 100%;
        align-items: stretch;
    }

    #new-footer .footer-newsletter-form input {
        flex: 1;
        padding: 14px 18px;
        font-size: 1rem;
        min-width: 0;
        border: 1px solid rgba(255, 255, 255, 0.25);
        background-color: rgba(255, 255, 255, 0.12);
    }

    #new-footer .footer-subscribe-btn {
        padding: 14px 24px;
        font-size: 0.95rem;
        min-width: 140px;
        font-weight: 600;
    }
}

/* Large Tablet Landscape Styles (1025px - 1199px) - Galaxy Tab S4 Optimized */
@media (max-width: 1199px) and (min-width: 1025px) {
    #new-footer .footer-newsletter {
        margin-top: 20px;
    }

    #new-footer .footer-newsletter h4 {
        font-size: 1rem;
        margin-bottom: 12px;
        color: #fff;
    }

    #new-footer .footer-newsletter-form {
        display: flex;
        flex-direction: row;
        gap: 12px;
        max-width: 100%;
        width: 100%;
        align-items: stretch;
        flex-wrap: nowrap;
    }

    #new-footer .footer-newsletter-form input {
        flex: 1;
        padding: 12px 16px;
        font-size: 0.95rem;
        min-width: 0;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        color: #fff;
    }

    #new-footer .footer-newsletter-form input:focus {
        outline: none;
        border-color: var(--primary-color);
        background-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 0 2px rgba(245, 32, 8, 0.2);
    }

    #new-footer .footer-newsletter-form input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }

    #new-footer .footer-subscribe-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        white-space: nowrap;
        min-width: 130px;
        flex-shrink: 0;
        background-color: var(--primary-color);
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        transition: var(--transition);
    }

    #new-footer .footer-subscribe-btn:hover {
        background-color: #ff5a3c;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(245, 32, 8, 0.3);
    }

    /* Galaxy Tab S4 specific contact column layout optimization */
    #new-footer .footer-column:last-child {
        text-align: left;
    }

    #new-footer .contact-info {
        max-width: 100%;
    }

    #new-footer .contact-info li {
        margin-bottom: 10px;
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
}

/* iPad and Tablet Landscape Styles (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    #new-footer .footer-newsletter {
        margin-top: 20px;
    }

    #new-footer .footer-newsletter h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    #new-footer .footer-newsletter-form {
        display: flex;
        flex-direction: row;
        gap: 12px;
        max-width: 100%;
        width: 100%;
        align-items: stretch;
    }

    #new-footer .footer-newsletter-form input {
        flex: 1;
        padding: 12px 16px;
        font-size: 0.95rem;
        min-width: 0;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 0.1);
    }

    #new-footer .footer-newsletter-form input:focus {
        border-color: var(--primary-color);
        background-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 0 2px rgba(245, 32, 8, 0.2);
    }

    #new-footer .footer-subscribe-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        white-space: nowrap;
        min-width: 120px;
        flex-shrink: 0;
    }
}

/* Tablet Portrait and Large Mobile (max-width: 768px) */
@media (max-width: 768px) {
    #new-footer .footer-newsletter {
        margin-top: 20px;
    }

    #new-footer .footer-newsletter-form {
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
        width: 100%;
    }

    #new-footer .footer-newsletter-form input {
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
        margin-bottom: 0;
    }

    #new-footer .footer-subscribe-btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.95rem;
    }
}

/* Tablet Styles */
@media (max-width: 992px) {
    #new-footer .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    #new-footer .footer-logo {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }

    #new-footer .footer-links {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }

    #new-footer .social-icons {
        justify-content: center;
    }

    #new-footer .footer-social h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    #new-footer {
        padding: 40px 0 20px;
    }

    #new-footer .container {
        padding: 0 15px;
    }

    #new-footer .footer-content {
        gap: 30px;
        margin-bottom: 40px;
    }

    #new-footer .footer-links {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    #new-footer .footer-column {
        text-align: center;
    }

    #new-footer .footer-column:last-child {
        text-align: left;
    }

    #new-footer .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    #new-footer .project-list li {
        justify-content: center;
        text-align: center;
    }

    #new-footer .contact-info li {
        justify-content: flex-start;
        text-align: left;
        flex-direction: row;
        gap: 10px;
        align-items: flex-start;
    }

    #new-footer .contact-info li i {
        margin-top: 2px;
        flex-shrink: 0;
        width: 16px;
        text-align: center;
    }

    #new-footer .footer-newsletter {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 100%;
        margin: 20px 0 0;
    }

    #new-footer .footer-newsletter h4 {
        font-size: 1rem;
        text-align: left;
        margin-bottom: 12px;
    }

    #new-footer .footer-newsletter-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        margin: 0;
        gap: 12px;
    }

    #new-footer .footer-newsletter-form input {
        width: 100%;
        padding: 14px 16px;
        margin-bottom: 0;
        min-width: unset;
        font-size: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    #new-footer .footer-subscribe-btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    #new-footer .legal-links {
        flex-direction: column;
        gap: 15px;
    }

    #new-footer .legal-links span {
        font-size: 0.9rem;
    }

    /* Mobile contact info specific styling */
    #new-footer .contact-info {
        max-width: 100%;
        margin: 0;
    }

    #new-footer .contact-info li {
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #new-footer .contact-info li:last-child {
        border-bottom: none;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    #new-footer .container {
        padding: 0 10px;
    }

    #new-footer .footer-logo img {
        height: 50px;
    }

    #new-footer .company-description {
        font-size: 0.9rem;
        max-width: 100%;
    }

    #new-footer .footer-column h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    #new-footer .project-list a,
    #new-footer .contact-info a {
        font-size: 0.9rem;
    }

    #new-footer .social-icons {
        gap: 12px;
    }

    #new-footer .social-icons a {
        width: 35px;
        height: 35px;
    }

    #new-footer .legal-links span {
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    #new-footer .footer-column h3 {
        font-size: 1rem;
    }

    #new-footer .project-list a,
    #new-footer .contact-info a {
        font-size: 0.85rem;
    }

    #new-footer .company-description {
        font-size: 0.85rem;
    }
}

/* Safari-specific fixes for mobile */
@supports (-webkit-touch-callout: none) {
    #new-footer .footer-content {
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
    }

    #new-footer .footer-links {
        -webkit-flex: 1;
        flex: 1;
        width: 100%;
    }

    #new-footer .footer-column {
        -webkit-flex: 1 1 100%;
        flex: 1 1 100%;
        min-width: 0;
    }

    @media (max-width: 768px) {
        #new-footer .footer-logo {
            -webkit-flex: none;
            flex: none;
            width: 100%;
        }

        #new-footer .footer-links {
            -webkit-flex: none;
            flex: none;
        }

        #new-footer .footer-column {
            -webkit-flex: none;
            flex: none;
            width: 100%;
        }

        #new-footer .project-list li {
            -webkit-flex-wrap: nowrap;
            flex-wrap: nowrap;
        }

        #new-footer .contact-info li {
            -webkit-flex-wrap: wrap;
            flex-wrap: wrap;
            align-items: center;
            -webkit-align-items: center;
        }
    }
}