/*
Theme Name: StroyCrimea Portal
Author: Senior Frontend Designer
Description: Концепция "Южная надежность": Светлые тона, морская синева и акцент на климатических особенностях региона.
Version: 1.0.0
Text Domain: stroycrimea
*/

:root {
    /* Colors - Coastal & Solid */
    --bg: #fdfcfb;
    --surface: #f3f6f9;
    --surface-dark: #002b4d;
    --primary: #005fa3; /* Mediterranean Blue */
    --primary-dim: rgba(0, 95, 163, 0.08);
    --accent: #e67e22; /* Terracotta / Sunset Orange */
    --text: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    
    /* Spacing */
    --gap: 2.5rem;
    --header-height: 90px;
    --container-width: 1300px;
    
    /* Fonts */
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    background-color: var(--bg); 
    color: var(--text); 
    font-family: var(--font-body); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: 0.3s ease; }
ul { list-style: none; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--gap); }

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.2; color: var(--surface-dark); }
.text-label { text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; font-weight: 700; color: var(--accent); }

/* Header */
.site-header {
    height: var(--header-height);
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--surface-dark);
    flex-shrink: 0;
}
.logo span { color: var(--primary); }

.main-nav ul { display: flex; gap: 3.5rem; }
.main-nav a { 
    font-weight: 700; 
    font-size: 0.9rem; 
    color: var(--surface-dark);
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary);
    transition: 0.3s;
}
.main-nav a:hover::after, .main-nav .current-menu-item a::after { width: 100%; }

.menu-toggle { 
    display: none; 
    background: var(--surface-dark); 
    color: #fff; 
    border: none; 
    padding: 0.8rem; 
    border-radius: 8px;
    cursor: pointer; 
}
.hamburger { width: 22px; height: 2px; background: #fff; position: relative; display: block; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 100%; height: 2px; background: #fff; left: 0; transition: 0.3s; }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Hero - Option B: Image Left, Text Right */
.hero {
    padding: 8rem 0;
    background: linear-gradient(to right, #fff 50%, var(--surface) 50%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
}

.hero-image-wrap {
    position: relative;
    padding-right: 4rem;
}
.hero-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: url('banner.png') center/cover;
    border-radius: 20px;
    box-shadow: 30px 30px 0 var(--primary-dim);
    position: relative;
    z-index: 2;
}
.hero-image::before {
    content: '';
    position: absolute;
    top: -20px; left: -20px; width: 100px; height: 100px;
    border-top: 5px solid var(--accent);
    border-left: 5px solid var(--accent);
}

.hero-content { position: relative; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin: 1.5rem 0 2rem; color: var(--surface-dark); }
.hero-desc { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 3rem; max-width: 550px; }

/* Climate Focus Block */
.climate-block {
    background: var(--surface-dark);
    padding: 6rem 0;
    color: #fff;
    margin-top: -3rem;
    position: relative;
    z-index: 5;
    border-radius: 30px 30px 0 0;
}

.climate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.climate-item h3 { color: var(--primary); margin-bottom: 1.5rem; font-size: 1.4rem; }
.climate-item p { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

/* Phase Navigator */
.phase-nav {
    padding: 10rem 0;
}
.phase-title { text-align: center; margin-bottom: 6rem; }

.phase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.phase-card {
    background: #fff;
    padding: 3rem 2rem;
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: 0.4s;
    text-align: center;
}
.phase-card:hover { border-color: var(--primary); transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.phase-icon {
    width: 60px; height: 60px;
    background: var(--primary-dim);
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 2rem;
    font-weight: 800;
}

/* Post Grid */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 6rem;
}

.post-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.card-img-wrap {
    height: 240px;
    overflow: hidden;
}
.card-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.post-card:hover .card-img { transform: scale(1.1); }

.card-content { padding: 2.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-cat { color: var(--accent); font-weight: 700; font-size: 0.75rem; margin-bottom: 1rem; display: block; }
.card-title { font-size: 1.4rem; margin-bottom: 1.5rem; color: var(--surface-dark); line-height: 1.3; }
.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2.5rem; flex-grow: 1; }

.btn-crimea {
    background: var(--primary);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    display: inline-block;
    font-size: 0.9rem;
}
.btn-crimea:hover { background: var(--surface-dark); transform: translateY(-2px); }

/* Footer */
.site-footer {
    background: var(--surface);
    padding: 8rem 0 4rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-logo { margin-bottom: 2rem; }
.footer-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

.footer-col h4 { margin-bottom: 2.5rem; font-size: 1.1rem; color: var(--surface-dark); }
.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); padding-left: 5px; }

.footer-contact p { margin-bottom: 1.5rem; color: var(--text-muted); }
.footer-contact label { display: block; font-size: 0.75rem; color: var(--primary); font-weight: 700; margin-bottom: 0.3rem; }

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

/* Pagination */
.pagination-list { display: flex; justify-content: center; gap: 1rem; padding-bottom: 8rem; }
.pagination-item a, .pagination-item span {
    padding: 1rem 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 700;
}
.pagination-item.is-active span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Single Post Styles */
.single-post-header {
    background: var(--surface);
    padding: 4rem 0;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border);
}

.breadcrumbs {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: 0.3; }

.post-header-content { max-width: 900px; }
.post-header-content h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; margin-bottom: 0; }

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
}
.post-cat a { color: var(--accent); }
.post-meta-top .sep { opacity: 0.2; }

.single-post-layout {
    max-width: 900px;
    margin: 0 auto 10rem;
}

.post-featured-image {
    margin-bottom: 4rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
.post-featured-image img { width: 100%; height: auto; display: block; }

.post-content-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text);
}

.post-content-body h2 { font-size: 2.2rem; margin: 4rem 0 2rem; }
.post-content-body h3 { font-size: 1.8rem; margin: 3rem 0 1.5rem; }
.post-content-body p { margin-bottom: 2rem; }

.post-content-body ul, .post-content-body ol {
    margin: 2rem 0;
    padding-left: 1.5rem;
}
.post-content-body li { margin-bottom: 1rem; position: relative; }
.post-content-body ul li::before {
    content: '';
    position: absolute;
    left: -1.5rem; top: 0.7em;
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.post-content-body blockquote {
    margin: 4rem 0;
    padding: 3rem;
    background: var(--primary-dim);
    border-left: 4px solid var(--primary);
    font-style: italic;
    font-size: 1.4rem;
    color: var(--surface-dark);
}

.post-footer {
    margin-top: 6rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}
.post-tags a {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--surface);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 0.5rem;
}
.post-tags a:hover { background: var(--primary); color: #fff; }

/* Mobile Post Adjustments */
@media (max-width: 768px) {
    .single-post-header { padding: 3rem 0; }
    .post-content-body { font-size: 1.05rem; }
    .post-content-body h2 { font-size: 1.8rem; }
    .post-content-body h3 { font-size: 1.5rem; }
}

/* Mobile */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 4rem; text-align: center; }
    .hero { background: #fff; }
    .hero-image-wrap { padding-right: 0; }
    .hero-desc { margin: 0 auto 3rem; }
    .climate-grid { grid-template-columns: 1fr; gap: 3rem; }
    .phase-grid { grid-template-columns: repeat(2, 1fr); }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: fixed; top: var(--header-height); left: 0; width: 100%; height: 100vh;
        background: #fff; z-index: 999; padding: 4rem 0;
    }
    .main-nav ul { flex-direction: column; align-items: center; gap: 2.5rem; }
    .menu-toggle { display: block; }
    .post-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
