/*
Theme Name: Titov.me
Theme URI: https://titov.me
Author: Titovme
Description: Custom theme
Version: 1.0
Text Domain: titovme
*/

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

body {
    font-family: 'Unbounded', sans-serif;
    color: #fff;
    line-height: 1.6;
}

body.is-homepage {
    background: #000;
    color: #fff;
}

/* Стили для внутренних страниц */
body.is-inner-page {
    background: #e9e9e9;
}

/* Main container */
.main-container {
    width: 100%;
    min-height: 100vh;
    padding: 0 12px;
}

/* Mobile */
@media (min-width: 576px) {
    .main-container {
        padding: 0 16px;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .main-container {
        padding: 0 20px;
    }
}

/* Small Desktop */
@media (min-width: 992px) {
    .main-container {
        padding: 0 30px;
    }
}

/* Desktop */
@media (min-width: 1200px) {
    .main-container {
        padding: 0 40px;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .main-container {
        padding: 0 60px;
        max-width: 1440px;
        margin: 0 auto;
    }
}

/* Hero section */
.hero-section {
    position: relative;
    min-height: 830px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-logo {
    max-width: 819px;
    width: 100%;
    margin-bottom: 40px;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 60px;
    max-width: 389px;
}

/* Social links */
.social-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.social-item {
    width: 83px;
    height: 82px;
    background: #fff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.social-item:hover {
    transform: translateY(-3px);
}

.social-icon {
    width: 41px;
    height: 41px;
}

/* Navigation section */
.nav-section {
    padding: 45px 20px;
}

.nav-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.nav-card {
    color: #212121;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    min-height: 69px;
    overflow: hidden;
    gap: 5px;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.nav-text {
    background: #fff;
    border-radius: 23px;
    font-size: 18px;
    font-weight: 500;
    flex: 1;
    padding: 20px;
}

.nav-arrow-container {
    width: 68px;
    height: 69px;
    background: #1b51ab;
    border-radius: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-arrow {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-arrow {
    transform: rotate(45deg);
}

/* Popups */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: #fbfbf9;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.popup-title {
    font-size: 24px;
    color: #212121;
    margin-bottom: 30px;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.popup-btn {
    padding: 15px 25px;
    background: #1b51ab;
    color: #fff;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.popup-btn:hover {
    background: #0d3a8c;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #212121;
}

/* Mobile styles */
@media (max-width: 768px) {
    .hero-section {
        min-height: 380px;
        height: auto;
        padding: 40px 0;
    }
    
    .hero-content {
        padding: 20px 15px;
    }
    
    .hero-logo {
        max-width: 360px;
        margin-bottom: 30px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 40px;
        max-width: 271px;
    }
    
    .social-grid {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .social-item {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }
    
    .social-icon {
        width: 16px;
        height: 16px;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-card {
        min-height: 50px;
        border-radius: 15px;
    }
    
    .nav-text {
        font-size: 16px;
        padding: 10px;
        border-radius: 15px;
    }
    
    .nav-arrow-container {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }
    
    .nav-arrow {
        width: 20px;
        height: 20px;
    }
    
    .popup-buttons {
        flex-direction: column;
    }
    
    .popup-btn {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .nav-section {
        padding: 30px 15px;
    }
    
    .popup-content {
        padding: 30px 20px;
    }
    
    .popup-title {
        font-size: 20px;
    }
}

@media (min-width: 769px) {
    .hero-content {
        margin-top: 320px;
    }
}

/* Projects Page */
.projects-page {
    padding: 60px 0;
    background: #fff;
}

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 22px;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 1.4;
}

.project-title strong {
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .project-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .projects-page {
        padding: 40px 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .projects-container {
        padding: 0 15px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-content {
        padding: 15px;
    }
    
    .project-title {
        font-size: 16px;
    }
}

/* Additional styles for better spacing */
.projects-page .main-container {
    padding: 0;
}

.projects-page .projects-container {
    width: 100%;
}

.page-title {
    color: black;
}

/* Reading Page */
.reading-page {
    padding: 60px 0;
    background: #fff;
}

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

.reading-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.book-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.book-image {
    position: relative;
    overflow: hidden;
    height: 400px;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-content {
    padding: 25px;
}

.book-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.book-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.book-title a:hover {
    color: #1b51ab;
}

.book-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 15px 0;
}

.book-author {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .reading-title {
        font-size: 2rem;
    }
    
    .book-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .reading-page {
        padding: 40px 0;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .reading-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .book-image {
        height: 300px;
    }
    
    .book-content {
        padding: 20px;
    }
    
    .book-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .reading-container {
        padding: 0 15px;
    }
    
    .reading-title {
        font-size: 1.5rem;
    }
    
    .book-image {
        height: 250px;
    }
    
    .book-content {
        padding: 15px;
    }
    
    .book-title {
        font-size: 1.1rem;
    }
    
    .book-author {
        font-size: 0.9rem;
    }
}

/* Specific styles for reading page background */
body.page-template-reading-page {
    background: #f8f9fa;
}

body.page-template-reading-page .reading-page {
    background: #fff;
}

.coming-soon {
    color: black;
}