<?php
include __DIR__ . '/../layouts/header.php';
?>

<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home - Platform Kapal Wisata Danau Toba</title>
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
    
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap" rel="stylesheet">
    
    <!-- AOS Animation -->
    <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
    <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
</head>
<body>

<div class="home-wrapper">
    
    <!-- ========================================== -->
    <!-- HERO SECTION - DENGAN BACKGROUND DANAU -->
    <!-- ========================================== -->
    <section class="hero-section" id="home">
        <!-- Background Image Danau Toba -->
        <div class="hero-bg" style="background-image: url('assets/images/danau-toba-hero.jpg');">
            <div class="hero-overlay"></div>
        </div>
        
        <!-- Efek Gelombang Air -->
        <div class="wave-container">
            <svg class="wave" viewBox="0 0 1200 200" preserveAspectRatio="none">
                <path d="M0,100 C300,0 600,200 900,100 L1200,50 L1200,200 L0,200 Z" 
                      fill="rgba(255,255,255,0.1)" />
                <path d="M0,130 C250,30 500,230 750,130 L1200,80 L1200,200 L0,200 Z" 
                      fill="rgba(255,255,255,0.07)" />
                <path d="M0,160 C200,60 400,260 600,160 L1200,110 L1200,200 L0,200 Z" 
                      fill="rgba(255,255,255,0.04)" />
            </svg>
        </div>
        
        <div class="hero-content">
            <div class="hero-badge" data-aos="fade-down">
                <span class="badge-dot"></span>
                ⛵ Wisata Danau Toba
            </div>
            <h1 data-aos="fade-up" data-aos-delay="200">
                Temukan Petualangan <br><span>di Danau Toba</span>
            </h1>
            <p data-aos="fade-up" data-aos-delay="400">
                Platform pemesanan kapal wisata terbaik di Danau Toba. 
                Mudah, cepat, dan terpercaya.
            </p>
            <div class="hero-actions" data-aos="fade-up" data-aos-delay="600">
                <?php if(!isset($_SESSION['user_id'])): ?>
                    <a href="?page=register" class="btn-hero-primary">
                        <span>Mulai Petualangan</span>
                        <i class="fas fa-arrow-right"></i>
                    </a>
                    <a href="#kapal" class="btn-hero-secondary">
                        <i class="fas fa-ship"></i> Lihat Kapal
                    </a>
                <?php else: ?>
                    <a href="?page=wisatawan&action=booking" class="btn-hero-primary">
                        <span>Cari Kapal Sekarang</span>
                        <i class="fas fa-arrow-right"></i>
                    </a>
                <?php endif; ?>
            </div>
        </div>
    </section>

    <!-- ========================================== -->
    <!-- FEATURES SECTION -->
    <!-- ========================================== -->
    <section class="features-section">
        <div class="section-header" data-aos="fade-up">
            <span class="section-subtitle">KENAPA MEMILIH KAMI</span>
            <h2>Nikmati Pengalaman <span>Berlayar Terbaik</span></h2>
            <p>Kami menyediakan layanan terbaik untuk perjalanan wisata Anda di Danau Toba</p>
        </div>
        
        <div class="features-grid">
            <div class="feature-card" data-aos="fade-up" data-aos-delay="100">
                <div class="feature-icon-wrapper">
                    <div class="feature-icon-bg" style="background:linear-gradient(135deg,#dbeafe,#bfdbfe);">
                        <i class="fas fa-ship" style="color:var(--primary);"></i>
                    </div>
                </div>
                <h3>Kapal Terverifikasi</h3>
                <p>Semua kapal telah melalui proses verifikasi ketat dan layak berlayar</p>
                <div class="feature-number">01</div>
            </div>
            <div class="feature-card" data-aos="fade-up" data-aos-delay="200">
                <div class="feature-icon-wrapper">
                    <div class="feature-icon-bg" style="background:linear-gradient(135deg,#d1fae5,#a7f3d0);">
                        <i class="fas fa-wallet" style="color:#059669;"></i>
                    </div>
                </div>
                <h3>Harga Transparan</h3>
                <p>Tidak ada biaya tersembunyi. Harga sesuai dengan yang ditampilkan</p>
                <div class="feature-number">02</div>
            </div> 
            <div class="feature-card" data-aos="fade-up" data-aos-delay="300">
                <div class="feature-icon-wrapper">
                    <div class="feature-icon-bg" style="background:linear-gradient(135deg,#fef3c7,#fde68a);">
                        <i class="fas fa-bolt" style="color:#d97706;"></i>
                    </div>
                </div>
                <h3>Booking Instan</h3>
                <p>Proses pemesanan cepat dan mudah, langsung dapat notifikasi</p>
                <div class="feature-number">03</div>
            </div>
            <div class="feature-card" data-aos="fade-up" data-aos-delay="400">
                <div class="feature-icon-wrapper">
                    <div class="feature-icon-bg" style="background:linear-gradient(135deg,#ede9fe,#c4b5fd);">
                        <i class="fas fa-headset" style="color:#7c3aed;"></i>
                    </div>
                </div>
                <h3>Dukungan 24/7</h3>
                <p>Tim support siap membantu Anda kapan saja melalui WhatsApp</p>
                <div class="feature-number">04</div>
            </div>
        </div>
    </section>

    <!-- ========================================== -->
    <!-- KAPAL SECTION -->
    <!-- ========================================== -->
    <section class="kapal-section" id="kapal">
        <div class="section-header" data-aos="fade-up">
            <span class="section-subtitle">KAPAL TERSEDIA</span>
            <h2>Kapal Wisata <span>Pilihan</span></h2>
            <p>Beberapa kapal terbaik yang siap mengantar Anda menjelajahi Danau Toba</p>
        </div>
        
        <?php if(empty($kapalList)): ?>
            <div class="empty-state" data-aos="fade-up">
                <i class="fas fa-ship"></i>
                <h3>Belum Ada Kapal</h3>
                <p>Silakan cek kembali nanti untuk kapal wisata yang tersedia</p>
            </div>
        <?php else: ?>
            <div class="kapal-grid">
            <?php foreach(array_slice($kapalList, 0, 3) as $index => $kapal): ?>
                    <div class="kapal-card" data-aos="fade-up" data-aos-delay="<?= $index * 100 + 100 ?>">
                        <div class="kapal-card-image">
                            <?php if(!empty($kapal['foto'])): ?>
                                <img src="../uploads/kapal/<?= $kapal['foto'] ?>" 
                                     alt="<?= htmlspecialchars($kapal['nama_kapal']) ?>" 
                                     loading="lazy"
                                     onerror="this.style.display='none'; this.parentElement.querySelector('.img-placeholder').style.display='flex';">
                                <div class="img-placeholder" style="display:none;">
                                    <i class="fas fa-ship"></i>
                                </div>
                            <?php else: ?>
                                <div class="img-placeholder">
                                    <i class="fas fa-ship"></i>
                                </div>
                            <?php endif; ?>
                            <div class="kapal-badges">
                                <span class="badge-verified"><i class="fas fa-check-circle"></i> Terverifikasi</span>
                                <span class="badge-price">Rp <?= number_format($kapal['harga_tampil'] ?? 0, 0, ',', '.') ?></span>
                            </div>
                            <div class="kapal-card-overlay">
                                <a href="?page=wisatawan&action=booking&kapal_id=<?= $kapal['id'] ?>" class="overlay-btn">
                                    <i class="fas fa-eye"></i> Lihat Detail
                                </a>
                            </div>
                        </div>
                        
                        <div class="kapal-card-body">
                            <div class="kapal-card-header">
                                <h3><?= htmlspecialchars($kapal['nama_kapal']) ?></h3>
                                <div class="kapal-rating">
                                    <i class="fas fa-star"></i>
                                    <i class="fas fa-star"></i>
                                    <i class="fas fa-star"></i>
                                    <i class="fas fa-star"></i>
                                    <i class="fas fa-star-half-alt"></i>
                                    <span>4.5</span>
                                </div>
                            </div>
                            
                            <div class="kapal-details">
                                <div class="kapal-detail">
                                    <i class="fas fa-map-marker-alt"></i>
                                    <span><?= htmlspecialchars($kapal['pelabuhan_asal'] ?? 'Parapat') ?></span>
                                </div>
                                <div class="kapal-detail">
                                    <i class="fas fa-flag"></i>
                                    <span><?= htmlspecialchars($kapal['pelabuhan_tujuan'] ?? 'Tuk-Tuk') ?></span>
                                </div>
                                <div class="kapal-detail">
                                    <i class="fas fa-users"></i>
                                    <span><?= $kapal['kapasitas'] ?> Orang</span>
                                </div>
                                <div class="kapal-detail">
                                    <i class="fas fa-clock"></i>
                                    <span><?= $kapal['durasi_jam'] ?? 1 ?> Jam</span>
                                </div>
                            </div>
                            
                            <?php if(!empty($kapal['fasilitas'])): ?>
                                <div class="kapal-fasilitas">
                                    <i class="fas fa-check-circle" style="color:#22c55e;"></i>
                                    <?= htmlspecialchars(substr($kapal['fasilitas'], 0, 50)) ?>...
                                </div>
                            <?php endif; ?>
                            
                            <div class="kapal-card-footer">
                                <div class="kapal-pemilik">
                                    <i class="fas fa-user-circle"></i>
                                    <span><?= htmlspecialchars($kapal['pemilik'] ?? 'Admin') ?></span>
                                </div>
                                <?php if(isset($_SESSION['user_id']) && $_SESSION['role'] == 'wisatawan'): ?>
                                    <a href="?page=wisatawan&action=booking&kapal_id=<?= $kapal['id'] ?>" class="btn-book">
                                        Pesan <i class="fas fa-arrow-right"></i>
                                    </a>
                                <?php elseif(isset($_SESSION['user_id']) && $_SESSION['role'] != 'wisatawan'): ?>
                                    <span class="btn-book-disabled">
                                        <i class="fas fa-lock"></i> Login Wisatawan
                                    </span>
                                <?php else: ?>
                                    <a href="?page=login" class="btn-book-outline">
                                        Login <i class="fas fa-arrow-right"></i>
                                    </a>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
            
            <div class="kapal-footer-actions" data-aos="fade-up">
                <?php if(($totalKapal ?? 0) > 6): ?>
                    <p>Menampilkan <strong><?= count($kapalList) ?></strong> dari <strong><?= $totalKapal ?? 0 ?></strong> kapal tersedia</p>
                <?php endif; ?>
                <?php if(isset($_SESSION['user_id']) && $_SESSION['role'] == 'wisatawan'): ?>
                    <a href="?page=wisatawan&action=booking" class="btn-view-all">
                        Lihat Semua Kapal <i class="fas fa-arrow-right"></i>
                    </a>
                <?php else: ?>
                    <a href="?page=login" class="btn-view-all">
                        Login untuk Lihat Semua <i class="fas fa-arrow-right"></i>
                    </a>
                <?php endif; ?>
            </div>
        <?php endif; ?>
    </section>

    <!-- ========================================== -->
    <!-- CTA BANNER -->
    <!-- ========================================== -->
    <section class="cta-banner-section" data-aos="fade-up" data-aos-offset="100">
        <div class="cta-banner">
            <div class="cta-decoration">
                <div class="cta-circle cta-circle-1"></div>
                <div class="cta-circle cta-circle-2"></div>
                <div class="cta-circle cta-circle-3"></div>
            </div>
            <div class="cta-content">
                <span class="cta-badge"> MULAI SEKARANG</span>
                <h2>Siap Berpetualang di <br><span>Danau Toba?</span></h2>
                <p>Temukan kapal wisata terbaik dan nikmati keindahan Danau Toba bersama kami</p>
                <?php if(!isset($_SESSION['user_id'])): ?>
                    <a href="?page=register" class="btn-cta">
                        Daftar Sekarang <i class="fas fa-arrow-right"></i>
                    </a>
                <?php else: ?>
                    <a href="?page=wisatawan&action=booking" class="btn-cta">
                        Cari Kapal <i class="fas fa-arrow-right"></i>
                    </a>
                <?php endif; ?>
            </div>
        </div>
    </section>

    <!-- ========================================== -->
    <!-- FOOTER INFO -->
    <!-- ========================================== -->
    <footer class="footer-section">
        <div class="footer-grid">
            <div class="footer-col">
                <h3>⛵ KapalWisata</h3>
                <p>Platform pemesanan kapal wisata di Danau Toba. Mudah, cepat, dan terpercaya.</p>
                <div class="footer-social">
                    <a href="#"><i class="fab fa-facebook"></i></a>
                    <a href="#"><i class="fab fa-instagram"></i></a>
                    <a href="#"><i class="fab fa-youtube"></i></a>
                    <a href="#"><i class="fab fa-tiktok"></i></a>
                </div>
            </div>
            <div class="footer-col">
                <h4>Menu</h4>
                <ul>
                    <li><a href="#home">Beranda</a></li>
                    <li><a href="#kapal">Kapal</a></li>
                    <li><a href="?page=tentang">Tentang</a></li>
                    <li><a href="?page=cara-booking">Cara Booking</a></li>
                </ul>
            </div>
            <div class="footer-col">
                <h4>Untuk Anda</h4>
                <ul>
                    <li><a href="?page=login">Login</a></li>
                    <li><a href="?page=register">Daftar</a></li>
                    <?php if(isset($_SESSION['user_id']) && $_SESSION['role'] == 'wisatawan'): ?>
                        <li><a href="?page=wisatawan&action=dashboard">Dashboard</a></li>
                    <?php endif; ?>
                </ul>
            </div>
            <div class="footer-col">
                <h4>Kontak</h4>
                <ul>
                    <li><i class="fas fa-phone"></i> 0821-6431-4025</li>
                    <li><i class="fas fa-envelope"></i> info@kapalwisata.com</li>
                    <li><i class="fas fa-map-marker-alt"></i> Danau Toba, Sumatera Utara</li>
                </ul>
            </div>
    </footer>

</div>

<!-- ============================================ -->
<!-- CSS LENGKAP -->
<!-- ============================================ -->
<style>
/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary: #0f3b5e;
    --primary-light: #1a5a8a;
    --primary-dark: #0a2647;
    --secondary: #fbbf24;
    --secondary-light: #fcd34d;
    --success: #22c55e;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

.home-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ============================================
   HERO SECTION - DENGAN BACKGROUND DANAU
   ============================================ */
.hero-section {
    position: relative;
    min-height: 550px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 4rem;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
}

/* Background Image */
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: 0;
    animation: zoomIn 20s ease-in-out infinite alternate;
    transform: scale(1.1);
}

@keyframes zoomIn {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Overlay Gelap */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(10, 22, 40, 0.75) 0%,
        rgba(10, 22, 40, 0.4) 50%,
        rgba(10, 22, 40, 0.6) 100%
    );
    z-index: 1;
}

/* Efek Gelombang Air */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wave path {
    animation: waveMove 6s ease-in-out infinite;
}

.wave path:nth-child(1) { animation-duration: 6s; }
.wave path:nth-child(2) { animation-duration: 8s; animation-delay: -2s; }
.wave path:nth-child(3) { animation-duration: 10s; animation-delay: -4s; }

@keyframes waveMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-30px); }
}

/* ============================================
   HERO CONTENT - DENGAN PADDING YANG BENAR
   ============================================ */
.hero-content {
    position: relative;
    z-index: 3;
    padding: 3rem 3rem 3rem 6rem;  /* 🔥 Jarak dari kiri 6rem (96px) */
    max-width: 700px;
    color: #fff;
}

/* ============================================
   RESPONSIVE - Padding menyesuaikan
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        padding: 2.5rem 2.5rem 2.5rem 4rem;  /* Tablet: 4rem = 64px */
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        border-radius: 14px;
    }
    
    .hero-content {
        padding: 2rem 1.5rem 2rem 2.5rem;  /* Mobile: 2.5rem = 40px */
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .wave-container {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 350px;
        border-radius: 12px;
    }
    
    .hero-content {
        padding: 1.5rem 1rem 1.5rem 1.5rem;  /* Mobile kecil: 1.5rem = 24px */
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-actions .btn-hero-primary,
    .hero-actions .btn-hero-secondary {
        justify-content: center;
        text-align: center;
    }
    
    .wave-container {
        height: 40px;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--secondary);
    padding: 0.3rem 1.2rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    backdrop-filter: blur(4px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.hero-content h1 span {
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

.hero-content h1 span::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), transparent);
    border-radius: 2px;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 480px;
    margin-bottom: 1.8rem;
    line-height: 1.7;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--secondary), #f59e0b);
    color: var(--primary-dark);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-hero-primary:hover::before {
    transform: translateX(0);
}

.btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(251, 191, 36, 0.35);
    color: var(--primary-dark);
    text-decoration: none;
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.85);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1.5px solid rgba(255,255,255,0.2);
    transition: var(--transition);
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    transform: translateY(-3px);
    text-decoration: none;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.hero-stats .stat-item .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
    display: block;
    line-height: 1.2;
}

.hero-stats .stat-item .stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header .section-subtitle {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-light);
    background: var(--gray-100);
    padding: 0.2rem 1rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.section-header h2 span {
    color: var(--primary);
}

.section-header p {
    color: var(--gray-500);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    padding: 2rem 0 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon-wrapper {
    margin-bottom: 1rem;
}

.feature-icon-bg {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.feature-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--gray-100);
    position: absolute;
    bottom: -10px;
    right: 10px;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   KAPAL SECTION
   ============================================ */
.kapal-section {
    padding: 2rem 0 3rem;
}

.kapal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2rem;
}

.kapal-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.kapal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.kapal-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--gray-100);
}

.kapal-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.kapal-card:hover .kapal-card-image img {
    transform: scale(1.08);
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-400);
    background: var(--gray-100);
}

.kapal-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.badge-verified {
    background: rgba(34, 197, 94, 0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-price {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

.kapal-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.kapal-card:hover .kapal-card-overlay {
    opacity: 1;
}

.overlay-btn {
    background: rgba(255,255,255,0.95);
    color: var(--primary-dark);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    transform: scale(0.9);
}

.kapal-card:hover .overlay-btn {
    transform: scale(1);
}

.overlay-btn:hover {
    background: var(--secondary);
    color: var(--primary-dark);
}

.kapal-card-body {
    padding: 1.2rem 1.5rem 1.5rem;
}

.kapal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.kapal-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.kapal-rating {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    font-size: 0.7rem;
    color: var(--secondary);
}

.kapal-rating span {
    color: var(--gray-500);
    margin-left: 0.2rem;
    font-weight: 600;
}

.kapal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 0.8rem;
    margin-bottom: 0.6rem;
}

.kapal-detail {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.kapal-detail i {
    color: var(--primary);
    width: 14px;
    font-size: 0.7rem;
}

.kapal-fasilitas {
    font-size: 0.75rem;
    color: var(--gray-500);
    padding: 0.3rem 0.6rem;
    background: var(--gray-50);
    border-radius: 6px;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kapal-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.8rem;
    border-top: 1px solid var(--gray-100);
}

.kapal-pemilik {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.kapal-pemilik i {
    font-size: 1.1rem;
    color: var(--primary);
}

.btn-book {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-book:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(15,59,94,0.3);
    color: #fff;
    text-decoration: none;
}

.btn-book-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1.5px solid var(--gray-200);
    color: var(--gray-600);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-book-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.btn-book-disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--gray-100);
    color: var(--gray-400);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: not-allowed;
}

.kapal-footer-actions {
    text-align: center;
    padding: 1rem 0;
}

.kapal-footer-actions p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.btn-view-all:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(15,59,94,0.25);
    color: #fff;
    text-decoration: none;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-400);
    display: block;
    margin-bottom: 0.5rem;
}

.empty-state h3 {
    color: var(--gray-700);
    margin-bottom: 0.3rem;
}

.empty-state p {
    color: var(--gray-500);
}

/* ============================================
   TESTIMONIAL SECTION
   ============================================ */
.testimonial-section {
    padding: 2rem 0 3rem;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.testimonial-stars {
    color: var(--secondary);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.testimonial-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.testimonial-author h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.testimonial-author span {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner-section {
    padding: 1rem 0 3rem;
}

.cta-banner {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cta-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}

.cta-circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
}

.cta-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -80px;
    left: -40px;
}

.cta-circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cta-banner .cta-content {
    position: relative;
    z-index: 1;
}

.cta-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.2rem 1.2rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.cta-banner h2 {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
}

.cta-banner h2 span {
    color: var(--secondary);
}

.cta-banner p {
    opacity: 0.85;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    font-size: 1.05rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 0.7rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(251, 191, 36, 0.35);
    color: var(--primary-dark);
    text-decoration: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-section {
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.8rem;
}

.footer-col p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.3rem;
}

.footer-col ul li a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-col ul li i {
    color: var(--primary);
    width: 20px;
    font-size: 0.8rem;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stats .stat-item .stat-number {
        font-size: 1.3rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .kapal-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .cta-banner h2 {
        font-size: 1.6rem;
    }
    
    .feature-number {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-actions .btn-hero-primary,
    .hero-actions .btn-hero-secondary {
        justify-content: center;
        text-align: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .kapal-grid {
        grid-template-columns: 1fr;
    }
    
    .kapal-card-image {
        height: 180px;
    }
    
    .kapal-details {
        grid-template-columns: 1fr 1fr;
    }
    
    .kapal-card-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .hero-stats .stat-item {
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .cta-banner {
        padding: 2rem 1.2rem;
    }
    
    .cta-banner h2 {
        font-size: 1.3rem;
    }
    
    .btn-cta {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   AOS ANIMATIONS
   ============================================ */
[data-aos] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-30px);
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}
</style>

<!-- ============================================ -->
<!-- JAVASCRIPT -->
<!-- ============================================ -->
<script>
    // ==============================================
    // AOS INIT
    // ==============================================
    AOS.init({
        once: true,
        duration: 800,
        easing: 'ease-out-cubic'
    });

    // ==============================================
    // COUNTER ANIMATION
    // ==============================================
    document.addEventListener('DOMContentLoaded', function() {
        function animateCounter(element, target, duration = 2000) {
            const startTime = performance.now();
            
            function updateCounter(currentTime) {
                const elapsed = currentTime - startTime;
                const progress = Math.min(elapsed / duration, 1);
                const current = Math.floor(progress * target);
                
                element.textContent = current.toLocaleString('id-ID');
                
                if (progress < 1) {
                    requestAnimationFrame(updateCounter);
                } else {
                    element.textContent = target.toLocaleString('id-ID');
                }
            }
            
            requestAnimationFrame(updateCounter);
        }

        const counterObserver = new IntersectionObserver(function(entries) {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    const target = parseInt(entry.target.getAttribute('data-count'), 10);
                    if (target && target > 0) {
                        animateCounter(entry.target, target);
                        counterObserver.unobserve(entry.target);
                    }
                }
            });
        }, { threshold: 0.5 });

        document.querySelectorAll('.stat-number[data-count]').forEach(el => {
            const target = parseInt(el.getAttribute('data-count'), 10);
            if (target && target > 0) {
                counterObserver.observe(el);
            }
        });

        console.log(' Home page loaded');
    });
</script>

<?php include __DIR__ . '/../layouts/footer.php'; ?>
</body>
</html>