/* ── DirectorioSEOMETAL — Estilos frontend ── */

/* Reset base */
.dsm-wrap * { box-sizing: border-box; }
.dsm-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ── Blindar botones contra sobreescritura del tema ── */
.dsm-wrap button[type="button"],
.dsm-wrap button[type="submit"] {
    color: inherit;
    background: inherit;
    font-family: inherit;
}
.dsm-wrap button[style*="background:#f1f5f9"] {
    color: #334155 !important;
}
.dsm-wrap button[style*="background:#2563eb"],
.dsm-wrap button[style*="background:#25D366"],
.dsm-wrap button[style*="background:#d97706"],
.dsm-wrap button[style*="background:#16a34a"] {
    color: #fff !important;
}
.dsm-wrap a.dsm-plan-btn,
.dsm-wrap a.dsm-btn-profile,
.dsm-wrap a.dsm-btn-whatsapp,
.dsm-wrap a.dsm-contact-btn {
    color: #fff !important;
}

/* ── Página de membresías ── */
.dsm-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 32px 0;
}
.dsm-plan-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}
.dsm-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,.10);
}
.dsm-plan-card.dsm-plan-featured {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37,99,235,.15);
}
.dsm-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.dsm-plan-card.dsm-plan-premium .dsm-plan-badge { background: #d97706; }
.dsm-plan-name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
}
.dsm-plan-duration {
    font-size: 13px;
    color: #888;
    margin: 0 0 16px;
}
.dsm-plan-price {
    font-size: 40px;
    font-weight: 800;
    color: #111;
    line-height: 1;
    margin: 0 0 4px;
}
.dsm-plan-price span { font-size: 18px; font-weight: 500; color: #555; }
.dsm-plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}
.dsm-plan-features li {
    font-size: 13px;
    color: #444;
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.dsm-plan-features li:last-child { border-bottom: none; }
.dsm-plan-features .dsm-check  { color: #16a34a; flex-shrink: 0; }
.dsm-plan-features .dsm-cross  { color: #cbd5e1; flex-shrink: 0; }
.dsm-plan-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}
.dsm-plan-btn:hover { background: #1ebe5d; color: #fff; }
.dsm-plan-card.dsm-plan-featured .dsm-plan-btn,
.dsm-plan-card.dsm-plan-standard .dsm-plan-btn { background: #2563eb; }
.dsm-plan-card.dsm-plan-featured .dsm-plan-btn:hover,
.dsm-plan-card.dsm-plan-standard .dsm-plan-btn:hover { background: #1d4ed8; }
.dsm-plan-card.dsm-plan-premium .dsm-plan-btn  { background: #d97706; }
.dsm-plan-card.dsm-plan-premium .dsm-plan-btn:hover { background: #b45309; }

/* ── Filtros del directorio ── */
.dsm-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: flex-end;
}
.dsm-filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.dsm-filter-group select,
.dsm-filter-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    background: #fff;
    outline: none;
    transition: border-color .2s;
}
.dsm-filter-group select:focus,
.dsm-filter-group input:focus { border-color: #2563eb; }
.dsm-filter-btn {
    padding: 9px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.dsm-filter-btn:hover { background: #1d4ed8; }
.dsm-filter-reset {
    padding: 9px 14px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}
.dsm-filter-reset:hover { background: #e2e8f0; }

/* ── Resultados ── */
.dsm-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.dsm-results-count {
    font-size: 14px;
    color: #64748b;
}
.dsm-results-count strong { color: #111; }

/* ── Tarjeta de profesional ── */
.dsm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.dsm-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
    position: relative;
}
.dsm-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.dsm-card-badge-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #d97706;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.dsm-card-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}
.dsm-card-photo-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    color: #94a3b8;
}
.dsm-card-body { padding: 16px; }
.dsm-card-type {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 4px;
}
.dsm-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 6px;
    line-height: 1.3;
}
.dsm-card-name a { color: inherit; text-decoration: none; }
.dsm-card-name a:hover { color: #2563eb; }
.dsm-card-location {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.dsm-card-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}
.dsm-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.dsm-tag-more {
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 20px;
}
.dsm-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.dsm-card-modality {
    font-size: 13px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
}
.dsm-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #16a34a;
}
.dsm-card-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}
.dsm-btn-profile {
    flex: 1;
    padding: 8px 12px;
    background: #2563eb;
    color: #fff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background .2s;
}
.dsm-btn-profile:hover { background: #1d4ed8; color: #fff; }
.dsm-btn-whatsapp {
    padding: 8px 12px;
    background: #25D366;
    color: #fff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background .2s;
}
.dsm-btn-whatsapp:hover { background: #1ebe5d; color: #fff; }

/* ── Paginación ── */
.dsm-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 24px 0;
    flex-wrap: wrap;
}
.dsm-pagination a,
.dsm-pagination span {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 13px;
    text-decoration: none;
    color: #334155;
    background: #fff;
    transition: background .15s;
}
.dsm-pagination a:hover { background: #eff6ff; border-color: #2563eb; color: #2563eb; }
.dsm-pagination .dsm-page-current { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 700; }

/* ── Texto SEO del distrito ── */
.dsm-district-seo {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px 28px;
    margin-top: 40px;
    font-size: 14px;
    line-height: 1.8;
    color: #374151;
}
.dsm-district-seo h2,
.dsm-district-seo h3 { color: #111; }

/* ── Ficha individual del profesional ── */
.dsm-profile-wrap {
    max-width: 900px;
    margin: 0 auto;
}
.dsm-profile-header {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.dsm-profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #e2e8f0;
}
.dsm-profile-photo-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    color: #94a3b8;
    flex-shrink: 0;
}
.dsm-profile-info { flex: 1; min-width: 0; }
.dsm-profile-type-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.dsm-profile-name {
    font-size: 26px;
    font-weight: 800;
    color: #111;
    margin: 0 0 6px;
    line-height: 1.2;
}
.dsm-profile-desc {
    font-size: 15px;
    color: #555;
    margin: 0 0 12px;
    line-height: 1.5;
}
.dsm-profile-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.dsm-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}
.dsm-pill-green  { background: #f0fdf4; color: #16a34a; }
.dsm-pill-blue   { background: #eff6ff; color: #2563eb; }
.dsm-pill-orange { background: #fff7ed; color: #ea580c; }
.dsm-profile-contact-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.dsm-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .2s, color .2s, border-color .2s;
    border: 2px solid transparent;
}

/* WhatsApp — verde */
.dsm-contact-btn-wa {
    background: #25D366 !important;
    color: #fff !important;
    border-color: #25D366 !important;
}
.dsm-contact-btn-wa:hover {
    background: #128c5e !important;
    color: #fff !important;
    border-color: #128c5e !important;
}
.dsm-contact-btn-wa svg, .dsm-contact-btn-wa * { color: #fff !important; fill: #fff !important; }

/* Teléfono — azul oscuro con texto e ícono blancos */
.dsm-contact-btn-phone {
    background: #1e3a5f !important;
    color: #fff !important;
    border-color: #1e3a5f !important;
}
.dsm-contact-btn-phone:hover {
    background: #0f2540 !important;
    color: #fff !important;
    border-color: #0f2540 !important;
}
.dsm-contact-btn-phone svg, .dsm-contact-btn-phone * { color: #fff !important; fill: #fff !important; }

/* Correo — violeta/morado con texto e ícono blancos */
.dsm-contact-btn-email {
    background: #7c3aed !important;
    color: #fff !important;
    border-color: #7c3aed !important;
}
.dsm-contact-btn-email:hover {
    background: #5b21b6 !important;
    color: #fff !important;
    border-color: #5b21b6 !important;
}
.dsm-contact-btn-email svg, .dsm-contact-btn-email * { color: #fff !important; fill: #fff !important; }

/* Web — azul brillante con ícono y texto blancos */
.dsm-contact-btn-web {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}
.dsm-contact-btn-web:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
    border-color: #1d4ed8 !important;
}
.dsm-contact-btn-web svg, .dsm-contact-btn-web * { color: #fff !important; fill: #fff !important; }

/* Bloque de sección en ficha */
.dsm-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 16px;
}
.dsm-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}
/* Formación en columnas */
.dsm-academic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.dsm-academic-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
}
.dsm-academic-item strong { display: block; color: #111; margin-bottom: 2px; }
.dsm-academic-item span   { color: #64748b; font-size: 14px; }
/* Checkboxes en grid */
.dsm-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
/* Redes sociales */
.dsm-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.dsm-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #f1f5f9;
    border-radius: 7px;
    font-size: 13px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    transition: background .15s;
}
.dsm-social-link:hover { background: #e2e8f0; color: #111; }

/* Formulario de contacto */
.dsm-contact-form { margin-top: 12px; }
.dsm-contact-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.dsm-contact-form label:first-child { margin-top: 0; }
.dsm-contact-form input,
.dsm-contact-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.dsm-contact-form input:focus,
.dsm-contact-form textarea:focus { border-color: #2563eb; }
.dsm-contact-form textarea { height: 90px; resize: vertical; }
.dsm-contact-form button {
    margin-top: 14px;
    padding: 10px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.dsm-contact-form button:hover { background: #1d4ed8; }

/* Valoraciones */
.dsm-rating-stars { color: #f59e0b; font-size: 18px; letter-spacing: 2px; }
.dsm-review-item {
    border-bottom: 1px solid #f1f5f9;
    padding: 14px 0;
}
.dsm-review-item:last-child { border-bottom: none; }
.dsm-review-author { font-size: 13px; font-weight: 700; color: #111; }
.dsm-review-date   { font-size: 14px; color: #94a3b8; margin-left: 8px; }
.dsm-review-text   { font-size: 13px; color: #444; margin-top: 4px; line-height: 1.5; }

/* ── Mensaje de plan restringido ── */
.dsm-locked {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin-top: 8px;
}
.dsm-locked a { color: #2563eb; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .dsm-profile-header { flex-direction: column; align-items: center; text-align: center; }
    .dsm-profile-meta-pills { justify-content: center; }
    .dsm-profile-contact-btns { justify-content: center; }
    .dsm-filters { grid-template-columns: 1fr; }
    .dsm-plan-card { max-width: 360px; margin: 0 auto; }
}

/* ── Panel Mi cuenta ── */
.dsm-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.dsm-account-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
}
.dsm-account-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}
@media (max-width: 480px) {
    .dsm-account-grid { grid-template-columns: 1fr; }
}

/* Campo título de perfil — responsive */
@media (max-width: 600px) {
    .dsm-wrap [style*="max-width:50%"],
    .dsm-wrap div[style*="max-width:50%"] {
        max-width: 100% !important;
    }
}

/* SERP preview y campos SEO — responsive */
@media (max-width: 600px) {
    [style*="max-width:75%"],
    [style*="max-width:50%"] {
        max-width: 100% !important;
    }
}
