/* ============================================
   Portal Ganeca - Landing Page Custom Styles
   Supplements Tailwind CSS with custom animations
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --navy-950: #020617;
    --navy-900: #0A1628;
    --navy-800: #0F1D35;
    --navy-700: #162544;
    --blue-700: #1D4ED8;
    --blue-600: #2563EB;
    --blue-500: #3B82F6;
    --blue-400: #60A5FA;
    --blue-300: #93C5FD;
    --blue-200: #BFDBFE;
    --blue-100: #DBEAFE;
    --blue-50: #EFF6FF;
    --glass-bg: rgba(255,255,255,0.06);
    --glass-border: rgba(255,255,255,0.1);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--navy-900);
    color: #e2e8f0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* --- Animated Background --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 40%, #0c2461 70%, var(--blue-700) 100%);
    overflow: hidden;
    padding-bottom: 5rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 20%, rgba(37,99,235,0.06) 0%, transparent 40%),
                radial-gradient(ellipse at 50% 80%, rgba(96,165,250,0.04) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-2%, -1%) scale(1.05); }
}

/* --- Floating Shapes --- */
.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.07;
    animation: floatShape linear infinite;
}

.shape-1 { width: 300px; height: 300px; background: var(--blue-500); top: 10%; left: -5%; animation-duration: 20s; }
.shape-2 { width: 200px; height: 200px; background: var(--blue-400); top: 60%; right: -3%; animation-duration: 25s; animation-delay: -5s; }
.shape-3 { width: 150px; height: 150px; background: var(--blue-300); top: 30%; right: 20%; animation-duration: 18s; animation-delay: -8s; }
.shape-4 { width: 100px; height: 100px; background: var(--blue-600); bottom: 15%; left: 15%; animation-duration: 22s; animation-delay: -3s; }
.shape-5 { width: 250px; height: 250px; background: var(--blue-400); bottom: 5%; right: 30%; animation-duration: 28s; animation-delay: -10s; }
.shape-6 { width: 80px; height: 80px; background: var(--blue-200); top: 5%; right: 40%; animation-duration: 15s; animation-delay: -2s; }

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(5deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
    75% { transform: translateY(-40px) rotate(7deg); }
}

/* --- Particles --- */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(147, 197, 253, 0.4);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* --- Glassmorphism Card --- */
.glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* --- Search Card --- */
.search-card {
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    z-index: 10;
    position: relative;
}

.search-card .form-label {
    color: var(--blue-200);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.search-card input {
    width: 100%;
    padding: 0.875rem 1.15rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.search-card input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.search-card input:focus {
    border-color: var(--blue-500);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-card input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

/* --- Buttons --- */
.btn-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-glow:hover::before {
    transform: translateX(100%);
}

.btn-glow:active {
    transform: translateY(0);
}

.btn-glow .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-glow.loading .spinner { display: block; }
.btn-glow.loading .btn-text { display: none; }

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

/* --- Navbar --- */
.navbar-ganeca {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    transition: all 0.4s ease;
}

.navbar-ganeca.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 0.75rem 2rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.navbar-logo img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
}

.navbar-logo-text h1 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.navbar-logo-text span {
    font-size: 0.75rem;
    color: var(--blue-300);
    font-weight: 400;
}

/* --- Steps Section --- */
.steps-section {
    background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
    padding: 5rem 1.5rem;
    position: relative;
}

.step-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-5px);
}

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
}

.step-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blue-400);
    background: rgba(59, 130, 246, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.step-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* --- Footer --- */
.footer-ganeca {
    background: var(--navy-950);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3rem 1.5rem 1.5rem;
}

.footer-ganeca a {
    color: var(--blue-400);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-ganeca a:hover {
    color: var(--blue-300);
}

.wa-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #25D366;
    color: #fff !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.wa-button:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* --- Animations --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Error Toast --- */
.error-toast {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 200;
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.3);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-toast.show {
    transform: translateX(0);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: rgba(147, 197, 253, 0.35);
    font-size: 0.7rem;
    animation: bounce 2s infinite;
    pointer-events: none;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding-top: 5rem;
        padding-bottom: 3rem;
    }

    .search-card {
        margin: 0 1.25rem;
        padding: 1.75rem 1.5rem;
        max-width: 400px;
    }
    
    .navbar-ganeca {
        padding: 0.75rem 1rem;
    }
    
    .hero-title { font-size: 1.75rem !important; }
    .hero-subtitle { font-size: 0.95rem !important; }

    .hero-text-container {
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding-top: 4.5rem;
        padding-bottom: 2.5rem;
    }

    .search-card {
        margin: 0 1rem;
        padding: 1.5rem 1.15rem;
        border-radius: 16px;
        max-width: 360px;
    }
    
    .hero-title { font-size: 1.5rem !important; }

    .hero-text-container {
        margin-bottom: 1.25rem !important;
    }
}
