/* assets/css/style.css */
:root {
    --primary-color: #10623F;
    --secondary-color: #F08519;
    --accent-color: #FFF9B1;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 76px;
}

/* Custom Bootstrap Colors */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #0d4f32;
    border-color: #0d4f32;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 98, 63, 0.3);
}

.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    font-weight: 600;
}

.btn-warning:hover, .btn-warning:focus {
    background-color: #d6711a;
    border-color: #d6711a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 133, 25, 0.3);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.btn-outline-dark:hover {
    background-color: var(--dark-color);
    border-color: var(--dark-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-warning {
    color: var(--secondary-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-warning {
    background-color: var(--secondary-color) !important;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    padding: 0.8rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 12px;
    color: #333 !important;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 12px;
    animation: fadeInDown 0.3s ease-in-out;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.dropdown-item {
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateX(5px);
}

/* Brand logo presisi */
.navbar-brand .brand-logo {
    height: 40px;
    width: auto;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .brand-logo {
    transform: rotate(5deg);
}

.navbar-brand span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d4f32 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px 0; /* Tambah padding minimal biar gak mentok edge */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(240, 133, 25, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-right: 20px; /* Jarak dari gambar di desktop */
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

/* Hero Image Styling - Desktop First */
.hero-image {
    position: relative;
    z-index: 2;
    text-align: center; /* Pastikan gambar selalu center */
    padding: 15px; /* Kurangi padding biar gak terlalu tebal */
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(5px); /* Efek glassmorphism ringan */
}

.hero-img {
    width: 100%; /* Ubah ke 100% biar full container */
    max-width: 400px; /* Batasi lebar maksimal biar gak kegedean */
    height: auto; /* Pertahankan aspect ratio - INI PENTING! */
    max-height: 450px; /* Kurangi dari 500px */
    transition: all 0.4s ease; /* Smooth transition */
    opacity: 0.95;
    border-radius: 15px;
    display: block; /* Pastikan block element */
    margin: 0 auto; /* Center horizontal */
    object-fit: contain; /* Pastikan gambar gak terdistorsi, fit ke container */
}

/* Hover Effect - Hanya untuk Desktop (gak jalan di mobile) */
@media (hover: hover) and (min-width: 769px) {
    .hero-img:hover {
        transform: scale(1.03); /* Kurangi scale, hapus rotate biar gak aneh */
        opacity: 1;
    }
}

/* Fallback kalau gambar gak ada */
.hero-img[src=""], .hero-img[src="#"], .hero-img:not([src]) {
    display: none;
}

.hero-image:empty::after,
.hero-image:has(.hero-img[src=""])::after {
    content: "📱 Gambar akan segera tersedia";
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

/* RESPONSIVE - Mobile & Tablet */
@media (max-width: 992px) {
    .hero-section {
        min-height: 90vh; /* Kurangi tinggi biar gak terlalu panjang */
        text-align: center;
        padding: 40px 15px; /* Padding lebih kecil */
    }
    
    .hero-content {
        padding-right: 0;
        padding-bottom: 30px; /* Jarak di bawah gambar */
        order: 2; /* Teks di bawah gambar */
    }
    
    .hero-image {
        order: 1; /* Gambar di atas */
        padding: 10px; /* Padding lebih kecil */
        margin-bottom: 20px; /* Jarak antar elemen */
        max-width: 300px; /* Batasi container */
        margin: 0 auto 20px; /* Center dan jarak bawah */
        border-radius: 15px; /* Sudut lebih kecil */
    }
    
    .hero-img {
        width: 100%;
        max-width: 280px; /* Lebih kecil buat tablet */
        max-height: 250px; /* Optimal buat tablet */
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 55vh;
        padding: 10px 10px;
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-image {
        padding: 8px; /* Padding minimal */
        margin-bottom: 10px;
        border-radius: 12px;
    }
    
    .hero-img {
        max-width: 250px; /* Pas buat portrait */
        max-height: 200px; /* Tinggi optimal */
    }
    
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 80vh;
        padding: 20px 5px;
    }
    
    .hero-content {
        padding: 0 5px;
    }
    
    .hero-image {
        padding: 5px; /* Hampir nol padding */
        margin-bottom: 20px;
        border-radius: 10px;
        max-width: 100%; /* Full width container */
    }
    
    .hero-img {
        max-width: 220px; /* Pas buat small phone */
        max-height: 180px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        border-radius: 25px;
    }
}

/* Landscape Mobile Fix */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        align-items: flex-start;
        padding: 20px;
    }
    
    .hero-img {
        max-height: 150px;
        max-width: 200px;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 0.95rem;
    }
}

/* Performance: Lazy loading untuk gambar */
.hero-img {
    loading: eager; /* Prioritas tinggi buat hero image */
}

/* Accessibility: No hover on touch devices */
@media (hover: none) and (pointer: coarse) {
    .hero-img:hover {
        transform: none; /* Hapus semua hover effect di touch */
    }
}


/* Service Sections */
.service-icon {
    transition: all 0.4s ease;
    padding: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.service-icon:hover {
    transform: scale(1.2) rotate(10deg);
    background: rgba(255, 255, 255, 0.2);
}

.service-icon i {
    display: block;
    transition: all 0.3s ease;
}

.service-icon:hover i {
    transform: scale(1.1);
}

/* Statistics Counter */
.stat-item {
    padding: 30px 20px;
    transition: all 0.4s ease;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stat-item:hover {
    transform: translateY(-15px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.counter {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter {
  color: #fff !important;
}


/* Cards */
.card {
    border-radius: 20px;
    transition: all 0.4s ease;
    border: none;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Contact Section */
.contact-info {
    padding: 30px 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
    background: rgba(16, 98, 63, 0.05);
}

.contact-info:hover {
    transform: translateY(-5px);
    background: rgba(16, 98, 63, 0.1);
}

.contact-info i {
    transition: all 0.3s ease;
}

.contact-info:hover i {
    transform: scale(1.2);
    color: var(--secondary-color) !important;
}

/* FAQ Section */
.accordion {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.accordion-item {
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    margin-bottom: 0;
}

.accordion-button {
    background-color: rgba(16, 98, 63, 0.05);
    border: none;
    font-weight: 600;
    color: var(--primary-color);
    padding: 20px 25px;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 98, 63, 0.25);
}

.accordion-button::after {
    transition: transform 0.3s ease;
}

.accordion-body {
    padding: 25px;
    background-color: rgba(248, 249, 250, 0.8);
    line-height: 1.8;
}

/* Form Styling */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(16, 98, 63, 0.15);
    transform: translateY(-2px);
}

.form-control-lg, .form-select-lg {
    padding: 15px 20px;
    font-size: 1.1rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Form Validation */
.is-valid {
    border-color: var(--success-color) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38L7.7 4.08 6.76 3.14 4.25 5.65z'/%3e%3c/svg%3e");
}

.is-invalid {
    border-color: var(--danger-color) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: var(--danger-color);
    margin-top: 5px;
    font-weight: 500;
}

/* Animations */
.fade-in {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SweetAlert2 Custom Styling */
.swal2-popup {
    border-radius: 20px !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-title {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

.swal2-confirm {
    background-color: var(--primary-color) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

.swal2-cancel {
    background-color: var(--success-color) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

/* Toast Styling */
.swal2-toast {
    border-radius: 15px !important;
}

/* Social Links */
.social-links a {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    transition: all 0.4s ease;
    margin: 0 8px;
    font-size: 1.2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.social-links a:hover::before {
    left: 100%;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(240, 133, 25, 0.3);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.cta-buttons .btn {
    min-width: 180px;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
}

.cta-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.cta-buttons .btn:hover::before {
    left: 100%;
}

/* Section Spacing */
section {
    padding: 80px 0;
    position: relative;
}

section.py-5 {
    padding: 80px 0 !important;
}

/* Section Backgrounds */
.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    position: relative;
}

.bg-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(16,98,63,0.05)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0d4f32, #d6711a);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-img {
        max-width: 90%;
        max-height: 450px;
    }
    
    .counter {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        text-align: center;
        padding: 60px 0;
    }
    
    .hero-img {
        max-width: 90%;
        max-height: 400px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        min-width: 250px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .stat-item {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand .brand-logo {
        height: 35px;
    }
    
    .display-4 {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .hero-content {
        order: 2;
        margin-top: 20px;
    }
    
    .hero-img {
        max-width: 95%;
        max-height: 300px;
    }
    
    .counter {
        font-size: 2.5rem;
    }
    
    .service-icon {
        padding: 15px;
    }
    
    .service-icon i {
        font-size: 3rem !important;
    }
    
    .contact-info {
        margin-bottom: 20px;
    }
    
    .accordion-button {
        padding: 15px 20px;
        font-size: 0.95rem;
    }
    
    .accordion-body {
        padding: 20px;
    }
    
    section {
        padding: 50px 0;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .hero-img {
        max-width: 100%;
        max-height: 250px;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .service-icon i {
        font-size: 2.5rem !important;
    }
    
    .cta-buttons .btn {
        min-width: 200px;
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        min-width: 200px;
        margin-bottom: 10px;
    }
    
    .stat-item {
        padding: 20px 15px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .form-control-lg, .form-select-lg {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .social-links, .hero-buttons, .cta-buttons {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        min-height: auto !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    section {
        padding: 20px 0 !important;
        break-inside: avoid;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #2c3e50;
        --dark-color: #f8f9fa;
    }
    
    /* Uncomment if you want to support dark mode
    body {
        background-color: #1a1a1a;
        color: #f8f9fa;
    }
    
    .navbar {
        background-color: rgba(26, 26, 26, 0.95) !important;
    }
    
    .card {
        background-color: #2c3e50;
        color: #f8f9fa;
    }
    */
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-img:hover {
        transform: none;
    }
    
    .service-icon:hover {
        transform: none;
    }
    
    .stat-item:hover {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-warning {
        background-color: #ff6600;
        border-color: #ff6600;
        color: #000;
    }
    
    .text-primary {
        color: #000 !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background-color: var(--secondary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--secondary-color);
    color: white;
}

/* Fallback untuk gambar yang tidak ada */
.hero-img[src=""], .hero-img[src="#"] {
    display: none;
}

/* Performance Optimizations */
.hero-section,
.service-icon,
.stat-item,
.card {
    will-change: transform;
}

/* Lazy Loading Support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
