/**
 * Footer Styles
 * 
 * @package Clevertech_Astra_Child
 */

/* COMPLETE FOOTER RESET - Isolate from ALL page styles */
.site-footer {
    /* Reset only for main footer container */
    all: revert;
    /* Re-apply our box model */
    box-sizing: border-box;
}

.site-footer * {
    /* Don't reset all properties for child elements */
    box-sizing: border-box;
}

/* Ensure footer has proper CSS variable access */
.site-footer {
    --gradient-cta: linear-gradient(90deg, #E74C3C 0%, #F39C12 100%);
    background: var(--background-dark, #1A1A1A);
    color: var(--white, #FFFFFF);
    margin-top: var(--space-2xl, 8rem);
    /* Reset any inherited styles */
    position: relative;
    width: 100%;
    clear: both;
    /* Block any inheritance from parent containers */
    display: block;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    flex: none;
}

.footer-top {
    padding: var(--space-2xl) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    /* Consistent width regardless of parent containers */
    width: 100%;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1.2fr 1.2fr 2.5fr;
    gap: var(--space-2xl);
    align-items: start;
}

/* Footer Logo and Company Info */
.footer-logo {
    color: var(--white);
    font-size: var(--fs-xl);
    margin-bottom: var(--space-md);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

/* Footer Contact Info */
.footer-contact-info {
    margin: var(--space-md) 0;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-contact-item svg {
    flex-shrink: 0;
    color: #F39C12;
    stroke: #F39C12;
    fill: #F39C12;
}

.footer-contact-item a,
.footer-contact-item a:link,
.footer-contact-item a:visited,
.footer-contact-item a:hover,
.footer-contact-item a:active,
.footer-contact-item a:focus {
    color: #F39C12 !important;
    text-decoration: none !important;
    transition: opacity var(--transition-base);
}

.footer-contact-item a:hover {
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.site-footer .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.site-footer .footer-social a svg {
    width: 20px;
    height: 20px;
    fill: #FFFFFF;
    display: block;
}

/* LinkedIn styling */
.social-linkedin {
    background: #0077B5 !important;
}

.social-linkedin:hover {
    background: #005885 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 181, 0.4);
}

/* Twitter/X styling */
.social-twitter {
    background: #000000 !important;
}

.social-twitter:hover {
    background: #1DA1F2 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.4);
}

/* GitHub styling */
.social-github {
    background: #333333 !important;
}

.social-github:hover {
    background: #6e5494 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(110, 84, 148, 0.4);
}

/* Footer Links */
.footer-title {
    color: var(--white);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--white);
}

/* Newsletter Section */
.footer-newsletter {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.footer-newsletter:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.footer-newsletter h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #FFFFFF;
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Newsletter Form */
.footer-newsletter .newsletter-form {
    margin: 1.5rem 0 0;
    max-width: 100%;
}

.newsletter-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: transparent;
    border-radius: 8px;
    overflow: visible;
    height: auto;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
}

.newsletter-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-radius: 8px;
    color: #2C3E50;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-input:hover,
.newsletter-input:focus {
    border-color: #F39C12;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.25);
}

.newsletter-input::placeholder {
    color: #7F8C8D;
    font-size: 0.95rem;
    opacity: 1;
}

/* Fix for better placeholder visibility */
.newsletter-input::-webkit-input-placeholder {
    color: #7F8C8D;
    opacity: 1;
}
.newsletter-input::-moz-placeholder {
    color: #7F8C8D;
    opacity: 1;
}
.newsletter-input:-ms-input-placeholder {
    color: #7F8C8D;
    opacity: 1;
}
.newsletter-input:-moz-placeholder {
    color: #7F8C8D;
    opacity: 1;
}

.newsletter-submit {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, #E74C3C 0%, #F39C12 100%);
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.newsletter-submit span {
    display: block;
}

.newsletter-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.35);
    background: linear-gradient(90deg, #E74C3C 0%, #E67E22 100%);
}

/* Newsletter Feedback */
.newsletter-feedback {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    display: none;
    animation: slideDown 0.3s ease;
}

.newsletter-feedback.show {
    display: block;
}

.newsletter-feedback.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28A745;
}

.newsletter-feedback.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #DC3545;
}

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

/* Certifications */
.footer-certifications {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.cert-badge {
    display: inline-block;
    transition: all var(--transition-base);
    opacity: 0.8;
}

.cert-badge:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.footer-certifications img,
.footer-certifications a img,
.cert-badge img,
a.cert-badge img,
.footer-newsletter img {
    display: block !important;
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-md) 0;
}

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

.footer-copyright p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-legal a:hover {
    color: var(--white);
}

.separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--space-lg);
    }
    
    .footer-column.footer-company {
        grid-column: 1 / -1;
        margin-bottom: var(--space-md);
    }
    
    .footer-column.footer-newsletter {
        grid-column: 1 / -1;
        margin-top: var(--space-md);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

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

    .footer-newsletter {
        margin: var(--space-xl) 0;
        padding: 1.5rem;
    }

    /* Newsletter stays in column layout on tablet */
    .newsletter-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-input {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevent zoom on mobile */
    }

    .newsletter-submit {
        width: 100%;
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    .footer-contact-info {
        margin: var(--space-lg) auto;
        max-width: 300px;
    }

    .footer-contact-item {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
        margin: var(--space-md) auto;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-certifications {
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-legal {
        margin-top: var(--space-sm);
    }

    .footer-legal .separator {
        display: inline-block;
        margin: 0 var(--space-xs);
    }
}

@media (max-width: 480px) {
    .footer-top {
        padding: var(--space-xl) 0;
    }

    .footer-container {
        padding: 0 var(--space-sm);
    }

    .newsletter-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .newsletter-input {
        width: 100%;
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .newsletter-submit {
        width: 100%;
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .footer-legal {
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .footer-legal .separator {
        display: none;
    }
    
    .footer-certifications img,
    .footer-certifications a img,
    .cert-badge img,
    a.cert-badge img {
        height: 35px !important;
        max-height: 35px !important;
    }
    
    .footer-newsletter .newsletter-form {
        max-width: 100%;
    }
}

/* Force contact info link colors - absolute override */
.site-footer .footer-contact-info a,
.footer-column .footer-contact-item a,
.footer-contact-info p a,
a[href^="tel:"],
a[href^="mailto:"] {
    color: #F39C12 !important;
}

/* Force certification badge sizes - absolute override */
.site-footer .footer-certifications img,
.site-footer .cert-badge img,
.site-footer a[href*="certificeringen"] img {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
}

@media (max-width: 480px) {
    .site-footer .footer-certifications img,
    .site-footer .cert-badge img,
    .site-footer a[href*="certificeringen"] img {
        height: 35px !important;
        max-height: 35px !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }
    
    .footer-company,
    .footer-newsletter {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-company,
    .footer-newsletter {
        grid-column: span 1;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}
/* Accessibility: Screen Reader Only Text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.screen-reader-text:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
