/*
Theme Name: YA Blog Theme
Theme URI: https://yuraa.com
Author: YA
Author URI: https://yuraa.com
Description: A custom WordPress theme for YA Blog
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ya-blog-theme
Tags: blog, custom, minimal, dark
*/

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

body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    padding: 20px;
}

a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* =Site Structure
-------------------------------------------------------------- */
.site {
    max-width: 1200px;
    margin: 0 auto;
}

.site-header {
    padding: 40px 0;
    margin-bottom: 60px;
    border-bottom: 1px solid #222;
}

.site-branding {
    margin-bottom: 20px;
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.site-title a {
    color: #ffffff;
}

.site-description {
    font-size: 16px;
    color: #888;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: #888;
    font-size: 14px;
}

.main-navigation a:hover {
    color: #ffffff;
}

/* =Main Content
-------------------------------------------------------------- */
.site-main {
    padding: 0;
}

/* =Posts List with Progressive Font Sizes
-------------------------------------------------------------- */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-list article {
    margin-bottom: 40px;
}

.post-list .entry-title {
    margin: 0;
    line-height: 1.2;
}

.post-list .entry-title a {
    color: #e0e0e0;
    display: block;
    transition: color 0.2s ease;
}

.post-list .entry-title a:hover {
    color: #ffffff;
}

/* Progressive font size reduction for first 5 posts */
.post-list article:nth-child(1) .entry-title {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 8px;
}

.post-list article:nth-child(2) .entry-title {
    font-size: 60px;
    font-weight: 700;
    margin-bottom: 8px;
}

.post-list article:nth-child(3) .entry-title {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 6px;
}

.post-list article:nth-child(4) .entry-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 6px;
}

.post-list article:nth-child(5) .entry-title {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 5px;
}

/* All posts after 5th have same small size */
.post-list article:nth-child(n+6) .entry-title {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 4px;
}

/* Post list metadata */
.post-list .entry-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 400;
}

.post-list .entry-meta span {
    display: inline-block;
}

.post-list .entry-meta .meta-separator {
    margin: 0 8px;
    opacity: 0.5;
}

/* =Excerpt Hover Effect
-------------------------------------------------------------- */
.post-list .entry-excerpt {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    color: #888;
    font-size: 16px;
    line-height: 1.6;
}

.post-list article:hover .entry-excerpt {
    max-height: 200px;
    opacity: 1;
    margin-top: 15px;
}

.post-list .entry-excerpt p {
    margin: 0;
}

/* =Single Post
-------------------------------------------------------------- */
.single article {
    max-width: 800px;
}

.single .entry-header {
    margin-bottom: 30px;
}

.single .entry-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.single .entry-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.single .entry-meta span {
    margin-right: 15px;
}

.single .entry-meta a {
    color: #888;
}

.single .entry-meta a:hover {
    color: #ffffff;
}

.single .post-thumbnail {
    margin-bottom: 40px;
}

.single .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single .entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #e0e0e0;
}

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

.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4 {
    color: #ffffff;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

.single .entry-content h2 {
    font-size: 32px;
}

.single .entry-content h3 {
    font-size: 24px;
}

.single .entry-content h4 {
    font-size: 20px;
}

.single .entry-content a {
    color: #888;
    text-decoration: underline;
}

.single .entry-content a:hover {
    color: #ffffff;
}

.single .entry-content ul,
.single .entry-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

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

.single .entry-content code {
    background-color: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 16px;
    color: #ffffff;
}

.single .entry-content pre {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.single .entry-content pre code {
    background-color: transparent;
    padding: 0;
}

.single .entry-content blockquote {
    border-left: 3px solid #333;
    padding-left: 20px;
    margin: 20px 0;
    color: #888;
    font-style: italic;
}

.single .entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #222;
}

.single .tags-links {
    font-size: 14px;
    color: #666;
}

.single .tags-links a {
    color: #888;
    margin-left: 5px;
}

.single .tags-links a:hover {
    color: #ffffff;
}

.post-navigation {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-navigation .nav-title {
    display: block;
    font-size: 16px;
    color: #e0e0e0;
    transition: color 0.2s ease;
}

.post-navigation a:hover .nav-title {
    color: #ffffff;
}

/* =Sidebar & Widgets
-------------------------------------------------------------- */
.widget-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #222;
}

.widget {
    margin-bottom: 40px;
}

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

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.widget ul li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1a1a1a;
}

.widget ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget a {
    color: #888;
    font-size: 14px;
    transition: color 0.2s ease;
}

.widget a:hover {
    color: #ffffff;
}

.widget select {
    width: 100%;
    padding: 10px;
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #222;
    border-radius: 4px;
    font-size: 14px;
}

.widget select:focus {
    outline: none;
    border-color: #444;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form .search-field {
    flex: 1;
    padding: 10px;
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #222;
    border-radius: 4px;
    font-size: 14px;
}

.search-form .search-field:focus {
    outline: none;
    border-color: #444;
}

.search-form .search-submit {
    padding: 10px 20px;
    background-color: #222;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.search-form .search-submit:hover {
    background-color: #333;
}

/* =Footer
-------------------------------------------------------------- */
.site-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #222;
    color: #666;
    font-size: 14px;
}

.site-info {
    margin-bottom: 20px;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.footer-navigation a {
    color: #666;
    font-size: 14px;
}

.footer-navigation a:hover {
    color: #888;
}

/* =WordPress Core
-------------------------------------------------------------- */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
}

/* =Responsive Design
-------------------------------------------------------------- */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .site-header {
        padding: 30px 0;
        margin-bottom: 40px;
    }

    .site-title {
        font-size: 24px;
    }

    .site-description {
        font-size: 14px;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        gap: 15px;
    }

    .main-navigation a {
        font-size: 13px;
    }

    .post-list article:nth-child(1) .entry-title {
        font-size: 42px;
        margin-bottom: 6px;
    }

    .post-list article:nth-child(2) .entry-title {
        font-size: 36px;
        margin-bottom: 6px;
    }

    .post-list article:nth-child(3) .entry-title {
        font-size: 30px;
        margin-bottom: 5px;
    }

    .post-list article:nth-child(4) .entry-title {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .post-list article:nth-child(5) .entry-title {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .post-list article:nth-child(n+6) .entry-title {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .post-list .entry-meta {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .post-list .entry-excerpt {
        font-size: 14px;
    }

    .single .entry-title {
        font-size: 36px;
    }

    .single .entry-content {
        font-size: 16px;
    }

    .single .entry-content h2 {
        font-size: 28px;
    }

    .single .entry-content h3 {
        font-size: 22px;
    }

    .single .entry-content h4 {
        font-size: 18px;
    }

    .post-navigation .nav-links {
        flex-direction: column;
    }

    .post-navigation .nav-next {
        text-align: left;
    }

    .site-footer {
        margin-top: 60px;
        padding-top: 30px;
    }

    .footer-navigation ul {
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* Mobile - Touch devices: Show excerpts on tap */
@media (max-width: 768px) and (hover: none) {
    .post-list article.touch-active .entry-excerpt {
        max-height: 200px;
        opacity: 1;
        margin-top: 12px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .site-header {
        padding: 20px 0;
        margin-bottom: 30px;
    }

    .site-title {
        font-size: 20px;
    }

    .site-description {
        font-size: 13px;
    }

    .main-navigation ul {
        gap: 12px;
    }

    .main-navigation a {
        font-size: 12px;
    }

    .post-list article:nth-child(1) .entry-title {
        font-size: 32px;
        margin-bottom: 5px;
    }

    .post-list article:nth-child(2) .entry-title {
        font-size: 28px;
        margin-bottom: 5px;
    }

    .post-list article:nth-child(3) .entry-title {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .post-list article:nth-child(4) .entry-title {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .post-list article:nth-child(5) .entry-title {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .post-list article:nth-child(n+6) .entry-title {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .post-list .entry-meta {
        font-size: 10px;
        margin-bottom: 10px;
    }

    .post-list .entry-meta .meta-separator {
        margin: 0 6px;
    }

    .post-list .entry-excerpt {
        font-size: 13px;
        line-height: 1.5;
    }

    .single .entry-title {
        font-size: 28px;
    }

    .single .entry-content {
        font-size: 15px;
    }

    .single .entry-content h2 {
        font-size: 24px;
    }

    .single .entry-content h3 {
        font-size: 20px;
    }

    .single .entry-content h4 {
        font-size: 16px;
    }

    .site-footer {
        margin-top: 40px;
        padding-top: 20px;
        font-size: 13px;
    }

    .footer-navigation ul {
        gap: 12px;
    }

    .footer-navigation a {
        font-size: 12px;
    }
}
