/*
    Hero Section - Fixed and improved with pseudo-element
*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: 'Inter', sans-serif;
    color: rgb(0, 0, 0);
}

        
/* Doctor Section */
.doctors-section {
    padding: 60px 5%; /* Use percentage for better responsiveness */
    background-color: #F4F1E7;
    background: url('https://www.transparenttextures.com/patterns/subtle-white-feathers.png');
}

.doctor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* Gap kam kiya */
    justify-items: center;
    max-width: 1000px; /* Grid ki max-width set ki */
    margin: 0 auto; /* Grid ko center kiya */
}

.doctor-card {
    position: relative;
    background-color: #fff;
    border: 2px solid #AF5A3D;
    border-radius: 8px;
    overflow: hidden;
    width: 100%; 
    max-width: 300px; /* Restore original card size */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Softer shadow */
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* NEW ANIMATION: Initial state */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* This class will be added by JavaScript to trigger the new animation */
.card-visible {
    opacity: 1;
    transform: scale(1);
}


.doctor-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 250px; 
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; /* No rounded corners */
}

/* Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.appointment-hover-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: #BB6B52;
    font-size: 14px;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    color: #fff !important;
    overflow: hidden;
}
.appointment-hover-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    background-color: #F3F1E6;
    z-index: -1;
    transition: width 0.5s ease, left 0.5s ease;
}

.appointment-hover-btn::after {
    display: none;
}

.appointment-hover-btn:hover::before {
    width: 100%;
    left: 0;
}

.appointment-hover-btn:hover {
    color: #fff !important;
}

.doctor-card:hover .image-overlay {
    opacity: 0.5;
}

.doctor-card:hover .appointment-hover-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* Bottom info */
.doctor-info {
    padding: 20px 10px;
    text-align: center;
}

.speciality {
    font-size: 14px;
    color: #BB6B52;
    margin-bottom: 5px;
}

.doctor-info h3 {
    font-size: 16px;
    margin: 0;
}

.doctor-info h3 a {
    color: #333;
    text-decoration: none;
}

.doctor-info h3 a:hover {
    color: #BB6B52;
}


/* --- RESPONSIVE ADJUSTMENTS --- */

/* For Tablets */
@media (max-width: 1024px) {
    .doctor-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 650px; /* Adjust max-width for tablet */
    }
}

/* Mobile View */
@media (max-width: 612px) {
  .page-hero {
    top: 40px;
    margin-bottom: 30px;
  }
    .doctor-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .doctor-card {
        max-width: 100%; /* Ensure card fills the grid column on mobile */
    }
    .image-wrapper {
        height: 180px; 
    }
    .doctor-info h3 {
        font-size: 14px;
    }
    .speciality {
        font-size: 12px;
    }
    .appointment-hover-btn {
        padding: 10px 22px;
        font-size: 12px;
        white-space: nowrap;
    }
}

