/*
Theme Name: NewsCorp
Theme URI: https://afthemes.com/products/newscorp/
Author: Krish Digital Agency
Author URI: https://krishdigitalagency.com/
Description: Premium responsive Telugu news portal child theme for RK NEWS 12.
Template: morenews
Version: 3.0.0
Requires at least: 5.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: newscorp
*/

/* =========================================================
   RK NEWS 12 — PREMIUM RESPONSIVE NEWS DESIGN
   ========================================================= */

/* ---------------------------------------------------------
   1. GLOBAL VARIABLES
--------------------------------------------------------- */

:root {
    --rk-primary: #b80000;
    --rk-primary-dark: #8f0000;
    --rk-secondary: #007acc;
    --rk-black: #111111;
    --rk-text: #222222;
    --rk-muted: #777777;
    --rk-border: #e8e8e8;
    --rk-bg: #f6f7f9;
    --rk-white: #ffffff;
    --rk-radius: 8px;
    --rk-shadow: 0 4px 18px rgba(0,0,0,.07);
    --rk-transition: all .25s ease;
}

/* ---------------------------------------------------------
   2. RESET / GLOBAL
--------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--rk-text);
    background: var(--rk-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    transition: var(--rk-transition);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ---------------------------------------------------------
   3. BRAND COLORS
--------------------------------------------------------- */

.main-navigation .menu-description:after {
    border-top-color: var(--rk-primary);
}

.morenews-header div.custom-menu-link > a {
    background: var(--rk-primary);
}

.main-navigation .menu-description,
.read-img .trending-no,
.trending-posts-vertical .trending-no {
    background-color: var(--rk-primary);
}

.aft-default-mode .entry-content > .wp-block-heading a:not(.has-link-color) {
    border-color: var(--rk-primary);
}

.aft-default-mode .entry-content .wp-block-heading:not(.has-link-color):not(.wp-block-post-title) a,
.entry-content > p:not(.has-link-color) a,
.entry-content > p:not(.has-link-color) a:visited {
    color: var(--rk-primary);
}

.af-cat-widget-carousel a.morenews-categories.category-color-1 {
    background-color: var(--rk-primary);
}

a.morenews-categories.category-color-1 {
    color: var(--rk-primary);
}

.af-cat-widget-carousel a.morenews-categories.category-color-2 {
    background-color: var(--rk-secondary);
}

a.morenews-categories.category-color-2 {
    color: var(--rk-secondary);
}

.af-cat-widget-carousel a.morenews-categories.category-color-3 {
    background-color: #333;
}

a.morenews-categories.category-color-3 {
    color: #333;
}

/* ---------------------------------------------------------
   4. SITE CONTAINER
--------------------------------------------------------- */

.container,
.site-content .container,
.morenews-container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ---------------------------------------------------------
   5. HEADER
--------------------------------------------------------- */

.site-header {
    position: relative;
    z-index: 100;
}

.morenews-header {
    background: var(--rk-white);
}

.site-branding {
    min-width: 0;
}

.site-branding .site-title {
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.site-branding .site-description {
    color: var(--rk-muted);
}

/* ---------------------------------------------------------
   6. MAIN NAVIGATION
--------------------------------------------------------- */

.main-navigation {
    font-weight: 700;
}

.main-navigation ul {
    align-items: center;
}

.main-navigation a {
    white-space: nowrap;
}

.main-navigation a:hover {
    color: var(--rk-primary);
}

.main-navigation .menu-item.current-menu-item > a,
.main-navigation .menu-item.current-menu-ancestor > a {
    color: var(--rk-primary);
}

/* ---------------------------------------------------------
   7. CONTENT AREA
--------------------------------------------------------- */

.site-main {
    min-width: 0;
}

.entry-content {
    font-size: 17px;
    line-height: 1.8;
}

.entry-content li [class^="wp-block-"] {
    margin-bottom: 5px;
}

.entry-content section.morenews-author-bio {
    margin-top: 24px;
}

/* ---------------------------------------------------------
   8. NEWS CARDS
--------------------------------------------------------- */

article {
    min-width: 0;
}

.af-double-column,
.read-single,
.af-list-post,
.af-main-banner-story {
    transition: var(--rk-transition);
}

.read-single:hover,
.af-list-post:hover {
    transform: translateY(-2px);
}

.read-img,
.post-thumbnail {
    overflow: hidden;
    border-radius: var(--rk-radius);
}

.read-img img,
.post-thumbnail img,
.af-list-post img {
    transition: transform .4s ease;
}

.read-single:hover img,
.af-list-post:hover img {
    transform: scale(1.03);
}

/* ---------------------------------------------------------
   9. NEWS TITLES
--------------------------------------------------------- */

.entry-title,
.post-title,
.af-main-banner-story .entry-title {
    line-height: 1.25;
    word-break: break-word;
}

.entry-title a:hover,
.post-title a:hover {
    color: var(--rk-primary);
}

/* ---------------------------------------------------------
   10. CATEGORY LABELS
--------------------------------------------------------- */

.morenews-categories {
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    display: inline-block;
}

/* ---------------------------------------------------------
   11. TRENDING
--------------------------------------------------------- */

.trending-posts-vertical {
    overflow: hidden;
}

.trending-posts-vertical .trending-no,
.read-img .trending-no {
    border-radius: 50%;
    font-weight: 800;
}

/* ---------------------------------------------------------
   12. IMAGES
--------------------------------------------------------- */

img {
    display: block;
}

.wp-post-image {
    object-fit: cover;
}

figure {
    margin: 0;
}

/* ---------------------------------------------------------
   13. SINGLE POST
--------------------------------------------------------- */

.single-post .entry-header {
    margin-bottom: 20px;
}

.single-post .entry-title {
    font-weight: 900;
    line-height: 1.15;
}

.single-post .entry-meta {
    color: var(--rk-muted);
}

.single-post .entry-content {
    max-width: 850px;
}

.single-post .entry-content p {
    margin-bottom: 1.2em;
}

.single-post .entry-content img {
    border-radius: 8px;
}

/* ---------------------------------------------------------
   14. TABLES
--------------------------------------------------------- */

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.entry-content table th,
.entry-content table td {
    padding: 10px 12px;
    border: 1px solid var(--rk-border);
}

/* ---------------------------------------------------------
   15. WORDPRESS BLOCKS
--------------------------------------------------------- */

.wp-block-image {
    margin-left: 0;
    margin-right: 0;
}

.wp-block-gallery {
    gap: 10px;
}

.wp-block-quote {
    border-left: 4px solid var(--rk-primary);
    padding-left: 18px;
}

.wp-block-button__link {
    border-radius: 6px;
}

/* ---------------------------------------------------------
   16. SIDEBAR
--------------------------------------------------------- */

.widget {
    margin-bottom: 28px;
}

.widget-title {
    position: relative;
    font-weight: 900;
}

.widget-title::after {
    content: "";
    display: block;
    width: 45px;
    height: 3px;
    margin-top: 8px;
    background: var(--rk-primary);
}

.sidebar .widget,
.widget-area .widget {
    min-width: 0;
}

/* ---------------------------------------------------------
   17. SEARCH
--------------------------------------------------------- */

.search-form {
    display: flex;
    width: 100%;
}

.search-form label {
    flex: 1;
}

.search-form input[type="search"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--rk-border);
    border-radius: 6px 0 0 6px;
    padding: 8px 12px;
}

.search-form .search-submit {
    min-width: 45px;
    border: 0;
    background: var(--rk-primary);
    color: #fff;
    border-radius: 0 6px 6px 0;
}

/* ---------------------------------------------------------
   18. AUTHOR
--------------------------------------------------------- */

.author-website-and-posts {
    font-size: 16px;
}

/* ---------------------------------------------------------
   19. FOOTER
--------------------------------------------------------- */

.site-footer {
    margin-top: 40px;
}

.site-footer a:hover {
    color: var(--rk-primary);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .container,
    .site-content .container,
    .morenews-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .entry-content {
        font-size: 16px;
    }

    .main-navigation a {
        font-size: 14px;
    }

    .widget {
        margin-bottom: 22px;
    }
}

/* =========================================================
   MOBILE — 768px
   ========================================================= */

@media (max-width: 768px) {

    /* GLOBAL */

    body {
        font-size: 15px;
    }

    .container,
    .site-content .container,
    .morenews-container {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* HEADER */

    .site-header {
        width: 100%;
    }

    .site-branding {
        max-width: 70%;
    }

    .site-branding .site-title {
        font-size: 2rem;
        line-height: 1;
    }

    .site-branding .site-description {
        font-size: 11px;
        line-height: 1.3;
    }

    /* MOBILE MENU */

    .main-navigation {
        width: 100%;
    }

    .main-navigation ul {
        width: 100%;
    }

    .main-navigation a {
        padding: 10px 14px;
        font-size: 15px;
    }

    .main-navigation .menu-item {
        border-bottom: 1px solid rgba(0,0,0,.07);
    }

    .main-navigation .sub-menu {
        box-shadow: none;
        border-top: 1px solid var(--rk-border);
    }

    /* CONTENT */

    .site-content {
        padding-top: 12px;
    }

    .entry-content {
        font-size: 16px;
        line-height: 1.75;
    }

    /* PAGE TITLE */

    body.single-post .entry-title,
    body h1.page-title {
        font-size: 25px;
        line-height: 1.2;
        margin-bottom: 12px;
    }

    /* POST TITLES */

    .entry-title {
        font-size: 21px;
    }

    /* NEWS GRID */

    .af-double-column,
    .af-list-post,
    .read-single {
        width: 100%;
    }

    /* IMAGES */

    .read-img,
    .post-thumbnail {
        border-radius: 6px;
    }

    /* CATEGORY */

    .morenews-categories {
        font-size: 11px;
        padding: 4px 7px;
    }

    /* SIDEBAR */

    .sidebar,
    .widget-area {
        width: 100%;
        margin-top: 25px;
    }

    /* BLOCKS */

    .wp-block-columns {
        display: block !important;
    }

    .wp-block-column {
        width: 100% !important;
        margin-bottom: 20px;
    }

    .wp-block-media-text {
        display: block;
    }

    .wp-block-media-text__media {
        margin-bottom: 15px;
    }

    .wp-block-cover {
        min-height: 300px !important;
    }

    /* TABLE */

    .entry-content table {
        font-size: 14px;
    }

    /* FOOTER */

    .site-footer {
        margin-top: 25px;
    }
}

/* =========================================================
   SMALL MOBILE — 600px
   ========================================================= */

@media (max-width: 600px) {

    /* REMOVE EXCESSIVE DESKTOP SPACING */

    .site-content,
    .content-area {
        width: 100%;
    }

    /* LOGO */

    .site-branding .site-title {
        font-size: 1.8rem;
        letter-spacing: -.7px;
    }

    /* NEWS HEADLINES */

    .entry-title,
    .post-title {
        font-size: 19px;
        line-height: 1.28;
    }

    .af-main-banner-story .entry-title {
        font-size: 22px;
    }

    /* POST META */

    .entry-meta {
        font-size: 12px;
    }

    /* IMAGES */

    .read-img img,
    .post-thumbnail img {
        width: 100%;
    }

    /* BUTTONS */

    .wp-block-button,
    .wp-block-button__link {
        max-width: 100%;
    }

    .wp-block-button__link {
        padding: 10px 16px;
    }

    /* SEARCH */

    .search-form input[type="search"] {
        font-size: 15px;
    }

    /* AUTHOR */

    .author-website-and-posts {
        font-size: 14px;
    }
}

/* =========================================================
   VERY SMALL PHONES — 480px
   ========================================================= */

@media (max-width: 480px) {

    body {
        font-size: 14px;
    }

    .container,
    .site-content .container,
    .morenews-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* BRAND */

    body .site-branding .site-title {
        font-size: 1.65rem;
    }

    /* PAGE TITLE */

    body.single-post .entry-title,
    body h1.page-title {
        font-size: 22px;
    }

    /* MAIN NEWS */

    .af-main-banner-story .entry-title {
        font-size: 20px;
    }

    /* STANDARD NEWS */

    .entry-title,
    .post-title {
        font-size: 18px;
    }

    /* CONTENT */

    .entry-content {
        font-size: 15.5px;
        line-height: 1.72;
    }

    .entry-content h2 {
        font-size: 21px;
    }

    .entry-content h3 {
        font-size: 19px;
    }

    .entry-content h4 {
        font-size: 17px;
    }

    /* QUOTE */

    .wp-block-quote {
        margin-left: 0;
        margin-right: 0;
        padding-left: 14px;
    }

    /* IMAGES */

    .entry-content img {
        border-radius: 5px;
    }

    /* WIDGET */

    .widget-title {
        font-size: 18px;
    }
}

/* =========================================================
   EXTRA SMALL PHONES — 375px
   ========================================================= */

@media (max-width: 375px) {

    body .site-branding .site-title {
        font-size: 1.5rem;
    }

    body.single-post .entry-title,
    body h1.page-title {
        font-size: 21px;
    }

    .entry-title,
    .post-title {
        font-size: 17px;
    }

    .af-main-banner-story .entry-title {
        font-size: 19px;
    }

    .entry-content {
        font-size: 15px;
    }

    .main-navigation a {
        font-size: 14px;
    }
}

/* =========================================================
   TOUCH DEVICES
   ========================================================= */

@media (hover: none) and (pointer: coarse) {

    a,
    button,
    input[type="submit"],
    .menu-toggle {
        -webkit-tap-highlight-color: transparent;
    }

    .read-single:hover,
    .af-list-post:hover {
        transform: none;
    }

    .read-single:hover img,
    .af-list-post:hover img {
        transform: none;
    }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

:focus-visible {
    outline: 3px solid var(--rk-secondary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   DARK MODE
   ========================================================= */

.aft-dark-mode .entry-content .wp-block-heading a,
.aft-dark-mode .entry-content p a {
    color: #ff4b4b;
}

.aft-dark-mode .wp-block-archives-list.wp-block-archives a:not(.has-text-color):hover,
.aft-dark-mode .wp-block-latest-posts a:not(.has-text-color):hover,
.aft-dark-mode .wp-block-categories-list.wp-block-categories a:not(.has-text-color):hover,
.aft-dark-mode .wp-block-latest-comments li.wp-block-latest-comments__comment a:hover {
    color: #fff;
}

.aft-dark-mode .entry-content .wp-block-rss li a,
.aft-dark-mode .entry-content .wp-block-categories a,
.aft-dark-mode .entry-content .wp-block-archives a,
.aft-dark-mode .entry-content .wp-block-latest-comments li a,
.aft-dark-mode .entry-content .wp-block-latest-posts li a,
.aft-dark-mode .entry-content .wp-block-tag-cloud a {
    color: inherit !important;
}

/* =========================================================
   MOBILE PERFORMANCE
   ========================================================= */

@media (max-width: 768px) {

    .site-main img {
        content-visibility: auto;
    }

    iframe {
        max-width: 100%;
    }

    video {
        max-width: 100%;
        height: auto;
    }
}