@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
    /* Корпоративные цвета со скриншота */
    --primary: #4f5df1; /* Яркий синий для кнопок и акцентов */
    --primary-hover: #3b46c4;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --card-dark: #1e1e2c; /* Темно-синий/серый для контрастных блоков */
    --text-main: #333333;
    --text-light-bg: #ffffff;
    --text-muted: #888888;
    --border-color: #eaeaea;
    
    /* Градиент хедера со скриншота (глубокий сине-фиолетовый) */
    --header-bg: linear-gradient(135deg, #515cf4 0%, #3f49cf 100%);
    --header-text: #ffffff;
    
    --radius: 4px;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.04);
}

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

body { 
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
a:hover { color: var(--primary); }
ul { list-style: none; }

.icon { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: middle; fill: currentColor; }

/* Header - Имитация геометрического синего фона со скриншота */
.site-header { 
    background: var(--header-bg);
    /* Добавляем геометрические треугольники на фон с помощью градиентов */
    background-image: 
        linear-gradient(115deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.05) 30%, transparent 30%),
        linear-gradient(250deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 40%, transparent 40%),
        var(--header-bg);
    color: var(--header-text); 
    padding: 30px 0 120px 0;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 95%); /* Легкий скос внизу */
}

.header-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 10px 20px; 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: center; 
    gap: 15px; 
}

/* Логотип с имитацией желтой плашки */
.logo { 
    font-size: 1.8rem; 
    color: var(--header-text); 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.logo::after {
    content: 'FREE';
    background: #f1c40f;
    color: #111;
    font-size: 0.6rem;
    padding: 3px 6px;
    border-radius: 3px;
    vertical-align: top;
    margin-top: -10px;
}

/* Big Header Text ("the best Solutions.") */
.hero-title-area {
    max-width: 1200px; 
    margin: 100px auto 80px auto; 
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title-area h1 {
    font-size: clamp(4rem, 8vw, 7rem);
    color: white;
    text-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 0 auto;
}
/* Добавляем надпись "Fresh Ideas..." через псевдоэлемент, так как менять HTML нельзя */
.hero-title-area h1::after {
    content: 'Fresh Ideas for Your Business';
    display: block;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 400;
    font-style: italic;
    margin-top: 20px;
    position: relative;
}

/* Search */
.search-wrapper { flex-grow: 1; max-width: 300px; position: relative; display: none; }
@media(min-width: 768px) { .search-wrapper { display: block; } }
.search-input { width: 100%; padding: 10px 40px 10px 20px; border-radius: 50px; border: none; background: rgba(255,255,255,0.1); outline: none; font-size: 0.85rem; color: #fff; transition: background 0.3s; }
.search-input::placeholder { color: rgba(255,255,255,0.6); }
.search-input:focus { background: rgba(255,255,255,0.2); }
.search-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #fff; cursor: pointer; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-radius: var(--radius); margin-top: 10px; box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; display: none; z-index: 100; color: var(--text-main); }
.search-results.active { display: block; }
.search-item { display: block; padding: 15px; border-bottom: 1px solid var(--border-color); }
.search-item-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 5px; }
.search-item-desc { font-size: 0.8rem; color: var(--text-muted); }

/* Nav Buttons */
.header-nav { display: flex; align-items: center; gap: 30px; }
.nav-btn { background: none; border: none; color: rgba(255,255,255,0.8); cursor: pointer; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; transition: color 0.3s; }
.nav-btn:hover { color: #fff; }

/* Синяя кнопка READ MORE */
.btn-primary { 
    background-color: var(--primary); 
    color: #fff; 
    padding: 14px 35px; 
    border-radius: 50px; 
    font-weight: 700; 
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    transition: all 0.3s ease; 
    box-shadow: 0 10px 20px rgba(79, 93, 241, 0.3); 
}
.btn-primary:hover { 
    background-color: var(--primary-hover);
    transform: translateY(-2px); 
    box-shadow: 0 15px 25px rgba(79, 93, 241, 0.4); 
}

/* Main Layout - Секция About us со скриншота */
.layout-container { 
    max-width: 1200px; 
    margin: 80px auto; 
    padding: 0 20px; 
    display: flex; 
    flex-direction: column-reverse; /* Меняем местами для мобилки */
    gap: 60px; 
    flex-grow: 1; 
    width: 100%; 
    position: relative;
    z-index: 10;
}
@media(min-width: 860px) { 
    .layout-container { flex-direction: row; align-items: center; } 
}

/* Огромная надпись ABOUT на фоне */
.layout-container::before {
    content: 'ABOUT';
    position: absolute;
    bottom: -100px;
    right: 50px;
    font-size: clamp(8rem, 20vw, 18rem);
    font-weight: 800;
    color: #f7f7f7;
    z-index: -1;
    line-height: 1;
}

/* Имитация правой текстовой части About Us */
.main-content { flex-grow: 1; width: 100%; }
@media(min-width: 860px) { .main-content { width: 50%; padding-left: 40px; } }

/* Имитация левой части с картинкой */
.sidebar { width: 100%; display: flex; flex-direction: column; gap: 30px; position: relative; }
@media(min-width: 860px) { .sidebar { width: 50%; } }
/* Имитация серого прямоугольника позади картинки */
.sidebar::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 80%;
    height: 100%;
    background: #f4f5f7;
    z-index: -1;
}

/* Делаем так, чтобы карточки в сайдбаре выглядели как одно большое изображение */
.card { background-color: transparent; border: none; padding: 0; margin-bottom: 20px; box-shadow: none; }
.card img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); object-fit: cover; }

.card-dark { background-color: var(--card-dark); color: #fff; padding: 40px; border-radius: var(--radius); }
.card-dark .widget-title { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.1); }
.card-dark .stat-list li span:first-child { color: rgba(255,255,255,0.6); }
.card-dark .stat-list li span:last-child { color: #fff; font-size: 1.5rem; font-weight: 700; }

.widget-title { font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; font-weight: 600; border: none; }
.stat-list li { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; font-weight: 500; border-bottom: 1px solid var(--border-color); }
.random-links li { margin-bottom: 15px; font-weight: 500; line-height: 1.6; border-bottom: 1px solid var(--border-color); padding-bottom: 15px;}
.random-links li:last-child { border: none; }

/* Заголовок секции "What We Do" */
.page-title { 
    font-size: 3.5rem; 
    margin-bottom: 40px; 
    font-weight: 800;
    color: var(--text-main);
    position: relative;
    padding-bottom: 20px;
}
/* Синяя линия под заголовком */
.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%; /* Уходит влево, как на скрине */
    width: 150%;
    height: 2px;
    background-color: var(--primary);
}

/* Corporate Post List */
.post-list { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media(min-width: 768px) { .post-list { grid-template-columns: 1fr 1fr; } }

.post-item { background: var(--card-bg); border-radius: var(--radius); padding: 40px; transition: transform 0.3s, box-shadow 0.3s; position: relative; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); display: flex; flex-direction: column; }
.post-item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.post-item-top { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
.post-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.post-title { font-size: 1.4rem; margin-bottom: 15px; line-height: 1.3; font-weight: 700; }
.post-desc { font-size: 1rem; color: var(--text-muted); margin-bottom: 30px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; font-weight: 400; }
.post-divider { height: 1px; background-color: var(--border-color); width: 100%; margin: auto 0 20px 0; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tag { background-color: rgba(79, 93, 241, 0.1); color: var(--primary); font-size: 0.75rem; font-weight: 700; padding: 6px 15px; border-radius: 50px; text-transform: uppercase; }

.post-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; align-items: center; }
.meta-item { display: flex; align-items: center; gap: 8px; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 60px; }
.page-link { padding: 12px 20px; border: 1px solid var(--border-color); background: #fff; color: var(--text-muted); border-radius: 50px; font-weight: 600; transition: all 0.3s; }
.page-link:hover, .page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Single Post View / Testimonials */
.breadcrumb { font-weight: 500; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 30px; }
.post-main-title { font-size: 2.5rem; margin-bottom: 30px; font-weight: 800; color: var(--text-main); }

/* Message Block (Стилизуем под карточки отзывов или команду) */
.message-block { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 30px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform 0.3s; }
.message-block:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
@media(min-width: 640px) { .message-block { flex-direction: row; } }

.user-panel { background: #fafafa; padding: 30px; display: flex; flex-direction: row; align-items: center; gap: 20px; border-bottom: 1px solid var(--border-color); }
@media(min-width: 640px) { .user-panel { width: 250px; border-bottom: none; border-right: 1px solid var(--border-color); flex-direction: column; text-align: center; flex-shrink: 0; } }
.user-panel img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.user-stats { font-size: 0.8rem; color: var(--text-muted); line-height: 1.8; font-weight: 500; }

.message-content { padding: 40px; flex-grow: 1; display: flex; flex-direction: column; }
.message-header { display: flex; justify-content: space-between; margin-bottom: 25px; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.user-name { font-weight: 700; font-size: 1.2rem; color: var(--text-main); }
.badge { background: rgba(79, 93, 241, 0.1); color: var(--primary); font-size: 0.7rem; padding: 4px 10px; border-radius: 50px; margin-left: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.message-date { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.message-text { font-size: 1rem; font-weight: 400; line-height: 1.8; color: #555; }

.message-block.op-post { border-left: 4px solid var(--primary); }

/* Comments */
.comments-header { font-size: 1.5rem; margin: 60px 0 40px 0; font-weight: 700; color: var(--text-main); }
.comment { margin-bottom: 30px; }
.comment.is-reply { margin-left: 20px; border-left: 2px solid var(--border-color); padding-left: 20px; }
@media(min-width: 640px) { .comment.is-reply { margin-left: 60px; padding-left: 30px; } }
.reply-badge { font-size: 0.7rem; background: var(--text-muted); color: #fff; padding: 3px 10px; border-radius: 50px; margin-left: 10px; text-transform: uppercase; font-weight: 600; }

/* Call to action */
.cta-box { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 60px 40px; text-align: center; margin-top: 80px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
/* Декоративный круг в CTA */
.cta-box::before { content: ''; position: absolute; top: -50%; left: -10%; width: 300px; height: 300px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.cta-title { font-size: 2.2rem; margin-bottom: 20px; font-weight: 800; position: relative; z-index: 1; }
.cta-text { font-size: 1.1rem; font-weight: 400; color: rgba(255,255,255,0.9); margin-bottom: 30px; position: relative; z-index: 1; }

/* Footer - Темный, строгий корпоративный */
.site-footer { background: var(--card-dark); color: #fff; padding: 80px 20px; margin-top: auto; font-size: 0.95rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 50px; }
@media(min-width: 768px) { .footer-container { grid-template-columns: repeat(3, 1fr); } }
.footer-title { color: #fff; font-size: 1.2rem; margin-bottom: 25px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.footer-text { line-height: 1.8; color: rgba(255,255,255,0.6); font-weight: 400; }
.footer-text a { color: var(--primary); font-weight: 600; }
.footer-text a:hover { color: #fff; }