/* ==========================================================================
   Doctors Page Styles
   ========================================================================== */

/* Hero Section */
.doctors-hero {
    background: linear-gradient(135deg, #E31E24 0%, #C41E24 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.doctors-hero::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"><path d="M50 0 L100 50 L50 100 L0 50 Z" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
}

.doctors-hero .container {
    position: relative;
    z-index: 1;
}

.doctors-hero .page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doctors-hero .page-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Section */
.doctors-filter-section {
    background: #f0f4f8;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-container {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-search {
    flex: 2;
    display: flex;
    gap: 10px;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    background: white;
    transition: all 0.3s ease;
    color: #333;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #E31E24;
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1);
}

.filter-input::placeholder {
    color: #999;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.search-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, #1a2b4a 0%, #0d1829 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0d1829 0%, #1a2b4a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 43, 74, 0.3);
}

/* Doctors Grid Section */
.doctors-grid-section {
    padding: 60px 0;
    background: #ffffff;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Doctor Card */
.doctor-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.doctor-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 125%;
    /* 4:5 aspect ratio for portrait */
    overflow: hidden;
}

.doctor-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.doctor-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to top,
            rgba(227, 30, 36, 0.85) 0%,
            rgba(227, 30, 36, 0.6) 40%,
            transparent 100%);
    transition: all 0.4s ease;
    pointer-events: none;
}

.doctor-card:hover .doctor-overlay {
    height: 100%;
    background: linear-gradient(to top,
            rgba(227, 30, 36, 0.75) 0%,
            rgba(227, 30, 36, 0.6) 60%,
            rgba(227, 30, 36, 0.3) 100%);
}

.doctor-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    z-index: 2;
    transition: all 0.4s ease;
}

.doctor-card:hover .doctor-info {
    transform: translateY(-120px);
}

.doctor-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: white;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.doctor-specialization {
    font-size: 0.9rem;
    margin-bottom: 4px;
    opacity: 0.95;
    font-weight: 500;
    line-height: 1.4;
}

.doctor-department {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 400;
}

/* Doctor Action Buttons */
.doctor-actions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.doctor-card:hover .doctor-actions {
    opacity: 1;
    transform: translateY(0);
}

.doctor-btn {
    display: block;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.btn-profile {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.btn-profile:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-appointment {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.btn-appointment:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
    color: white;
}

/* No Doctors Message */
.no-doctors {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-doctors p {
    font-size: 1.2rem;
    color: #666;
}

/* Pagination */
.doctors-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.pagination-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #E31E24;
    color: #E31E24;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    background: #E31E24;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.current-page {
    color: #E31E24;
    font-weight: 700;
}

/* Results Info */
.results-info {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 0.95rem;
}

#results-count,
#total-count {
    font-weight: 700;
    color: #E31E24;
}

/* Loading State */
.doctors-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.doctors-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E31E24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doctor-card {
    animation: fadeInUp 0.6s ease-out;
}

.doctor-card:nth-child(1) {
    animation-delay: 0.05s;
}

.doctor-card:nth-child(2) {
    animation-delay: 0.1s;
}

.doctor-card:nth-child(3) {
    animation-delay: 0.15s;
}

.doctor-card:nth-child(4) {
    animation-delay: 0.2s;
}

.doctor-card:nth-child(5) {
    animation-delay: 0.25s;
}

.doctor-card:nth-child(6) {
    animation-delay: 0.3s;
}

.doctor-card:nth-child(7) {
    animation-delay: 0.35s;
}

.doctor-card:nth-child(8) {
    animation-delay: 0.4s;
}

.doctor-card:nth-child(9) {
    animation-delay: 0.45s;
}

.doctor-card:nth-child(10) {
    animation-delay: 0.5s;
}

.doctor-card:nth-child(11) {
    animation-delay: 0.55s;
}

.doctor-card:nth-child(12) {
    animation-delay: 0.6s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .doctors-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .doctors-hero .page-title {
        font-size: 2rem;
    }

    .doctors-hero .page-subtitle {
        font-size: 1rem;
    }

    .filter-container {
        flex-direction: column;
    }

    .filter-group,
    .filter-search {
        width: 100%;
        min-width: 100%;
    }

    .doctors-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .doctor-name {
        font-size: 1rem;
    }

    .doctor-specialization {
        font-size: 0.8rem;
    }

    .doctor-info {
        padding: 15px;
    }

    .doctor-card:hover .doctor-info {
        transform: translateY(-110px);
    }

    .doctor-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .doctors-grid {
        grid-template-columns: 1fr;
    }

    .doctor-card:hover .doctor-info {
        transform: translateY(-100px);
    }
}