/**
 * Premium Styles for Nabeel & Sana Clinic
 * Professional design with advanced effects
 */

/* Import premium fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* CSS Variables for dental/medical theming */
:root {
    --primary-gradient: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
    --secondary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --dental-blue: #0ea5e9;
    --dental-teal: #14b8a6;
    --dental-green: #10b981;
    --medical-white: #f8fafc;
    --medical-gray: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 8px 32px rgba(20, 184, 166, 0.15);
    --shadow-medium: 0 15px 35px rgba(20, 184, 166, 0.2);
    --shadow-strong: 0 25px 50px rgba(20, 184, 166, 0.3);
    --border-radius: 20px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Custom Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.8); }
}

@keyframes morph {
    0%, 100% { border-radius: 20px; }
    50% { border-radius: 30px; }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 3s ease-in-out infinite 1s;
}

.animate-float-slow {
    animation: float-slow 4s ease-in-out infinite 2s;
}

.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Before/After Slider Styles */
.before-after-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.before-image {
    display: block;
}

.after-image {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.3s ease;
}

.before-after-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.before-after-slider::-webkit-slider-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
}

.before-after-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #3b82f6;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.before-after-slider::-moz-range-track {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    border: none;
}

.before-after-slider::-moz-range-thumb {
    background: #3b82f6;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Testimonial Marquee */
.testimonial-marquee {
    overflow: hidden;
    position: relative;
}

.testimonial-track {
    display: flex;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.testimonial-card {
    transition: transform 0.3s ease;
}

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

/* Premium Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-strong);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Premium Glassmorphism */
.glass-premium {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-soft);
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* Premium Buttons */
.btn-premium {
    position: relative;
    overflow: hidden;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    padding: 12px 32px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-medium);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
    animation: glow 2s infinite;
}

/* Premium Text Effects */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

.text-shimmer {
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2s linear infinite;
}

/* Premium Cards */
.card-premium {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

/* Premium Navigation */
.nav-premium {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

/* Premium Hero Section */
.hero-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

/* Premium Animations */
.animate-premium-float {
    animation: float 4s ease-in-out infinite;
}

.animate-premium-glow {
    animation: glow 3s ease-in-out infinite;
}

.animate-premium-morph {
    animation: morph 6s ease-in-out infinite;
}

/* Premium Typography */
.font-display {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

.font-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* Premium Spacing */
.space-premium > * + * {
    margin-top: 2rem;
}

/* Premium Shadows */
.shadow-premium {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.shadow-premium-lg {
    box-shadow: 0 35px 60px rgba(0, 0, 0, 0.2);
}

/* Premium Borders */
.border-premium {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
}

/* Premium Backgrounds */
.bg-premium-gradient {
    background: var(--primary-gradient);
}

.bg-premium-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Doctor Cards */
.doctor-card {
    transition: all 0.3s ease;
}

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

/* FAQ Accordion */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: #f8fafc;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 200px;
}

.faq-question svg {
    transition: transform 0.3s ease;
}

.faq-question.active svg {
    transform: rotate(180deg);
}

/* Form Styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button Hover Effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Range Slider */
.slider {
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 50%, #e5e7eb 50%, #e5e7eb 100%);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ============================================
   MOBILE RESPONSIVE - Full site
   ============================================ */

/* Prevent horizontal scroll (see Smooth Scrolling section for html) */
body {
    overflow-x: hidden;
    min-width: 0;
}

/* Ensure containers don't cause horizontal scroll on small screens */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Touch-friendly minimum tap targets (44px) for key controls */
@media (max-width: 1024px) {
    button:not([type="range"]),
    .nav-link-mobile,
    .nav-link,
    .btn-primary,
    a.bg-gradient-to-r,
    a.bg-clinic-blue {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link-mobile,
    .nav-link {
        min-width: auto;
    }
}

/* Tablet and below */
@media (max-width: 768px) {
    .testimonial-track {
        animation-duration: 20s;
    }
    
    .testimonial-card {
        width: min(85vw, 320px) !important;
        min-width: 280px;
    }
    
    .service-card:hover {
        transform: translateY(-4px);
    }
    
    .doctor-card:hover {
        transform: translateY(-2px);
    }
    
    /* Section padding */
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .card-premium,
    .glass-card {
        padding: 1.25rem;
    }
    
    /* FAQ answer expand for long content on mobile */
    .faq-answer.active {
        max-height: 500px;
    }
}

/* Mobile (small phones) */
@media (max-width: 480px) {
    .testimonial-card {
        width: min(92vw, 320px) !important;
    }
    
    section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Responsive images and media */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Form inputs full width on small screens */
@media (max-width: 640px) {
    input, select, textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-clinic-blue {
        background-color: #1d4ed8 !important;
    }
    
    .text-clinic-blue {
        color: #1d4ed8 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .testimonial-track {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3b82f6;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Custom Utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur-md {
    backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

/* Three.js Canvas Container */
#hero-canvas {
    position: relative;
    overflow: hidden;
}

/* Smooth Scrolling & mobile-friendly base */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Selection Colors */
::selection {
    background-color: #3b82f6;
    color: white;
}

::-moz-selection {
    background-color: #3b82f6;
    color: white;
}
