/* css/layout.css - Стили для основных макетов (хедер, футер, контейнеры, сетки) */

/* --- Header Layout --- */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.header-top-bar {
    background-color: var(--header-top-bg);
    color: #fff;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    flex-wrap: wrap;
}

.top-bar-left span,
.top-bar-right span {
    margin-right: 25px;
    white-space: nowrap;
}

.top-bar-left i,
.top-bar-right i {
    margin-right: 8px;
    color: var(--green-accent);
}

.header-main-nav-area {
    padding: 15px 0;
}

.header-main-nav-area .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding img {
    max-height: 70px;
    width: auto;
}

.main-navigation {
    display: block; /* Visible on desktop */
}
.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 0; /* Убрать дефолтный margin */
    padding: 0; /* Убрать дефолтный padding */
}

.main-navigation li a {
    color: var(--dark-text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 0;
    display: block;
    position: relative;
}

.main-navigation li a:hover {
    color: var(--main-accent-color);
}

.main-navigation li.current-menu-item a {
    color: var(--main-accent-color);
}
.main-navigation li.current-menu-item a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 3px;
    background-color: var(--main-accent-color);
}

.header-widgets {
    display: flex;
    align-items: center;
    gap: 20px; /* Отступ между элементами в виджетах */
    margin-left: 30px;
}

.client-login-btn {
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    color: var(--dark-text-color);
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px; /* Использовать 5px, так как var(--border-radius) не определен здесь */
    transition: all 0.2s ease;
    white-space: nowrap; /* Не переносить текст кнопки */
}

.client-login-btn:hover {
    color: var(--main-accent-color);
    border-color: var(--main-accent-color);
    /* Закомментировал background-color с var(--main-accent-rgb), так как он не определен в этом файле. */
    /* background-color: rgba(var(--main-accent-rgb), 0.05); */ 
}

.client-login-btn i {
    margin-right: 8px;
    color: var(--main-accent-color); /* Цвет иконки */
}


/* --- Mobile Menu Toggle --- */
.mobile-menu-toggle {
    display: none; /* Hidden by default on desktop, shown in responsive.css */
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-text-color);
    cursor: pointer;
    padding: 5px; /* Для удобства клика */
}
.mobile-menu-toggle:hover {
    color: var(--main-accent-color);
}


/* --- Mobile Navigation Overlay --- */
.mobile-nav-overlay {
    display: none; /* Hidden by default, controlled by JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 9999;
    justify-content: flex-end; /* Slide in from right */
    align-items: flex-start;
    opacity: 0; /* Для плавного появления оверлея */
    transition: opacity 0.3s ease-in-out;
}

.mobile-nav-overlay.active {
    opacity: 1;
    display: flex; /* Показываем оверлей */
}

.mobile-nav-content {
    background-color: #fff;
    width: 300px;
    height: 100%;
    padding: 30px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    transform: translateX(100%); /* Изначально скрыто справа */
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0); /* Slide in */
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 40px;
    color: #333;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.mobile-navigation ul {
    list-style: none;
    padding: 0;
    margin-top: 50px; /* Отступ от верхней части, чтобы не перекрывать кнопку закрытия */
    margin-bottom: 0;
}
.mobile-navigation li {
    margin-bottom: 0; /* Сбрасываем, чтобы контролировать через padding/border */
    border-bottom: 1px solid #eee;
}
.mobile-navigation li:last-child {
    border-bottom: none;
}
.mobile-navigation a {
    display: block;
    padding: 12px 0;
    font-size: 1.1em;
    color: var(--dark-text-color);
    text-decoration: none;
    font-weight: 600;
}
.mobile-navigation a:hover {
    color: var(--main-accent-color);
}
/* Стили для ссылок "Личный кабинет" и "Выход" в мобильном меню */
.mobile-navigation li a i {
    margin-right: 10px;
    color: var(--main-accent-color);
}

.mobile-contact-info {
    margin-top: auto; /* Прижимает блок к низу меню */
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}
.mobile-contact-info p {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-bottom: 8px;
}
.mobile-contact-info i {
    margin-right: 8px;
    color: var(--main-accent-color);
}

/* --- Footer Layout --- */
.site-footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 50px 0 30px;
    font-size: 15px;
}

.footer-widgets-area {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #555;
    margin-bottom: 20px;
}

.footer-widget h3 {
    color: var(--green-accent); /* Возможно, здесь должен быть другой акцентный цвет футера */
    margin-bottom: 25px;
    font-size: 1.5em;
    font-weight: 700;
}

.footer-about .footer-logo img {
    max-height: 50px;
    margin-bottom: 20px;
}

.footer-about p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
}

.social-links {
    margin-top: 20px;
}
.social-links a {
    color: #fff;
    font-size: 20px;
    margin-right: 15px;
    transition: color 0.3s ease-in-out;
}

.social-links a:hover {
    color: var(--green-accent);
}

.footer-widget i {
    margin-right: 10px;
    color: var(--green-accent); /* Возможно, здесь должен быть другой акцентный цвет футера */
}

.footer-nav-menu ul {
    list-style: none;
    padding: 0; /* Убрать дефолтный padding */
    margin: 0; /* Убрать дефолтный margin */
}

.footer-nav-menu li {
    margin-bottom: 12px;
}

.footer-nav-menu li a {
    color: #fff;
    transition: color 0.3s ease-in-out;
    text-decoration: none;
}

.footer-nav-menu li a:hover {
    color: var(--green-accent);
}

.footer-contact-info .contact-block {
    margin-bottom: 20px;
}

.footer-contact-info .contact-block h4 {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.footer-contact-info .contact-block p {
    margin-bottom: 5px;
    color: rgba(255,255,255,0.8);
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: rgba(255,255,255,0.8);
    font-size: 0.9em;
}

.site-info a {
    color: var(--green-accent);
    text-decoration: none;
    margin: 0 5px;
}

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

/* --- Content Block (General for inner pages) --- */
.content-block {
    padding: 60px 0;
    background-color: #fff;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}