/*
Theme Name: Preneurs Simple Urdu
Theme URI: https://preneurs.com
Author: Preneurs Team
Author URI: https://preneurs.com
Description: A lightweight, SEO-optimized, and responsive Urdu newspaper theme. Built with Calibri font, featuring customizer controls for header layout, social links, featured categories, and post metadata.
Version: 1.0.0
License: GPL v2 or later
Text Domain: preneurs-simple-urdu
*/

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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #c0392b;
    --accent-color: #2980b9;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Calibri', 'Noto Nastaliq Urdu', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background: #fff;
    max-width: 1400px;
    margin: 0 auto;
    direction: rtl;
}

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

/* Typography - Heading Bar Line */
h1, h2, h3, h4 {
    font-family: 'Calibri', 'Noto Nastaliq Urdu', sans-serif;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
}

h2 {
    font-size: 1.7rem;
    color: var(--primary-color);
    border-right: 3px solid var(--secondary-color);
    padding-right: 15px;
    margin: 25px 0 20px;
}

h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
    color: #444;
}

.lead {
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
}

/* Header Styles */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: #fff;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

body.admin-bar .header.sticky {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .header.sticky {
        top: 46px;
    }
}

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

.logo {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-img {
    max-height: 80px;
    width: auto;
}

.logo-subtitle {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-top: -8px;
    text-align: left;
    display: block;
}

.date-display {
    font-size: 0.95rem;
    color: #7f8c8d;
    border: 1px solid #eee;
    padding: 6px 12px;
    background: #f8f8f8;
    border-radius: 3px;
}

/* Navigation */
.main-nav {
    background: var(--primary-color);
    padding: 0;
    margin-bottom: 30px;
}

.nav-links {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 14px 18px;
    display: block;
    font-size: 1.05rem;
    transition: background 0.3s;
}

.nav-links a:hover,
.nav-links .current-menu-item a,
.nav-links .current_page_item a {
    background: #34495e;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 14px;
}

/* Dropdown Menu Styles - Desktop Click to Open */
.main-nav .menu-item-has-children {
    position: relative;
}

.main-nav .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--primary-color);
    min-width: 200px;
    z-index: 999;
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

.main-nav .sub-menu li {
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-nav .sub-menu li:last-child {
    border-bottom: none;
}

.main-nav .sub-menu a {
    padding: 12px 18px;
    white-space: nowrap;
}

/* Dropdown arrow indicator */
.main-nav .menu-item-has-children > a {
    cursor: pointer;
}

.main-nav .menu-item-has-children > a::after {
    content: " ▼";
    font-size: 10px;
    margin-right: 5px;
}

/* Active class for open dropdown */
.main-nav .menu-item-has-children.active > .sub-menu {
    display: block;
}

/* Hero Section - Updated for better image proportions */
.hero {
    background: #fff;
    padding: 30px 0;
    margin: 20px 0;
    border-bottom: 1px solid #eee;
}

.hero-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
    align-items: center;
}

.hero-title {
    font-size: 2rem;
    color: var(--primary-color);
    border: none;
    padding: 0;
    margin-bottom: 15px;
}

.hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
}

/* Featured Posts Grid - 4 in a row */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.featured-item {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.featured-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.featured-content {
    padding: 20px;
}

.featured-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.featured-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.featured-title a {
    color: inherit;
    text-decoration: none;
}

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

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

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

.article-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

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

.article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.article-content {
    padding: 25px;
}

.article-category {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.article-summary {
    color: #666;
    font-size: 1rem;
    margin: 15px 0;
}

.article-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.read-more {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
}

.read-more:hover {
    text-decoration: underline;
}

/* Single Post Styles */
.single-post {
    background: #fff;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.post-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 25px;
}

.post-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.post-category {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

/* Social Sharing */
.social-sharing {
    margin: 30px 0;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 4px;
}

.sharing-title {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.facebook { background: #3b5998; }
.instagram { background: #e4405f; }
.linkedin { background: #0077b5; }
.whatsapp { background: #25d366; }
.link-share { background: var(--accent-color); }
.qr-code { background: #7f8c8d; }

.qr-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.qr-container {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 4px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-top: 10px;
}

#qr-code {
    margin: 0 auto 10px;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 4px;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #777;
    flex-shrink: 0;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Related Posts */
.related-posts {
    margin: 40px 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-card {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-right: 3px solid var(--secondary-color);
}

.related-card h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Page Styles */
.page-content {
    background: #fff;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.page-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.page-content ul,
.post-content ul {
    padding-right: 20px;
    margin-bottom: 20px;
}

.page-content li,
.post-content li {
    margin-bottom: 10px;
    padding-right: 10px;
}

/* Widget Styles */
.widget {
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.widget-title {
    border-right: 2px solid var(--secondary-color);
    padding-right: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.widget ul li a {
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

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

/* Recent Posts Widget with Thumbnails */
.recent-posts-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.recent-thumb {
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 4px;
}

.recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-date {
    display: block;
    font-size: 0.75rem;
    color: #999;
    width: 100%;
    margin-top: 5px;
}

/* Newsletter Widget */
.newsletter-widget {
    text-align: center;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Calibri', sans-serif;
}

.newsletter-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: #fff;
    padding: 35px 0 15px;
    margin-top: 40px;
}

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

.footer-section h3 {
    color: #fff;
    border-bottom: 1px solid #4a6572;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-right: none;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

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

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-links a {
    color: #ecf0f1;
    font-size: 1.2rem;
    transition: color 0.3s;
}

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

.copyright {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #4a6572;
    color: #bdc3c7;
    font-size: 0.85rem;
}

/* Comments */
.comments-area {
    background: #fff;
    padding: 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.comment-list {
    list-style: none;
}

.comment {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 5px;
}

.comment-metadata {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
}

.comment-content p {
    margin-bottom: 10px;
}

.reply {
    margin-top: 10px;
}

.comment-reply-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.comment-respond {
    margin-top: 30px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Calibri', 'Noto Nastaliq Urdu', sans-serif;
    margin-bottom: 15px;
}

.comment-form input[type="submit"] {
    background: var(--primary-color);
    color: white;
    width: auto;
    cursor: pointer;
    transition: background 0.3s;
}

.comment-form input[type="submit"]:hover {
    background: var(--secondary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
}

.pagination .current {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Archive Page Styles */
.archive-description {
    margin-bottom: 30px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 4px;
    border-right: 3px solid var(--secondary-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }
.mb-30 { margin-bottom: 30px; }

/* Responsive */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .hero-article {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        aspect-ratio: 16 / 9;
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    /* Mobile dropdown styles */
    .main-nav .sub-menu {
        position: static;
        display: none;
        background: #34495e;
        padding-right: 20px;
        width: 100%;
    }
    
    .main-nav .menu-item-has-children.active > .sub-menu {
        display: block;
    }
    
    .main-nav .menu-item-has-children > a::after {
        content: " ▼";
        float: left;
    }
    
    .main-nav .menu-item-has-children.active > a::after {
        content: " ▲";
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
}