/* ===== CUSTOM STYLES - Doctor Profile Card ===== */

/* === Base Reset & Typography === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes ekgDraw {
    from {
        stroke-dashoffset: 800;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* === Animation Classes === */
.animate-fadeIn {
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* === EKG Line Animation === */
.ekg-line {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: ekgDraw 3s ease-in-out forwards;
    animation-delay: 0.8s;
}

/* === Pulse Icon === */
.pulse-icon {
    animation: pulseGlow 2.5s ease-in-out infinite;
}

/* === Contact Items Staggered Entry === */
.contact-item {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.contact-item:nth-child(1) { animation-delay: 0.3s; }
.contact-item:nth-child(2) { animation-delay: 0.45s; }
.contact-item:nth-child(3) { animation-delay: 0.6s; }
.contact-item:nth-child(4) { animation-delay: 0.75s; }

/* === Specialization Cards Staggered Entry === */
.spec-card {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.spec-card:nth-child(1) { animation-delay: 0.5s; }
.spec-card:nth-child(2) { animation-delay: 0.65s; }
.spec-card:nth-child(3) { animation-delay: 0.8s; }
.spec-card:nth-child(4) { animation-delay: 0.95s; }

/* === Divider Separators between Spec Cards === */
#specializations-grid {
    position: relative;
}

/* === Card Shadow Enhancement === */
#profile-card {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.08),
        0 25px 50px -12px rgba(13, 158, 138, 0.12);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

#profile-card:hover {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 30px 60px -15px rgba(13, 158, 138, 0.18);
    transform: translateY(-2px);
}

/* === Photo Section Hover Effect === */
#photo-section img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#profile-card:hover #photo-section img {
    transform: scale(1.03);
}

/* === Footer Shimmer Effect === */
#card-footer {
    position: relative;
    overflow: hidden;
}

#card-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

/* === Responsive Fine-tuning === */
@media (max-width: 768px) {
    #photo-section {
        max-height: 300px;
    }

    #profile-card:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    #specializations-grid {
        gap: 0.5rem;
    }
}

/* === Print Styles === */
@media print {
    body {
        background: white !important;
        padding: 0 !important;
    }

    #profile-card {
        box-shadow: none !important;
        border: 1px solid #e2e8f0;
        border-radius: 0 !important;
        max-width: 100% !important;
    }

    .animate-fadeIn,
    .animate-fadeInUp,
    .contact-item,
    .spec-card {
        opacity: 1 !important;
        animation: none !important;
    }

    #profile-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}
