/* ===========================
   DOCTOR PAGE - doctor-page.css
   Стилі для сторінки лікаря
   Використовує паттерни з team-page.css та service-page.css
   =========================== */

/* ===========================
   DOCTOR HERO (як team-hero)
   =========================== */

.doctor-hero {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(145, 208, 114, 0.2);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-badge svg {
    stroke: var(--primary-color);
}

.doctor-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.doctor-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.doctor-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95) 0%, rgba(44, 62, 80, 0.8) 100%);
}

.doctor-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 80px 0;
}

.doctor-hero-title {
    color: var(--white);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 15px;
}

.doctor-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.doctor-specialties-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.doctor-specialties-inline span {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(145, 208, 114, 0.2);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.doctor-hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.doctor-hero-actions .btn svg {
    flex-shrink: 0;
}

/* ===========================
   DOCTOR PROFILE CARD
   =========================== */

.doctor-profile-card {
    padding: 0 0 80px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.profile-card-wrapper {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
}

.profile-photo {
    background: var(--light-gray);
    min-height: 500px;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.profile-info {
    padding: 50px;
}

.profile-section {
    margin-bottom: 50px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.profile-section h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.profile-section p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.063rem;
}

.profile-section p:last-child {
    margin-bottom: 0;
}

/* ===========================
   EDUCATION TIMELINE
   =========================== */

.education-timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.timeline-point {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.timeline-point .year {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 80px;
    flex-shrink: 0;
}

.timeline-point h4 {
    color: var(--secondary-color);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-point p {
    color: var(--text-light);
    font-size: 0.938rem;
    margin: 0;
}

/* ===========================
   SPECIALIZATION SECTION (компактний)
   =========================== */

.doctor-specialization {
    padding: 60px 0;
    background: var(--light-gray);
}

.specialization-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.spec-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.spec-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7bc05a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
}

.spec-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.spec-card h3 {
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* ===========================
   FACEBOOK POSTS SECTION (як news layout)
   =========================== */

.doctor-facebook {
    padding: 80px 0;
    background: var(--light-gray);
}

.fb-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Featured Post - Facebook Embed (ліворуч) */
.fb-featured-embed {
    position: relative;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.fb-featured-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

/* Old featured post styles (kept for fallback) */
.fb-featured {
    position: relative;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.fb-featured a {
    position: relative;
    z-index: 2;
    display: block;
    height: 100%;
}

.fb-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
    transition: background 0.3s ease;
}

.fb-featured:hover::before {
    background: rgba(0, 0, 0, 0.25);
}

.fb-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.fb-featured:hover img {
    transform: scale(1.08);
}

.fb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top,
            rgba(44, 62, 80, 0.95) 0%,
            rgba(44, 62, 80, 0.7) 50%,
            transparent 100%);
    padding: 50px 40px;
    color: white;
}

.fb-overlay h3 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: white;
    line-height: 1.3;
    font-weight: 700;
}

.fb-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.fb-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.fb-link:hover {
    gap: 12px;
}

.fb-link svg {
    flex-shrink: 0;
}

.post-type-badge {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Для відео - великий Play по центру */
.video-icon {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fb-featured:hover .video-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.video-icon svg {
    width: 32px;
    height: 32px;
}

.video-icon svg path {
    fill: #e74c3c;
}

/* Для фото - маленький значок в куті */
.photo-icon {
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.75);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.photo-icon svg {
    width: 20px;
    height: 20px;
}

/* Post List (праворуч) */
.fb-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
    position: relative;
}

/* Gradient fade at bottom to indicate scroll */
.fb-list::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(249, 249, 249, 1) 0%, rgba(249, 249, 249, 0) 100%);
    pointer-events: none;
    margin-top: -60px;
}

/* Custom scrollbar */
.fb-list::-webkit-scrollbar {
    width: 6px;
}

.fb-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.fb-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.fb-list::-webkit-scrollbar-thumb:hover {
    background: #7ab85f;
}

.fb-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
}

.fb-item:hover {
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.fb-item-image {
    position: relative;
    width: 140px;
    height: 110px;
    overflow: hidden;
    border-radius: 10px;
    flex-shrink: 0;
}

.fb-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fb-item:hover .fb-item-image img {
    transform: scale(1.05);
}


.fb-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fb-item-content h4 {
    color: #2c3e50;
    font-size: 1.063rem;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 700;
}

.fb-item-content p {
    color: #919191;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.fb-item-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1877f2;
    font-size: 0.813rem;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.fb-item:hover .fb-item-link {
    opacity: 1;
}

.fb-item-link svg {
    width: 14px;
    height: 14px;
    stroke: #1877f2;
}

/* ===========================
   MEDIA SECTION (акцент на зображеннях)
   =========================== */

.doctor-media {
    padding: 80px 0;
    background: var(--light-gray);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.media-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

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

.media-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.media-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--light-gray);
}

.media-image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.media-card:hover .media-image img {
    transform: scale(1.1);
}

.media-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(145, 208, 114, 0.4);
}

.media-badge.internal {
    background: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.media-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.media-content h3 {
    color: var(--secondary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.media-excerpt {
    color: var(--text-light);
    font-size: 0.938rem;
    line-height: 1.7;
    margin: 0 0 15px 0;
    flex: 1;
}

.media-date {
    color: #999;
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
    .profile-card-wrapper {
        grid-template-columns: 320px 1fr;
    }

    .profile-info {
        padding: 40px;
    }

    .specialization-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .fb-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .doctor-hero {
        min-height: 400px;
        margin-bottom: 60px;
    }

    .doctor-hero-content {
        padding: 60px 0;
    }

    .doctor-hero-title {
        font-size: 2rem;
    }

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

    .doctor-hero-actions {
        flex-direction: column;
    }

    .doctor-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .doctor-profile-card {
        margin-top: -20px;
    }

    .profile-card-wrapper {
        grid-template-columns: 1fr;
    }

    .profile-photo {
        min-height: 400px;
    }

    .profile-info {
        padding: 30px 25px;
    }

    .profile-section {
        margin-bottom: 35px;
    }

    .profile-section h2 {
        font-size: 1.75rem;
    }

    .profile-section h3 {
        font-size: 1.25rem;
    }

    .timeline-point {
        flex-direction: column;
        gap: 10px;
    }

    .timeline-point .year {
        font-size: 1.25rem;
        min-width: auto;
    }

    .doctor-specialization {
        padding: 50px 0;
    }

    .doctor-facebook,
    .doctor-media {
        padding: 60px 0;
    }

    .fb-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .fb-featured-embed {
        height: 500px;
    }

    .fb-list {
        max-height: none;
    }

    .fb-list::after {
        display: none;
    }

    .fb-posts-grid,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .fb-post-image,
    .media-image {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .doctor-hero-title {
        font-size: 1.75rem;
    }

    .doctor-hero-subtitle {
        font-size: 0.938rem;
    }

    .doctor-specialties-inline span {
        font-size: 13px;
        padding: 6px 12px;
    }

    .profile-photo {
        min-height: 350px;
    }

    .profile-info {
        padding: 25px 20px;
    }

    .profile-section h2 {
        font-size: 1.5rem;
    }

    .profile-section h3 {
        font-size: 1.125rem;
    }

    .fb-featured-embed {
        height: 400px;
    }

    .fb-item {
        flex-direction: column;
        padding: 15px;
    }

    .fb-item-image {
        width: 100%;
        height: 180px;
    }

    .profile-section p {
        font-size: 0.938rem;
    }

    .spec-card {
        padding: 20px 15px;
        gap: 15px;
    }

    .spec-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .spec-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }

    .spec-card h3 {
        font-size: 0.938rem;
    }

    .fb-post-image,
    .media-image {
        height: 200px;
    }

    .fb-post-content,
    .media-content {
        padding: 20px;
    }

    .fb-post-content h3 {
        font-size: 1rem;
    }

    .media-content h3 {
        font-size: 1.063rem;
    }
}
