/* Footer.css */
.footer {
    background: linear-gradient(135deg, #2d5f0f 0%, #356203 50%, #4a7c2a 100%);
    padding: 60px 0 20px 0;
    color: white;
    position: relative;
    margin-top: 60px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #356203, #4a7c2a);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
    margin-bottom: 10px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #ffffff;
    font-weight: 600;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #ff6b35;
    border-radius: 2px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.footer-section ul li:hover {
    transform: translateX(5px);
}

.footer-section ul li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.footer-section ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-section ul li a::before {
    content: '→';
    margin-right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover::before {
    opacity: 1;
}

/* Newsletter Section */
.newsletter .input-group {
    display: flex;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.newsletter input[type="email"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    outline: none;
    transition: background 0.3s ease;
}

.newsletter input[type="email"]:focus {
    background: rgba(255, 255, 255, 1);
}

.newsletter input[type="email"]::placeholder {
    color: #666;
}

.newsletter button {
    padding: 12px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.newsletter button:hover {
    background: #e55a2d;
    transform: translateY(-1px);
}

/* Social Media Icons */
.social-media {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.social-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.social-icon:hover::before {
    left: 0;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-icon.whatsapp { 
    background: #25D366; 
    color: white; 
}

.social-icon.youtube { 
    background: #FF0000; 
    color: white; 
}

.social-icon.instagram { 
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white; 
}

.social-icon.facebook { 
    background: #1877F2; 
    color: white; 
}

.social-icon.linkedin { 
    background: #0077B5; 
    color: white; 
}

.social-icon.twitter { 
    background: #1DA1F2; 
    color: white; 
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.footer-logo:hover img {
    border-color: #ff6b35;
}

.footer-logo span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ff6b35;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-links a:hover::after {
    width: 100%;
}

.copyright p {
    margin: 0;
    font-size: 0.85rem;
    color: #b0b0b0;
    font-style: italic;
}

/* Back to Top Button */
.back-to-top {
    position: absolute;
    right: 0;
    top: -20px;
    width: 45px;
    height: 45px;
    background: linear-gradient(45deg, #ff6b35, #e55a2d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    opacity: 0;
    visibility: hidden;
    font-size: 1.1rem;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px) scale(1.05);
}

/* Responsive Design */
@media (max-width: 1500px) {
    .footer-content {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 kolom sejajar */
        gap: 30px;
        align-items: start;
    }

    .footer-section {
        margin-bottom: 0; /* hilangkan jarak bawah biar rata */
    }

    .newsletter {
        grid-column: auto; /* jangan span semua kolom */
        width: 100%;
        margin-top: 0; /* hilangkan jarak atas */
    }

    .newsletter .input-group {
        flex-direction: row; /* input dan button sejajar */
    }

    .newsletter input[type="email"] {
        flex: 1;
        margin-right: 10px;
    }

    .newsletter button {
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
    .footer-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 kolom menu */
        gap: 30px;
        align-items: start;
    }

    .newsletter {
        grid-column: 1 / -1; /* span semua kolom, jadi full width */
        width: 100%;
        margin-top: 20px; /* beri jarak atas biar lega */
    }

    .newsletter .input-group {
        flex-direction: column; /* input dan button vertikal */
    }

    .newsletter input[type="email"] {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px; /* jarak ke button */
    }

    .newsletter button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 menu tetap horizontal */
        gap: 15px;
    }

    .footer-section {
        text-align: center; /* biar rata tengah kalau sempit */
    }

    .newsletter {
        grid-column: 1 / -1; /* newsletter span penuh di bawah */
        width: 100%;
        margin-top: 20px;
    }

    .newsletter .input-group {
        flex-direction: column; /* input & tombol ditumpuk */
        align-items: stretch;
    }

    .newsletter input[type="email"] {
        width: 100%;
        margin-bottom: 10px;
    }

    .newsletter button {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .newsletter input[type="email"] {
        background: rgba(255, 255, 255, 0.9);
        color: #333;
    }
    
    .newsletter input[type="email"]::placeholder {
        color: #666;
    }
}

/* Animation for footer sections */
.footer-section {
    animation: fadeInUp 0.6s ease-out;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for better interactivity */
.footer-section {
    transition: transform 0.3s ease;
}

.footer-section:hover {
    transform: translateY(-2px);
}

/* Enhanced newsletter section */
.newsletter {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Print styles */
@media print {
    .footer {
        background: #356203 !important;
        color: black !important;
    }
    
    .social-media,
    .back-to-top,
    .newsletter button {
        display: none;
    }
    
    .footer-links a {
        color: black !important;
    }
}