/**
 * Main Stylesheet
 * 
 * Additional styles loaded after the main style.css
 * 
 * @package Strategic_Club
 * @since 1.0.0
 */

/* ==========================================================================
   Site Header
   Implemented in assets/css/header.css (Figma Node 6025:17637)
   ========================================================================== */

/* Legacy fallback � header.css takes precedence */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #1C1E22;
    direction: rtl;
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

/* Post Card */
.post-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.post-card-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05);
}

.post-card-content {
    padding: var(--spacing-lg);
}

.post-card-header {
    margin-bottom: var(--spacing-md);
}

.post-card-title {
    font-size: var(--font-size-xl);
    margin-bottom: 0;
}

.post-card-title a {
    color: var(--color-dark);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--color-primary);
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
}

.post-card-excerpt {
    color: var(--color-gray-700);
    margin-bottom: var(--spacing-md);
}

.post-card-excerpt p:last-child {
    margin-bottom: 0;
}

.post-card-footer {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
}

.sticky-post {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-sm);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-2xl);
}

.pagination .nav-links {
    display: flex;
    gap: var(--spacing-sm);
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--spacing-sm);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--border-radius-md);
    color: var(--color-gray-700);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination .page-numbers:hover {
    background-color: var(--color-gray-100);
    border-color: var(--color-gray-400);
}

.pagination .page-numbers.current {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ==========================================================================
   Site Footer - Figma Design Implementation
   Node: 1496:3963
   ========================================================================== */

.site-footer {
    background-color: #1C1E22;
    color: #FFFFFF;
    padding: 40px 108px;
    border-top: 2px solid #30343B;
    border-radius: 0;
    direction: rtl;
}

.footer-widgets {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 16px;
}

.footer-widgets-inner {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
}

.footer-widgets .widget-title {
    color: #FFFFFF;
    font-size: 16px;
    font-family: 'Vazir', sans-serif;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 16px;
}

.footer-widgets .widget ul {
    padding: 0;
    margin: 0;
}

.footer-widgets .widget li {
    margin-bottom: 8px;
}

.footer-widgets .widget a {
    color: #C4C8CF;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    line-height: 1.5;
}

.footer-widgets .widget a:hover {
    color: #1081DF;
}

/* Footer Bottom - Figma: gap 16px */
.footer-bottom {
    padding: 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-direction: row-reverse;
}

.footer-copyright {
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    line-height: 1.5;
}

.footer-copyright p {
    margin: 0;
    color: #FFFFFF;
}

/* Footer Menu Buttons - Figma: bg #25272D, height 32px, padding 8px 12px */
.footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex-direction: row-reverse;
}

.footer-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25272D;
    color: #FFFFFF;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    font-weight: 400;
    line-height: 1.2;
    padding: 8px 12px;
    height: 32px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.footer-menu a:hover {
    background: #30343B;
}

/* Social Links - Figma: bg #25272D, border #30343B, 28px size, 4px padding */
.social-links-menu {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.social-links-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #25272D;
    border: 1px solid #30343B;
    border-radius: 4px;
    padding: 4px;
    color: #C4C8CF;
    text-decoration: none;
    transition: all 0.15s ease;
}

.social-links-menu a:hover {
    background-color: #1081DF;
    border-color: #1081DF;
    color: #FFFFFF;
}

.social-links-menu a svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 992px) {
    .footer-widgets-inner {
        flex-wrap: wrap;
    }

    .site-footer {
        padding: 40px 24px;
    }
}

@media (max-width: 768px) {
    .footer-widgets-inner {
        flex-direction: column;
        gap: 16px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-menu {
        justify-content: center;
    }

    .social-links-menu {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding: 24px 16px;
    }
}

/* ==========================================================================
   Single Post � Footer Corner Fix
   Eliminates white corners above the rounded footer on single post pages.
   The body background is white by default; on single posts the page is dark,
   so we match the body background to the footer background colour.
   ========================================================================== */

body.single {
    background-color: #101114;
}

/* ==========================================================================
   Post Content Links
   Makes links inside post content visible and clickable.
   ========================================================================== */

.entry-content td {
    color: #ffffff;
}

.entry-content a:not([class]),
.entry-content p a,
.entry-content li a,
.entry-content td a {
    color: #1081df;
    /* text-decoration: underline; */
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.entry-content a:not([class]):hover,
.entry-content p a:hover,
.entry-content li a:hover,
.entry-content td a:hover {
    color: #3aa0f7;
    text-decoration-color: #3aa0f7;
}

.entry-content a:not([class]):focus-visible,
.entry-content p a:focus-visible,
.entry-content li a:focus-visible,
.entry-content td a:focus-visible {
    outline: 2px solid #1081df;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Native WordPress Gallery Support
   ========================================================================== */

.entry-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin: 1.5em 0;
    padding: 0;
    list-style: none;
}

.entry-content .gallery-item {
    margin: 0;
    padding: 0;
    text-align: center;
}

.entry-content .gallery-item img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.entry-content .gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.entry-content .gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.entry-content .gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.entry-content .gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.entry-content .gallery-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.entry-content .gallery-columns-7 {
    grid-template-columns: repeat(7, 1fr);
}

.entry-content .gallery-columns-8 {
    grid-template-columns: repeat(8, 1fr);
}

.entry-content .gallery-columns-9 {
    grid-template-columns: repeat(9, 1fr);
}

/* ── Global custom dark scrollbar ── */
* {
    scrollbar-width: thin;
    scrollbar-color: #30343B transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: #30343B;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #3C4049;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

.entry-content .gallery-caption {
    display: block;
    font-size: 0.85em;
    color: #9ca3af;
    margin-top: 4px;
    padding: 0 4px;
}

@media (max-width: 600px) {
    .entry-content .gallery-columns-3,
    .entry-content .gallery-columns-4,
    .entry-content .gallery-columns-5,
    .entry-content .gallery-columns-6,
    .entry-content .gallery-columns-7,
    .entry-content .gallery-columns-8,
    .entry-content .gallery-columns-9 {
        grid-template-columns: repeat(2, 1fr);
    }
}

