/* ==========================================
   SUBJECTS STYLING
   Styles for subject listing & booking pages
   ========================================== */

/* Modern Gradient Background */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0.5rem 0 0 0;
}

.page-header .teacher-info {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 0.5rem;
}

/* ==========================================
   FILTERS SECTION
   ========================================== */

.filters-section {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.filter-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-item input,
.filter-item select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-item input:focus,
.filter-item select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-apply {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-clear {
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    color: #333;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #e0e0e0;
    border-color: #d0d0d0;
}

/* ==========================================
   SUBJECTS GRID & CARDS
   ========================================== */

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0;
}

@media (max-width: 768px) {
    .subjects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .subjects-grid {
        grid-template-columns: 1fr;
    }
}

.subject-card {
    all: unset;
    cursor: pointer;
}

.subject-card-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.subject-card-wrapper:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.subject-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: center;
}

.subject-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subject-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.subject-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mentor-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.mentor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.mentor-name {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.4;
}

.card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.meta-item {
    font-size: 0.85rem;
    color: #666;
}

.meta-item-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.meta-item-value {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #667eea;
}

.price-badge {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.price-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-details {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.new-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #999;
}

/* No Results Message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 12px;
    color: #d97706;
}

/* ==========================================
   SUBJECT DETAILS PAGE
   ========================================== */

.subject-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .subject-container {
        grid-template-columns: 1fr;
    }
}

/* Subject Info Card */
.subject-info-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.subject-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.subject-info-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.subject-info-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.teacher-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.teacher-name {
    color: white;
    margin: 0;
}

.subject-info-body {
    padding: 2rem;
}

.description-section {
    margin-bottom: 2rem;
}

.description-section h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.description-text {
    color: #666;
    line-height: 1.6;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.spec-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.spec-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    width: fit-content;
}

/* ==========================================
   CALENDAR SECTION
   ========================================== */

.calendar-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.calendar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.month-switcher {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.month-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.month-btn:hover,
.month-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

.calendar-body {
    padding: 2rem;
}

.month-year-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    display: table;
}

.calendar-table thead {
    background: #f8f9fa;
    display: table-header-group;
}

.calendar-table tbody {
    display: table-row-group;
}

.calendar-table tr {
    display: table-row;
}

.calendar-table th,
.calendar-table td {
    display: table-cell;
}

.calendar-table th {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: #667eea;
    border: 1px solid #e0e0e0;
    width: 14.28%;
}

.calendar-day {
    padding: 1rem;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-weight: 500;
    height: 60px;
    vertical-align: middle;
    transition: all 0.3s ease;
    width: 14.28%;
}

.calendar-day.available {
    background: #e8f5e9;
    color: #2e7d32;
    cursor: pointer;
}

.calendar-day.available:hover {
    background: #c8e6c9;
    transform: scale(1.05);
}

.calendar-day.booked {
    background: #fff3e0;
    color: #e65100;
}

.calendar-day.unavailable {
    background: #f5f5f5;
    color: #9e9e9e;
    cursor: not-allowed;
}

.calendar-day.past {
    background: #eeeeee;
    color: #bdbdbd;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.hours-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.hours-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.hours-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hour-badge {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==========================================
   BOOKING SECTION
   ========================================== */

.booking-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.booking-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.booking-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.booking-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.btn-book {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
}

/* ==========================================
   MODAL STYLING
   ========================================== */

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.75rem;
    padding: 1rem 0;
}

.time-slot-btn {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.time-slot-btn.available {
    border-color: #667eea;
    color: #667eea;
}

.time-slot-btn.available:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.time-slot-btn.booked {
    background: #ffebee;
    color: #c62828;
    border-color: #c62828;
    cursor: not-allowed;
    opacity: 0.5;
}

.selected-date-display {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}
