/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
    --max-width: 1400px;
    --container-padding: 40px;
    --primary-pr2: #A2C3AA;
    --primary-pr3: #83AF8E;
    --primary-pr5: #507C5B;
    --primary-pr6: #3C5D44;
    --primary-pr7: #283E2D;
    --neutral-smooth-white: #F2F3F7;
    --neutral-white: #FFFFFF;
    --font-outfit: 'Outfit';
}

/* ========================================
   PAKSA MARGIN KIRI KANAN - SAMA PERSIS DENGAN HEADER
   ======================================== */
footer {
    width: 100%;
    position: relative;
    left: 0;
    right: 0;
}

/* Paksa semua container - SAMA PERSIS DENGAN HEADER */
footer .container,
footer .container-1440 {
    max-width: var(--max-width) !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: var(--container-padding) !important;
    padding-right: var(--container-padding) !important;
    box-sizing: border-box !important;
}

/* ========================================
   FOOTER STRUCTURE - MENGIKUTI HEADER
   ======================================== */
.footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    width: 100%;
    position: relative;
}

/* ========================================
   CTA SECTION - DENGAN CONTAINER (SAMA SEPERTI HEADER)
   ======================================== */
.cta-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 234px;
    background: #507C5B;
    background-image: url("/images/webp/background-footer1.webp");
    background-size: cover;
    background-position: center;
    position: relative;
}

/* TAMBAHKAN CONTAINER DI DALAM CTA SECTION */
.cta-section .container {
    width: 100%;
    padding: 30px var(--container-padding);
}

.cta-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 40px;
}

.cta-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    padding: 0;
    margin: 0;
}

.cta-text h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 48px;
    line-height: 1.3;
    color: #FFFFFF;
    margin: 0 0 8px 0;
    word-wrap: break-word;
}

.cta-text p {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: #FFFFFF;
    margin: 0;
    word-wrap: break-word;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    gap: 10px;
    background: #F2F3F7;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #283E2D;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: auto;
    min-width: 180px;
    border-radius: 0;
}

.cta-button i {
    font-size: 18px;
    color: #283E2D;
}

.cta-button:hover {
    background: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   MAIN FOOTER - DENGAN CONTAINER (SAMA SEPERTI HEADER)
   ======================================== */
.footer-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background: #F2F3F7;
    position: relative;
}

/* TAMBAHKAN CONTAINER DI DALAM FOOTER MAIN */
.footer-main .container {
    width: 100%;
    padding: 0 var(--container-padding);
    position: relative;
}

/* GARIS UTAMA FULL WIDTH - TIDAK TERPOTONG PADDING */
.footer-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 1px;
    background: var(--primary-pr2);
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    width: 100%;
    margin: 0 auto;
}

/* Brand Section */
.footer-brand {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 40px 40px 40px 0;
    gap: 30px;
    height: 100%;
    position: relative;
}

.footer-brand > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 26px;
    width: 100%;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 4px;
    width: 100%;
}

.footer-logo h3 {
    font-family: var(--font-outfit);
    font-style: italic;
    font-weight: 400;
    font-size: 36px;
    line-height: 120%;
    text-align: left;
    color: var(--primary-pr6);
    margin: 0;
}

.footer-logo p {
    font-family: var(--font-outfit);
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 120%;
    text-align: left;
    color: var(--primary-pr6);
    margin: 0;
}

.footer-logo img {
    max-width: 100%;
    height: auto;
}

.footer-brand-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.footer-brand-inner p {
    font-family: var(--font-outfit);
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 160%;
    text-align: center;
    text-transform: capitalize;
    color: var(--primary-pr5);
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
}

/* Footer Social */
.footer-social {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    gap: 20px !important;
    height: 24px !important;
    width: 100% !important;
    margin: 20px auto 0 auto !important;
    text-align: center !important;
}

.footer-social a {
    width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--primary-pr5) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-social a:hover {
    transform: scale(1.2) !important;
    color: var(--primary-pr6) !important;
}

.footer-social i {
    font-size: 24px !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Links Sections */
.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0px;
    gap: 20px;
    height: 100%;
    position: relative;
    border-left: 1px solid var(--primary-pr2);
}

/* HAPUS SEMUA GARIS KECIL DI SAMPING */
.footer-links:nth-child(2)::after,
.footer-links:nth-child(3)::after {
    display: none !important;
}

.footer-links:last-child::after {
    display: none !important;
}

.footer-links-toggle {
    display: none;
}

.footer-heading-desktop,
.footer-links h4 {
    font-family: var(--font-outfit);
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 135%;
    text-align: center;
    color: var(--primary-pr3);
    width: 100%;
    margin: 0;
}

.footer-links-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 8px;
    width: 100%;
}

.footer-links-content ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 8px;
    width: 100%;
    list-style: none;
    margin: 0;
}

.footer-links-content li {
    width: 100%;
}

.footer-links-content li a {
    font-family: var(--font-outfit);
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 160%;
    text-align: center;
    color: var(--primary-pr5);
    text-decoration: none;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.footer-links-content li a:hover {
    color: var(--primary-pr6);
}

/* ========================================
   BOTTOM FOOTER - DENGAN CONTAINER (SAMA SEPERTI HEADER)
   ======================================== */
.footer-bottom {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    width: 100%;
    min-height: 62px;
    background: var(--neutral-smooth-white);
}

/* TAMBAHKAN CONTAINER DI DALAM FOOTER BOTTOM */
.footer-bottom .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 var(--container-padding);
}

.footer-bottom-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-bottom-content p {
    font-family: var(--font-outfit);
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 160%;
    color: var(--primary-pr6);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 20px;
}

.footer-bottom-links a {
    font-family: var(--font-outfit);
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 160%;
    color: var(--primary-pr6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary-pr5);
}

/* ========================================
   SAFARI & CROSS-BROWSER SUPPORT
   ======================================== */

/* Safari 9+ - Grid fix */
_::-webkit-full-page-media, _:future, :root .footer-content {
    display: -webkit-grid;
    display: grid;
}

/* Safari hover fixes */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .cta-button:hover {
            -webkit-transform: translateY(-2px);
            transform: translateY(-2px);
        }
        
        .footer-social a:hover {
            -webkit-transform: scale(1.2) !important;
            transform: scale(1.2) !important;
        }
        
        .footer-social a {
            transition: -webkit-transform 0.3s ease, color 0.3s ease;
        }
    }
}

/* iOS Safari touch improvements */
@supports (-webkit-touch-callout: none) {
    .cta-button,
    .footer-links-toggle,
    .footer-social a,
    .footer-bottom-links a {
        -webkit-tap-highlight-color: transparent;
    }
    
    .footer-links-toggle {
        cursor: pointer;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* ========================================
   RESPONSIVE - SAMA PERSIS DENGAN HEADER
   ======================================== */

/* Large Desktop */
@media (max-width: 1400px) {
    footer .container,
    footer .container-1440 {
        padding-left: 40px !important;
        padding-right: 40px !important;
    }
}

/* Desktop Large */
@media (min-width: 1200px) and (max-width: 1399px) {
    .footer-brand {
        padding: 40px 30px 40px 0;
    }
}

/* Small Desktop */
@media (min-width: 1025px) and (max-width: 1199px) {
    .footer-brand {
        padding: 40px 20px 40px 0;
    }
    
    .footer-brand-inner p {
        max-width: 220px;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    footer .container,
    footer .container-1440 {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
    
    .cta-text h2 {
        font-size: 36px;
    }
    
    .cta-text p {
        font-size: 16px;
    }
    
    .cta-button {
        min-width: 160px;
        padding: 10px 24px;
        font-size: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        border-right: none;
        padding: 40px 0 30px 0;
        align-items: flex-start;
    }
    
    .footer-links:nth-child(2) {
        border-right: 1px solid var(--primary-pr2);
    }
    
    .footer-links::after {
        display: none !important;
    }
}

/* Tablet Portrait */
@media (min-width: 769px) and (max-width: 1023px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-links:nth-child(3),
    .footer-links:nth-child(4) {
        border-left: 1px solid var(--primary-pr2);
    }
}

/* ========================================
   RESPONSIVE MOBILE - TIDAK DIUBAH (SESUAI PERMINTAAN)
   ======================================== */
@media (max-width: 768px) {
    footer .container,
    footer .container-1440 {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* CTA SECTION - TOMBOL WHATSAPP DI KIRI BAWAH TEKS */
    .cta-section {
        flex-direction: column;
        padding: 30px 0;
    }
    
    .cta-section .container {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .cta-content {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .cta-text {
        width: 100%;
    }
    
    .cta-text h2 {
        font-size: 24px;
        text-align: left;
        margin-bottom: 8px;
    }
    
    .cta-text p {
        font-size: 14px;
        text-align: left;
        margin-bottom: 16px;
    }
    
    /* TOMBOL WHATSAPP DI KIRI BAWAH TEKS */
    .cta-button {
        width: auto !important;
        min-width: 160px;
        margin-left: 0 !important;
        margin-right: auto !important;
        align-self: flex-start;
        padding: 10px 24px;
        font-size: 14px;
        order: 2;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-brand {
        width: 100%;
        padding: 40px 0 30px;
        border-right: none;
        position: relative;
        align-items: flex-start;
    }
    
    /* GARIS BAWAH BRAND - FULL WIDTH */
    .footer-brand::after {
        display: block;
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        height: 1px;
        background: var(--primary-pr2);
        pointer-events: none;
    }
    
    .footer-links {
        width: 100%;
        padding: 0;
        gap: 0;
        border-left: none !important;
    }
    
    .footer-links::after,
    .footer-links:nth-child(2)::after,
    .footer-links:nth-child(3)::after,
    .footer-links:last-child::after {
        display: none !important;
    }
    
    .footer-heading-desktop {
        display: none;
    }
    
    .footer-links-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        background: none;
        border: none;
        padding: 20px 0;
        cursor: pointer;
    }
    
    .footer-links-toggle,
    .footer-links:last-child .footer-links-toggle {
        border: none !important;
        border-bottom: none !important;
    }
    
    .footer-links-toggle h4 {
        font-size: 16px;
        color: var(--primary-pr5);
        text-align: left;
        margin: 0;
    }
    
    .toggle-icon {
        transition: transform 0.3s ease;
        transform: rotate(180deg);
    }
    
    .toggle-icon.active {
        transform: rotate(0deg);
    }
    
    .footer-links-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        width: 100%;
    }
    
    .footer-links-content.active {
        max-height: 600px;
        padding: 20px 0;
    }
    
    .footer-links-content li a {
        text-align: left;
        padding: 8px 0;
    }
    
    .footer-links:first-child {
        border-top: 1px solid var(--primary-pr2);
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-bottom-content p {
        font-size: 12px;
        text-align: center;
    }
    
    .footer-bottom-links {
        gap: 15px;
        justify-content: center;
    }
    
    .footer-bottom-links a {
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    footer .container,
    footer .container-1440 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .cta-text h2 {
        font-size: 20px;
    }
    
    .cta-text p {
        font-size: 12px;
    }
    
    .cta-button {
        min-width: 140px;
        padding: 8px 16px !important;
        font-size: 12px !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        align-self: flex-start;
    }
    
    .cta-button i {
        font-size: 16px;
    }
    
    .footer-logo h3 {
        font-size: 28px;
    }
    
    .footer-logo p {
        font-size: 16px;
    }
    
    .footer-brand-inner p {
        font-size: 12px;
        max-width: 220px;
        text-align: center !important;
        color: var(--primary-pr5) !important;
    }
    
    .footer-bottom-links {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-bottom-links a {
        font-size: 11px;
        white-space: nowrap;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .cta-button {
        min-width: 120px;
        padding: 6px 12px !important;
    }
    
    .footer-logo h3 {
        font-size: 24px;
    }
    
    .footer-logo p {
        font-size: 14px;
    }
}

/* ========================================
   KHUSUS MOBILE - HAPUS GARIS KANAN TOTAL
   ======================================== */
@media (max-width: 767px) {
    .footer-brand,
    .footer-links,
    .footer-column,
    .footer-brand-inner,
    .footer-content > div,
    .footer-links-toggle {
        border-right: none !important;
        border-left: none !important;
        box-shadow: none !important;
    }
    
    .footer-main {
        padding-bottom: 5px !important;
    }
    
    .footer-links-content {
        margin-bottom: 0 !important;
        padding-bottom: 5px !important;
    }
    
    .footer-links ul {
        margin-bottom: 0 !important;
    }
    
    .footer-links ul li:last-child {
        margin-bottom: 0 !important;
    }
    
    .footer-bottom {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    .footer-bottom-content {
        margin-top: 0 !important;
        gap: 5px !important;
    }
    
    .toggle-icon {
        border: none !important;
        outline: none !important;
    }
}

/* ========================================
   ZOOM LEVEL EKSTREM
   ======================================== */
@media (min-width: 2000px) {
    .cta-text h2 {
        font-size: 64px;
    }
    
    .cta-text p {
        font-size: 24px;
    }
    
    .cta-button {
        min-width: 240px;
        height: 60px;
        font-size: 20px;
        padding: 16px 32px;
    }
}

@media (min-width: 2560px) {
    .cta-text h2 {
        font-size: 72px;
    }
    
    .cta-text p {
        font-size: 28px;
    }
    
    .cta-button {
        min-width: 280px;
        height: 70px;
        font-size: 24px;
        padding: 18px 36px;
    }
}