/* academies.co.il – Modern Hebrew RTL design */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #0ea5e9;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
    --shadow-hover: 0 4px 20px rgba(37,99,235,.12);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Heebo', sans-serif;
    --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 2rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-area > i {
    font-size: 2.5rem;
    opacity: .9;
}

.logo-area h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.tagline {
    font-size: .95rem;
    opacity: .85;
    font-weight: 300;
}

.header-stats .stat {
    background: rgba(255,255,255,.15);
    padding: .5rem 1.25rem;
    border-radius: 2rem;
    font-size: .9rem;
}

.header-stats strong {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Filters */
.filters-section {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.search-box {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.search-box i {
    position: absolute;
    right: .875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: .625rem 2.5rem .625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .95rem;
    transition: border-color var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.filter-group label {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-group select {
    padding: .625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .9rem;
    background: #fff;
    cursor: pointer;
}

.results-count {
    margin-top: .75rem;
    font-size: .85rem;
    color: var(--text-muted);
}

/* Grid */
.academies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0 3rem;
}

/* Card */
.academy-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.academy-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.academy-card.hidden { display: none; }

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.academy-card:hover .card-image img {
    transform: scale(1.04);
}

.type-badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: rgba(255,255,255,.92);
    color: var(--primary-dark);
    padding: .25rem .75rem;
    border-radius: 2rem;
    font-size: .75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.card-header {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
}

.academy-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.academy-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

.card-title-area h2 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
}

.location {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

.location i {
    margin-left: .25rem;
    font-size: .75rem;
}

/* Meta */
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--primary);
    font-size: .75rem;
}

.meta-item.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.meta-item.link:hover {
    text-decoration: underline;
}

/* Degrees */
.degrees {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.degree-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    min-width: 52px;
    cursor: default;
}

.degree-icon i {
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity var(--transition);
}

.degree-icon.active i {
    background: var(--primary-light);
    color: var(--primary);
}

.degree-icon.inactive {
    opacity: .2;
}

.degree-label {
    font-size: .6rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}

/* Summary */
.summary {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* No results */
.no-results {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.no-results i {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: .4;
}

/* Footer */
.site-footer {
    background: var(--text);
    color: rgba(255,255,255,.7);
    padding: 2rem 0;
    text-align: center;
    font-size: .85rem;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.copyright {
    margin-top: .5rem;
    opacity: .5;
}

/* Responsive */
@media (max-width: 768px) {
    .academies-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    .filter-group,
    .filter-group select,
    .search-box {
        width: 100%;
    }

    .logo-area h1 { font-size: 1.4rem; }
}
