/*
 Theme Name:   wpseo theme
 Theme URI:    https://seogru.in/wpseo/
 Description:  Custom theme optimized for Discover & CWV
 Author:       seogru.in
 Author URI:   https://seogru.in
 Version:      1.2
*/

/* ===============================
   GLOBAL LAYOUT
================================ */

.main-navigation {
    box-shadow: 0 1px 4px rgba(0,0,0,0.16);
}

.site-content .content-area,
.is-right-sidebar {
    margin-top: 30px;
}

/* ===============================
   STICKY MENU (SAFE)
================================ */

.inb-scroll-menu {
    background: #fff;
    color: #000;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-top: 1px solid #ccc;
    box-shadow: 0 3px 4px rgba(0,0,0,0.13);
}

/* ===============================
   FEATURED IMAGE (LCP SAFE)
================================ */

.page-header-image-single img,
.post-image > .wp-post-image,
figure > .wp-post-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Aspect ratio fallback-safe */
@supports (aspect-ratio: 16 / 9) {
    .page-header-image-single img,
    .post-image > .wp-post-image,
    figure > .wp-post-image {
        aspect-ratio: 16 / 9;
    }
}

.page-header-image-single img,
.page-header-image-single .wp-post-image {
    border-radius: 16px;
    margin-bottom: -5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* ===============================
   BREADCRUMB
================================ */

.rank-math-breadcrumb p {
    background: #e5e8ec;
    color: #000;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .rank-math-breadcrumb p {
        margin: 10px;
    }
}

/* ===============================
   TABLE OF CONTENT
================================ */

#toc_container {
    border: 1px solid #aaa;
    background: transparent;
}

#toc_container li a {
    display: block;
    padding: 10px 1em;
    border-top: 1px solid #aaa;
}

#toc_container span.toc_toggle {
    font-size: 18px;
    padding: 6px 20px;
    display: block;
    text-align: center;
}

/* ===============================
   TAG CLOUD
================================ */

.widget_epcl_tag_cloud a,
.widget_tag_cloud a,
.wp-block-tag-cloud a,
div.tags a {
    font-size: 12px;
    padding: 4px 15px;
    margin: 5px;
    border: 1px solid #333;
    border-radius: 25px;
    background: #fff;
    color: #333;
    display: inline-block;
}

/* ===============================
   CATEGORY HEADING
================================ */

.inb-hp-heading:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 2px solid #808080;
    z-index: -1;
}

.stretch-link {
    position: relative;
}

/* ===============================
   INLINE & BLOCK IMAGES IN POSTS
================================ */

.wp-block-image,
.prose .wp-block-image,
.entry-content .wp-block-image {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.5rem auto !important;
    padding: 0 !important;
    clear: both;
}

.wp-block-image img,
.prose .wp-block-image img,
.prose img,
.entry-content img,
article .prose img {
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.wp-block-image.aligncenter,
.prose .wp-block-image.aligncenter {
    text-align: center;
}

.wp-block-image.alignfull,
.wp-block-image.alignwide,
.prose .wp-block-image.alignfull,
.prose .wp-block-image.alignwide {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Image Captions */
.wp-block-image figcaption,
.prose figcaption,
.wp-caption-text {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    color: #6b7280 !important;
    text-align: center !important;
    margin-top: 0.5rem !important;
    padding: 0 0.5rem;
    font-style: italic;
}
.dark .wp-block-image figcaption,
.dark .prose figcaption,
.dark .wp-caption-text {
    color: #9ca3af !important;
}

/* ===============================
   RESPONSIVE EMBEDDED VIDEOS & IFRAMES
================================ */

/* Gutenberg Embed Containers */
.wp-block-embed,
.prose .wp-block-embed,
.entry-content .wp-block-embed {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.75rem auto !important;
    clear: both;
    overflow: hidden;
    border-radius: 12px;
}

.wp-block-embed__wrapper,
.prose .wp-block-embed__wrapper,
.entry-content .wp-block-embed__wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both;
}

/* Aspect ratio 16:9 for Gutenberg responsive embeds */
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper,
.prose .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper {
    position: relative !important;
    width: 100% !important;
    padding-top: 56.25% !important; /* 16:9 ratio */
    height: 0 !important;
    overflow: hidden;
}

.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper iframe,
.wp-block-embed.wp-has-aspect-ratio iframe,
.prose .wp-block-embed.wp-has-aspect-ratio iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 12px;
}

/* Post Content Iframes (YouTube, Vimeo, etc.) */
.prose iframe,
.entry-content iframe,
article iframe {
    max-width: 100% !important;
    border: 0 !important;
    border-radius: 12px;
}

.prose iframe[src*="youtube.com"],
.prose iframe[src*="youtu.be"],
.prose iframe[src*="youtube-nocookie.com"],
.prose iframe[src*="vimeo.com"],
.prose iframe[src*="dailymotion.com"],
article iframe[src*="youtube.com"],
article iframe[src*="youtu.be"],
article iframe[src*="youtube-nocookie.com"],
article iframe[src*="vimeo.com"],
article iframe[src*="dailymotion.com"] {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    display: block !important;
    margin: 1.75rem auto !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* HTML5 Video */
.prose video,
.entry-content video,
article video,
.wp-block-video video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    display: block;
    margin: 1.75rem auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ===============================
   CATEGORY GRID
================================ */

.gp-category-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Safe content visibility */
@supports (content-visibility: auto) {
    .gp-category-wrapper {
        content-visibility: auto;
    }
}

@media (max-width: 600px) {
    .gp-category-wrapper {
        grid-template-columns: 1fr;
    }
}

.gp-post-box {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease;
}

.gp-post-box:hover {
    transform: translateY(-4px);
}

.gp-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gp-content {
    padding: 15px;
}

.gp-title {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.gp-title a {
    color: #111;
    text-decoration: none;
}

.gp-title a:hover {
    color: #e11d48;
}

.gp-excerpt {
    font-size: 14px;
    color: #555;
}


/* ===============================
   CORE WEB VITALS SAFE
================================ */

a,
button {
    touch-action: manipulation;
}

@media (max-width: 768px) {

    body {
        font-size: 20px;
        line-height: 1.6;
    }

    .gp-title {
        font-size: 26px;
        font-weight: 800;
        line-height: 1.3;
    }

    .gp-excerpt {
        font-size: 18px;
    }

    .main-navigation {
        box-shadow: none;
    }
    
    /* Google Discover Mobile Optimization */
    .post-image,
    .page-header-image-single {
        margin-left: -20px !important;
        margin-right: -20px !important;
        margin-top: -20px !important;
        margin-bottom: 20px !important;
    }
    
    .page-header-image-single img,
    .post-image > .wp-post-image,
    figure > .wp-post-image {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0 !important;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }
    
    .entry-title {
        font-size: 32px !important;
        line-height: 1.3 !important;
        font-weight: 800 !important;
        margin-bottom: 15px;
    }

    * {
        transition: none !important;
    }
}


/* --------------------------------------------------
   Whatsapp Share button
-------------------------------------------------- */

/* Hide on desktop */
@media (min-width: 768px) {
    .wa-sticky-wrap {
        display: none ;
    }
}

/* Sticky wrapper */
.wa-sticky-wrap {
    position: fixed;
    right: 10px;
    bottom: 60px; /* safer than middle */
    z-index: 9999;
    max-width: 90vw;
    overflow: hidden;
    box-sizing: border-box;
}

/* WhatsApp button */
.wa-sticky-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 10px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 5px 12px rgba(0,0,0,0.25);
    max-width: 100%;
    white-space: nowrap;
}

/* Icon */
.wa-sticky-btn img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Prevent page overflow */
html, body {
    overflow-x: hidden;
}

.gp-ad{
  margin:28px 0;
  text-align:center;
}

.gp-ad-2{
  display:none;
}

.gp-ad-2.show{
  display:block;
}

.news-ad {
    width: 350px;
    max-width: 100%;
    margin: 30px auto;
    text-align: center;
}

.news-ad img,
.news-ad video {
    width: 350px;
    max-width: 100%;
    height: auto;
    display: block;
}

