/*
 * Pelita Ilmu Fisiatris - Frontend Custom Styles
 * Modern Medical Theme with Tailwind CSS
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Tailwind Base */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* CSS Variables for Theme - Masjid As-Syifa Theme (Hijau Toska Soft) */
:root {
    /* Primary Colors - Hijau Toska Soft (Tema Masjid) */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;

    /* Secondary Colors - Hijau Mint (Aksen Islami) */
    --secondary-50: #f0fdf4;
    --secondary-100: #dcfce7;
    --secondary-200: #bbf7d0;
    --secondary-300: #86efac;
    --secondary-400: #4ade80;
    --secondary-500: #22c55e;
    --secondary-600: #16a34a;
    --secondary-700: #15803d;
    --secondary-800: #166534;
    --secondary-900: #14532d;

    /* Accent Colors */
    --accent-teal: #14b8a6;
    --accent-gold: #f59e0b;
    --accent-emerald: #10b981;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Spacing */
    --container-max-width: 1280px;
    --section-padding: 5rem;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-400));
    color: white;
    box-shadow: 0 2px 8px 0 rgba(13, 71, 161, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-500));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px 0 rgba(13, 71, 161, 0.35);
}

.btn-outline {
    background: white;
    color: var(--primary-600);
    border: 2px solid var(--primary-300);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
}

.btn-white {
    background: white;
    color: var(--primary-600);
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15);
}

/* Cards */
.card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-gradient {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-600), var(--secondary-600));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-600);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-600);
}

.nav-link.active::after {
    width: 80%;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2000;
    padding: 2rem 1.5rem;
}

.mobile-menu.active {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 5rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 50%, #ecfdf5 100%);
    z-index: -1;
}

/* Animated Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: blob 12s infinite;
}

.blob-1 {
    top: 10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--primary-300);
}

.blob-2 {
    top: 40%;
    right: 10%;
    width: 350px;
    height: 350px;
    background: var(--secondary-300);
    animation-delay: 4s;
}

.blob-3 {
    bottom: 10%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: #a78bfa;
    animation-delay: 8s;
}

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 30px) scale(0.9);
    }
    75% {
        transform: translate(40px, 40px) scale(1.05);
    }
}

/* Floating Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

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

/* Section Styles */
.section {
    padding: var(--section-padding) 0;
}

.section-light {
    background: var(--gray-50);
}

.section-gradient {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

/* Stats Counter */
.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Service Cards */
.service-card {
    position: relative;
    padding: 2rem;
    border-radius: 1rem;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    color: white;
    font-size: 2rem;
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Image Hover Effects */
.img-hover-scale {
    overflow: hidden;
    border-radius: 1rem;
}

.img-hover-scale img {
    transition: transform 0.4s ease;
}

.img-hover-scale:hover img {
    transform: scale(1.1);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-700);
}

/* Loading Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
}

/* Testimonial Card */
.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    color: var(--primary-200);
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
    background: var(--gray-900);
    color: var(--gray-300);
}

footer a {
    color: var(--gray-400);
    transition: color 0.3s ease;
    text-decoration: none;
}

footer a:hover {
    color: white;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

.shadow-smooth {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --section-padding: 3rem;
    }

    .hero {
        min-height: 80vh;
        padding-top: 4rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .blob {
        width: 200px !important;
        height: 200px !important;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--secondary-700));
}
