/* ===================================
   Modern School Cards CSS
   Inspired by Yelp, TripAdvisor, Airbnb
   =================================== */

/* Card Container */
.school-card-modern {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.school-card-modern:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Image Section */
.school-card-image {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 5:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.school-card-image .image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.school-card-image .school-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.school-card-modern:hover .school-image {
    transform: scale(1.05);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.school-card-modern:hover .image-overlay {
    opacity: 1;
}

.view-details {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    margin-bottom: 20px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.school-card-modern:hover .view-details {
    transform: translateY(0);
}

/* Badges Container */
.badges-container {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.badges-container .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.badges-container .badge:hover {
    transform: scale(1.05);
}

.badge-featured {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #ffffff;
}

.badge-verified {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
}

.badge-new {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    color: #ffffff;
}

/* Quick Actions */
.quick-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
}

.action-btn i {
    font-size: 18px;
    color: #666;
    transition: color 0.3s ease;
}

.action-btn:hover i {
    color: #FF6B6B;
}

.action-btn.saved i {
    color: #FF6B6B;
}

.action-btn.saved .fa-heart-o:before {
    content: "\f004"; /* Solid heart */
}

/* Card Content */
.school-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* School Header */
.school-header {
    margin-bottom: 12px;
}

.school-name {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.school-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.school-name a:hover {
    color: #3498db;
}

.school-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7f8c8d;
    font-size: 14px;
}

.school-location i {
    color: #e74c3c;
    font-size: 14px;
}

/* School Meta */
.school-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 16px;
}

.meta-item i {
    color: #3498db;
    font-size: 12px;
}

/* School Description */
.school-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

/* Card Footer */
.school-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #ecf0f1;
    margin-top: auto;
}

/* Contact Actions */
.contact-actions {
    display: flex;
    gap: 8px;
}

.contact-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.contact-btn:hover {
    background: #3498db;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.contact-btn i {
    font-size: 16px;
    color: #555;
    transition: color 0.3s ease;
}

.contact-btn:hover i {
    color: #ffffff;
}

.contact-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.contact-btn.whatsapp:hover i {
    color: #ffffff;
}

/* Primary CTA Button */
.btn-view-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border-radius: 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.btn-view-details:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
    color: #ffffff;
}

.btn-view-details i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.btn-view-details:hover i {
    transform: translateX(4px);
}

/* Grid Layout for Cards */
.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* List Layout for Cards */
.schools-list .school-card-modern {
    flex-direction: row;
    height: auto;
}

.schools-list .school-card-image {
    width: 300px;
    padding-top: 0;
    height: 220px;
    flex-shrink: 0;
}

.schools-list .school-card-content {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 991px) {
    .schools-list .school-card-modern {
        flex-direction: column;
    }

    .schools-list .school-card-image {
        width: 100%;
        padding-top: 60%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .school-card-modern {
        margin-bottom: 20px;
    }

    .school-name {
        font-size: 18px;
    }

    .school-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .contact-actions {
        justify-content: center;
    }

    .btn-view-details {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .badges-container .badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .school-card-content {
        padding: 16px;
    }

    .meta-item {
        font-size: 12px;
    }
}

/* Loading State */
.school-card-modern.loading {
    opacity: 0.6;
    pointer-events: none;
}

.school-card-modern.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Empty State */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results i {
    font-size: 64px;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #2c3e50;
    margin-bottom: 12px;
}

.no-results p {
    color: #7f8c8d;
    margin-bottom: 24px;
}
