@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Tailwind Base - will be loaded via CDN */
/* This file contains custom component styles */

/* ========================================
   Base Styles
   ======================================== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
    width: 100% !important;
}

body {
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Quicksand', 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ========================================
   Custom Utility Classes
   ======================================== */
.container-custom {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ========================================
   Component Styles
   ======================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background-color: white;
    color: #1d4ed8;
    border: 2px solid #eff6ff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background-color: #eff6ff;
    border-color: #dbeafe;
    transform: translateY(-1px);
}

.btn-accent {
    background-color: #eab308;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.btn-accent:hover {
    background-color: #ca8a04;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(234, 179, 8, 0.4);
}

/* Cards */
.card {
    background-color: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover,
.card-lift:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
    border-color: #e2e8f0;
}

/* Dark mode card */
.dark .card {
    background-color: #1e293b;
    border: 1px solid #334155;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.dark .form-input {
    background-color: #1e293b;
    border-color: #475569;
    color: white;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.dark .form-label {
    color: #d1d5db;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07);
    transition: all 0.3s;
}

.dark .navbar {
    background-color: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid #1e293b;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.75rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.nav-link.active {
    color: #2563eb;
    background-color: #dbeafe;
}

.dark .nav-link {
    color: #94a3b8;
}

.dark .nav-link:hover {
    color: #60a5fa;
    background-color: rgba(30, 58, 138, 0.5);
}

.dark .nav-link.active {
    color: #60a5fa;
    background-color: rgba(37, 99, 235, 0.2);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #0f172a 100%);
    overflow: hidden;
}

/* Section */
.section {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .section {
        padding: 7rem 0;
    }
}

/* Icon Box */
.icon-box {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

/* Stats */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3rem;
    }
}

.dark .stat-number {
    color: #60a5fa;
}

.stat-label {
    color: #64748b;
    margin-top: 0.5rem;
    font-weight: 500;
}

.dark .stat-label {
    color: #94a3b8;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.dark .badge-primary {
    background-color: rgba(30, 58, 138, 0.5);
    color: #93c5fd;
}

.badge-accent {
    background-color: #fef3c7;
    color: #92400e;
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 4rem 0;
}

.footer-link {
    transition: color 0.2s;
}

.footer-link:hover {
    color: #60a5fa;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 20rem;
    max-width: 100%;
    z-index: 50;
    background-color: white;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

.dark .mobile-menu {
    background-color: #0f172a;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* ========================================
   Loading Skeleton
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   Lazy Loading Images
   ======================================== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
    opacity: 1;
}

.img-lazy-wrapper {
    position: relative;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .img-lazy-wrapper {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
}

.img-lazy-wrapper img {
    position: relative;
    z-index: 1;
}

/* ========================================
   Focus States for Accessibility
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ========================================
   Unique Design System - SMP Baturetno
   ======================================== */

/* Container with Blue Glow Effect */
.container-glow {
    position: relative;
    background: white;
    border-radius: 30px;
    box-shadow:
        0 0 80px -20px rgba(59, 130, 246, 0.3),
        0 25px 50px -12px rgba(0, 0, 0, 0.1),
        inset 0 0 60px -30px rgba(59, 130, 246, 0.1);
}

.dark .container-glow {
    background: #1e293b;
    box-shadow:
        0 0 80px -20px rgba(96, 165, 250, 0.2),
        0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

/* Pill-shaped elements */
.pill-shape {
    border-radius: 9999px;
}

/* Extra rounded corners */
.rounded-2xl-plus {
    border-radius: 24px;
}

.rounded-3xl-plus {
    border-radius: 32px;
}

.rounded-4xl {
    border-radius: 40px;
}

/* Gradient Stat Cards */
.stat-card-gradient {
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.stat-card-gradient:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient variations for stat cards */
.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.gradient-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.gradient-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Floating Search Bar */
.floating-search {
    position: relative;
    background: white;
    border-radius: 9999px;
    box-shadow:
        0 20px 40px -15px rgba(0, 0, 0, 0.15),
        0 0 40px -10px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.floating-search input {
    flex: 1;
    min-width: 0;
}

.floating-search button {
    flex-shrink: 0;
}

.floating-search:focus-within {
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.2),
        0 0 60px -10px rgba(59, 130, 246, 0.4);
    transform: scale(1.02);
}

/* Hero 3-Column Layout */
.hero-grid {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) 260px !important;
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}

@media (max-width: 1279px) {
    .hero-grid {
        grid-template-columns: 220px minmax(0, 1fr) 220px !important;
        gap: 1rem;
    }
}

@media (max-width: 1024px) {
    .hero-grid {
        display: flex !important;
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Service List Item */
.service-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

/* Rounded Image Container */
.rounded-image-container {
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* History Card */
.history-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 100%;
    box-sizing: border-box;
}

/* Enhanced hover glow for cards */
.card-hover-glow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-glow:hover {
    box-shadow:
        0 20px 40px -15px rgba(59, 130, 246, 0.3),
        0 0 30px -5px rgba(59, 130, 246, 0.15);
    transform: translateY(-6px);
}

/* Decorative blob animations */
@keyframes blob {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.animate-blob {
    animation: blob 8s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Pulse glow animation */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 40px -5px rgba(59, 130, 246, 0.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Main content wrapper with glow border */
.main-content-wrapper {
    margin: 0 auto;
    max-width: 1400px;
    position: relative;
}

.main-content-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent, rgba(59, 130, 246, 0.2));
    border-radius: 36px;
    z-index: -1;
    opacity: 0.5;
}