/* Reset and Base Styles */
.counselors-container {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.counselors-container * {
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
}

.counselors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Card Styles */
.counselor-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
}

.counselor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Image Container */
.counselor-card > div:first-child {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.counselor-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    max-width: 100%;
}

.counselor-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

/* Content Area */
.counselor-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.counselor-name {
    font-size: 20px;
    margin: 0 0 5px 0;
    font-weight: bold;
    line-height: 1.3;
}

.counselor-specialty {
    color: #6b7280;
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.availability {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    margin-bottom: 15px;
    font-size: 14px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    margin-left: 0;
    flex-shrink: 0;
}

.status-available {
    background-color: #10b981;
}

.status-busy {
    background-color: #f59e0b;
}

.counselor-description {
    color: #4b5563;
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

/* Tags */
.counselor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 12px;
    background-color: #e5e7eb;
    border-radius: 15px;
    font-size: 12px;
    white-space: nowrap;
}

/* Buttons */
.counselor-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
    width: 100%;
}

.btn {
    flex: 1;
    padding: 10px 20px;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary {
    color: white;
    border: 2px solid transparent;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid;
}

.btn-secondary:hover {
    color: white;
}

/* Tablet View - 1200px */
@media screen and (max-width: 1200px) {
    .counselors-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }
}

/* Mobile Landscape - 992px */
@media screen and (max-width: 992px) {
    .counselors-container {
        padding: 15px;
    }
    
    .counselors-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    
    .counselor-image {
        height: 220px;
    }
}

/* Mobile Portrait - 768px */
@media screen and (max-width: 768px) {
    .counselors-container {
        padding: 10px;
    }
    
    .counselors-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .counselor-card {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    
    .counselor-image {
        height: 200px;
    }
    
    .counselor-info {
        padding: 15px;
    }
    
    .counselor-name {
        font-size: 18px;
    }
    
    .counselor-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Small Mobile - 576px */
@media screen and (max-width: 576px) {
    .counselors-container {
        padding: 8px;
    }
    
    .counselors-grid {
        gap: 15px;
    }
    
    .counselor-card {
        border-radius: 8px;
    }
    
    .counselor-image {
        height: 180px;
    }
    
    .counselor-tags {
        gap: 5px;
        margin-bottom: 15px;
    }
    
    .tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .counselor-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
}

/* Extra Small Mobile - 480px */
@media screen and (max-width: 480px) {
    .counselors-container {
        padding: 5px;
    }
    
    .counselors-grid {
        gap: 12px;
    }
    
    .counselor-card {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .counselor-image {
        height: 160px;
    }
    
    .counselor-info {
        padding: 12px;
    }
    
    .counselor-name {
        font-size: 16px;
        margin-bottom: 3px;
    }
    
    .counselor-specialty {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .counselor-description {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .availability {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .counselor-badge {
        font-size: 10px;
        padding: 3px 10px;
        top: 5px;
        right: 5px;
    }
    
    .btn {
        font-size: 13px;
        padding: 10px 15px;
    }
}

/* Very Small Devices - 360px */
@media screen and (max-width: 360px) {
    .counselor-image {
        height: 140px;
    }
    
    .counselor-info {
        padding: 10px;
    }
    
    .counselor-name {
        font-size: 15px;
    }
    
    .tag {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* Override Elementor Default Styles */
.elementor-widget-kadence-counselors-list .counselors-grid {
    display: grid !important;
}

.elementor-widget-kadence-counselors-list .counselor-card {
    margin: 0 !important;
    width: 100% !important;
}

/* Ensure Images Don't Overflow */
.counselor-card img {
    max-width: 100% !important;
    height: auto !important;
}

/* Fix for Elementor Column Width Issues */
.elementor-column .counselors-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Print Styles */
@media print {
    .counselor-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .counselor-buttons {
        display: none;
    }
}
