/**
 * Public Styles for Recent Success Pro
 * Frontend display styles for student cards
 * Version: 2.0.0
 */

/* ============================================
   MAIN CONTAINER
   ============================================ */
.rs-public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ============================================
   GRID LAYOUT
   ============================================ */
.rs-students-grid {
    display: grid;
    gap: 25px;
}

/* Column layouts */
.rs-cols-1 .rs-students-grid { 
    grid-template-columns: 1fr; 
}

.rs-cols-2 .rs-students-grid { 
    grid-template-columns: repeat(2, 1fr); 
}

.rs-cols-3 .rs-students-grid { 
    grid-template-columns: repeat(3, 1fr); 
}

.rs-cols-4 .rs-students-grid { 
    grid-template-columns: repeat(4, 1fr); 
}

/* ============================================
   STUDENT CARD - BASE STYLES
   ============================================ */
.rs-student-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    position: relative;
}

.rs-student-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* ============================================
   CARD STYLE VARIANTS
   ============================================ */

/* MODERN STYLE - Default */
.rs-student-card.modern {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.rs-student-card.modern:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* CLASSIC STYLE */
.rs-student-card.classic {
    border-radius: 8px;
    border: 2px solid #e8e8e8;
    box-shadow: none;
}

.rs-student-card.classic:hover {
    border-color: #007cba;
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.1);
}

/* MINIMAL STYLE */
.rs-student-card.minimal {
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 2px solid #f0f0f0;
    background: transparent;
}

.rs-student-card.minimal:hover {
    transform: translateY(-4px);
    border-bottom-color: #007cba;
    box-shadow: none;
}

/* ============================================
   STUDENT IMAGE
   ============================================ */
.rs-student-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    position: relative;
}

/* Loading placeholder */
.rs-student-image::before {
    content: '📸';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    opacity: 0.3;
    z-index: 0;
}

.rs-student-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.rs-student-card:hover .rs-student-image img {
    transform: scale(1.08);
}

/* ============================================
   STUDENT INFO
   ============================================ */
.rs-student-info {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Name */
.rs-student-name {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.rs-student-name a {
    color: inherit;
    text-decoration: none;
}

.rs-student-name a:hover {
    color: #007cba;
}

/* District */
.rs-student-district {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.rs-student-district .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #007cba;
}

/* Session Badge */
.rs-student-session {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
    align-self: flex-start;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Description */
.rs-student-description {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
    flex: 1;
}

.rs-student-description p {
    margin: 0 0 10px 0;
}

.rs-student-description p:last-child {
    margin-bottom: 0;
}

/* ============================================
   TESTIMONIAL
   ============================================ */
.rs-student-testimonial {
    background: #f8f9fa;
    padding: 16px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #007cba;
    position: relative;
}

.rs-student-testimonial::before {
    content: '"';
    position: absolute;
    top: -5px;
    left: 10px;
    font-size: 40px;
    color: #007cba;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.rs-student-testimonial blockquote {
    margin: 0;
    font-style: italic;
    color: #444;
    font-size: 14px;
    line-height: 1.7;
    padding-left: 5px;
    position: relative;
    z-index: 1;
}

/* ============================================
   SOCIAL LINKS
   ============================================ */
.rs-student-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.rs-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.rs-social-link:hover {
    transform: scale(1.12) translateY(-2px);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.rs-social-link:active {
    transform: scale(0.95);
}

/* Social platform colors */
.rs-facebook { 
    background: #1877f2; 
}

.rs-facebook:hover { 
    background: #0d65d9; 
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
}

.rs-whatsapp { 
    background: #25d366; 
}

.rs-whatsapp:hover { 
    background: #1da851; 
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.rs-email { 
    background: #ea4335; 
}

.rs-email:hover { 
    background: #d33426; 
    box-shadow: 0 4px 15px rgba(234, 67, 53, 0.4);
}

/* Social icons styling */
.rs-social-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.rs-social-link svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* Tooltip on hover */
.rs-social-link::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
}

.rs-social-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ============================================
   NO ENTRIES MESSAGE
   ============================================ */
.rs-no-entries {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
    background: #fafafa;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
}

.rs-no-entries::before {
    content: '📭 ';
    font-size: 30px;
    display: block;
    margin-bottom: 10px;
}

/* ============================================
   DEVELOPER CREDIT
   ============================================ */
.rs-public-credit {
    text-align: center;
    margin-top: 35px;
    padding: 18px;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #eee;
    letter-spacing: 0.3px;
}

.rs-public-credit a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.rs-public-credit a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet - Medium screens */
@media (max-width: 1024px) {
    .rs-cols-4 .rs-students-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
    
    .rs-student-image {
        height: 200px;
    }
}

/* Tablet - Small screens */
@media (max-width: 768px) {
    .rs-cols-2 .rs-students-grid,
    .rs-cols-3 .rs-students-grid,
    .rs-cols-4 .rs-students-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rs-student-image {
        height: 180px;
    }
    
    .rs-student-name {
        font-size: 18px;
    }
    
    .rs-student-info {
        padding: 16px 18px 18px;
    }
    
    .rs-public-container {
        padding: 15px;
    }
    
    .rs-students-grid {
        gap: 18px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .rs-cols-1 .rs-students-grid,
    .rs-cols-2 .rs-students-grid,
    .rs-cols-3 .rs-students-grid,
    .rs-cols-4 .rs-students-grid {
        grid-template-columns: 1fr;
    }
    
    .rs-student-image {
        height: 200px;
    }
    
    .rs-student-name {
        font-size: 19px;
    }
    
    .rs-student-info {
        padding: 14px 16px 16px;
    }
    
    .rs-student-description {
        font-size: 13px;
    }
    
    .rs-student-testimonial blockquote {
        font-size: 13px;
    }
    
    .rs-social-link {
        width: 40px;
        height: 40px;
    }
    
    .rs-public-container {
        padding: 10px;
    }
    
    .rs-students-grid {
        gap: 15px;
    }
    
    /* Hide tooltips on mobile */
    .rs-social-link::after {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .rs-student-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
        transform: none !important;
    }
    
    .rs-student-card:hover {
        transform: none !important;
    }
    
    .rs-student-image {
        height: 150px;
    }
    
    .rs-student-image img {
        transform: none !important;
    }
    
    .rs-social-link {
        background: #666 !important;
    }
    
    .rs-public-credit {
        display: none;
    }
    
    .rs-student-card.minimal {
        border-bottom: 1px solid #ddd;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .rs-student-card {
        background: #1e1e1e;
        border-color: #333;
    }
    
    .rs-student-name {
        color: #f0f0f0;
    }
    
    .rs-student-district {
        color: #aaa;
    }
    
    .rs-student-description {
        color: #bbb;
    }
    
    .rs-student-testimonial {
        background: #2a2a2a;
        border-left-color: #007cba;
    }
    
    .rs-student-testimonial blockquote {
        color: #ccc;
    }
    
    .rs-student-social {
        border-top-color: #333;
    }
    
    .rs-student-card.modern {
        background: #1a1a1a;
    }
    
    .rs-student-card.classic {
        border-color: #444;
    }
    
    .rs-student-card.minimal {
        border-bottom-color: #333;
    }
    
    .rs-no-entries {
        background: #1a1a1a;
        color: #777;
        border-color: #333;
    }
    
    .rs-public-credit {
        border-top-color: #333;
        color: #777;
    }
}