/* 
==============================================
PADRE FAMILY MEDICINE CLINIC - MODERN ENHANCEMENTS
==============================================
*/

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern Box Shadows & Depth */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

/* Card Hover Effects */
.feature-item, 
.service-item,
.team-item {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-item:hover,
.service-item:hover,
.team-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

/* Modern Button Styles */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Improved Typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Smooth Fade-in Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Image Optimization */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Modern Form Inputs */
.form-control {
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.form-control:focus {
    border-color: #223a66;
    box-shadow: 0 0 0 3px rgba(34, 58, 102, 0.1);
    transform: translateY(-2px);
}

/* Improved Footer */
footer {
    background: linear-gradient(135deg, #1e3a5f 0%, #223a66 100%);
}

footer .footer-socials li a {
    transition: all 0.3s ease;
    display: inline-block;
}

footer .footer-socials li a:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Loading State */
.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: 3px solid #f3f3f3;
    border-top: 3px solid #223a66;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Improved Testimonials */
.testimonial-block {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.testimonial-block:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Modern Badge Styles */
.badge {
    font-weight: 600;
    padding: 0.5em 0.8em;
    border-radius: 20px;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    h1, .h1 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
}

/* Accessibility Improvements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(34, 58, 102, 0.5);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #223a66;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

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

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .footer-socials {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Improved Header Top Bar */
.header-top-bar {
    background: linear-gradient(135deg, #223a66 0%, #2a4570 100%);
    transition: all 0.3s ease;
}

.header-top-bar a {
    transition: all 0.3s ease;
}

.header-top-bar a:hover {
    opacity: 0.8;
    transform: translateX(3px);
}

/* Better Spacing */
.section-title {
    margin-bottom: 3rem;
}

.divider {
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, #e12454 0%, #223a66 100%);
    border-radius: 3px;
}

/* Icon Improvements */
.feature-icon i,
.icofont {
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon i {
    transform: scale(1.1) rotate(5deg);
}

/* Counter Animation Support */
.counter-stat {
    transition: all 0.3s ease;
}

.counter-stat:hover {
    transform: scale(1.05);
}

/* Client Logo Hover */
.client-thumb {
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.7;
}

.client-thumb:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Improved CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 58, 102, 0.95) 0%, rgba(225, 36, 84, 0.95) 100%);
    z-index: 0;
}

.cta {
    position: relative;
    z-index: 1;
}

/* Service Card Improvements */
.service-item {
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

/* Department Links */
.department-block {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.department-block:hover {
    background: #f8f9fa;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Mobile Menu Improvements */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
}

/* Better Focus Indicators for Keyboard Navigation */
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid #223a66;
    outline-offset: 2px;
}

/* Smooth Page Transitions */
body {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

body.loading {
    opacity: 0;
}
