/*
Theme Name: Грани инноваций
Theme URI: https://graninov.ru/
Author: Custom Theme
Author URI: https://graninov.ru/
Description: Тема для АНО «Грани инноваций» — социально-образовательных проектов. Чёрная шапка и подвал с оранжевым текстом, белое основное тело.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: graninov
*/

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* ===== ЗАКРЕПЛЁННОЕ ВЕРХНЕЕ МЕНЮ — ЧЁРНЫЙ ФОН, ОРАНЖЕВЫЙ ТЕКСТ ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #000000;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border-bottom: 2px solid #ff6600;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    color: #ff6600;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: #ffffff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: #ff6600;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
    font-weight: 600;
}

.nav-menu a:hover {
    color: #ffffff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6600;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ff6600;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== ОТСТУП ДЛЯ ЗАКРЕПЛЁННОГО МЕНЮ ===== */
.main-content {
    padding-top: 60px;
}

/* ===== HERO СЕКЦИЯ — ЧЁРНЫЙ ФОН, ОРАНЖЕВЫЙ АКЦЕНТ ===== */
.hero {
    background: #000000;
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    border-bottom: 3px solid #ff6600;
}

.hero-subtitle {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ff6600;
    margin-bottom: 15px;
    font-weight: 600;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
    color: #ffffff;
}

.hero-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #cccccc;
    font-style: italic;
}

/* ===== ОСНОВНОЙ КОНТЕНТ — БЕЛЫЙ ФОН ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #000000;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #ff6600;
}

/* ===== СЕТКА В ДВЕ КОЛОНКИ ===== */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* ===== КАРТОЧКИ ПРОЕКТОВ — БЕЛЫЙ ФОН, ЧЁРНЫЙ ТЕКСТ ===== */
.project-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eeeeee;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #ff6600;
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Изображения внутри одиночной записи — сохраняют пропорции */
.single-post .project-image,
.single-projects .project-image,
.entry-content img,
.wp-post-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    aspect-ratio: auto;
    max-width: 100%;
    display: block;
    border-radius: 4px;
}

/* Галерея внутри записи */
.entry-content .wp-block-gallery img,
.entry-content .gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: auto;
}

.project-content {
    padding: 25px;
    background: #ffffff;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 10px;
    line-height: 1.4;
}

.project-subtitle {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.project-link {
    display: inline-block;
    color: #ff6600;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    transition: color 0.3s;
}

.project-link:hover {
    color: #000000;
}

/* ===== О НАС / ТЕКСТОВЫЙ БЛОК — БЕЛЫЙ ФОН ===== */
.about-section {
    background: #ffffff;
    padding: 60px 20px;
    margin-bottom: 40px;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-title {
    font-size: 1.5rem;
    color: #000000;
    margin-bottom: 20px;
    font-weight: 700;
}

.about-text {
    font-size: 1rem;
    color: #333333;
    line-height: 1.8;
}

/* ===== УСЛУГИ — ЧЁРНЫЙ ФОН, ОРАНЖЕВЫЙ ТЕКСТ ===== */
.services-section {
    background: #000000;
    color: #ffffff;
    padding: 60px 20px;
    border-top: 3px solid #ff6600;
    border-bottom: 3px solid #ff6600;
}

.services-section .section-title {
    color: #ffffff;
}

.services-section .section-title::after {
    background: #ff6600;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-item {
    text-align: center;
    padding: 20px;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.service-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ff6600;
}

.service-desc {
    font-size: 0.85rem;
    color: #cccccc;
    line-height: 1.6;
}

/* ===== ФУТЕР — ЧЁРНЫЙ ФОН, ОРАНЖЕВЫЙ ТЕКСТ ===== */
.footer {
    background: #000000;
    color: #ff6600;
    padding: 60px 20px 30px;
    border-top: 3px solid #ff6600;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-block h3 {
    color: #ff6600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-block p {
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 10px;
    color: #ffffff;
}

.footer-contact {
    font-size: 1rem;
    color: #ff6600;
    font-weight: 600;
    margin-bottom: 5px;
}

.footer-address {
    font-size: 0.85rem;
    color: #aaaaaa;
    margin-top: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333333;
    font-size: 0.8rem;
    color: #666666;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
    .two-column-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #000000;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 2px solid #ff6600;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

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

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ СТРАНИЦ ===== */
.page-content {
    background: #ffffff;
    padding: 40px 20px;
}

.page-content h1 {
    color: #000000;
    font-size: 2rem;
    margin-bottom: 30px;
}

.page-content p {
    color: #333333;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* ===== СТИЛИ ДЛЯ ОТДЕЛЬНОЙ ЗАПИСИ (SINGLE) ===== */
.single-container {
    padding-top: 100px;
    max-width: 900px;
}

.single-article {
    background: #ffffff;
    padding: 40px 0;
}

.single-thumbnail {
    margin-bottom: 30px;
    text-align: center;
}

.single-featured-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.single-title {
    font-size: 2rem;
    color: #000000;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.single-subtitle {
    color: #ff6600;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-style: italic;
    font-weight: 600;
}

.entry-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333333;
}

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

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
}

.entry-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.entry-content .alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.entry-content .alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.entry-content figure {
    margin: 20px 0;
}

.entry-content figcaption {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 8px;
}

.single-back-link {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

/* Очистка float после изображений */
.entry-content::after {
    content: "";
    display: table;
    clear: both;
}
