/*
 * Custom Styles for Dr. Mohsin Bilal's Website
 */

/* --- Fonts --- */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #555;
    margin: 0;
    padding: 0;
}

/* Ensure full height layouts */
html, body {
    height: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand strong, .section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* --- Global --- */
.section-title {
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    display: block;
    width: 50px;
    height: 3px;
    background: #007bff;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

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

/* --- Section Animations --- */
.animated-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    min-height: 300px; /* or an appropriate value based on your content */
}

.animated-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Animations --- */
.animate-title {
    animation: slideInUp 1s ease-out 0.2s both;
}

.animate-subtitle {
    animation: slideInUp 1s ease-out 0.4s both;
}

.animate-text {
    animation: slideInUp 1s ease-out 0.6s both;
}

.animate-btn {
    animation: slideInUp 1s ease-out 0.8s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Doctor Photo Animation --- */
.doctor-photo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doctor-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* --- About Content Animation --- */
.about-content {
    animation: fadeInLeft 1s ease-out 0.5s both;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Navbar --- */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar .nav-link {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.navbar .btn-primary {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* --- Hero Section --- */
.hero-section {
    /* Fallback solid background */
    background-color: #1d3557;
    /* Primary gradient background */
    background-image: linear-gradient(135deg, rgba(0, 123, 255, 0.8), rgba(29, 53, 87, 0.9));
    height: 100vh;
    min-height: 650px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero background with doctor image and overlay */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(135deg, rgba(0, 123, 255, 0.3), rgba(29, 53, 100, 0.8)),
                      url('/assets/images/ot.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

/* Responsive adjustments for hero */
@media (max-width: 768px) {
    .hero-section {
        height: 100vh;
        min-height: 600px;
    }
    
    .hero-section::before {
        background-attachment: scroll;
    }
    
    .hero-section .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-section .container {
        padding: 0 15px;
    }
}

/* --- Page Header --- */
.page-header {
    background-color: #f8f9fa;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

/* --- Service Cards --- */
.service-card {
    transition: all 0.4s ease-in-out;
    border: 1px solid #eee;
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

.service-card.animate {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.service-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 30px rgba(0,123,255,0.15);
    border-color: #007bff;
}

.service-icon {
    font-size: 3rem;
    color: #007bff;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-icon-intro i {
    color: #007bff;
}

/* Remove problematic loading effect that might hide cards */
/* Card Loading Effect removed to ensure visibility */

/* --- Podcast/Video Cards --- */
.podcast-card {
    transition: all 0.3s ease-in-out;
    border: none;
    overflow: hidden;
}

.podcast-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.podcast-card .embed-responsive {
    background-color: #000;
}

.podcast-card .card-body {
    padding: 1.25rem;
}

.podcast-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.podcast-card .card-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.podcast-card iframe {
    border: 0;
    border-radius: 0;
}

/* YouTube Subscribe Button Styling */
.btn-danger {
    background: linear-gradient(45deg, #ff0000, #cc0000);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #cc0000, #990000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* --- Testimonials --- */
.testimonial-content {
    padding: 2rem 4rem;
    text-align: center;
}

#testimonialCarousel .carousel-indicators li {
    background-color: #007bff;
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.1);
    border-color: #007bff;
}

.testimonial-text {
    font-style: italic;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.testimonial-stars {
    font-size: 1.1rem;
}

.testimonial-stars-small {
    font-size: 0.9rem;
}

.testimonial-mini {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.testimonial-mini:hover {
    background-color: #fff !important;
    border-color: #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.testimonial-cta {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.testimonial-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.testimonial-avatar-small {
    min-width: 30px;
}

.testimonial-content-small {
    flex: 1;
}

/* --- FAQ Accordion --- */
.accordion .card-header {
    background-color: #f8f9fa;
}
.accordion .btn-link {
    color: #333;
    font-weight: bold;
    text-decoration: none;
}
.accordion .btn-link:hover {
    color: #007bff;
}

/* --- Blog Cards --- */
.blog-card {
    transition: all 0.3s ease-in-out;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.blog-card .card-title a {
    color: #333;
    text-decoration: none;
}
.blog-card .card-title a:hover {
    color: #007bff;
}

/* --- Footer --- */
.site-footer {
    font-size: 0.9rem;
}
.footer-link {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-link:hover {
    color: #fff;
    text-decoration: none;
}
.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-right: 10px;
    transition: background-color 0.3s;
}
.social-icon:hover {
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
}

/* --- General Fixes --- */
/* Ensure proper spacing and display for all sections */
section[id] {
  scroll-margin-top: 100px;
}
section {
    position: relative;
}

/* Smooth section transitions */
section {
    transition: background-color 0.3s ease;
}

/* Ensure testimonial CTA doesn't create abrupt jumps */
.testimonial-cta {
    margin: 2rem 0;
    border-radius: 15px !important;
}

/* Fix testimonials section layout to prevent jumping */
#testimonials-intro {
    min-height: auto;
    position: relative;
}

#testimonials-intro .container {
    position: relative;
    z-index: 1;
}

/* Ensure smooth background transitions between sections */
#testimonials-intro + #blog {
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Fix potential image sizing issues */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure cards maintain consistent heights */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Fix contact form styling */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #007bff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Blog Preview Section Styles */
.blog-preview-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    border: none;
}

.blog-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.blog-preview-card .card-img-top {
    border-radius: 15px 15px 0 0;
    transition: transform 0.3s ease;
}

.blog-preview-card:hover .card-img-top {
    transform: scale(1.05);
}

.blog-meta {
    font-size: 0.85rem;
}

.blog-preview-card .card-title a {
    transition: color 0.3s ease;
}

.blog-preview-card .card-title a:hover {
    color: #007bff !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.blog-preview-card .btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
    transform: translateX(3px);
}

/* Blog Listing Page Styles */
.blog-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 80px 0;
}

.blog-post-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.blog-post-featured {
    border-left: 4px solid #007bff;
}

.blog-category-badge {
    background-color: #007bff;
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-read-more {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    color: #0056b3;
    text-decoration: none;
    transform: translateX(3px);
}

/* Individual Blog Post Styles */
.blog-post-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 100px 0 60px;
}

.blog-post-meta {
    background-color: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
    color: #007bff;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-post-content blockquote {
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 10px 10px 0;
}

.social-share {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.social-share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.social-share-btn:hover {
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

.social-share-btn.facebook { background-color: #3b5998; }
.social-share-btn.twitter { background-color: #1da1f2; }
.social-share-btn.linkedin { background-color: #0077b5; }
.social-share-btn.whatsapp { background-color: #25d366; }

.author-bio {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    border-left: 4px solid #007bff;
}

.related-posts .card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.related-posts .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Blog Navigation */
.blog-pagination .page-link {
    border: none;
    color: #007bff;
    font-weight: 500;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.blog-pagination .page-link:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

.blog-pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Blog Search and Filter */
.blog-search {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.blog-filter-btn {
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 25px;
    padding: 8px 20px;
    margin: 5px;
    transition: all 0.3s ease;
}

.blog-filter-btn:hover,
.blog-filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}
/* Ensure proper text readability */
.text-white {
    color: #ffffff !important;
}

/* Fix any potential z-index issues with sticky navbar */
.sticky-top {
    z-index: 1020;
}

/* Ensure smooth transitions don't interfere with functionality */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* ===========================================
   BEAUTIFUL FOOTER STYLES
   =========================================== */

/* Footer Background Gradients */
.footer-beautiful {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    position: relative;
    overflow: hidden;
}

.footer-beautiful::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 20"><polygon fill="%23ffffff" fill-opacity="0.03" points="0,20 100,0 100,20"/></svg>') repeat-x;
    background-size: 100px 20px;
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%) !important;
}

.bg-dark-extra {
    background: linear-gradient(135deg, #0f1419 0%, #1a252f 100%) !important;
}

.bg-danger-dark {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%) !important;
}

/* Footer Typography */
.footer-beautiful h4,
.footer-beautiful h5,
.footer-beautiful h6 {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-heading {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
}

/* Footer Links */
.footer-link {
    color: #adb5bd;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-link:hover {
    color: #007bff;
    text-decoration: none;
    transform: translateX(5px);
}

.footer-link i {
    font-size: 12px;
    transition: all 0.3s ease;
}

.footer-link:hover i {
    color: #007bff;
}

/* Social Media Icons */
.social-icon-beautiful {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon-beautiful:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

/* Specific social media colors on hover */
.social-icon-beautiful:hover .fa-facebook-f {
    background: #3b5998;
}

.social-icon-beautiful:hover .fa-twitter {
    background: #1da1f2;
}

.social-icon-beautiful:hover .fa-linkedin-in {
    background: #0077b5;
}

.social-icon-beautiful:hover .fa-youtube {
    background: #ff0000;
}

/* Contact Information */
.contact-info .contact-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info .contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 30px;
    text-align: center;
}

.contact-icon i {
    font-size: 16px;
}

/* Clinic Hours */
.clinic-hours {
    background-color: #121212; /* Dark background */
    color: white;              /* Default text color */
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clinic-hours * {
    color: white !important;
}

/* Emergency Info */
.emergency-info {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
}

/* Badges */
.badge-outline-light {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.badge-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-links a {
    transition: all 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #007bff !important;
    text-decoration: none;
}

/* Text Colors for Footer */
.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* YouTube Section */
.youtube-section .btn {
    transition: all 0.3s ease;
}

.youtube-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-beautiful .col-lg-4,
    .footer-beautiful .col-lg-3,
    .footer-beautiful .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    .footer-heading {
        text-align: center;
    }
    
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-bottom-links {
        text-align: center !important;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .footer-beautiful {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .social-icon-beautiful {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-right: 8px;
    }
    
    .emergency-info {
        margin-bottom: 20px;
    }
}
