/**
 * Footer Styles - Modern Contemporary Design
 * Orange left section, Light blue right section
 * Responsive: Mobile, Tablet, Desktop
 */

/* ============================================
   FOOTER BASE
   ============================================ */
.site-footer {
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

/* ============================================
   FOOTER TOP - Two Column Layout
   ============================================ */
.footer-top {
    position: relative;
    min-height: 400px;
}

.footer-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 400px;
    position: relative;
}

@media (min-width: 768px) {
    .footer-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   LEFT SECTION - ORANGE
   ============================================ */
.footer-left {
    /* Background akan di-set via inline style dari Customizer */
    padding: var(--spacing-2xl) var(--container-padding-mobile);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .footer-left {
        padding: var(--spacing-2xl) var(--container-padding-tablet);
    }
}

@media (min-width: 1024px) {
    .footer-left {
        padding: var(--spacing-2xl) var(--container-padding-desktop);
    }
}

/* Gradient overlay for smooth transition - will use inline style from PHP */
.footer-left::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 122, 0, 1) 0%, rgba(255, 122, 0, 0.8) 50%, rgba(255, 122, 0, 0) 100%);
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
}

@media (min-width: 768px) {
    .footer-left::after {
        width: 100px;
}
}

/* ============================================
   RIGHT SECTION - LIGHT BLUE
   ============================================ */
.footer-right {
    /* Background akan di-set via inline style dari Customizer */
    padding: var(--spacing-2xl) var(--container-padding-mobile);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .footer-right {
        padding: var(--spacing-2xl) var(--container-padding-tablet);
    }
}

@media (min-width: 1024px) {
    .footer-right {
        padding: var(--spacing-2xl) var(--container-padding-desktop);
    }
}

/* Gradient overlay for smooth transition - will use inline style from PHP */
.footer-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to left, rgba(227, 242, 253, 1) 0%, rgba(227, 242, 253, 0.8) 50%, rgba(227, 242, 253, 0) 100%);
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
}

@media (min-width: 768px) {
    .footer-right::before {
        width: 100px;
}
}

/* ============================================
   FOOTER BRAND (Left Section)
   ============================================ */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    text-align: left;
    position: relative;
    z-index: 3;
    justify-content: flex-start;
}

@media (min-width: 1024px) {
    .footer-brand {
        gap: 0;
        padding-top: var(--spacing-sm);
    }
}

/* Ensure logo container is visible */
.footer-brand > *:first-child {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Logo styling - same as header */
.footer-brand .custom-logo-link {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-extrabold);
    color: #1a1a1a;
    margin: 0 0 var(--spacing-base) 0;
    line-height: 1;
    transition: opacity var(--transition-fast);
    text-decoration: none;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 768px) {
    .footer-brand .custom-logo-link {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .footer-brand .custom-logo-link {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-lg);
    }
}

.footer-brand .custom-logo-link:hover {
    opacity: 0.9;
}

/* Custom logo image - ensure it's visible */
.footer-brand .custom-logo-link img,
.footer-brand img.custom-logo,
.footer-brand .custom-logo {
    display: block !important;
    max-width: 160px !important;
    max-height: 60px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (min-width: 768px) {
    .footer-brand .custom-logo-link img,
    .footer-brand img.custom-logo,
    .footer-brand .custom-logo {
        max-width: 200px !important;
        max-height: 70px !important;
    }
}

@media (min-width: 1024px) {
    .footer-brand .custom-logo-link img,
    .footer-brand img.custom-logo,
    .footer-brand .custom-logo {
        max-width: 220px !important;
        max-height: 80px !important;
}
}

/* Fallback text logo */
.footer-brand .custom-logo-link.footer-logo {
    display: inline-flex;
    align-items: center;
}

.footer-logo-text {
    display: inline-block;
    color: #1a1a1a;
}

.footer-logo sup {
    font-size: 0.4em;
    font-weight: var(--font-weight-normal);
    margin-left: 2px;
    opacity: 0.9;
    vertical-align: super;
}

.footer-description {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: #1a1a1a;
    margin: 0 0 var(--spacing-md) 0;
    max-width: 100%;
    text-align: left;
    font-weight: var(--font-weight-normal);
}

@media (min-width: 768px) {
    .footer-description {
        font-size: var(--font-size-base);
        line-height: 1.7;
        max-width: 420px;
        margin-bottom: var(--spacing-lg);
    }
}

@media (min-width: 1024px) {
    .footer-description {
        font-size: var(--font-size-base);
        line-height: 1.8;
        max-width: 480px;
        margin-bottom: var(--spacing-xl);
    }
}

/* ============================================
   SOCIAL LINKS (Left Section)
   ============================================ */
.footer-social {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-xs);
}

@media (min-width: 768px) {
    .footer-social {
        margin-top: var(--spacing-xs);
    }
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: #ffffff;
    border-radius: 50%;
    color: #1a1a1a;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-social-link:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ============================================
   FOOTER COLUMNS (Right Section)
   ============================================ */
.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 3;
}

@media (min-width: 768px) {
    .footer-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: #1a1a1a;
    margin: 0 0 var(--spacing-xs) 0;
    text-transform: none;
    letter-spacing: 0;
}

@media (min-width: 768px) {
    .footer-title {
        font-size: var(--font-size-lg);
    }
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
    transition: all var(--transition-fast);
    display: inline-block;
    padding: 2px 0;
}

@media (min-width: 768px) {
    .footer-menu a {
        font-size: var(--font-size-base);
    }
}

.footer-menu a:hover,
.footer-menu a:focus {
    color: #007bff;
    transform: translateX(4px);
}

.footer-menu a:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ============================================
   FOOTER DIVIDER - White Horizontal Line
   ============================================ */
.footer-divider {
    width: 100%;
    height: 1px;
    background: #ffffff;
    position: relative;
    z-index: 10;
}

/* ============================================
   FOOTER BOTTOM
   ============================================ */
.footer-bottom {
    background: linear-gradient(135deg, #FF7A00 0%, #E3F2FD 100%);
    padding: var(--spacing-md) var(--container-padding-mobile);
    position: relative;
}

@media (min-width: 768px) {
    .footer-bottom {
        padding: var(--spacing-md) var(--container-padding-tablet);
    }
}

@media (min-width: 1024px) {
.footer-bottom {
        padding: var(--spacing-md) var(--container-padding-desktop);
    }
}

.footer-bottom .footer-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    text-align: center;
    min-height: auto;
}

@media (min-width: 768px) {
    .footer-bottom .footer-wrapper {
        flex-direction: row;
        text-align: left;
    }
}

.copyright {
    margin: 0;
    color: #1a1a1a;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-normal);
}

.footer-links {
    display: flex;
    gap: var(--spacing-base);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .footer-links {
        justify-content: flex-end;
    }
}

.footer-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-links a:focus {
    color: #007bff;
}

.footer-links a:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ============================================
   WHATSAPP FLOAT BUTTON
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: var(--z-fixed);
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: var(--spacing-base);
        right: var(--spacing-base);
    }
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: var(--radius-full);
    color: #FFFFFF;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
    animation: pulse 2s infinite;
}

@media (max-width: 480px) {
    .whatsapp-float a {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
    }
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float a:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.whatsapp-float a svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

@media (max-width: 480px) {
    .whatsapp-float a svg {
        width: 24px;
        height: 24px;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, 0.6);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float a {
        animation: none;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Mobile: Stack sections vertically - Minimalist */
@media (max-width: 767px) {
    .footer-left,
    .footer-right {
        padding: 24px 16px;
    }
    
    .footer-brand {
        align-items: center;
        text-align: center;
        margin-bottom: 14px;
    }
    
    .footer-description {
        text-align: center;
        margin-bottom: 14px;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 12px;
    }
    
    .footer-columns {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-menu a {
        text-align: center;
    }
    
    .footer-menu a:hover,
    .footer-menu a:focus {
        transform: none;
    }
}

/* Mobile 480px: Modern Minimalist Design */
@media (max-width: 480px) {
    .footer-top {
        min-height: auto;
    }
    
    .footer-wrapper {
        min-height: auto;
    }
    
    .footer-left,
    .footer-right {
        padding: 18px 14px;
        border-radius: 0;
    }
    
    .footer-brand {
        margin-bottom: 10px;
    }
    
    .footer-brand .custom-logo-link img,
    .footer-brand img.custom-logo,
    .footer-brand .custom-logo {
        max-width: 90px !important;
        max-height: 32px !important;
        filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .footer-brand .custom-logo-link:hover img {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
    }
    
    .footer-description {
        font-size: 0.75rem;
        line-height: 1.5;
        margin-bottom: 10px;
        opacity: 0.9;
        letter-spacing: 0.01em;
    }
    
    .footer-social {
        gap: 8px;
        margin-top: 10px;
    }
    
    .footer-social-link {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .footer-social-link:hover {
        transform: translateY(-2px) scale(1.08);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
        background: rgba(255, 255, 255, 1);
    }
    
    .footer-columns {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 4px;
    }
    
    .footer-column {
        margin-bottom: 0;
        padding: 6px 4px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .footer-column:hover {
        background: rgba(255, 255, 255, 0.6);
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    }
    
    .footer-title {
        font-size: 0.8rem;
        margin-bottom: 5px;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: #1a1a1a;
    }
    
    .footer-menu {
        gap: 2px;
    }
    
    .footer-menu a {
        font-size: 0.7rem;
        padding: 2px 0;
        opacity: 0.85;
        transition: all 0.2s ease;
        border-radius: 4px;
        display: block;
    }
    
    .footer-menu a:hover {
        opacity: 1;
        color: var(--inviro-primary, #2F80ED);
        transform: translateX(2px);
        padding-left: 3px;
    }
    
    .footer-bottom {
        padding: 10px 14px;
        border-radius: 0;
    }
    
    .footer-bottom .footer-wrapper {
        gap: 6px;
    }
    
    .copyright {
        font-size: 0.7rem;
        opacity: 0.9;
        line-height: 1.4;
        letter-spacing: 0.01em;
    }
    
    .footer-links {
        gap: 8px;
        margin-top: 4px;
    }
    
    .footer-links a {
        font-size: 0.7rem;
        opacity: 0.9;
        transition: all 0.2s ease;
        padding: 3px 6px;
        border-radius: 5px;
    }
    
    .footer-links a:hover {
        opacity: 1;
        color: var(--inviro-primary, #2F80ED);
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }
}

/* Tablet: Adjust spacing and layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .footer-left,
    .footer-right {
        padding: var(--spacing-2xl) var(--container-padding-tablet);
    }
    
    .footer-columns {
        gap: var(--spacing-lg);
    }
}
