/* === गूगल फन्ट इम्पोर्ट করা হচ্ছে === */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Poppins:wght@400;500;600;700&display=swap');

/* === ভেরিয়েবল এবং বেসিক স্টাইল === */
:root {
    --primary-color: #00A97F; /* সবুজ রঙ */
    --secondary-color: #2c3e50; /* গাঢ় নেভি ব্লু */
    --background-color: #f4f7f6; /* হালকা ধূসর ব্যাকগ্রাউন্ড */
    --text-color: #333;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --header-bg: #ffffff;
    --footer-bg: #1f2937;
    --footer-text: #d1d5db;
    --gold-color: #D4AF37; /* সোনালী বর্ডার */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

/* === ডার্ক মোড ভেরিয়েবল === */
body.dark-mode {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --header-bg: #1e1e1e;
    --secondary-color: #f1f1f1;
}

/* === গ্লোবাল স্টাইল রিসেট === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === হেডার স্টাইল === */
.header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
}

.nav-desktop ul {
    display: flex;
    gap: 30px;
}

.nav-desktop a {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--secondary-color);
    padding: 10px 5px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}
.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-desktop a:hover::after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--header-bg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 100;
}

.dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    white-space: nowrap;
}
.dropdown-menu a:hover {
    background-color: var(--background-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.search-form input {
    border: none;
    outline: none;
    padding: 8px 15px;
    background-color: transparent;
    color: var(--text-color);
    width: 180px;
}

.search-form button {
    border: none;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background-color: #008f6b;
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: var(--secondary-color);
}
.dark-mode-toggle .fa-sun { display: none; }
body.dark-mode .dark-mode-toggle .fa-moon { display: none; }
body.dark-mode .dark-mode-toggle .fa-sun { 
    display: block; 
    color: #f39c12;
}

.mobile-menu-toggle { display: none; }
.nav-mobile { display: none; }
.mobile-dropdown-menu { display: none; }

/* === প্রধান কন্টেইনার === */
.main-container, .video-page-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* === পোস্ট গ্রিড === */
.post-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.post-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    padding: 12px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}

.no-posts, .page-heading {
    text-align: center;
    grid-column: 1 / -1;
    font-size: 20px;
    margin: 40px 0;
    font-family: var(--font-primary);
}

/* === বিজ্ঞাপন কন্টেইনার === */
.ad-container-middle, .ad-container-banner {
    width: 100%;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

/* === পেজিনেশন === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 40px;
    gap: 8px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--secondary-color);
    font-weight: 500;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .pagination-btn {
    font-weight: 700;
}

/* === ফুটার === */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 20px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    border: 2px solid var(--gold-color);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    padding: 5px;
    margin-bottom: 15px;
}

.footer-about h3 {
    font-family: var(--font-primary);
    color: white;
    margin-bottom: 10px;
}

.footer-links h4, .footer-social h4 {
    color: white;
    font-family: var(--font-primary);
    margin-bottom: 15px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    font-size: 24px;
    transition: color 0.2s, transform 0.2s;
}
.social-icons a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.footer-copyright {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid #444;
    font-size: 14px;
}

/* === ভিডিও ডিটেইলস পেজ === */
.video-page-container {
    display: flex;
    gap: 30px;
}

.video-main-content {
    flex: 3;
}

.sidebar-suggested {
    flex: 1;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player-wrapper iframe,
.video-player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.video-details-title {
    font-family: var(--font-primary);
    font-size: 24px;
    color: var(--secondary-color);
}

.video-view-count {
    font-weight: 500;
}

.sidebar-post-card {
    margin-bottom: 15px;
}
.sidebar-post-card a {
    display: flex;
    gap: 15px;
    align-items: center;
}
.sidebar-post-card img {
    width: 120px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}
.sidebar-post-card h3 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}
.sidebar-post-card span {
    font-size: 12px;
    color: #888;
}

.suggested-posts-mobile { display: none; }

/* === Social Page Styles === */
.page-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.page-subheading {
    max-width: 600px;
    margin: 10px auto 40px;
    color: var(--secondary-color);
    opacity: 0.8;
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    text-align: left;
}

.social-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.social-icon-container {
    font-size: 36px;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 50px;
    text-align: center;
}

.social-info {
    flex-grow: 1;
}

.social-name {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.join-button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.join-button:hover {
    background-color: var(--dark-primary);
    color: #fff;
}

.no-links-found {
    font-size: 18px;
    color: #888;
    padding: 40px 0;
}