/* ====================================
   PERSIAN PODCAST WEBSITE - CSS
   Fully Responsive & RTL Optimized
   ==================================== */

/* ----- ROOT VARIABLES ----- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

/* ----- GLOBAL RESET & BASE STYLES ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
}

/* ----- CONTAINER ----- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----- NAVIGATION BAR ----- */
.navbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.logo-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* space between logo and name */
}
.site-logo {
    height: 40px; /* adjust size as needed */
    width: auto;
    border-radius: 50%; /* optional: rounded logo */
}
.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: var(--secondary-color);
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ----- MAIN CONTENT AREA ----- */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

/* ----- PODCAST GRID (Main Page) ----- */
.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.podcast-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.podcast-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.podcast-card .card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.podcast-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-date {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.8rem;
}

.card-description {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* ----- BLOG GRID (Blog Page) ----- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.blog-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-card .card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-summary {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.7;
}

/* ----- ABOUT PAGE ----- */
.team-section,
.contact-section {
    margin: 3rem 0;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 1rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.team-member {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--secondary-color);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.member-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Contact Section */
.contact-info {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.email-box {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
}

.email-link {
    font-size: 1.3rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--accent-color);
}

/* ----- POST PAGES (Podcast & Blog Posts) ----- */
.post-container {
    background-color: var(--white);
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.post-container .container {
    padding: 3rem 2rem;
}

.back-button {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--accent-color);
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.post-date {
    font-size: 1rem;
    color: #777;
    margin-bottom: 2rem;
}

.post-image {
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Audio Player */
.audio-player {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.player-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.custom-audio {
    width: 100%;
    max-width: 600px;
    outline: none;
}

/* Post Content */
.post-content {
    max-width: 800px;
    margin: 3rem auto;
    line-height: 1.9;
}

.post-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.content-image {
    margin: 2rem 0;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-caption {
    font-size: 0.9rem;
    color: #777;
    margin-top: 0.5rem;
    font-style: italic;
}

.related-links {
    list-style: none;
    margin: 1rem 0;
}

.related-links li {
    margin-bottom: 0.8rem;
}

.related-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.related-links a:hover {
    color: var(--accent-color);
}

/* ----- COMMENTS SECTION ----- */
.comments-section {
    max-width: 800px;
    margin: 4rem auto 2rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.comments-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* Comment Form */
.comment-form {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.comment-form h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.submit-button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.submit-button:hover {
    background-color: var(--primary-color);
}

/* Comments List */
.comments-list {
    margin-top: 2rem;
}

.comments-list h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.comment {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-right: 4px solid var(--secondary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.9rem;
    color: #777;
}

.comment-text {
    line-height: 1.7;
    color: var(--text-color);
}

/* ----- FOOTER ----- */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin: 0;
}

/* ====================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ==================================== */

/* Tablet Screens */
@media screen and (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .podcast-grid,
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .contact-info {
        padding: 2rem;
    }
}

/* Mobile Screens */
@media screen and (max-width: 480px) {
    /* Show Mobile Menu Toggle */
    .menu-toggle {
        display: flex;
    }

    /* Hide Desktop Menu by Default */
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu li a {
        display: block;
        padding: 1rem;
        text-align: center;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .podcast-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-container .container {
        padding: 2rem 1rem;
    }

    .post-title {
        font-size: 1.7rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .audio-player {
        padding: 1.5rem 1rem;
    }

    .comment-form {
        padding: 1.5rem;
    }

    .contact-info {
        padding: 1.5rem;
    }

    .email-link {
        font-size: 1.1rem;
        word-break: break-all;
    }
}

/* Large Desktop Screens */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .podcast-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}
