/* ESL Teacher Hub — base styles. Colors are CSS variables so the brand
   palette can be changed in one place. */

:root {
    --brand-primary: #2563eb;
    --brand-primary-dark: #1d4ed8;
    --brand-secondary: #f59e0b;
    --brand-success: #16a34a;
    --brand-bg-soft: #f8fafc;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    color: #1f2937;
    background-color: #ffffff;
}

a {
    color: var(--brand-primary);
}

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
}

.navbar-brand {
    color: var(--brand-primary) !important;
}

.badge-free {
    background-color: var(--brand-success);
}

.badge-members {
    background-color: var(--brand-secondary);
    color: #1f2937;
}

.resource-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.resource-card .card-img-top {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.section-soft {
    background-color: var(--brand-bg-soft);
}

.hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: #fff;
}

footer a:hover {
    color: #fff !important;
}

.favorite-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.15);
}

.favorite-btn.active {
    background-color: #fff;
}

/* ---------------------------------------------------------------------
   Teacher review & rating system
   ------------------------------------------------------------------- */

/* Interactive star selector on the review form — pure CSS, radio-based.
   Markup order must be 5,4,3,2,1 (see resource.php) so that, combined
   with row-reverse below, hovering/checking a star highlights it and
   every star to its left via the general sibling selector. Works
   identically on touch (tap sets :checked) as on desktop hover. */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.star-rating-input input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.star-rating-input label {
    cursor: pointer;
    font-size: 1.85rem;
    line-height: 1;
    color: #d8dce1;
    padding: 0.25rem;
    transition: color 0.15s ease;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #f5b301;
}

/* Review cards on the resource detail page */
.review-item .review-text {
    overflow-wrap: break-word;
    word-break: break-word;
}

.review-helpful-btn.active {
    background-color: var(--brand-bg-soft);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}
