/*
Theme Name: FincoLoan Minimal Perfect Fix
Author: fincoloan
Description: Fully Optimized & Speed Fixed Stylesheet for fincoloan.com
Version: 7.1
*/

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-y: scroll; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; 
    line-height: 1.8; 
    color: #222; 
    background: #f4f6f8; 
    padding: 15px; 
    font-size: 16px; 
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
}
a { color: #0056b3; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }

/* Main Container (CLS Containment Fix) */
.container { 
    max-width: 900px; 
    margin: 0 auto; 
    background: #ffffff; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    contain: layout style; 
}

/* Header & Branding */
header.site-header { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eef0f2; 
    padding-bottom: 20px; 
    margin-bottom: 25px; 
}
.site-branding { margin-bottom: 0; }
.site-title a { font-size: 1.6rem; font-weight: 700; color: #111; }

/* Custom Logo Aspect Ratio & CLS Lock */
.custom-logo {
    width: 200px !important;
    height: auto !important;
    max-height: 50px !important;
    aspect-ratio: 1000 / 229 !important;
    display: block !important;
}

/* Navigation Menu & Dropdown Hierarchy */
.main-navigation nav, .main-navigation div { display: block; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.main-navigation li { position: relative; list-style: none; margin: 0; }
.main-navigation a { display: block; padding: 8px 14px; font-weight: 600; color: #333; font-size: 0.95rem; border-radius: 4px; }
.main-navigation a:hover { background: #eef2f7; color: #0056b3; text-decoration: none; }

/* Submenu Dropdown Styling */
.main-navigation ul ul { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: #ffffff; 
    min-width: 210px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
    border-radius: 6px; 
    z-index: 9999; 
    flex-direction: column; 
    gap: 0; 
    padding: 8px 0; 
    border: 1px solid #e0e0e0; 
}
.main-navigation ul li:hover > ul,
.main-navigation ul li:focus-within > ul { display: flex; }
.main-navigation ul ul li { width: 100%; }
.main-navigation ul ul a { font-size: 0.9rem; padding: 10px 18px; border-radius: 0; font-weight: 500; }
.main-navigation ul ul a:hover { background: #f8f9fa; color: #0056b3; }

/* Mobile Navigation Toggle Button */
.menu-toggle {
    display: none;
    background: #0056b3;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Post Content Typography */
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin-top: 35px; margin-bottom: 18px; line-height: 1.35; color: #111; clear: both; }
.post-content p { margin-top: 0; margin-bottom: 20px; font-size: 1.05rem; line-height: 1.85; }
.post-content ul, .post-content ol { margin-top: 15px; margin-bottom: 25px; padding-left: 30px; box-sizing: border-box; }
.post-content li { margin-bottom: 10px; font-size: 1.05rem; line-height: 1.8; }

/* Meta Info Top & Accessibility Fix */
.post-meta-top { font-size: 0.88rem; color: #555; background: #f1f3f5; padding: 12px 15px; border-radius: 6px; margin: 15px 0 30px 0; border-left: 4px solid #0056b3; }
.post-meta-top span { margin-right: 15px; display: inline-block; }
.post-meta-top a { text-decoration: underline !important; font-weight: 600 !important; color: #004085 !important; }

/* Featured Image (Combined LCP & CLS Fix) */
.featured-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
}
.featured-image img, article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

/* Custom Collapsible TOC Styling */
details.custom-toc {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 20px 0;
    padding: 12px 16px;
    font-family: inherit;
}
details.custom-toc summary {
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a202c;
    user-select: none;
}
details.custom-toc summary::-webkit-details-marker { display: none; }
details.custom-toc[open] summary .toc-icon { transform: rotate(180deg); }
details.custom-toc .toc-icon { font-size: 0.8rem; transition: transform 0.2s ease; color: #4a5568; }
details.custom-toc ul { margin: 12px 0 0 0; padding-left: 20px; border-top: 1px dashed #cbd5e0; padding-top: 10px; list-style-type: disc; }
details.custom-toc li { margin-bottom: 8px; font-size: 0.95rem; }
details.custom-toc li.toc-h3 { margin-left: 15px; list-style-type: circle; }
details.custom-toc a { color: #2b6cb0; text-decoration: none; }
details.custom-toc a:hover { text-decoration: underline; }

/* Calculator & Embeds Fix */
.post-content form, .post-content table, .post-content iframe, .post-content .calculator-container { max-width: 100% !important; box-sizing: border-box; }

/* Single Post Navigation */
.post-navigation { display: flex; justify-content: space-between; border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: 15px 0; margin: 35px 0; font-size: 0.9rem; font-weight: 600; }
.post-navigation div { max-width: 48%; }

/* ==========================================
   AUTHOR BOX STYLING (Restored & Enhanced)
   ========================================== */
.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #2563eb; /* आकर्षक लेफ्ट बॉर्डर */
    padding: 22px;
    border-radius: 10px;
    margin-top: 35px;
    margin-bottom: 25px;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img.avatar-img,
.author-avatar img {
    width: 85px !important;
    height: 85px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.author-info h3 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    color: #1f2937;
    font-weight: 700;
}

.author-info p {
    margin: 0;
    font-size: 0.93rem;
    color: #4b5563;
    line-height: 1.5;
}

/* Footer Styling */
footer { margin-top: 40px; border-top: 2px solid #eef0f2; padding-top: 25px; font-size: 0.9rem; color: #666; }
.footer-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.footer-widget h3, .footer-widget h4 { margin-bottom: 10px; color: #111; font-size: 1rem; }
.footer-widget ul { list-style: none; padding: 0; }
.footer-widget ul li { margin-bottom: 8px; }
.copyright { text-align: center; border-top: 1px solid #eee; padding-top: 15px; margin-top: 15px; font-size: 0.85rem; }

/* ==========================================
   HOMEPAGE POST LISTING (Single Flow - No Extra Boxes)
   ========================================== */

/* Main Section Wrapper */
.site-main {
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Post Entry - Simple Divider Style (No Border/Box) */
.entry-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid #e5e7eb; /* बॉक्स की जगह सिर्फ एक पतली डिवाइडर लाइन */
    border-radius: 0;
    padding: 25px 0; /* पोस्ट्स के बीच सही वर्टिकल गैप */
    margin-bottom: 0;
    box-shadow: none;
}

.entry-card:last-child {
    border-bottom: none; /* आख़िरी पोस्ट के नीचे लाइन न दिखे */
}

/* Hover Effect Removed (No Box Elevation) */
.entry-card:hover {
    transform: none;
    box-shadow: none;
}

/* Featured Image Styling (Fix: Complete Image Without Cropping) */
.entry-card .featured-image {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.entry-card .featured-image img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* Entry Title */
.entry-card .entry-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

.entry-card .entry-title a {
    color: #111827;
    text-decoration: none;
}

.entry-card .entry-title a:hover {
    color: #2563eb;
}

/* Meta Data (Date & Category) */
.entry-card .entry-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.entry-card .entry-meta a {
    color: #2563eb;
    text-decoration: none;
}

/* Excerpt Text */
.entry-card .post-excerpt {
    color: #374151;
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Pagination Links Styling */
.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-weight: 600;
}

.pagination-nav a {
    color: #2563eb;
    text-decoration: none;
    padding: 8px 16px;
    background: #eff6ff;
    border-radius: 6px;
    transition: background 0.2s;
}

.pagination-nav a:hover {
    background: #dbeafe;
}

/* Mobile & Tablet Responsive Adjustments */
@media screen and (max-width: 768px) {
    body { padding: 8px; font-size: 15px; }
    .container { padding: 15px; }
    
    header.site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .menu-toggle {
        display: block; /* मोबाइल पर टोगल बटन दिखेगा */
        width: 100%;
        text-align: left;
    }

    .menu-primary-container {
        display: none; /* डिफ़ॉल्ट में मोबाइल मेन्यू बंद रहेगा */
        width: 100%;
    }

    .menu-primary-container.toggled {
        display: block; /* बटन दबाने पर मेन्यू खुलेगा */
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 18px;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        background: #f8f9fa;
        border-radius: 6px;
        padding: 8px 0;
        border: 1px solid #e0e0e0;
    }

    .main-navigation li { width: 100%; }
    .main-navigation a { padding: 10px 15px; border-bottom: 1px solid #eee; }

    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 15px;
        background: #f0f4f8;
        display: none;
    }

	.entry-card {
        padding: 16px;
        margin-bottom: 20px;
    }
    .entry-card .entry-title {
        font-size: 1.25rem;
    }
	
    .footer-widgets { grid-template-columns: 1fr; }
    .author-box { flex-direction: column; text-align: center; }
    .post-content p, .post-content li { font-size: 1rem; }
    .post-content ul, .post-content ol { padding-left: 20px; }
}