/* WebKeun Custom Styles */
:root {
    --primary-color: #299689;
    --primary-dark: #1f7a6e;
    --primary-light: #34b2a3;
    --secondary-color: #2d3748;
    --accent-color: #f59e0b;
    --text-dark: #1a202c;
    --text-light: #718096;
    --bg-light: #f4f1de;
    --border-color: #e2e8f0;
}



/* Untuk elemen body langsung */
body {
    background-color: var(--bg-light) !important;
}





/* Custom Scrollbar */
::-webkit-html {
	background: #e2e8f0;
}
::-webkit-scrollbar {
    width: 8px;
	background: black;
}

::-webkit-scrollbar-track {
    background: #f4f1de;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Custom Button Styles */
.btn-primary {
    @apply bg-green-600 hover:bg-green-700 text-white font-semibold py-3 px-6 rounded-lg transition duration-300;
}

.btn-outline {
    @apply border-2 border-green-600 text-green-600 hover:bg-green-600 hover:text-white font-semibold py-3 px-6 rounded-lg transition duration-300;
}

.btn-secondary {
    @apply bg-gray-600 hover:bg-gray-700 text-white font-semibold py-3 px-6 rounded-lg transition duration-300;
}

/* Card Hover Effects */
.card-hover {
    @apply transition duration-300 transform hover:-translate-y-1 hover:shadow-lg;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse Animation */
.pulse-green {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(41, 150, 137, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(41, 150, 137, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(41, 150, 137, 0);
    }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staggered Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Form Styles */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent transition duration-300;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

.form-error {
    @apply text-red-600 text-sm mt-1;
}

/* Navigation Styles */
.nav-link {
    @apply text-gray-700 hover:text-green-600 transition duration-300 font-medium;
}

.nav-link.active {
    @apply text-green-600;
}

/* Hero Section Styles */
.hero-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* Testimonial Styles */
.testimonial-card {
    @apply bg-white rounded-xl shadow-sm hover:shadow-md transition duration-300 p-6;
}

/* Portfolio Grid */
.portfolio-item {
    @apply relative overflow-hidden rounded-lg shadow-sm hover:shadow-lg transition duration-300;
}

.portfolio-overlay {
    @apply absolute inset-0 bg-black bg-opacity-0 hover:bg-opacity-70 transition duration-300 flex items-center justify-center;
}

.portfolio-content {
    @apply transform translate-y-4 opacity-0 transition duration-300 text-white text-center;
}

.portfolio-item:hover .portfolio-content {
    @apply translate-y-0 opacity-100;
}

/* Statistics Counter */
.counter {
    @apply text-3xl md:text-4xl font-bold text-green-600;
}

/* Back to Top Button */
.back-to-top {
    @apply fixed bottom-8 right-8 w-12 h-12 bg-green-600 text-white rounded-full shadow-lg hover:bg-green-700 transition duration-300 flex items-center justify-center z-50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Custom Alert Styles */
.alert-success {
    @apply bg-green-50 border border-green-200 text-green-800 rounded-lg p-4;
}

.alert-error {
    @apply bg-red-50 border border-red-200 text-red-800 rounded-lg p-4;
}

.alert-warning {
    @apply bg-yellow-50 border border-yellow-200 text-yellow-800 rounded-lg p-4;
}

.alert-info {
    @apply bg-blue-50 border border-blue-200 text-blue-800 rounded-lg p-4;
}

/* Progress Bar */
.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
    @apply bg-green-600 h-2 rounded-full transition-all duration-500;
}

/* Tooltip */
.tooltip {
    @apply relative inline-block;
}

.tooltip .tooltip-text {
    @apply invisible absolute z-50 w-48 p-3 bg-gray-900 text-white text-sm rounded-lg shadow-lg;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    @apply visible;
    opacity: 1;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a202c transparent transparent transparent;
}

/* Custom Checkbox */
.custom-checkbox {
    @apply w-4 h-4 text-green-600 border-gray-300 rounded focus:ring-green-500;
}

/* Custom Radio */
.custom-radio {
    @apply w-4 h-4 text-green-600 border-gray-300 focus:ring-green-500;
}

/* Animation Classes */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-bounce-slow {
    animation: bounce 2s infinite;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .break-after {
        page-break-after: always;
    }
    
    .break-before {
        page-break-before: always;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #00695c;
        --text-dark: #000000;
        --text-light: #333333;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible for Accessibility */
.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* Back to Top Button - Enhanced Styles */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(41, 150, 137, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(41, 150, 137, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(41, 150, 137, 0.3);
}

/* Pulse animation when visible */
.back-to-top.visible.pulse {
    animation: backToTopPulse 2s infinite;
}

@keyframes backToTopPulse {
    0% {
        box-shadow: 0 4px 20px rgba(41, 150, 137, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(41, 150, 137, 0.6);
    }
    100% {
        box-shadow: 0 4px 20px rgba(41, 150, 137, 0.3);
    }
}

/* Responsive positioning */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 70px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .back-to-top {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: opacity 0.3s ease;
    }
    
    .back-to-top:hover {
        transform: none;
    }
}

/* WhatsApp button positioning adjustment to avoid overlap */
.fixed.bottom-8.left-8 {
    bottom: 80px; /* Adjust WhatsApp button to be above back to top */
}

@media (max-width: 768px) {
    .fixed.bottom-8.left-8 {
        bottom: 70px;
        left: 15px;
        width: 50px;
        height: 50px;
    }
}