/*
Theme Name: CheckROI
Theme URI: https://checkroi.ru
Author: CheckROI Team
Author URI: https://checkroi.ru
Description: Тема для агрегатора онлайн-курсов и сервисов CheckROI
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: Private
Text Domain: checkroi
*/

/* ==========================================================================
   Base styles
   ========================================================================== */

:root {
    /* Brand */
    --color-primary: #7324FF;
    --color-primary-dark: #5a10e0;
    --color-primary-light: #9B5FFF;

    /* Semantic */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* Text */
    --color-text: #272B37;
    --color-text-light: #5A5E6A;
    --color-text-muted: #8A8F9E;

    /* Backgrounds */
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;

    /* Borders */
    --color-border: #E4E9F2;

    /* Typography */
    --font-heading: 'Inter Tight', Arial, sans-serif;
    --font-sans: 'Inter', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Layout */
    --radius: 8px;
    --radius-lg: 15px;
    --grid-gap: 30px;
    --container-max: 1520px;
    --container-padding: 50px;

    /* Shadows */
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

.site-header .site-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--color-text);
}

.site-title a:hover {
    text-decoration: none;
}

.site-main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 40px 0;
    text-align: center;
    color: var(--color-text-light);
}

/* ==========================================================================
   Components
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
    text-decoration: none;
}

.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

/* ==========================================================================
   Archive Header
   ========================================================================== */

.archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.archive-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.archive-description {
    color: var(--color-text-light);
    font-size: 18px;
    margin: 0;
}

/* ==========================================================================
   Schools
   ========================================================================== */

.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.school-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.school-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.school-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.school-card-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.school-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.school-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

.school-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.school-card-rating,
.school-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rating-stars {
    color: #f59e0b;
    letter-spacing: 2px;
}

.rating-value {
    font-weight: 600;
    color: var(--color-text);
}

.school-card-excerpt {
    color: var(--color-text-light);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Single School */

.school-single {
    max-width: 800px;
    margin: 0 auto;
}

.school-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.school-logo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-alt);
}

.school-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.school-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.school-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--color-text-light);
    font-size: 14px;
}

.school-website {
    color: var(--color-primary);
}

.school-content {
    font-size: 16px;
    line-height: 1.8;
}

.school-content p {
    margin-bottom: 1.5em;
}

@media (max-width: 600px) {
    .school-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .school-meta {
        justify-content: center;
    }
}

/* ==========================================================================
   Typography — Inter Tight for headings, Inter for body
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.site-title,
.section-header,
.archive-title,
.school-card-title,
.school-title,
.card-title {
    font-family: var(--font-heading);
}
