/*
Theme Name: Abhira Media
Theme URI: https://example.com/abhira-media
Author: Abhira Media
Author URI: https://example.com
Description: A security-hardened, fully responsive technical media theme with a mega menu. Built around four editorial models: Technology News, AI & Emerging Technology Intelligence, Cybersecurity & Software Intelligence, and Technology Reviews & Independent Testing.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abhira-media
Tags: news, blog, two-columns, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* ---------- Tokens ---------- */
:root {
	--accent: #e11d48;
	--ink: #0f172a;
	--ink-soft: #475569;
	--line: #e2e8f0;
	--bg: #ffffff;
	--bg-soft: #f8fafc;
	--bg-dark: #0b1220;
	--radius: 10px;
	--shadow: 0 10px 30px rgba(15, 23, 42, .12);
	--container: 1200px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--c-technology-news: #e11d48;
	--c-ai-emerging-technology: #7c3aed;
	--c-cybersecurity-software: #ea580c;
	--c-reviews-testing: #059669;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 17px; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1.2em; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background: #fff; clip: auto; clip-path: none; color: #000; display: block; font-weight: 700; height: auto; left: 8px; padding: 12px 18px; top: 8px; width: auto; z-index: 100000; }
.skip-link:focus { z-index: 100001; }

/* ---------- Top bar ---------- */
.topbar { background: var(--bg-dark); color: #cbd5e1; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar a { color: #e2e8f0; text-decoration: none; margin-left: 14px; }
.topbar a:hover { color: #fff; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.header-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.site-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-title a span { color: var(--accent); }
.site-description { margin: 0; color: var(--ink-soft); font-size: 13px; }
.custom-logo { max-height: 56px; width: auto; }

.search-form { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg-soft); }
.search-form input[type="search"] { border: 0; background: transparent; padding: 10px 16px; min-width: 0; width: 220px; font: inherit; font-size: 15px; color: var(--ink); }
.search-form button { border: 0; background: var(--accent); color: #fff; padding: 0 18px; cursor: pointer; font: inherit; font-weight: 600; }

/* ---------- Navigation + Mega menu ---------- */
.main-nav { background: var(--bg-dark); position: relative; z-index: 50; }
.nav-bar { display: flex; align-items: center; justify-content: space-between; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 14px 0; font: inherit; font-weight: 700; cursor: pointer; align-items: center; gap: 10px; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 2px; background: currentColor; content: ""; position: relative; transition: transform .2s; }
.nav-toggle__bars::before { position: absolute; top: -7px; }
.nav-toggle__bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

.primary-menu, .primary-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.primary-menu a { color: #e2e8f0; text-decoration: none; display: block; }
.submenu-toggle { display: none; }
.mega-heading { display: block; font-weight: 800; }

@media (min-width: 961px) {
	.nav-panel { flex: 1; }
	.primary-menu { display: flex; flex-wrap: wrap; }
	.primary-menu > li { position: relative; }
	.primary-menu > li > a { padding: 16px 18px; font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; }
	.primary-menu > li:hover > a, .primary-menu > li:focus-within > a, .primary-menu > li.current-menu-item > a, .primary-menu > li.current-menu-ancestor > a { color: #fff; border-bottom-color: var(--accent); background: rgba(255, 255, 255, .05); }
	.primary-menu > li.menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: 8px; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-3px); }

	/* standard dropdown */
	.primary-menu > li > .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; box-shadow: var(--shadow); border-top: 3px solid var(--accent); padding: 8px 0; }
	.primary-menu > li:hover > .sub-menu, .primary-menu > li:focus-within > .sub-menu { display: block; }
	.primary-menu .sub-menu a { color: var(--ink); padding: 9px 20px; font-size: 15px; }
	.primary-menu .sub-menu a:hover { background: var(--bg-soft); color: var(--accent); }
	.primary-menu .sub-menu .sub-menu { position: static; box-shadow: none; padding-left: 12px; }

	/* mega menu: add CSS class "mega-menu" to a top-level item in Appearance > Menus */
	.primary-menu > li.mega-menu { position: static; }
	.primary-menu > li.mega-menu > .sub-menu { left: 0; right: 0; width: 100%; padding: 28px max(20px, calc((100% - var(--container)) / 2 + 20px)); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; border-top-width: 3px; }
	.primary-menu > li.mega-menu:hover > .sub-menu, .primary-menu > li.mega-menu:focus-within > .sub-menu { display: grid; }
	.mega-menu > .sub-menu > li > a, .mega-menu > .sub-menu > li > .mega-heading { padding: 0 0 8px; margin-bottom: 8px; border-bottom: 2px solid var(--line); font-weight: 800; color: var(--ink); font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
	.mega-menu > .sub-menu > li > a:hover { background: none; }
	.mega-menu > .sub-menu > li > .sub-menu { padding: 0; }
	.mega-menu > .sub-menu > li > .sub-menu a { padding: 6px 0; font-size: 15px; }
	.mega-menu > .sub-menu > li > .sub-menu a:hover { background: none; text-decoration: underline; }
	.mega-intro p { color: var(--ink-soft); font-size: 14px; margin: 0 0 12px; }
	.mega-intro .mega-all { color: var(--accent); font-weight: 700; padding: 0; }
	.nav-search { display: none; }
}

@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.nav-panel { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-dark); max-height: calc(100vh - 120px); overflow-y: auto; border-top: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow); padding: 0 20px 20px; }
	.main-nav.is-open .nav-panel { display: block; }
	.primary-menu > li { border-bottom: 1px solid rgba(255, 255, 255, .1); position: relative; }
	.primary-menu a { padding: 14px 44px 14px 0; font-weight: 600; }
	.primary-menu .sub-menu { display: none; padding-left: 14px; padding-bottom: 8px; }
	.primary-menu li.is-open > .sub-menu { display: block; }
	.primary-menu .sub-menu a { font-weight: 400; padding: 9px 0; color: #cbd5e1; }
	.mega-heading { padding: 10px 0 4px; color: #fff; text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
	.mega-intro p { color: #94a3b8; font-size: 14px; }
	.submenu-toggle { display: block; position: absolute; right: 0; top: 4px; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; color: #fff; }
	.submenu-toggle::before { content: ""; display: block; width: 8px; height: 8px; margin: auto; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
	li.is-open > .submenu-toggle::before { transform: rotate(-135deg); }
	.nav-search { padding-top: 14px; }
	.nav-search .search-form input[type="search"] { width: 100%; flex: 1; }
	.header-main .search-form { display: none; }
}

/* ---------- Ticker ---------- */
.ticker { background: var(--bg-soft); border-bottom: 1px solid var(--line); font-size: 14px; }
.ticker .container { display: flex; align-items: center; gap: 14px; min-height: 42px; }
.ticker__label { background: var(--accent); color: #fff; font-weight: 800; padding: 3px 10px; border-radius: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; flex: none; }
.ticker__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.ticker__list::-webkit-scrollbar { display: none; }
.ticker__list a { color: var(--ink); text-decoration: none; }
.ticker__list a:hover { color: var(--accent); }

/* ---------- Layout ---------- */
.site-main { padding-block: 36px 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.section { margin-block: 0 48px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 3px solid var(--sec, var(--accent)); margin-bottom: 22px; padding-bottom: 8px; flex-wrap: wrap; }
.section__head h2 { margin: 0; font-size: 1.5rem; }
.section__head p { margin: 0; color: var(--ink-soft); font-size: 14px; flex-basis: 100%; }
.section__head a.more { font-weight: 700; font-size: 14px; }
.page-header { margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 6px; }
.archive-description { color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; margin-bottom: 48px; }
.hero__side { display: grid; gap: 18px; }
.hero__main .card__media img { aspect-ratio: 16 / 9; }
.hero__main .card__title { font-size: clamp(1.4rem, 3vw, 2rem); }
.hero__side .card { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.hero__side .card__title { font-size: 1rem; }
.hero__side .card__excerpt { display: none; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--bg); }
.card__media { display: block; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.card__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding-top: 12px; }
.card__title { font-size: 1.1rem; margin: 6px 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__excerpt { color: var(--ink-soft); font-size: 15px; margin: 0 0 8px; }
.meta { color: var(--ink-soft); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #fff; background: var(--badge, var(--accent)); padding: 3px 9px; border-radius: 4px; text-decoration: none; }
.badge:hover { color: #fff; filter: brightness(1.1); }
.badge--technology-news { --badge: var(--c-technology-news); }
.badge--ai-emerging-technology { --badge: var(--c-ai-emerging-technology); }
.badge--cybersecurity-software { --badge: var(--c-cybersecurity-software); }
.badge--reviews-testing { --badge: var(--c-reviews-testing); }
.sec--technology-news { --sec: var(--c-technology-news); }
.sec--ai-emerging-technology { --sec: var(--c-ai-emerging-technology); }
.sec--cybersecurity-software { --sec: var(--c-cybersecurity-software); }
.sec--reviews-testing { --sec: var(--c-reviews-testing); }

/* ---------- Single ---------- */
.entry-title { font-size: clamp(1.9rem, 4.5vw, 2.8rem); letter-spacing: -.02em; margin: 12px 0; }
.entry-meta { margin-bottom: 20px; }
.entry-thumb img { border-radius: var(--radius); width: 100%; }
.entry-content { font-size: 1.08rem; overflow-wrap: anywhere; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content pre, .entry-content code { font-family: var(--mono); font-size: .92em; }
.entry-content pre { background: var(--bg-dark); color: #e2e8f0; padding: 16px; border-radius: var(--radius); overflow-x: auto; }
.entry-content :not(pre) > code { background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; }
.entry-content blockquote { border-left: 4px solid var(--accent); margin: 1.5em 0; padding: .3em 1.2em; color: var(--ink-soft); background: var(--bg-soft); }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--bg-soft); }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--ink-soft); }

/* Review + advisory boxes */
.infobox { border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 28px; background: var(--bg-soft); }
.infobox h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.infobox dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.infobox dt { font-weight: 700; }
.infobox dd { margin: 0; }
.infobox--review { border-left-color: var(--c-reviews-testing); }
.infobox--advisory { border-left-color: var(--c-cybersecurity-software); }
.score { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--c-reviews-testing); color: #fff; font-weight: 800; font-size: 1.3rem; margin-right: 14px; vertical-align: middle; }
.sev { display: inline-block; padding: 2px 10px; border-radius: 4px; color: #fff; font-weight: 800; font-size: 12px; text-transform: uppercase; }
.sev--low { background: #16a34a; } .sev--medium { background: #ca8a04; } .sev--high { background: #ea580c; } .sev--critical { background: #b91c1c; }

.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-block: 36px; flex-wrap: wrap; }
.post-nav a { font-weight: 700; }
.pagination, .navigation.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); }
.page-numbers.current, .page-numbers:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Sidebar & widgets ---------- */
.widget { margin-bottom: 32px; }
.widget-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 3px solid var(--accent); padding-bottom: 6px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.widget a { color: var(--ink); text-decoration: none; }
.widget a:hover { color: var(--accent); }

/* ---------- Comments ---------- */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.comment-respond .submit, .button { background: var(--accent); color: #fff; border: 0; padding: 11px 22px; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #cbd5e1; margin-top: 40px; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; padding-block: 48px; }
.site-footer .widget-title { color: #fff; }
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .widget li { border-color: rgba(255, 255, 255, .12); }
.footer-brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 18px; }
.footer-menu { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; flex-wrap: wrap; }

/* Scroll to top (lives in footer) */
.scroll-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s, transform .25s, visibility .25s; z-index: 90; }
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { filter: brightness(1.1); }
.scroll-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* WP alignment */
.alignleft { float: left; margin: 0 1.5em 1em 0; } .alignright { float: right; margin: 0 0 1em 1.5em; } .aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: 13px; color: var(--ink-soft); }
.sticky .card__title::before { content: "\2605 "; color: var(--accent); }
.bypostauthor { }
.gallery-caption { }
