/* Custom CSS for Valentia Road Medical Centre */

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Hero section enhancements */
.hero-image {
    transition: transform 0.3s ease-out;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Contact cards animation */
.contact-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.contact-card:hover::before {
    left: 100%;
}

/* Prescription section enhancements */
.prescription-card {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Button enhancements */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

/* Doctor section image effects */
.doctor-image-container {
    position: relative;
}

.doctor-image-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, #2563eb, #06b6d4);
    border-radius: 24px;
    opacity: 0.1;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

/* Opening hours visual enhancements */
.hours-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.hours-card:hover {
    border-left-color: #2563eb;
    transform: translateX(8px);
}

/* Mobile-specific animations */
@media (max-width: 768px) {
    .mobile-fade-in {
        animation: fadeIn 0.6s ease-out;
    }
    
    .mobile-slide-up {
        animation: slideUp 0.5s ease-out;
    }
    
    /* Touch-friendly hover effects */
    .touch-card {
        transition: all 0.2s ease;
    }
    
    .touch-card:active {
        transform: scale(0.98);
    }
}

/* Desktop-specific enhancements */
@media (min-width: 769px) {
    /* Parallax effect for hero */
    .parallax-bg {
        transform: translateZ(0);
        will-change: transform;
    }
    
    /* Advanced hover effects */
    .desktop-hover {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .desktop-hover:hover {
        transform: translateY(-12px) scale(1.02);
    }
}

/* Loading animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Intersection Observer animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom focus styles for accessibility */
.focus-ring:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-medical-blue {
        background-color: #1e40af !important;
    }
    
    .text-medical-blue {
        color: #1e40af !important;
    }
}

/* Reduced motion support */
@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 {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-medical-blue,
    .bg-medical-cyan {
        background: white !important;
        color: black !important;
    }
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur-strong {
    backdrop-filter: blur(20px);
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern card styles */
.modern-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Responsive typography */
.responsive-text {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.responsive-heading {
    font-size: clamp(2rem, 5vw, 4rem);
}

/* Custom grid layouts */
.auto-fit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Smooth transitions for all interactive elements */
button,
a,
input,
textarea,
select {
    transition: all 0.2s ease;
}

/* Custom selection colors */
::selection {
    background-color: #2563eb;
    color: white;
}

::-moz-selection {
    background-color: #2563eb;
    color: white;
}

/* Enhanced Language Selector Glass Effects */
#languageBtn {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#languageBtn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px) !important;
}

#languageDropdown {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

.language-option:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    backdrop-filter: blur(10px) !important;
}

/* Enhanced Contact Cards Glass Effects */
#contact .bg-white {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#contact .bg-white:hover {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-4px) scale(1.02) !important;
}

/* Enhanced Prescription Section Glass Effects */
#prescriptions .bg-white\/10 {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1) !important;
}

/* Modern Minimalist Enhancements */
.modern-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.crystal-effect {
    position: relative;
    overflow: hidden;
}

.crystal-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.crystal-effect:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Enhanced Scroll to Top Button */
#scrollToTop {
    background: rgba(37, 99, 235, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#scrollToTop:hover {
    background: rgba(6, 182, 212, 0.9) !important;
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.4) !important;
    transform: translateY(-2px) scale(1.1) !important;
}

/* Fluid Crystal Background Effects */
.fluid-bg {
    position: relative;
    overflow: hidden;
}

.fluid-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.05) 0%, 
        rgba(6, 182, 212, 0.05) 25%, 
        rgba(16, 185, 129, 0.05) 50%, 
        rgba(37, 99, 235, 0.05) 75%, 
        rgba(6, 182, 212, 0.05) 100%);
    background-size: 400% 400%;
    animation: fluidGradient 15s ease infinite;
    z-index: -1;
}

@keyframes fluidGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Enhanced Mobile Touch Effects */
@media (max-width: 768px) {
    .touch-glass {
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .touch-glass:active {
        background: rgba(255, 255, 255, 0.95) !important;
        transform: scale(0.98) !important;
    }
}

/* 3D Pill Header Enhancement */
header .bg-white\/90 {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

header:hover .bg-white\/90 {
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px) !important;
}

/* Enhanced Logo Visibility */
header .font-logo {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    font-weight: 700 !important;
}

header .text-medical-cyan {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    font-weight: 600 !important;
}

/* Enhanced Navigation Links */
header nav a {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.75rem !important;
    transition: all 0.3s ease !important;
}

header nav a:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    transform: translateY(-1px) !important;
}

/* Mobile Header Adjustments */
@media (max-width: 1024px) {
    header .bg-white\/90 {
        margin: 0 0.5rem !important;
    }
}

@media (max-width: 768px) {
    header .bg-white\/90 {
        margin: 0 0.25rem !important;
        padding: 0 1rem !important;
    }
    
    header .font-logo {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
    }
}

/* Compact Mobile Contact Cards */
@media (max-width: 640px) {
    #contact .grid {
        gap: 0.5rem !important;
    }
    
    #contact .bg-white\/80 {
        padding: 0.5rem !important;
        min-height: 50px !important;
        border-radius: 0.75rem !important;
    }
    
    #contact .bg-white\/80 a {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
        text-align: center !important;
        display: block !important;
        word-break: break-all !important;
    }
    
    #contact .bg-white\/80:hover {
        transform: translateY(-1px) scale(1.01) !important;
    }
}

/* Very Small Mobile Screens */
@media (max-width: 480px) {
    #contact .grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.375rem !important;
    }
    
    #contact .bg-white\/80 {
        padding: 0.375rem !important;
        min-height: 45px !important;
    }
    
    #contact .bg-white\/80 a {
        font-size: 0.65rem !important;
    }
}
