/*
Theme Name: Custom Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: Кастомная тема WordPress с двумя типами страниц и гибкими настройками цветов
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: custom-theme
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

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

img.aligncenter,
.wp-block-image.aligncenter img,
.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

img.alignleft,
.wp-block-image.alignleft,
.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

img.alignright,
.wp-block-image.alignright,
.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

figure {
    margin: 0;
}

.wp-block-image figcaption {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.site-title a {
    color: inherit;
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    max-height: 50px;
    width: auto;
}

.mobile-menu-toggle {
    display: none;
}

/* Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    display: inline-block;
}

/* Header Buttons */
.header-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 15px;
}

.header-button {
    padding: 10px 25px;
    background: #0066cc;
    color: white !important;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.header-button:hover {
    background: #0052a3;
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    position: relative;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
    display: block;
    position: absolute;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 12px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle span:nth-child(3) {
    bottom: 12px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Body padding for fixed header */
body {
    padding-top: 58px;
}

body.menu-open {
    overflow: hidden;
}

/* Banner */
.page-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    width: 100%;
}

/* Banner Link */
.page-banner-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}


.page-banner-link.clicked {
    transform: scale(0.98);
    opacity: 0.8;
}

.page-banner-link.loading {
    opacity: 0.7;
    cursor: wait;
}

.page-banner-link.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #ffffff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hide desktop banner on mobile, show mobile banner */
@media (max-width: 768px) {
    .page-banner:not(.mobile-banner) {
        display: none;
    }
    .page-banner.mobile-banner {
        display: block;
    }
    .page-banner-link:not(.mobile-banner-link) {
        display: none;
    }
    .page-banner-link.mobile-banner-link {
        display: block;
    }
}

/* Hide mobile banner on desktop */
@media (min-width: 769px) {
    .page-banner.mobile-banner {
        display: none;
    }
    .page-banner-link.mobile-banner-link {
        display: none;
    }
}

/* Content */
.site-content {
    padding: 20px 0;
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: #2c3e50;
}

thead th {
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 15px 20px;
    font-size: 16px;
}

tbody tr {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

tbody tr:nth-child(even) {
    background: #f8f9fa;
}

tbody tr:hover {
    background: #e3f2fd;
}

tbody td {
    padding: 15px 20px;
    color: #333333;
}

tbody tr:last-child {
    border-bottom: none;
}

/* Table wrapper for mobile scroll */
.table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
    -webkit-overflow-scrolling: touch;
}

/* Reviews Section */
.reviews-section {
    margin: 20px 0;
}

.reviews-section h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 36px;
    position: relative;
    padding-bottom: 20px;
}

.reviews-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #f39c12, #f1c40f);
}

.review-item {
    background: #f9f9f9;
    padding: 35px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #f39c12;
}

.review-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.review-author-info {
    flex: 1;
}

.review-author {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.review-date {
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

.review-rating {
    color: #f39c12;
    font-size: 22px;
    letter-spacing: 3px;
    flex-shrink: 0;
}

.review-text {
    line-height: 1.8;
    color: #555;
}

.review-text p {
    margin: 0;
}

/* FAQ Section */
.faq-section {
    margin: 20px 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 32px;
}

.faq-item {
    margin-bottom: 25px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    background: #f5f5f5;
    padding: 20px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #efefef;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    transition: transform 0.3s;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 20px;
    display: none;
    line-height: 1.8;
    background: #ffffff;
}

.faq-answer.active {
    display: block;
}

.faq-answer p {
    margin-bottom: 10px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Footer */
.site-footer {
    margin-top: 60px;
}

/* Footer Widgets */
.footer-widgets {
    padding: 60px 0 40px;
    border-top: 1px solid #e0e0e0;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-widget-column {
    min-width: 0;
}

.footer-widget {
    margin-bottom: 30px;
}

.footer-widget:last-child {
    margin-bottom: 0;
}

.footer-widget .widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: inherit;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-widget ul li a {
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-widget ul li a:hover {
    opacity: 0.7;
}

/* Footer Bottom */
.footer-bottom {
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    text-align: center;
}

.footer-custom-text {
    margin-top: 20px;
    line-height: 1.8;
}

.footer-custom-text p {
    margin-bottom: 15px;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

/* Buttons */
.button,
button,
input[type="submit"],
input[type="button"],
.read-more {
    display: inline-block;
    padding: 12px 30px;
    background: #0066cc;
    color: white !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 500;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.read-more:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,102,204,0.3);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0066cc;
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 33px;
    }
    
    /* Table mobile scroll */
    .page-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    thead th,
    tbody td {
        padding: 12px 15px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .site-header {
        padding: 15px 0;
    }
    
    .site-header .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: white;
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 80px 30px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .main-navigation.active {
        right: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        text-align: left;
    }
    
    .main-navigation li {
        border-bottom: 1px solid #eee;
    }
    
    .main-navigation li a {
        display: block;
        padding: 15px 0;
    }
    
    .header-buttons {
        position: fixed;
        bottom: 0;
        left: auto;
        right: 0;
        width: 280px;
        flex-direction: column;
        gap: 12px;
        padding: 20px 30px;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .main-navigation.active + .header-buttons,
    .header-buttons.active {
        transform: translateX(0);
    }
    
    .header-button {
        text-align: center;
        width: 100%;
    }

    .footer-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-widgets {
        padding: 40px 0 30px;
    }
    
    .reviews-section h2 {
        font-size: 28px;
    }
    
    .review-item {
        padding: 25px 20px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-author {
        font-size: 18px;
    }
    
    .review-rating {
        font-size: 20px;
    }
}

