/* ============================================
   ИНСТИТУТ МЕДИАКОНТЕНТА — Основной CSS
   my-artist.ru
   ============================================ */

/* ---------- Сброс и переменные ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #1B211A;
    --bg-2: #151914;
    --bg-3: #0f1210;
    --accent: #8BAE66;
    --accent-2: #628141;
    --text: #ffffff;
    --muted: #c5d0c0;
    --card: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Header ---------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 6%;
    background: rgba(27, 33, 26, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

nav a {
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--accent);
}

nav a.active {
    color: var(--accent);
}

nav a.active::after {
    width: 100%;
}

/* ---------- Hero Slider (компактное окно) ---------- */
.hero {
    position: relative;
    width: 100%;
    padding: 110px 20px 60px;
    background: linear-gradient(135deg, rgba(98, 129, 65, 0.08) 0%, rgba(139, 174, 102, 0.04) 100%);
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Обёртка слайдера + контролов */
.slider-wrapper {
    position: relative;
}

/* Сам слайдер — теперь без внутренних контролов */
.slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 630;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 174, 102, 0.2);
    background: var(--bg-2);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* Градиентная рамка */
.slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(139, 174, 102, 0.5) 0%, rgba(98, 129, 65, 0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
}

/* Контролы — теперь ПОД слайдером */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 40px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.slider-arrow {
    width: 44px;
    height: 44px;
    background: rgba(139, 174, 102, 0.15);
    border: 1px solid rgba(139, 174, 102, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.slider-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--accent);
    width: 30px;
    border-radius: 5px;
}

.dot:hover {
    background: rgba(139, 174, 102, 0.6);
}

/* Hero placeholder (заглушка, если нет баннеров) */
.hero-placeholder {
    display: none;
}

/* ---------- Journal (Журнал новостей) ---------- */
.journal {
    padding: 80px 6%;
    background: var(--bg-2);
    position: relative;
}

.journal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(98, 129, 65, 0.08) 0%, transparent 100%);
    pointer-events: none;
}

.journal .container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    margin-bottom: 50px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 40px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    margin-right: 16px;
    vertical-align: middle;
    border-radius: 3px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 1rem;
    max-width: 600px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.news-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 174, 102, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.news-img {
    width: 100%;
    aspect-ratio: 1200 / 630; /* ← Пропорции 1200x630 */
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.news-img-default {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    /* aspect-ratio наследуется от .news-img */
}

.news-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.3;
}

.news-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 18px;
    line-height: 1.5;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted);
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.news-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-content {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
    font-size: 1.1rem;
}

/* ---------- Страница новости (news.php) ---------- */
.news-full {
    padding: 140px 6% 60px;
    background: var(--bg-2);
    min-height: 100vh;
}

.news-full .container {
    max-width: 900px;
    margin: 0 auto;
}

.news-full-image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.news-full-content {
    max-width: 800px;
    margin: 0 auto;
}

.news-full-content h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.2;
    font-weight: 800;
}

.news-full-content .news-meta {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.news-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--muted);
}

.news-content p {
    margin-bottom: 20px;
}

.news-content h2,
.news-content h3 {
    color: var(--text);
    margin: 30px 0 15px;
    font-weight: 700;
}

.news-content h2 {
    font-size: 1.6rem;
}

.news-content h3 {
    font-size: 1.3rem;
}

.news-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}

.news-content a {
    color: var(--accent);
    text-decoration: underline;
}

.news-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 10px 20px;
    margin: 20px 0;
    background: rgba(139, 174, 102, 0.1);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.news-content ul,
.news-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.news-content li {
    margin-bottom: 8px;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    color: var(--accent);
    font-weight: 600;
    transition: color 0.3s;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
}

.back-link:hover {
    color: var(--accent-2);
    border-bottom-color: var(--accent);
}

/* ---------- Footer ---------- */
footer {
    background: var(--bg-3);
    padding: 70px 6% 30px;
    border-top: 1px solid var(--border);
}

footer .container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--muted);
    margin-bottom: 20px;
    max-width: 340px;
    line-height: 1.6;
}

.socials {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
}

.social-btn:hover {
    background: var(--accent);
    transform: translateY(-4px);
    border-color: var(--accent);
}

.footer-col h4 {
    margin-bottom: 18px;
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--muted);
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------- Адаптивность ---------- */
@media (max-width: 968px) {
    .header-container {
        flex-direction: column;
        gap: 16px;
    }

    nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding-top: 180px; /* ← Добавили отступ для планшетов */
    }

    .slider {
    }

    .slider-controls {
        gap: 16px;
        padding: 10px 20px;
        margin-top: 16px;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    header {
        padding: 14px 5%;
    }

    nav ul {
        gap: 14px;
    }

    .hero {
        padding: 160px 10px 40px; /* ← Увеличили с 100px до 160px */
    }

    .slider {
    }

    .slider-controls {
        gap: 12px;
        padding: 10px 16px;
        width: calc(100% - 20px);
        justify-content: center;
    }

    .slider-arrow {
        display: flex; /* Оставляем стрелки, они теперь не перекрывают баннер */
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .journal {
        padding: 60px 5%;
    }

    .news-img {
        aspect-ratio: 16 / 9; /* ← Чуть более квадратные на мобильных */
    }

    .news-full {
        padding: 100px 5% 40px;
    }

    .news-full-image {
        height: 250px;
    }
}