/* ==========================================================================
   PÁGINAS INTERNAS - LISTAS, DETALHES E COMPLEMENTOS
   ========================================================================== */

/* Hero de página interna */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, hsl(205, 85%, 24%) 60%, var(--primary-light) 130%);
    color: #fff;
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, hsla(197, 90%, 48%, 0.25), transparent 70%);
    pointer-events: none;
}
.page-hero .section-subtitle { color: var(--accent); }
.page-hero-title {
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin: 8px 0 12px;
    animation: heroFadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.page-hero-description {
    max-width: 720px;
    color: hsla(0, 0%, 100%, 0.85);
    font-size: 1.05rem;
    animation: heroFadeUp 0.7s 0.12s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: hsla(0, 0%, 100%, 0.7);
}
.breadcrumbs a { color: hsla(0, 0%, 100%, 0.85); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs i { font-size: 0.6rem; opacity: 0.6; }

/* Corpo da página */
.page-body { padding: 64px 0 88px; }

/* Layout de detalhe com sidebar */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
    align-items: start;
}
@media (max-width: 992px) {
    .detail-layout { grid-template-columns: 1fr; }
}

/* Garante que o artigo principal não ultrapasse a coluna do grid */
.detail-main {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.detail-cover {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}
.detail-cover img { width: 100%; object-fit: cover; max-height: 460px; }

.detail-profile-photo {
    width: 220px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    float: left;
    margin-right: 24px;
}
.detail-profile-photo img { width: 100%; height: auto; display: block; cursor: zoom-in; transition: opacity 0.2s; }
.detail-profile-photo img:hover { opacity: 0.88; }
/* Clearfix: garante que o container engloba o float */
.detail-main::after {
    content: "";
    display: table;
    clear: both;
}
@media (max-width: 640px) {
    .detail-profile-photo { float: none; margin-right: 0; width: 100%; max-width: 280px; }
}

.detail-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: hsla(0, 0%, 100%, 0.8);
    font-size: 0.9rem;
}
.detail-meta i { color: var(--accent); margin-right: 6px; }

/* Texto rico vindo do editor HTML */
.rich-text { font-size: 1.05rem; color: var(--text-dark); }
.rich-text h2 {
    margin: 36px 0 14px;
    font-size: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-light);
}
.rich-text h3 { margin: 28px 0 10px; font-size: 1.2rem; }
.rich-text p { margin-bottom: 16px; line-height: 1.75; }
.rich-text ul, .rich-text ol { margin: 0 0 20px 24px; }
.rich-text li { margin-bottom: 8px; line-height: 1.6; }
.rich-text img { border-radius: var(--border-radius-md); margin: 16px 0; }
.rich-text a { color: var(--primary-light); text-decoration: underline; }
.rich-text blockquote {
    border-left: 4px solid var(--accent);
    background: var(--accent-light);
    padding: 16px 20px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    margin: 20px 0;
}

/* Títulos de blocos do detalhe */
.detail-section-title {
    font-size: 1.4rem;
    margin: 48px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.detail-section-title i { color: var(--accent); }

/* Vídeos do YouTube */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.video-embed {
    margin: 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #000;
    transition: var(--transition-smooth);
}
.video-embed:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.video-embed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}
.video-embed figcaption {
    background: var(--bg-white);
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Galeria na página de detalhe */
.gallery-grid-detail {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-grid-detail .gallery-item img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    cursor: zoom-in;
}

/* Sidebar */
.detail-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 100px; }
@media (max-width: 992px) { .detail-sidebar { position: static; } }
.sidebar-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.sidebar-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary), hsl(205, 85%, 26%));
    color: #fff;
    border: none;
}
.sidebar-cta h3 { color: #fff; }
.sidebar-cta h3 i { color: #25d366; }
.sidebar-cta p { color: hsla(0, 0%, 100%, 0.85); font-size: 0.92rem; margin-bottom: 18px; }
.sidebar-links { list-style: none; }
.sidebar-links li { border-bottom: 1px dashed var(--border-color); }
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    color: var(--text-dark);
    font-size: 0.95rem;
}
.sidebar-links a:hover { color: var(--primary-light); transform: translateX(4px); }
.sidebar-links i { color: var(--accent); font-size: 0.7rem; }
.sidebar-hours { list-style: none; }
.sidebar-hours li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.95rem;
}
.sidebar-hours li:last-child { border-bottom: none; }
.sidebar-hours span { color: var(--text-muted); }

/* Barra de compartilhamento */
.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}
.share-label { font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-fast);
}
.share-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: #fff; }
.share-whatsapp:hover { background: #25d366; border-color: #25d366; }
.share-facebook:hover { background: #1877f2; border-color: #1877f2; }
.share-twitter:hover { background: #111; border-color: #111; }
.share-copy:hover { background: var(--primary-light); border-color: var(--primary-light); }
.share-copy.copied { background: #16a34a; border-color: #16a34a; color: #fff; }

/* Cards de exame com ícone (versão dinâmica) */
.exam-icon-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}
.exam-icon-illustration > i {
    font-size: 4.5rem;
    color: var(--primary-light);
    opacity: 0.85;
    transition: var(--transition-smooth);
}
.exam-card:hover .exam-icon-illustration > i {
    transform: scale(1.12) rotate(-4deg);
    color: var(--accent);
}

/* O overlay de hover da galeria não pode interceptar o clique (lightbox fica na imagem) */
.gallery-item::after { pointer-events: none; }

/* Card de convênio com link para o site oficial */
a.insurance-logo-card { cursor: pointer; }
a.insurance-logo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
    color: var(--primary-light);
}

/* Grupos de convênios (consultas x exames) */
.insurance-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-light);
}
.insurance-group-title i { color: var(--accent); }

/* Card inteiro clicável (stretched link) sem alterar o layout */
.specialty-card, .differential-card, .doctor-row, .blog-card { position: relative; }
.card-stretch {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
/* Links e botões internos continuam clicáveis acima da camada */
.specialty-card a:not(.card-stretch),
.differential-card a:not(.card-stretch),
.doctor-row a:not(.card-stretch),
.blog-card a:not(.card-stretch) {
    position: relative;
    z-index: 2;
}

/* Links em títulos de cards */
.blog-card h3 a, .exam-card-content h3 a, .doctor-info h3 a { color: inherit; }
.blog-card h3 a:hover, .exam-card-content h3 a:hover, .doctor-info h3 a:hover { color: var(--primary-light); }
