/* ═══════════════════════════════════════════════════════════════
   Star Imaging Center - Main CSS
   Tailwind CSS + Custom Styles
════════════════════════════════════════════════════════════════ */

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #1d4ed8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* ---------- Navbar scroll effect ---------- */
#navbar.scrolled {
    box-shadow: 0 4px 24px rgba(30, 64, 175, 0.12);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
}

/* ---------- Slider animations ---------- */
.slide-element {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s ease forwards;
}

.slide.active .slide-element {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide transitions */
.slide {
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide.inactive {
    opacity: 0;
    z-index: 0;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Hero Pattern ---------- */
.bg-hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Glass card ---------- */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---------- Gradient text ---------- */
.text-gradient {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Gold shimmer ---------- */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* ---------- Float animation ---------- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ---------- Pulse ring ---------- */
@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.3;
    animation: pulseRing 2s ease-out infinite;
}

/* ---------- Slide dot ---------- */
.slide-dot {
    transition: width 0.4s ease, background-color 0.4s ease;
}

.slide-dot.active {
    width: 2rem;
    background: white;
}

.slide-dot:not(.active) {
    background: rgba(255, 255, 255, 0.4);
}

/* ---------- Form focus ring ---------- */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ---------- Service card hover ---------- */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.01);
}

/* ---------- Loading spinner ---------- */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Page transition ---------- */
.page-enter {
    animation: pageEnter 0.5s ease forwards;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Custom selection ---------- */
::selection {
    background-color: #1d4ed8;
    color: white;
}

/* ---------- Print styles ---------- */
@media print {

    nav,
    footer,
    #back-to-top,
    button {
        display: none !important;
    }

    body {
        font-size: 12px;
    }
}

/* ---------- Mobile optimizations ---------- */
@media (max-width: 640px) {
    .font-display {
        letter-spacing: -0.02em;
    }

    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}