/*
Theme Name: Second Moscow
Theme URI: https://secondmoscow.ru
Author: Claude
Author URI: https://example.com
Description: Урбанистичная тема для медиа об альтернативной Москве. Минималистичный дизайн, акцент на типографику и контент. Для журнала о скрытых местах, независимой культуре и неочевидных маршрутах по городу.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: secondmoscow-theme
Tags: blog, magazine, minimalist, urban, culture, editorial
*/

/* === CSS Variables === */
:root {
    --primary-color: #2d3436;
    --secondary-color: #ff4757;
    --accent-color: #ffa502;
    --accent-blue: #5f27cd;
    --accent-green: #10ac84;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #fef9f3;
    --bg-accent: #fff5f5;
    --bg-dark: #1a1a1a;
    --border-color: #ffcdd2;
    --overlay: rgba(45, 52, 54, 0.9);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 30px;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

h1 {
    font-size: 48px;
    letter-spacing: -1px;
}

h2 {
    font-size: 36px;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 28px;
}

h4 {
    font-size: 22px;
}

p {
    margin-bottom: 20px;
}

strong {
    font-weight: 600;
    color: var(--primary-color);
}

/* === Header === */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: relative;
}

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

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title a:hover {
    color: var(--secondary-color);
}

.logo-mark {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 20px;
}

.site-description {
    color: var(--text-light);
    font-size: 14px;
    margin: 5px 0 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* === Navigation === */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.main-navigation a:hover {
    color: var(--secondary-color);
    background: var(--bg-light);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--secondary-color);
}

/* Dropdown */
.main-navigation ul ul,
.main-navigation .children {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.main-navigation ul li:hover > ul,
.main-navigation .page_item:hover > .children {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul li,
.main-navigation .children li {
    border-bottom: 1px solid var(--bg-light);
}

.main-navigation ul ul a,
.main-navigation .children a {
    padding: 12px 20px;
    font-size: 14px;
}

.main-navigation .menu-item-has-children > a::after,
.main-navigation .page_item_has_children > a::after {
    content: ' ▾';
    font-size: 10px;
    margin-left: 5px;
}

.main-navigation ul ul .menu-item-has-children > a::after,
.main-navigation .children .page_item_has_children > a::after {
    content: ' ›';
    float: right;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--secondary-color);
}

/* === Hero Section === */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 71, 87, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 165, 2, 0.2) 0%, transparent 50%),
        url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="%23ffffff" opacity="0.1"/></svg>');
    background-size: cover, cover, 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-section h1 {
    color: #fff;
    font-size: 56px;
    margin-bottom: 25px;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.hero-section .lead {
    font-size: 22px;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
    margin-bottom: 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

.hero-label {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.3);
}

/* === Image Slider === */
.image-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin: 60px 0;
    border-radius: 12px;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.slider-caption {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 2;
    color: #fff;
}

.slider-caption h3 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.slider-caption p {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 2px solid #fff;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slider-dot:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.2);
}

.slider-dot.active {
    background: var(--secondary-color);
    transform: scale(1.4);
    border-color: var(--secondary-color);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 71, 87, 0.8);
    backdrop-filter: blur(10px);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.slider-arrow:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

.slider-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

/* === Featured Content === */
.featured-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-header {
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 18px;
}

/* === Article Grid === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin: 40px 0;
}

.article-card {
    background: #fff;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    overflow: hidden;
    border-radius: 8px;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255, 71, 87, 0.2);
    border-color: var(--secondary-color);
}

.article-thumbnail {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg-light) 100%);
}

.article-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.08);
}

.article-content {
    padding: 30px;
    background: linear-gradient(to bottom, #fff 0%, var(--bg-light) 100%);
}

.article-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.article-category {
    color: var(--secondary-color);
    background: var(--bg-accent);
    padding: 4px 10px;
    border-radius: 12px;
}

.article-title {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-title a {
    color: var(--primary-color);
}

.article-title a:hover {
    color: var(--secondary-color);
}

.article-excerpt {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.read-more:hover {
    color: var(--secondary-color);
    gap: 12px;
}

.read-more::after {
    content: '→';
    transition: var(--transition);
}

/* === Single Post === */
.single-post {
    padding: 60px 0;
}

.post-header {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
}

.post-title {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 30px;
}

.post-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 19px;
    line-height: 1.8;
}

.post-content h2 {
    margin-top: 50px;
    margin-bottom: 20px;
    font-size: 32px;
}

.post-content h3 {
    margin-top: 40px;
    margin-bottom: 15px;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 25px;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content a {
    color: var(--secondary-color);
    text-decoration: underline;
    text-decoration-color: rgba(255, 71, 87, 0.3);
    text-underline-offset: 3px;
}

.post-content a:hover {
    text-decoration-color: var(--secondary-color);
}

.post-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    font-size: 22px;
    color: var(--text-dark);
}

.post-content img {
    margin: 40px 0;
    border-radius: 4px;
}

.post-thumbnail {
    margin-bottom: 50px;
}

.post-thumbnail img {
    width: 100%;
    border-radius: 4px;
}

/* === Footer === */
.site-footer {
    background: var(--primary-color);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
}

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

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

.footer-widget a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-widget a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: rgba(255,255,255,0.8);
}

.footer-bottom a:hover {
    color: #fff;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
}

.btn-primary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--secondary-color);
}

/* === Utilities === */
.text-center {
    text-align: center;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-50 {
    margin-bottom: 50px;
}

.mt-50 {
    margin-top: 50px;
}

/* === Responsive === */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .main-navigation {
        width: 100%;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        gap: 0;
        background: #fff;
        border: 1px solid var(--border-color);
        margin-top: 15px;
    }
    
    .main-navigation.toggled ul {
        display: flex;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--bg-light);
    }
    
    .main-navigation ul ul,
    .main-navigation .children {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-light);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-navigation ul ul.toggled-on,
    .main-navigation .children.toggled-on {
        max-height: 500px;
    }
    
    .main-navigation ul ul a,
    .main-navigation .children a {
        padding-left: 40px;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-section h1 {
        font-size: 36px;
    }
    
    .hero-section .lead {
        font-size: 18px;
    }
    
    .featured-section {
        padding: 50px 0;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .post-title {
        font-size: 32px;
    }
    
    .post-content {
        font-size: 17px;
    }
    
    .post-content h2 {
        font-size: 26px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    h3 {
        font-size: 22px;
    }
    
    .image-slider {
        height: 300px;
        margin: 40px 0;
    }
    
    .slider-caption h3 {
        font-size: 20px;
    }
    
    .slider-caption p {
        font-size: 14px;
    }
    
    .slider-caption {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .slider-arrow.prev {
        left: 10px;
    }
    
    .slider-arrow.next {
        right: 10px;
    }
}

/* === Print Styles === */
@media print {
    .site-header,
    .site-footer,
    .article-meta,
    .read-more {
        display: none;
    }
    
    body {
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}
