/*
Theme Name: Content Seba
Theme URI: https://contentseba.com
Author: Content Seba
Author URI: https://contentseba.com
Description: A premium WordPress theme for Content Seba - Bangladesh's best content writing agency. Features Deep Blue UI, Responsive Menu, and Custom Package Display.
Version: 3.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: content-seba
*/

:root {
    --primary: #0a2540; /* Deep Blue */
    --primary-dark: #051626;
    --primary-light: #1a3a5a;
    --accent: #00d4ff; /* Bright Blue Accent */
    --accent-dark: #0099cc;
    --text: #1a202c;
    --text-light: #4a5568;
    --bg: #f4f7fa;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 10px;
}

/* Global Styles */
* { 
    box-sizing: border-box; 
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
body {
    font-family: 'Hind Siliguri', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img {
    max-width: 100%;
    height: auto;
}

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

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Header Styles */
.site-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

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

.logo a {
    font-size: 26px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

/* Desktop Navigation */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    padding: 30px 0;
    display: block;
    position: relative;
}

/* Dropdown Menu */
.main-nav ul li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-dark);
    min-width: 200px;
    display: block;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 0 0 8px 8px;
}

.main-nav ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav ul li ul li a {
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.main-nav ul li ul li:last-child a {
    border-bottom: none;
}

.main-nav ul li ul li a::after {
    display: none;
}

.main-nav ul li a:hover, 
.main-nav ul li.current-menu-item a {
    color: var(--white);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.3s;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--white);
}

/* Mobile Navigation Drawer */
@media (max-width: 992px) {
    .menu-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--primary-dark);
        padding: 80px 30px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    }
    .main-nav.active { right: 0; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav ul li a { font-size: 18px; display: block; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
    
    /* Mobile Dropdown */
    .main-nav ul li ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0,0,0,0.2);
        box-shadow: none;
        padding-left: 20px;
        display: none; /* Hidden by default on mobile, toggle with JS if needed or keep visible */
    }
    .main-nav ul li.menu-item-has-children:hover > ul {
        display: block;
    }
    
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }
    .nav-overlay.active { display: block; }
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 80px 0 40px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

.footer-widget h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

@media (max-width: 768px) {
    .footer-widget h3::after { left: 50%; transform: translateX(-50%); }
}

.footer-credit {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: var(--primary-dark) !important;
    padding: 12px 25px;
    border-radius: var(--radius);
    font-weight: 700;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--white);
    transform: translateY(-2px);
}

/* Pagination Styles */
.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}
.pagination .page-numbers {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    transition: 0.3s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}

/* Post Card Hover Animation */
.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
    border-color: var(--accent) !important;
}
.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

/* Pagination Styling Refinement */
.pagination-wrapper .pagination {
    display: flex;
    justify-content: center;
}
.pagination-wrapper .nav-links {
    display: flex;
    gap: 8px;
}
.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--primary);
    font-weight: 700;
    transition: 0.3s;
}
.pagination-wrapper .page-numbers.current,
.pagination-wrapper .page-numbers:hover {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}

/* Single Post Layout Grid */
.post-layout-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

@media (max-width: 992px) {
    .post-layout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .post-main-content {
        order: 1;
    }
    .post-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .post-wrapper, .page-wrapper {
        padding: 20px !important;
        border-radius: 15px !important;
    }
    .post-header h1, .page-header h1 {
        font-size: 24px !important;
        word-wrap: break-word;
    }
    .posts-grid {
        grid-template-columns: 1fr !important;
    }
    .hero-content h1 {
        font-size: 28px !important;
    }
    .post-entry-content, .entry-content {
        font-size: 16px !important;
    }
    .post-layout-grid {
        display: block;
    }
}

/* Fix for horizontal scroll */
.site-header, .site-footer, main, section, div, article, aside {
    max-width: 100%;
    box-sizing: border-box;
}

/* Sidebar Widget Styles */
.widget {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.widget-title {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* Social Share Hover */
.share-buttons a {
    transition: 0.3s;
    text-decoration: none;
}
.share-buttons a:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* Author Box Responsive */
@media (max-width: 600px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Group Join CTA --- */
.group-join-cta {
    transition: transform 0.3s ease;
}
.group-join-cta:hover {
    transform: translateY(-5px);
}
.group-join-cta a:hover {
    background: #f0f9ff !important;
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .group-join-cta {
        padding: 20px !important;
    }
    .group-join-cta h3 {
        font-size: 20px !important;
    }
    .group-join-cta p {
        font-size: 14px !important;
    }
}

/* --- TOC Styles --- */
.cs-toc ul li a:hover {
    color: #00d4ff !important;
    padding-left: 5px;
}
.group-join-cta-inline {
    transition: 0.3s;
}
.group-join-cta-inline:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Footer Menu Styling */
.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-menu-list li {
    margin-bottom: 12px;
}
.footer-menu-list li a {
    color: rgba(255,255,255,0.7);
    transition: 0.3s;
}
.footer-menu-list li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Today Offers Button in Header */
.today-offers-btn {
    background: var(--accent);
    color: var(--primary-dark) !important;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.today-offers-btn:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .today-offers-btn span {
        display: none;
    }
    .today-offers-btn {
        padding: 10px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    .today-offers-btn i {
        margin: 0;
        font-size: 18px;
    }
}

/* Fix for Page Display Issues */
.page-template-default .post-main-content,
.page .post-main-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.entry-content h1, .entry-content h2, .entry-content h3 {
    color: var(--primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.entry-content p {
    margin-bottom: 1.5em;
    color: var(--text-light);
}

/* --- Coupon Single Page Styles --- */
.coupon-single-container {
    padding-top: 60px;
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.coupon-single-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.single-coupon-thumb {
    height: 350px;
    overflow: hidden;
}

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

.single-coupon-content {
    padding: 50px;
}

.coupon-title {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 20px;
}

.coupon-entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 40px;
}

.coupon-action-box {
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.action-box-title {
    margin-bottom: 20px;
    color: var(--primary);
}

.coupon-code-display {
    background: #fff;
    border: 3px dashed var(--accent);
    border-radius: 15px;
    padding: 20px;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.coupon-code-text {
    font-family: monospace;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
}

.copy-btn-large {
    background: var(--accent);
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.visit-btn-wrapper {
    margin-top: 10px;
}

.visit-site-btn {
    padding: 15px 40px;
    font-size: 18px;
    width: 100%;
    display: block;
}

.expiry-text {
    margin-top: 20px;
    color: #ef4444;
    font-weight: 600;
}

/* --- Responsive Adjustments for Coupon Page --- */
@media (max-width: 768px) {
    .coupon-single-container {
        padding-top: 30px;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .single-coupon-thumb {
        height: 200px;
    }
    
    .single-coupon-content {
        padding: 25px 20px;
    }
    
    .coupon-title {
        font-size: 24px;
    }
    
    .coupon-entry-content {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .coupon-action-box {
        padding: 25px 15px;
    }
    
    .coupon-code-display {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        padding: 15px;
    }
    
    .coupon-code-text {
        font-size: 24px;
        word-break: break-all;
    }
    
    .copy-btn-large {
        width: 100%;
    }
    
    .visit-site-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* --- General Table Responsiveness Fix --- */
.entry-content table, 
.post-entry-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 20px;
}

/* Wrap tables in a scrollable div if they are too wide */
@media (max-width: 768px) {
    .entry-content, .post-entry-content {
        overflow-x: hidden; /* Prevent parent overflow */
    }
    
    /* This targets tables directly, but for better UX, 
       WordPress usually needs a wrapper. Since we can't easily 
       add a wrapper to all tables in existing content without JS, 
       we'll make the table itself scrollable if possible or use JS. */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Fix for Header/Nav Overflow --- */
@media (max-width: 992px) {
    .header-flex {
        height: 70px;
    }
    .logo a {
        font-size: 22px;
    }
}

/* --- Single Post Styles --- */
.single-post-container {
    padding: 60px 0;
    background: #f8fafc;
}

.post-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.post-header {
    margin-bottom: 30px;
}

.post-category-label {
    color: #00d4ff;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.post-title {
    font-size: 36px;
    color: #0a2540;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.post-meta-single {
    color: #64748b;
    font-size: 15px;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.featured-img {
    width: 100%;
    height: auto;
    display: block;
}

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

.post-share {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.share-title {
    margin-bottom: 15px;
    color: #0a2540;
}

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

.share-btn {
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
}

.fb-share { background: #3b5998; }
.tw-share { background: #1da1f2; }
.wa-share { background: #25d366; }

.author-box {
    margin-top: 50px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.avatar-img {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.author-info {
    flex: 1;
    min-width: 200px;
}

.author-name {
    margin: 0 0 10px 0;
    color: #0a2540;
    font-size: 22px;
    font-weight: 700;
}

.author-bio {
    margin: 0 0 15px 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
}

.author-social {
    display: flex;
    gap: 15px;
    font-size: 18px;
    align-items: center;
}

.author-social-link.fb { color: #3b5998; }
.author-social-link.tw { color: #1da1f2; }
.author-social-link.li { color: #0077b5; }

.view-all-posts {
    color: #0a2540;
    font-size: 14px;
    font-weight: 600;
    margin-left: auto;
}

.related-posts {
    margin-top: 60px;
}

.related-title {
    margin-bottom: 30px;
    color: #0a2540;
    font-size: 24px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.post-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.post-thumbnail {
    height: 150px;
    overflow: hidden;
}

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

.post-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin: 0 0 10px 0;
}

.card-title a {
    color: #0a2540;
}

.card-date {
    font-size: 13px;
    color: #94a3b8;
}

/* --- Responsive Adjustments for Single Post --- */
@media (max-width: 768px) {
    .single-post-container {
        padding: 30px 0;
    }
    .post-wrapper {
        padding: 20px;
    }
    .post-title {
        font-size: 26px;
    }
    .post-meta-single {
        flex-direction: column;
        gap: 5px;
    }
    .post-entry-content {
        font-size: 16px;
    }
    .author-box {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    .view-all-posts {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }
    .author-social {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* --- Page Styles --- */
.page-container {
    padding: 60px 0;
    background: #f8fafc;
}

.page-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.page-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 15px;
}

.page-title {
    font-size: 36px;
    color: #0a2540;
    margin: 0;
    font-weight: 800;
    line-height: 1.3;
}

.page-featured-image {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
}

/* --- Responsive Adjustments for Page --- */
@media (max-width: 768px) {
    .page-container {
        padding: 30px 0;
    }
    .page-wrapper {
        padding: 20px;
    }
    .page-title {
        font-size: 26px;
    }
}
