/**
 * Footer v1.5 Styles
 * 
 * Modern footer with lightning borders and electric theme
 *
 * @package OutputLag
 * @since 1.5.0
 */

/* Ensure proper page layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1 0 auto;
    padding-bottom: calc(var(--spacing-xxl, 3rem) * 4);
    margin-bottom: var(--spacing-xxl, 3rem);
}

/* Clear any floats before footer */
.site-footer-v15::before {
    content: '';
    display: table;
    clear: both;
}

/* ==========================================================================
   Footer v1.5 Base Structure
   ========================================================================== */

.site-footer-v15 {
    position: relative;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.98) 0%, 
        rgb(var(--rgb-primary-dark)) 50%,
        rgba(0, 0, 0, 0.98) 100%
    );
    color: var(--color-text-secondary, #A0A0A0);
    margin-top: auto;
    padding-top: var(--spacing-xl, 2rem);
    overflow: hidden;
    z-index: 10;
    border-top: 1px solid rgba(var(--rgb-primary-accent), 0.1);
    clear: both;
    flex-shrink: 0;
    transform: none !important;
}

/* Circuit pattern overlay */
.site-footer-v15::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(var(--rgb-primary-accent), 0.03) 2px,
            rgba(var(--rgb-primary-accent), 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(var(--rgb-primary-accent), 0.03) 2px,
            rgba(var(--rgb-primary-accent), 0.03) 4px
        );
    pointer-events: none;
}

/* ==========================================================================
   Lightning Border Animation
   ========================================================================== */

.footer-lightning-border {
    height: 4px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg,
        rgba(var(--rgb-primary-accent), 0.1) 0%,
        rgba(var(--rgb-secondary-accent), 0.1) 100%
    );
    margin-bottom: var(--spacing-xl, 2rem);
    box-shadow: 0 0 20px rgba(var(--rgb-primary-accent), 0.3);
}

.footer-lightning-border::before,
.footer-lightning-border::after {
    content: '';
    position: absolute;
    top: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(var(--rgb-primary-accent), 0.8) 45%,
        rgba(var(--rgb-primary-accent), 1) 50%,
        rgba(var(--rgb-primary-accent), 0.8) 55%,
        transparent 100%
    );
    animation: lightning-sweep 3s ease-in-out infinite;
}

.footer-lightning-border::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(139, 92, 246, 0.8) 45%,
        rgba(139, 92, 246, 1) 50%,
        rgba(139, 92, 246, 0.8) 55%,
        transparent 100%
    );
    animation-delay: 1.5s;
}

@keyframes lightning-sweep {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ==========================================================================
   Footer Main Content
   ========================================================================== */

.footer-main {
    position: relative;
    padding: var(--spacing-xl, 2rem) 0;
    z-index: 1;
}

/* Container */
.footer-main .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg, 1.5rem);
}

/* Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: var(--spacing-xxl, 3rem);
    align-items: start;
}

/* Column Styles */
.footer-column {
    position: relative;
    padding: var(--spacing-lg, 1.5rem);
    background: rgba(var(--rgb-white), 0.02);
    border-radius: 12px;
    border: 1px solid rgba(var(--rgb-primary-accent), 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.footer-column:hover {
    background: rgba(var(--rgb-white), 0.03);
    border-color: rgba(var(--rgb-primary-accent), 0.2);
    box-shadow: 0 5px 20px rgba(var(--rgb-primary-accent), 0.1);
}

/* Headings */
.footer-heading {
    font-family: var(--font-heading, 'Space Grotesk', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-white, #FFFFFF);
    margin-bottom: var(--spacing-lg, 1.5rem);
    position: relative;
    display: inline-block;
    text-shadow: 0 0 20px rgba(var(--rgb-primary-accent), 0.5);
}

/* Heading underline effect */
.footer-heading::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(var(--rgb-primary-accent), 1) 0%,
        transparent 100%
    );
}

/* ==========================================================================
   Social Icons Section
   ========================================================================== */

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

.footer-brand-heading {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm, 0.5rem);
    color: rgba(var(--rgb-primary-accent), 1);
    text-shadow: 0 0 20px rgba(var(--rgb-primary-accent), 0.5);
}

.footer-brand-heading::after {
    display: none; /* Remove underline for brand */
}

.footer-subheading {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #A0A0A0);
    margin-bottom: var(--spacing-lg, 1.5rem);
}

/* Social Icons Container */
.social-icons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md, 1rem);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(var(--rgb-primary-accent), 0.1) 0%,
        rgba(var(--rgb-secondary-accent), 0.1) 100%
    );
    border: 2px solid rgba(var(--rgb-primary-accent), 0.2);
    color: var(--color-text-primary, #E0E0E0);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(var(--rgb-primary-accent), 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.social-link:hover {
    color: rgba(var(--rgb-primary-accent), 1);
    transform: scale(1.1) translateY(-2px);
    border-color: rgba(var(--rgb-primary-accent), 0.5);
    box-shadow: 0 4px 20px rgba(var(--rgb-primary-accent), 0.3);
}

.social-link:hover::before {
    width: 100%;
    height: 100%;
}

.social-link svg {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Footer Navigation Links
   ========================================================================== */

.footer-nav {
    margin-top: var(--spacing-sm, 0.5rem);
}

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

.footer-links li {
    margin-bottom: var(--spacing-sm, 0.5rem);
}

.footer-link {
    color: var(--color-text-secondary, #A0A0A0);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
    padding: var(--spacing-xs, 0.25rem) 0;
    padding-left: var(--spacing-md, 1rem);
}

.footer-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: rgba(var(--rgb-primary-accent), 1);
    transition: width 0.3s ease;
}

.footer-link::before {
    content: '▸';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: all 0.3s ease;
    color: rgba(var(--rgb-primary-accent), 1);
}

.footer-link:hover::before,
.footer-link:focus::before {
    opacity: 1;
}

.footer-link:hover,
.footer-link:focus {
    color: rgba(var(--rgb-primary-accent), 1);
    text-shadow: 0 0 10px rgba(var(--rgb-primary-accent), 0.5);
    padding-left: calc(var(--spacing-md, 1rem) + 5px);
}

.footer-link:hover::before {
    width: 100%;
}

/* ==========================================================================
   OpenCritic Badge
   ========================================================================== */

.opencritic-badge-wrapper {
    position: relative;
}

.opencritic-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--spacing-md, 1rem) var(--spacing-lg, 1.5rem);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.opencritic-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--rgb-primary-accent), 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.opencritic-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--rgb-primary-accent), 0.3);
    border-color: rgba(var(--rgb-primary-accent), 0.5);
}

.opencritic-badge:hover::before {
    left: 100%;
}

.opencritic-logo {
    margin: 0;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: brightness(0.9);
    line-height: 1;
}

.opencritic-logo img {
    max-width: 120px;
    height: auto;
    display: block;
}

.opencritic-badge:hover .opencritic-logo {
    opacity: 1;
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.opencritic-tagline {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #A0A0A0);
    text-align: center;
    transition: color 0.3s ease;
}

.opencritic-badge:hover .opencritic-tagline {
    color: var(--color-white, #FFFFFF);
}

/* Hover effect removed per request */

/* ==========================================================================
   Footer Action Buttons
   ========================================================================== */

.footer-action-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm, 0.5rem);
    margin-top: var(--spacing-lg, 1.5rem);
    width: 100%;
}

.footer-action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm, 0.5rem);
    padding: var(--spacing-sm, 0.5rem) var(--spacing-md, 1rem);
    background: rgba(var(--rgb-white), 0.03);
    border: 1px solid rgba(var(--rgb-primary-accent), 0.2);
    border-radius: 8px;
    color: var(--color-text-secondary, #A0A0A0);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--rgb-primary-accent), 0.1),
        transparent
    );
    transition: left 0.3s ease;
}

.footer-action-button:hover {
    color: rgba(var(--rgb-primary-accent), 1);
    border-color: rgba(var(--rgb-primary-accent), 0.5);
    background: rgba(var(--rgb-white), 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(var(--rgb-primary-accent), 0.2);
}

.footer-action-button:hover::before {
    left: 100%;
}

.footer-action-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.footer-action-button:hover svg {
    transform: scale(1.1);
}

/* ==========================================================================
   Footer Bottom
   ========================================================================== */

.footer-bottom {
    background: rgba(0, 0, 0, 0.5);
    padding: var(--spacing-lg, 1.5rem) 0;
    margin-top: var(--spacing-xl, 2rem);
    border-top: 1px solid rgba(var(--rgb-primary-accent), 0.1);
}

.footer-bottom .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg, 1.5rem);
}

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

.copyright {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary, #A0A0A0);
}

/* Footer Tagline */
.footer-tagline {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary, #A0A0A0);
    text-align: center;
}

.footer-tagline .heart {
    color: #e74c3c;
    font-size: 1rem;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Legal Links */
.legal-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-md, 1rem);
}

.legal-links a {
    color: var(--text-secondary, #B8B8B8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: rgba(var(--rgb-primary-accent), 1);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet: 768px-1199px */
@media (max-width: 1199px) and (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl, 2rem);
    }
    
    .footer-brand,
    .footer-opencritic {
        grid-column: span 1;
    }
}

/* Mobile: <768px */
@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl, 2rem);
        text-align: center;
    }
    
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: var(--spacing-md, 1rem);
        text-align: center;
    }
    
    .footer-tagline {
        order: -1; /* Move tagline above copyright on mobile */
    }
    
    .legal-links {
        justify-content: center;
    }
    
    /* Disable lightning animation on mobile for performance */
    .footer-lightning-border::before,
    .footer-lightning-border::after {
        animation: none;
        display: none;
    }
    
    .footer-lightning-border {
        background: linear-gradient(90deg,
            rgba(var(--rgb-primary-accent), 0.3) 0%,
            rgba(139, 92, 246, 0.3) 100%
        );
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus states */
.social-link:focus,
.footer-link:focus,
.opencritic-badge:focus {
    outline: 2px solid rgba(var(--rgb-primary-accent), 1);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .footer-lightning-border::before,
    .footer-lightning-border::after,
    .social-link,
    .footer-link,
    .opencritic-badge {
        animation: none;
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .footer-heading {
        color: #FFFFFF;
    }
    
    .footer-link,
    .rating-label {
        color: #E0E0E0;
    }
    
    .social-link,
    .opencritic-badge {
        border-width: 2px;
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* Use GPU acceleration for animations */
.footer-lightning-border::before,
.footer-lightning-border::after {
    will-change: transform, opacity;
    transform: translateZ(0);
}

.social-link,
.opencritic-badge {
    will-change: transform;
}

/* Contain layout */
.site-footer-v15 {
    contain: layout style;
}

/* ==========================================================================
   Fix for Post Hero Author Name Size
   ========================================================================== */

.post-hero .post-meta .author-name {
    font-size: 0.875rem !important;
    font-weight: 400;
}

.post-hero .post-meta .author-name a {
    font-weight: 500;
}