/* 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;
    }
}

/* ============================================
   IMPROVED LAYOUT & SPACING STYLES
   ============================================ */

/* Better spacing consistency */
section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Hero section improvements */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e40af 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Improved typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-weight: 800;
}

h2 {
    font-weight: 700;
}

/* Better button consistency */
a[class*="bg-gradient"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

a[class*="bg-gradient"]:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

a[class*="bg-gradient"]:active {
    transform: translateY(0);
}

/* Improved card layouts */
.bg-white.rounded-lg,
.bg-white.rounded-xl {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bg-white.rounded-lg:hover,
.bg-white.rounded-xl:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

/* Better feature boxes */
.flex.items-center.bg-gradient-to-r {
    transition: all 0.3s ease;
}

.flex.items-center.bg-gradient-to-r:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Improved testimonial cards */
.bg-white.p-6.rounded-lg.shadow-md {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bg-white.p-6.rounded-lg.shadow-md:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -5px rgba(0, 0, 0, 0.15);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Better spacing for feature boxes */
.flex.flex-col.sm\:flex-row.gap-3 {
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .flex.flex-col.sm\:flex-row.gap-3 {
        gap: 1rem;
    }
}

/* Hero section layout improvements */
@media (min-width: 768px) {
    .hero-gradient .flex.flex-col.md\:flex-row {
        gap: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero-gradient .flex.flex-col.md\:flex-row {
        gap: 4rem;
    }
}

/* Feature label improvements */
.flex.items-center.bg-gradient-to-r {
    white-space: nowrap;
    min-width: 0;
}

.flex.items-center.bg-gradient-to-r span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Improved badge styling */
.inline-block.bg-gradient-to-r {
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

@media (min-width: 640px) {
    .inline-block.bg-gradient-to-r {
        font-size: 0.875rem;
    }
}

/* Better image styling */
img.rounded-lg {
    transition: transform 0.3s ease;
}

img.rounded-lg:hover {
    transform: scale(1.02);
}

/* Improved testimonial quote box */
.absolute.-bottom-6.-left-6.bg-white {
    max-width: 90%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .absolute.-bottom-6.-left-6.bg-white {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1.5rem;
        max-width: 100%;
    }
}

/* Better badge positioning */
.absolute.-top-4.-right-4 {
    z-index: 10;
}

@media (max-width: 768px) {
    .absolute.-top-4.-right-4 {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 1rem;
        display: inline-block;
    }
}

/* Improved section headers */
.text-center.mb-12 h2 {
    margin-bottom: 1rem;
}

.text-center.mb-12 p {
    margin-top: 0.5rem;
}

/* Better grid spacing */
.grid.gap-8 {
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid.gap-8 {
        gap: 1.5rem;
    }
}

/* Improved pricing cards */
.bg-white.rounded-xl.shadow-xl {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bg-white.rounded-xl.shadow-xl:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

/* Better CTA section */
.hero-gradient.text-white {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e40af 100%);
}

/* Improved responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .text-lg {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Better button spacing */
.flex.flex-wrap.gap-4 a {
    min-width: 200px;
}

@media (max-width: 640px) {
    .flex.flex-wrap.gap-4 a {
        width: 100%;
        min-width: auto;
    }
}

/* Improved trusted by section */
.flex.items-center.mt-8 {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.flex.items-center.space-x-4 img {
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.6;
}

.flex.items-center.space-x-4 img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Better service cards alignment */
.service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card .text-center {
    margin-top: auto;
}

/* Improved promo section */
.bg-gradient-to-r.from-blue-600.to-blue-800 {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-r.from-blue-600.to-blue-800::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Better form styling */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    ring: 2px;
    ring-color: #2563eb;
    border-color: #2563eb;
}

/* Improved scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Better loading states */
.animate-on-scroll {
    will-change: opacity, transform;
}

/* Improved mobile menu */
@media (max-width: 768px) {
    #mobile-menu {
        animation: slideDown 0.3s ease;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Better badge animations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .8;
    }
}

/* Improved text readability */
p {
    line-height: 1.7;
}

.text-gray-600 {
    color: #4b5563;
    line-height: 1.7;
}

/* Better container max-width */
.max-w-7xl {
    max-width: 80rem;
}

/* Improved section padding on mobile */
@media (max-width: 640px) {
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-16 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-20 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}