/**
 * Custom Styles for Dr. Murat Toktamışoğlu Medical Aesthetic Website
 * Enhancements beyond Tailwind CSS
 */

/* ========================================
   ANIMATIONS & KEYFRAMES
   ======================================== */

/* Pulse animation for WhatsApp button */
@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   WHATSAPP BUTTON ENHANCEMENTS
   ======================================== */

.whatsapp-float {
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
    animation: none;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   MOBILE MENU ENHANCEMENTS
   ======================================== */

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

#mobile-menu.show {
    max-height: 500px;
    opacity: 1;
}

/* Mobile menu backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 40;
}

.mobile-menu-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   FORM ENHANCEMENTS
   ======================================== */

/* Better focus states for forms */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Mobile form optimization */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 16px;
    }

    button {
        min-height: 48px; /* Better touch target */
    }
}

/* ========================================
   CARD HOVER EFFECTS
   ======================================== */

.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(5, 150, 105, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

/* ========================================
   IMAGE EFFECTS
   ======================================== */

.doctor-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.doctor-image-wrapper img {
    transition: transform 0.5s ease;
}

.doctor-image-wrapper:hover img {
    transform: scale(1.05);
}

/* ========================================
   BUTTON ENHANCEMENTS
   ======================================== */

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* ========================================
   STATISTICS COUNTER
   ======================================== */

.counter {
    font-variant-numeric: tabular-nums;
}

/* ========================================
   TESTIMONIAL CARDS
   ======================================== */

.testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    border-color: #1e40af;
    box-shadow: 0 10px 30px -10px rgba(30, 64, 175, 0.2);
}

/* ========================================
   CUSTOM SCROLLBAR (Desktop)
   ======================================== */

@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 10px;
    }

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

    ::-webkit-scrollbar-thumb {
        background: #1e40af;
        border-radius: 5px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #1e3a8a;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .whatsapp-float,
    .mobile-action-bar,
    header,
    footer {
        display: none !important;
    }
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

/* Better spacing on mobile */
@media (max-width: 640px) {
    .container-mobile {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   TRUST BADGES
   ======================================== */

.trust-badge {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    border-color: #059669;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.2);
}

/* ========================================
   GRADIENT TEXT
   ======================================== */

.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   SOCIAL PROOF ELEMENTS
   ======================================== */

.social-proof {
    animation: fadeIn 0.5s ease-in;
}

.rating-stars {
    color: #fbbf24;
}

/* ========================================
   HEADER ENHANCEMENTS
   ======================================== */

header {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* ========================================
   HERO GRADIENT ENHANCEMENT
   ======================================== */

.hero-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU acceleration for animations */
.gpu-accelerate {
    transform: translateZ(0);
    will-change: transform;
}

/* Lazy load images placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

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