/* ============================================================
   MedPages — Templates CSS v2
   Estilos para páginas públicas de médicos (redesign completo)
   ============================================================ */

/* ── Theme Variables ── */
.doctor-page {
    --theme-primary:       var(--primary);
    --theme-primary-dark:  var(--primary-dark);
    --theme-primary-light: var(--primary-light);
    --theme-hero-bg:       linear-gradient(140deg, #072a60 0%, #1a5fbc 60%, #0d9b67 100%);
}

.theme-cardiologia {
    --theme-primary:       #dc2626;
    --theme-primary-dark:  #b91c1c;
    --theme-primary-light: #fee2e2;
    --theme-hero-bg:       linear-gradient(140deg, #7f1d1d 0%, #dc2626 55%, #f87171 100%);
}

.theme-psicologia {
    --theme-primary:       #8b5cf6;
    --theme-primary-dark:  #7c3aed;
    --theme-primary-light: #ede9fe;
    --theme-hero-bg:       linear-gradient(140deg, #3b0764 0%, #8b5cf6 55%, #a78bfa 100%);
}

.theme-odontologia {
    --theme-primary:       #0ea5e9;
    --theme-primary-dark:  #0284c7;
    --theme-primary-light: #e0f2fe;
    --theme-hero-bg:       linear-gradient(140deg, #0c4a6e 0%, #0ea5e9 55%, #38bdf8 100%);
}

.theme-pediatria {
    --theme-primary:       #10b981;
    --theme-primary-dark:  #059669;
    --theme-primary-light: #d1fae5;
    --theme-hero-bg:       linear-gradient(140deg, #064e3b 0%, #10b981 50%, #34d399 100%);
}

.theme-ortopedia {
    --theme-primary:       #64748b;
    --theme-primary-dark:  #475569;
    --theme-primary-light: #f1f5f9;
    --theme-hero-bg:       linear-gradient(140deg, #0f172a 0%, #334155 55%, #64748b 100%);
}

/* ── Sticky WhatsApp Button ── */
.dp-sticky-wa {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    background: #25d366;
    color: #fff;
    border-radius: 60px;
    padding: 13px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 24px rgba(37,211,102,0.45);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: dp-wa-in 0.6s cubic-bezier(0.34,1.56,0.64,1) 1.5s both;
}

@keyframes dp-wa-in {
    from { transform: translateY(40px) scale(0.8); opacity: 0; }
    to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

.dp-sticky-wa:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 12px 32px rgba(37,211,102,0.55);
    color: #fff;
    text-decoration: none;
}

.dp-sticky-wa-icon { font-size: 1.2rem; }

/* ── Hero ── */
.dp-hero {
    background: var(--theme-hero-bg);
    color: #fff;
    padding: 72px 0 80px;
    position: relative;
    overflow: hidden;
}

.dp-hero-bg-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dp-hero-bg-orb-1 {
    width: 420px;
    height: 420px;
    background: rgba(255,255,255,0.06);
    top: -130px;
    right: -80px;
}

.dp-hero-bg-orb-2 {
    width: 240px;
    height: 240px;
    background: rgba(255,255,255,0.04);
    bottom: -80px;
    left: 4%;
}

.dp-hero-inner {
    display: flex;
    align-items: center;
    gap: 48px;
    position: relative;
    z-index: 1;
}

/* ── Avatar Column ── */
.dp-hero-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.dp-avatar-wrap {
    position: relative;
    width: 160px;
    height: 160px;
}

.dp-avatar-img,
.dp-avatar-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.35);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 8px rgba(255,255,255,0.08);
    object-fit: cover;
    display: block;
}

.dp-avatar-placeholder {
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    font-weight: 800;
    color: #fff;
}

.dp-verified {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: #22c55e;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dp-avatar-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.dp-ar-stars { color: #fcd34d; font-size: 0.8rem; }
.dp-ar-num   { font-size: 0.875rem; font-weight: 700; color: #fff; }

/* ── Hero Info Column ── */
.dp-hero-info-col { flex: 1; min-width: 0; }

.dp-hero-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.dp-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.dp-chip-specialty { background: rgba(255,255,255,0.22); }
.dp-chip-crm       { background: rgba(0,0,0,0.18); }
.dp-chip-location  { background: rgba(0,0,0,0.14); }

.dp-hero-name {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.15;
}

.dp-hero-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.dp-hrr-stars { color: #fcd34d; font-size: 1rem; }
.dp-hrr-num   { font-weight: 700; font-size: 1rem; color: #fff; }
.dp-hrr-count { font-size: 0.875rem; color: rgba(255,255,255,0.7); }

/* ── Hero CTAs ── */
.dp-hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.dp-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(37,211,102,0.35);
}

.dp-btn-wa:hover {
    background: #1da851;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.45);
    text-decoration: none;
}

.dp-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.3);
    padding: 13px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.dp-btn-ghost:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
    text-decoration: none;
}

.dp-hero-trust-chips {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.dp-hero-trust-chips span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
}

/* ── Two-Column Layout ── */
.dp-layout-wrap {
    background: var(--gray-50);
    padding: 40px 0 60px;
}

.dp-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.dp-main {
    display: flex;
    flex-direction: column;
}

/* ── Sticky Sidebar ── */
.dp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}

/* ── Sidebar Cards ── */
.dps-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

/* WhatsApp card */
.dps-wa-card {
    background: linear-gradient(140deg, #064e3b 0%, #059669 55%, #10b981 100%);
    border-color: transparent;
    color: #fff;
    text-align: center;
}

.dps-wa-icon-wrap {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.dps-wa-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
}

.dps-wa-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
}

.dps-wa-btn {
    display: block;
    background: #fff;
    color: #15803d;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 14px;
}

.dps-wa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    color: #15803d;
    text-decoration: none;
}

.dps-wa-trust-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
}

/* Address + Form cards */
.dps-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.dps-address-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 4px;
}

.dps-address-city {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.dps-map-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--theme-primary);
    text-decoration: none;
    transition: color 0.15s;
}

.dps-map-link:hover { color: var(--theme-primary-dark); }

.dps-form .form-group { margin-bottom: 10px; }

/* ── Section Shared Styles ── */
.dp-section {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.dp-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.dp-section-icon { font-size: 1.2rem; flex-shrink: 0; }

.dp-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin: 0;
}

/* ── Bio ── */
.dp-bio-text {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--gray-600);
    border-left: 4px solid var(--theme-primary);
    padding-left: 18px;
}

/* ── Reviews Section (full-width, outside layout) ── */
.dp-reviews-section {
    background: var(--gray-50);
    padding: 64px 0;
}

/* Rating overview */
.dp-rating-overview {
    display: flex;
    gap: 40px;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 36px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.dp-ro-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    min-width: 130px;
}

.dp-ro-num {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--gray-900);
    line-height: 1;
    letter-spacing: -0.04em;
}

.dp-ro-stars {
    color: #f59e0b;
    font-size: 1.3rem;
    margin: 8px 0 6px;
}

.dp-ro-label { font-size: 0.8rem; color: var(--gray-400); }

.dp-ro-breakdown { flex: 1; display: flex; flex-direction: column; gap: 10px; }

.dp-bd-row { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; }

.dp-bd-label { color: var(--gray-500); font-weight: 600; min-width: 22px; text-align: right; }

.dp-bd-track {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.dp-bd-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 4px;
    min-width: 4px;
    transition: width 1s ease;
}

.dp-bd-count { color: var(--gray-400); min-width: 22px; font-size: 0.78rem; }

/* Reviews grid */
.dp-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.dp-review-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 22px;
    transition: var(--transition-slow);
}

.dp-review-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--theme-primary-light);
    transform: translateY(-3px);
}

.dp-rc-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.dp-rc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dp-rc-info { flex: 1; min-width: 0; }
.dp-rc-name { display: block; font-size: 0.9rem; font-weight: 700; color: var(--gray-900); margin-bottom: 2px; }
.dp-rc-date { font-size: 0.74rem; color: var(--gray-400); }
.dp-rc-stars { color: #f59e0b; font-size: 0.9rem; flex-shrink: 0; }

.dp-rc-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.65;
    font-style: italic;
    margin: 0;
}

.dp-no-reviews {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
    padding: 32px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 32px;
    border: 1px dashed var(--gray-300);
}

/* Review form */
.dp-review-form-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    max-width: 700px;
}

.dp-review-form-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 22px;
}

.dp-rf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ── CSS-only star picker ── */
.dp-star-picker {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 2px;
    margin-top: 4px;
}

.dp-star-picker input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.dp-star-picker label {
    font-size: 2rem;
    color: var(--gray-300);
    cursor: pointer;
    transition: color 0.1s, transform 0.1s;
    line-height: 1;
    padding: 2px 3px;
    user-select: none;
}

/* Hover: color hovered + lower-value stars (following siblings in reverse DOM = lower values) */
.dp-star-picker label:hover,
.dp-star-picker label:hover ~ label {
    color: #f59e0b;
    transform: scale(1.15);
}

/* Checked: highlight the checked star's label */
.dp-star-picker input:checked + label { color: #f59e0b; }

/* Checked: highlight all lower-value star labels */
.dp-star-picker input:checked ~ input + label { color: #f59e0b; }

/* ── Blog Section ── */
.dp-blog-section {
    background: #fff;
    padding: 64px 0;
}

.dp-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dp-blog-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.dp-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--theme-primary-light);
}

.dp-bc-accent {
    height: 5px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-primary-dark));
    flex-shrink: 0;
}

.dp-bc-body {
    padding: 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dp-bc-date   { font-size: 0.75rem; color: var(--gray-400); font-weight: 500; }
.dp-bc-title  { font-size: 0.95rem; font-weight: 700; color: var(--gray-900); line-height: 1.4; margin: 0; }
.dp-bc-excerpt { font-size: 0.85rem; color: var(--gray-500); line-height: 1.65; margin: 0; flex: 1; }

/* ── CTA Footer ── */
.dp-cta-footer {
    background: var(--gray-900);
    padding: 56px 0;
}

.dp-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.dp-cta-title { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.dp-cta-sub   { font-size: 0.9rem; color: rgba(255,255,255,0.65); margin: 0; }

.dp-cta-btn {
    display: inline-flex;
    align-items: center;
    background: var(--theme-primary);
    color: #fff;
    padding: 15px 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.dp-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    color: #fff;
    text-decoration: none;
}

/* ── Shared stars helper ── */
.stars { letter-spacing: 1px; }

/* ── Override theme btn-primary ── */
.doctor-page .btn-primary {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #fff;
}

.doctor-page .btn-primary:hover {
    background: var(--theme-primary-dark);
    border-color: var(--theme-primary-dark);
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .dp-layout { grid-template-columns: 1fr; }
    .dp-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .dp-hero                { padding: 48px 0 60px; }
    .dp-hero-inner          { flex-direction: column; text-align: center; gap: 28px; }
    .dp-hero-meta-chips     { justify-content: center; }
    .dp-hero-name           { font-size: 1.8rem; }
    .dp-hero-rating-row     { justify-content: center; }
    .dp-hero-ctas           { justify-content: center; }
    .dp-hero-trust-chips    { justify-content: center; }
    .dp-avatar-wrap,
    .dp-avatar-img,
    .dp-avatar-placeholder  { width: 120px; height: 120px; }
    .dp-avatar-placeholder  { font-size: 3.5rem; }
    .dp-sidebar             { grid-template-columns: 1fr; }
    .dp-rating-overview     { flex-direction: column; text-align: center; padding: 20px; }
    .dp-rf-row              { grid-template-columns: 1fr; }
    .dp-reviews-grid        { grid-template-columns: 1fr; }
    .dp-blog-grid           { grid-template-columns: 1fr; }
    .dp-cta-inner           { flex-direction: column; text-align: center; }
    .dp-cta-btn             { width: 100%; justify-content: center; }
    .dp-section             { padding: 24px 18px; }
    .dp-layout-wrap         { padding: 24px 0 40px; }
    .dp-reviews-section,
    .dp-blog-section        { padding: 40px 0; }
}

@media (max-width: 480px) {
    .dp-sticky-wa span:last-child { display: none; }
    .dp-sticky-wa  { padding: 14px 16px; border-radius: 50%; }
    .dp-sticky-wa-icon { font-size: 1.5rem; margin: 0; }
}
