﻿/* UX/UI FIXES: Lawyer Cards & Landing Pages */

/* ==========================================
   CIRCULAR ICONS FIX - Maintain Perfect Circle
   ========================================== */
.icon-circle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.icon-circle-lg {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
}

.icon-circle-sm {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
}

/* Fix for Bootstrap's rounded-circle when used with flex */
.rounded-circle.d-flex,
.rounded-circle.d-inline-flex {
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

/* ==========================================
   LAWYER CARD SPACING & LAYOUT IMPROVEMENTS
   ========================================== */
.lawyer-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lawyer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.lawyer-card .card-body {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* Photo container with proper aspect ratio */
.lawyer-photo-container {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
}

.lawyer-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================
   SOFT ACCENT SYSTEM
   Un solo CTA rojo protagonista por pantalla; el resto de elementos
   de marca usan tintes suaves para no saturar de rojo las landings.
   ========================================== */

/* Iconos de sección: tinte suave + icono en color de acento
   (en vez de círculo sólido rojo/azul/verde por sección) */
.icon-circle.bg-primary,
.icon-circle.bg-info,
.icon-circle.bg-success,
.icon-circle.bg-warning,
.icon-circle.bg-secondary {
    background: rgba(var(--fn-primary-rgb), 0.1) !important;
}
.icon-circle.bg-primary i,
.icon-circle.bg-info i,
.icon-circle.bg-success i,
.icon-circle.bg-warning i,
.icon-circle.bg-secondary i {
    color: var(--fn-primary) !important;
}

/* En dark mode, .bg-light del theme queda blanco puro y el texto claro
   desaparece (heroes y secciones de landings). Mapear a fondo oscuro suave. */
[data-bs-theme="dark"] .bg-light {
    background-color: var(--fn-tertiary-bg) !important;
}

/* Contadores en listas y tarjetas: pill neutra en vez de roja/verde */
.badge-count {
    background: var(--fn-tertiary-bg) !important;
    color: var(--fn-emphasis-color) !important;
    border: 1px solid var(--fn-border-color);
    font-weight: 600;
}

/* Badge improvements with better spacing */
.badge-specialty {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.85rem !important;
    line-height: 1.4;
    background: var(--fn-tertiary-bg) !important;
    color: var(--fn-emphasis-color) !important;
    border: 1px solid var(--fn-border-color);
    font-weight: 500 !important;
}

.lawyer-card .badge {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Description text spacing */
.description-text {
    line-height: 1.6;
    margin-bottom: 0.75rem !important;
    padding: 0 0.25rem;
}

/* ==========================================
   SCHEDULE/HOURS DISPLAY FIX
   ========================================== */
.status-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-indicator {
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    max-width: 10px;
    max-height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-text {
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.status-hours {
    font-size: 0.85rem;
    color: var(--bs-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Better status display on card footer */
.lawyer-card .card-footer .d-flex {
    gap: 0.5rem;
    align-items: center;
}

/* ==========================================
   MOBILE OPTIMIZATIONS (576px and below)
   ========================================== */
@media (max-width: 576px) {
    /* Card body spacing */
    .lawyer-card .card-body {
        padding: 1rem;
        gap: 0.75rem;
    }

    /* Photo size adjustments */
    .lawyer-photo-container {
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
        max-width: 80px;
        max-height: 80px;
    }

    /* Typography scaling */
    .lawyer-card h3.h5 {
        font-size: 1rem;
        line-height: 1.3;
    }

    /* Badge sizing */
    .lawyer-card .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .badge-specialty {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    /* Font sizes */
    .lawyer-card .fs-sm {
        font-size: 0.8rem;
    }

    /* Card footer */
    .lawyer-card .card-footer {
        padding: 0.75rem 1rem;
    }

    /* Button sizing */
    .lawyer-card .btn-sm {
        font-size: 0.8rem;
        padding: 0.35rem 0.65rem;
    }

    /* Status text adjustments */
    .status-text {
        font-size: 0.8rem;
    }

    .status-hours {
        font-size: 0.7rem;
        max-width: 120px;
    }

    /* Stack schedule info vertically on very small screens */
    .status-container {
        flex-direction: row;
        align-items: center;
    }

    /* Icon circles on mobile */
    .icon-circle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
    }
}

/* ==========================================
   EXTRA SMALL MOBILE (480px and below)
   ========================================== */
@media (max-width: 480px) {
    /* Even smaller photo */
    .lawyer-photo-container {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
        max-width: 70px;
        max-height: 70px;
    }

    /* Tighter spacing */
    .lawyer-card .card-body {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .lawyer-card .card-footer {
        padding: 0.5rem 0.75rem;
    }

    /* Hide hours text on very small screens */
    .status-hours {
        display: none;
    }

    /* Smaller icon circles */
    .icon-circle {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        max-width: 32px;
        max-height: 32px;
    }

    /* Simplify status display */
    .status-container {
        gap: 0.35rem;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.flex-shrink-0 {
    flex-shrink: 0 !important;
}

.min-w-0 {
    min-width: 0;
}

/* Ensure proper aspect ratio for images */
.aspect-square {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Text truncation with ellipsis */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Better gap support for older browsers */
.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 1rem;
}

.gap-lg {
    gap: 1.5rem;
}
