/*
Theme Name: MultiVerse Blog
Theme URI: https://example.com
Description: A modern, responsive personal blog theme for political, philosophical, photography, and travel content
Version: 1.0.0
Author: Your Name
Author URI: https://example.com
License: GPL-2.0-or-later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: multiverse-blog
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.2
*/

/* =================================
   GOOGLE FONTS FOR BENGALI SUPPORT
   ================================= */

@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

/* =================================
   RESET & BASE STYLES
   ================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    /* default latin-friendly font stack; Bangla font applied conditionally */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
    background-color: #fdfdfd;
    line-height: 1.8;
    font-size: 18px;
}

/* when Bangla characters are detected on the page, switch to Hind Siliguri */
html.bangla-detected,
.bangla-detected {
    font-family: 'Hind Siliguri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =================================
   TYPOGRAPHY
   ================================= */

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    font-family: 'Merriweather', 'Noto Serif Bengali', serif;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #8b0000;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0052a3;
}

/* =================================
   HEADER & NAVIGATION
   ================================= */

.header-wrapper {
    background: #ffffff;
    color: #1a1a1a;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eaeaea;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.site-tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.header-branding a {
    color: #1a1a1a;
    text-decoration: none;
}

.header-branding a:hover {
    color: #8b0000;
}

/* Main Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-navigation a {
    color: #1a1a1a;
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
}

.main-navigation a:hover,
.main-navigation li.current-menu-item a {
    color: #8b0000;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1a1a1a;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =================================
   LAYOUT CONTAINERS
   ================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin: 2rem 0;
}

.main-content {
    flex: 1;
}

.sidebar {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid #eaeaea;
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* =================================
   POSTS & ARTICLES
   ================================= */

.post {
    background: white;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    border: 1px solid #eaeaea;
    transition: border-color 0.3s ease;
}

.post:hover {
    border-color: #ccc;
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.post-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #ecf0f1;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    text-decoration: none;
    transition: background 0.3s ease;
}

.post-category:hover {
    background: #bdc3c7;
    color: white;
}

/* Category Colors */
.category-politics { background: #8b0000; color: white; }
.category-philosophy { background: #8b0000; color: white; }
.category-photography { background: #8b0000; color: white; }
.category-travel { background: #8b0000; color: white; }

.post-category.category-politics:hover,
.post-category.category-philosophy:hover,
.post-category.category-photography:hover,
.post-category.category-travel:hover {
    opacity: 0.8;
}

.featured-image {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    max-height: 400px;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-title {
    margin: 1rem 0;
    font-size: 1.8rem;
}

.post-title a {
    color: #1a1a1a;
}

.post-title a:hover {
    color: #8b0000;
}

.post-excerpt {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.post-excerpt p:last-child {
    margin-bottom: 0;
}

.read-more {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.read-more:hover {
    background: #8b0000;
    color: white;
    border-color: #8b0000;
}

/* Single Post */
.single-post {
    background: white;
    padding: 3rem;
    border-radius: 4px;
    border: 1px solid #eaeaea;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
}

.post-nav-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.post-nav-item:hover {
    background: #ecf0f1;
}

.post-nav-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-nav-title {
    margin-top: 0.5rem;
    color: #8b0000;
    font-weight: 600;
}

/* =================================
   IMAGE GALLERY / PHOTOGRAPHY
   ================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
    background: #ecf0f1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
    padding: 1rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

/* =================================
   SIDEBAR & WIDGETS
   ================================= */

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #8b0000;
    margin-bottom: 1rem;
    font-family: 'Merriweather', 'Noto Serif Bengali', serif;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: #8b0000;
    font-weight: 500;
}

.sidebar-widget a:hover {
    color: #5a0000;
}

/* Recent Posts */
.recent-posts-list li {
    padding: 0.8rem 0;
}

.recent-posts-list a {
    display: block;
    line-height: 1.4;
    font-size: 0.95rem;
}

/* Categories */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-link {
    padding: 0.5rem;
    background: #f0f0f0;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.category-link:hover {
    background: #e0e0e0;
}

/* Search Widget */
.search-form {
    display: flex;
    margin-bottom: 1rem;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.search-form button {
    padding: 0.5rem 1rem;
    background: #8b0000;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #5a0000;
}

/* =================================
   FOOTER
   ================================= */

.footer-wrapper {
    background: #ffffff;
    color: #555;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
    border-top: 1px solid #eaeaea;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget {
    padding: 0 2rem;
}

.footer-widget-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.footer-widget a {
    color: #555;
}

.footer-widget a:hover {
    color: #8b0000;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

.social-links {
    margin: 1rem 0;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 0.5rem;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
}

/* =================================
   COMMENTS
   ================================= */

#comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment-list li {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.comment-text p {
    margin-bottom: 0.5rem;
}

.comment-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 2rem;
}

.comment-form-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
}

.submit-btn {
    background: #8b0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #5a0000;
}

/* =================================
   PAGINATION
   ================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a {
    color: #8b0000;
    background: white;
}

.pagination a:hover {
    background: #8b0000;
    color: white;
}

.pagination .current {
    background: #8b0000;
    color: white;
    border-color: #8b0000;
}

/* =================================
   SEARCH RESULTS
   ================================= */

.no-results {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.search-not-found {
    color: #666;
    margin: 1rem 0;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .main-navigation {
        width: 100%;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .post {
        padding: 1.5rem;
    }

    .post-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .container,
    .header-content {
        padding: 0 1rem;
    }

    .post {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }

    .featured-image {
        max-height: 250px;
    }

    .post-title {
        font-size: 1.3rem;
    }
}
/* =================================
   RTL (RIGHT-TO-LEFT) SUPPORT FOR BENGALI
   ================================= */

body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .header-content {
    flex-direction: row-reverse;
}

body.rtl .content-wrapper {
    direction: rtl;
}

body.rtl .sidebar {
    margin-right: auto;
    margin-left: 0;
}

body.rtl .main-navigation ul {
    flex-direction: row-reverse;
}

body.rtl .post-navigation {
    direction: rtl;
}

body.rtl .post-nav-label::before {
    order: 2;
}

body.rtl .pagination {
    direction: rtl;
}

body.rtl .social-links a {
    margin-right: 0;
    margin-left: 0.5rem;
}

body.rtl blockquote {
    border-left: none;
    border-right: 4px solid #0066cc;
    padding-right: 1rem;
    padding-left: 0;
}

body.rtl ul,
body.rtl ol {
    padding-left: 0;
    padding-right: 2rem;
}

body.rtl .gap-list {
    padding-right: 2rem;
    padding-left: 0;
}