/*
Theme Name: Siyaqasha by Lutel Group
Theme URI: https://lutelgroup.com
Author: Lutel Group
Author URI: https://lutelgroup.com
Description: A high-performance WordPress theme for Google Discover, AdSense, and SEO.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: antigravity-portfolio
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/*
 * Base styles for Antigravity Portfolio
 * Developers: Add your custom CSS below or enqueue separate stylesheets in functions.php.
 */

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f9f9f9;
}

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

/* Layout Utilities */
.site-main {
    padding: 2rem 0;
}

/* Container Stability & Skeleton Loading */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f2f5 25%, #e1e4e8 37%, #f0f2f5 63%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 8px;
}

/*
 * AdSense policy: ads must not have decorative animations overlaid on them.
 * Strip the shimmer once the ad container is active (ad code present).
 * Also ensure .ad-container never inherits skeleton styles even if both
 * classes are accidentally applied in a template.
 */
.ad-container.skeleton,
.ad-container .skeleton {
    animation: none !important;
    background: #f8f9fa !important;
}

.aspect-ratio-box {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
    background-color: #f1f3f4;
    overflow: hidden;
    border-radius: 12px;
}

.aspect-ratio-box img,
.aspect-ratio-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Global Navigation Styles */
.menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; padding: 5px; color: #202124; line-height: 1; margin-right: 15px; }
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}
.main-navigation a {
    text-decoration: none;
    color: #5f6368;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.main-navigation a:hover {
    color: #1a73e8;
}

/* Post List Components */
.post-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid #f1f3f4;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.card-image-link {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card .entry-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

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

.card .entry-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.card .entry-excerpt {
    color: #444;
    font-size: 0.95rem;
}

/* AdSense Containers (CLS Safe)
 * Using display:block (not flex) so AdSense iframes flow naturally
 * without overlapping any pseudo-elements.
 */
.ad-container {
    background: #f8f9fa;
    display: block;           /* block ensures AdSense iframe stacks normally */
    text-align: center;       /* centres the ins/iframe horizontally */
    color: #9aa0a6;
    font-size: 0.8rem;
    min-height: 280px;        /* CLS guard — prevents jump when ad loads */
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px dashed #dadce0;
    position: relative;
    overflow: hidden;
}

/* Removed the ::before pseudo-element — it was always rendering
 * on top of real AdSense content, causing a visual stacking effect.
 * The fallback label is now printed as real DOM text in functions.php
 * only when no ad code is provided. */

.ad-container.leaderboard { min-height: 90px; }
.ad-container.square { min-height: 250px; }

@media screen and (max-width: 768px) {
    .ad-container { min-height: 250px; margin: 1.5rem 0; }
    .ad-container.leaderboard { min-height: 50px; }
}

/* Responsive Images globally */
img {
    max-width: 100%;
    height: auto;
}


/* NEW UI DISCOVER OVERRIDES */
body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #202124;
}


/* Card Visuals (Discover Style) */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid #f1f3f4;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-image-link {
    aspect-ratio: 16 / 9;
    border-radius: 12px 12px 0 0;
}

.featured-card:first-child .card-image-link {
    border-radius: 12px 0 0 12px;
    height: 100%;
}

.card-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.card-cat {
    color: #1a73e8; /* High CTR Accent */
}

.card-time {
    color: #5f6368;
}

.card .entry-title a {
    color: #202124;
    transition: color 0.15s ease;
}

.card:hover .entry-title a {
    color: #1a73e8;
}

/* TOC & FAQ Styles */
.toc-wrapper {
    background: #f1f3f4;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}
.toc-wrapper h3 { margin-top: 0; font-size: 1.25rem; color: #1a1a1a; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 0.5rem; }
.toc-list li a { color: #1a73e8; text-decoration: none; font-weight: 500; }
.toc-list li.toc-sub { margin-left: 1rem; font-size: 0.95rem; }

.faq-accordion h2 {
    cursor: pointer;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-size: 1.25rem;
    margin-bottom: 0;
    transition: background 0.2s;
}
.faq-accordion h2:hover { background: #f1f3f4; }
.faq-accordion h2::after {
    content: '+';
    float: right;
    color: #1a73e8;
}
.faq-accordion h2.active::after { content: '-'; }
.faq-accordion p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fff;
    padding: 0 15px;
    margin: 0 0 1rem 0;
}

/* Inline Related Posts */
.inline-related-posts {
    background: #e8f0fe;
    border-left: 4px solid #1a73e8;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}
.inline-related-posts h4 { margin-top: 0; color: #1a73e8; }
.inline-related-posts ul { margin-bottom: 0; }
.inline-related-posts a { font-weight: 600; color: #202124; text-decoration: none; }
.inline-related-posts a:hover { text-decoration: underline; }

/* Footer Widget Grid */
.footer-widget-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.footer-column {
    text-align: left;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column li {
    margin-bottom: 8px;
}
.footer-column a {
    text-decoration: none;
    color: #5f6368;
    transition: color 0.2s;
}
.footer-column a:hover {
    color: #1a73e8;
}
.widget-title {
    font-size: 1.1rem;
    color: #202124;
    margin-bottom: 15px;
    font-weight: 700;
}

@media screen and (max-width: 1024px) {
    .footer-widget-grid { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 600px) {
    .footer-widget-grid { grid-template-columns: 1fr; }
}


/* Comprehensive Responsive Target Fixes */
@media screen and (max-width: 768px) {
    /* Header & Navigation Dropdown */
    .header-inner { flex-direction: row !important; height: 60px !important; padding: 0 20px !important; justify-content: space-between !important; align-items: center !important; }
    .site-title { font-size: 1.15rem !important; margin: 0; text-align: left; white-space: nowrap; }
    .menu-toggle { display: block !important; margin-left: auto; margin-right: 15px; }
    .main-navigation ul { 
        display: none; 
        flex-direction: column; 
        width: 100%; 
        background: #fff; 
        position: absolute; 
        top: 60px; 
        left: 0; 
        padding: 20px; 
        box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
        border-top: 1px solid #f1f3f4;
        z-index: 1000; 
        text-align: center;
        gap: 15px;
    }
    .main-navigation ul.toggled { display: flex; }
    
    /* Fix Search Overlay scaling */
    #header-search-form { right: 50% !important; transform: translateX(50%); top: 90px !important; width: 90%; max-width: 350px; z-index: 1000; }
    #header-search-form input { width: 100% !important; box-sizing: border-box; }
    body { padding-top: 100px; } /* Offset adjustment for wrapped header */

    /* Typography & Structure Scaling */
    .entry-meta { flex-wrap: wrap; gap: 10px !important; font-size: 0.85rem !important; }
    .article-container { padding: 1.5rem 15px !important; }
    
    /*
     * Mobile ad sizing — do NOT use !important on the base .ad-container
     * because it overrides the .leaderboard and .square variants.
     * Instead, set the default and let the variants cascade naturally.
     */
    .ad-container { max-width: 100%; overflow: visible; min-height: 250px; }
    .ad-container.leaderboard { min-height: 50px; }
    
}

@media screen and (max-width: 480px) {
    .card-content { padding: 1rem; }
    .main-navigation ul { font-size: 0.85rem; gap: 8px; }
    .toc-wrapper { padding: 1rem; }
    .inline-related-posts { padding: 1rem; border-left-width: 3px; }
}

/* Numbered Pagination Styling */
.pagination-container {
    margin: 3rem 0;
    text-align: center;
    padding-bottom: 2rem;
}

.pagination-container .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-container .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #dadce0;
    color: #3c4043;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-container .page-numbers:hover {
    border-color: #1a73e8;
    color: #1a73e8;
    background: #f8f9fa;
}

.pagination-container .page-numbers.current {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(26,115,232,0.2);
}

.pagination-container .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

@media (max-width: 600px) {
    .pagination-container .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}
/* Job Meta & Post Typography Refinements */
.job-meta {
    background: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}
.job-meta ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.job-meta li { font-size: 0.95rem; color: #3c4043; }
.job-meta strong { color: #1a73e8; font-weight: 700; display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }

.post-category-pill {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.author-avatar-circle {
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
