/* Custom Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom utility classes */
.text-gradient {
    background: linear-gradient(90deg, #2563eb, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #1e40af;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #2563eb;
    color: white;
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Banner / Hero section */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
}

/* Special button styling for hero section */
.hero-btn {
    border-color: white !important;
    color: white !important;
}

.hero-btn:hover {
    background-color: white !important;
    color: #1e40af !important;
}

/* Service card */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-card .icon-wrapper {
    transition: all 0.3s ease;
}

.service-card:hover .icon-wrapper {
    background-color: #2563eb;
    color: white;
}

/* Mobile popup styles */
.mobile-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.90);
    z-index: 9999;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

/* Show popup when JavaScript sets display: flex */
.mobile-popup-overlay[style*="display: flex"] {
    display: flex !important;
}

.mobile-popup {
    width: 100%;
    max-width: 350px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    border-radius: 28px;
    padding: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.mobile-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-popup-close:hover {
    opacity: 1;
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}



.mobile-popup-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    text-align: center;
}

.mobile-popup-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.mobile-popup-content p {
    margin: 0;
    font-size: 14px;
}

/* Button animation */
@keyframes subtle-pulse {
    0% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
        transform: scale(1);
    }
}

@keyframes button-glow {
    0% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3), 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3), 0 0 0 8px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3), 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

@keyframes flash-shine {
    0% {
        opacity: 0;
        left: -100%;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        left: 100%;
    }
}

.mobile-popup-btn {
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 5px;
    padding: 18px 42px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffcc02 100%);
    color: white;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Only animate when popup is visible */
.mobile-popup-overlay:not([style*="display: none"]) .mobile-popup-btn {
    animation: subtle-pulse 2.5s infinite ease-in-out, button-glow 3s infinite;
}

.mobile-popup-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    z-index: 1;
}

/* Only animate shine effect when popup is visible */
.mobile-popup-overlay:not([style*="display: none"]) .mobile-popup-btn:before {
    animation: flash-shine 4s infinite;
}

.mobile-popup-btn:after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 120%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    z-index: 1;
}

/* Only animate second shine effect when popup is visible */
.mobile-popup-overlay:not([style*="display: none"]) .mobile-popup-btn:after {
    animation: flash-shine 4s infinite 2s;
}

/* Stop all animations when popup is closed */
.mobile-popup-overlay.popup-closed .mobile-popup-btn,
.mobile-popup-overlay.popup-closed .mobile-popup-btn:before,
.mobile-popup-overlay.popup-closed .mobile-popup-btn:after {
    animation: none !important;
}

.mobile-popup-btn span {
    position: relative;
    z-index: 2;
}

.mobile-popup-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #ff8c42 0%, #ffa726 50%, #ffd54f 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.mobile-popup-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.mobile-popup a {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

/* Modal Konfirmasi Styles */
.confirmation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.confirmation-modal {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirmation-modal-overlay[style*="display: flex"] .confirmation-modal {
    transform: scale(1);
}

.confirmation-modal-content {
    padding: 30px 25px 25px 25px;
    text-align: center;
}

.confirmation-modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: bold;
    color: #1e40af;
    line-height: 1.3;
}

.confirmation-modal-content p {
    margin: 0 0 25px 0;
    font-size: 16px;
    color: #4b5563;
    line-height: 1.5;
}

.confirmation-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn, .cancel-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.confirm-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.confirm-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.cancel-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.confirm-btn:active, .cancel-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive untuk modal konfirmasi */
@media (max-width: 480px) {
    .confirmation-modal {
        width: 95%;
        margin: 20px;
    }
    
    .confirmation-modal-content {
        padding: 25px 20px 20px 20px;
    }
    
    .confirmation-modal-content h3 {
        font-size: 18px;
    }
    
    .confirmation-modal-content p {
        font-size: 15px;
    }
    
    .confirmation-modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .confirm-btn, .cancel-btn {
        width: 100%;
        min-width: auto;
    }
}