/*
Theme Name: NexaTech Solutions
Author: NexaTech Solutions
Description: Bilingual (English / Arabic) company theme for NexaTech Solutions — British technology delivered for Iraq's infrastructure. Dark one-page homepage (hero, about, services, experience, team, contact) plus blog, pages, widgets and menus. Edit everything from the dashboard: homepage text and images in Appearance → Customize → Homepage sections, Services and Team as their own post types, menus per language, logo, and widget areas. Includes a working contact form.
Version: 2.0.0
Requires at least: 6.0
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: nexatechsolutions
Tags: one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, editor-style, blog, business, portfolio
*/

/* ==========================================================================
   Base (from the original design)
   ========================================================================== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--color-bg); text-wrap: pretty; }
a { color: var(--color-accent); }
a:hover { color: var(--color-accent-400); }
img { max-width: 100%; height: auto; }

.nexa-site {
  font-family: var(--font-body);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 720px at var(--nexa-glow-x, 82%) -160px, color-mix(in srgb, var(--color-accent-900) 75%, transparent), transparent 60%),
    radial-gradient(1100px 800px at -10% 40%, color-mix(in srgb, black 30%, transparent), transparent 55%),
    var(--color-bg);
}
.nexa-content-area { flex: 1 0 auto; }

/* Accessibility */
.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, .skip-link:focus {
  clip: auto !important; clip-path: none; height: auto; width: auto; margin: 0;
  left: 8px; top: 8px; z-index: 100000; padding: 12px 18px;
  background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); text-decoration: none; font-size: 14px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.nexa-header {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nexa-header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 56px);
  display: flex; align-items: center; gap: 28px;
}
.nexa-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--color-text);
  margin-inline-end: auto;
}
.nexa-brand:hover { color: var(--color-text); }
.nexa-logo { display: block; max-height: 36px; width: auto; }
.nexa-desktop-nav { display: flex; gap: 28px; }
.nexa-desktop-nav a.is-current { color: var(--color-accent) !important; }
.nexa-menu-btn { display: none !important; }
.nexa-mobile-nav { display: none; flex-direction: column; padding: 4px clamp(20px, 5vw, 56px) 18px; }
@media (max-width: 819.98px) {
  .nexa-desktop-nav { display: none; }
  .nexa-menu-btn { display: inline-flex !important; }
  .nexa-header.is-open .nexa-mobile-nav { display: flex; }
}

.nexa-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-divider) 48px, var(--color-divider) calc(100% - 48px), transparent);
}

/* Hover states (were style-hover attributes in the source design) */
.nexa-hover-accent:hover { color: var(--color-accent) !important; }
.nexa-card-hover:hover { box-shadow: var(--shadow-md) !important; }

/* ==========================================================================
   Homepage sections
   ========================================================================== */
.nexa-section {
  scroll-margin-top: 64px;
  max-width: 1200px; margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 56px);
}
.nexa-kicker {
  display: flex; align-items: center; gap: 12px;
  color: var(--color-accent); font-size: 12.5px; text-transform: uppercase;
  margin-bottom: 20px;
}
.nexa-kicker span { width: 28px; height: 1px; background: var(--color-accent); }
.nexa-cred-list { grid-column: span 2; }

.nexa-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nexa-img-box { overflow: hidden; min-height: 0; }
.nexa-img-ph {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 16px;
  color: var(--color-neutral-500); font-size: 13px; text-align: center;
  background: var(--color-neutral-900);
}
.nexa-icon-box {
  width: 40px; height: 40px; flex: none;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
}
.nexa-icon-box i { font-size: 20px; color: var(--color-accent); }

.nexa-page-content { max-width: 760px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px) clamp(32px, 5vw, 64px); }

/* Contact form */
.nexa-form-error { grid-column: 1 / -1; font-size: 13.5px; color: #f2a1a8; margin: 0; }
/* Spam trap: hidden by clipping, not by an offset (an offset would create sideways scrolling on RTL pages). */
.nexa-hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.nexa-form-plugin input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.nexa-form-plugin textarea,
.nexa-form-plugin select { width: 100%; }

/* ==========================================================================
   Footer
   ========================================================================== */
.nexa-footer { background: color-mix(in srgb, black 18%, var(--color-bg)); }
.nexa-footer-grid {
  max-width: 1200px; margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 56px) 32px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px;
}
.nexa-footer .nexa-brand { margin-inline-end: 0; }
.nexa-footer .nexa-brand-name { letter-spacing: 0 !important; }
.nexa-footer-heading { font-size: 12px; text-transform: uppercase; color: var(--color-neutral-500); margin-bottom: 14px; }
.nexa-footer-copy {
  max-width: 1200px; margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 56px) 32px;
  font-size: 12.5px; color: var(--color-neutral-500);
}
.nexa-footer-widgets { font-size: 14px; color: var(--color-neutral-300); }
.nexa-footer-widgets { display: grid; gap: 24px; align-content: start; }
.nexa-footer-widgets .widget-title,
.nexa-footer-widgets .wp-block-heading { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-neutral-500); margin: 0 0 14px; font-weight: 400; }
.nexa-lang-ar .nexa-footer-widgets .widget-title,
.nexa-lang-ar .nexa-footer-widgets .wp-block-heading { letter-spacing: 0; }
.nexa-footer-widgets .widget li { border-top: 0; padding: 4px 0; }

/* ==========================================================================
   Blog, pages, archives
   ========================================================================== */
.nexa-main {
  max-width: 760px; margin: 0 auto; width: 100%; box-sizing: border-box;
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 56px);
}
.nexa-main.is-wide { max-width: 1200px; }
.nexa-main.has-sidebar {
  max-width: 1200px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 64px); align-items: start;
}
@media (max-width: 899.98px) { .nexa-main.has-sidebar { grid-template-columns: minmax(0, 1fr); } }
.nexa-main-col { min-width: 0; }

.nexa-page-header { margin-bottom: 36px; }
.nexa-page-title { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; margin: 0; }
.nexa-lang-ar .nexa-page-title { line-height: 1.4; }
.nexa-archive-desc { margin-top: 14px; color: var(--color-neutral-400); font-size: 15.5px; line-height: 1.7; }
.nexa-meta { font-size: 13px; color: var(--color-neutral-500); margin-top: 14px; }
.nexa-meta a { color: var(--color-neutral-300); text-decoration: none; }
.nexa-meta a:hover { color: var(--color-accent); }

.nexa-post-grid { display: grid; gap: 20px; }
.nexa-post-card { padding: 0; gap: 0; overflow: hidden; transition: box-shadow 200ms ease; }
.nexa-post-thumb { display: block; aspect-ratio: 16 / 9; }
.nexa-post-body { padding: 24px; }
.nexa-post-title { font-size: 22px; line-height: 1.3; margin: 0; }
.nexa-post-title a { color: var(--color-text); text-decoration: none; }
.nexa-post-title a:hover { color: var(--color-accent); }
.nexa-excerpt { font-size: 15px; line-height: 1.7; color: var(--color-neutral-400); margin-top: 12px; }
.nexa-excerpt p { margin: 0; }
.nexa-read-more { margin-top: 12px; padding-inline: 0; }
.nexa-badge { display: inline-block; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-accent); border: 1px solid var(--color-accent); border-radius: 999px; padding: 2px 10px; margin-bottom: 12px; }
.nexa-none { padding: 28px; }
.nexa-none p { margin: 0 0 16px; color: var(--color-neutral-300); }

.nexa-featured { margin: 0 0 32px; }
.nexa-featured img { width: 100%; border-radius: var(--radius-md); display: block; }

/* Post content */
.entry-content { font-size: 16.5px; line-height: 1.75; color: var(--color-neutral-300); }
.entry-content > * { margin-block: 0 1.2em; }
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { color: var(--color-text); line-height: 1.3; margin: 1.8em 0 0.6em; }
.entry-content h2 { font-size: 28px; }
.entry-content h3 { font-size: 22px; }
.entry-content h4 { font-size: 18px; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content blockquote, .wp-block-quote {
  margin-inline: 0; padding: 4px 0; padding-inline-start: 22px;
  border-inline-start: 2px solid var(--color-accent); color: var(--color-text); font-size: 18px;
}
.entry-content blockquote cite { display: block; margin-top: 8px; font-size: 13.5px; color: var(--color-neutral-500); font-style: normal; }
.entry-content hr, .wp-block-separator { border: 0; height: 1px; background: var(--color-divider); margin: 2.4em 0; }
.entry-content code, .entry-content kbd { font-size: 0.9em; background: var(--color-surface); padding: 2px 6px; border-radius: var(--radius-sm); }
.entry-content pre { background: var(--color-surface); padding: 18px; border-radius: var(--radius-md); overflow: auto; font-size: 14px; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--color-divider); text-align: start; }
.entry-content th { color: var(--color-text); font-weight: 500; }
.entry-content img, .entry-content video { border-radius: var(--radius-md); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption, .wp-caption-text, .wp-element-caption { font-size: 13px; color: var(--color-neutral-500); margin-top: 8px; text-align: center; }
.entry-content .wp-block-button__link { background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); border-radius: var(--radius-md); padding: 10px 20px; text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.entry-content .alignwide { margin-inline: calc((min(1200px, 100vw - 2 * clamp(20px, 5vw, 56px)) - 100%) / -2); max-width: none; }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.nexa-main.has-sidebar .entry-content .alignwide, .nexa-main.has-sidebar .entry-content .alignfull { margin-inline: 0; width: auto; }
.alignleft { float: left; margin: 0.3em 1.6em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.6em; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.wp-caption { max-width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery-caption { font-size: 12.5px; }
.sticky, .bypostauthor { position: relative; }

.nexa-page-links { margin-top: 24px; font-size: 14px; display: flex; gap: 10px; }
.nexa-entry-footer { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.nexa-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.nexa-tags a { font-size: 13px; color: var(--color-neutral-300); text-decoration: none; border: 1px solid var(--color-divider); border-radius: 999px; padding: 4px 12px; }
.nexa-tags a:hover { color: var(--color-accent); border-color: var(--color-accent); }
.nexa-edit a { font-size: 13px; }

/* Post navigation & pagination */
.post-navigation { margin-top: 48px; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.post-navigation a { display: block; padding: 18px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--color-text); }
.post-navigation a:hover { box-shadow: var(--shadow-md); }
.post-navigation .nav-next { text-align: end; }
.nexa-nav-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-neutral-500); margin-bottom: 6px; }
.nexa-nav-title { display: block; font-size: 15.5px; line-height: 1.4; }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  color: var(--color-neutral-300); text-decoration: none; font-size: 14px;
}
.pagination .page-numbers.current { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.pagination a.page-numbers:hover { color: var(--color-accent); }

/* Search form */
.nexa-search { display: flex; gap: 8px; align-items: stretch; max-width: 460px; }
.nexa-search .input { flex: 1; min-height: 44px; }
.nexa-search .btn { min-height: 44px; min-width: 44px; justify-content: center; }

/* ==========================================================================
   Widgets
   ========================================================================== */
.nexa-sidebar { display: grid; gap: 28px; position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px); }
.widget { font-size: 14.5px; line-height: 1.6; color: var(--color-neutral-300); }
.nexa-sidebar .widget { padding: 22px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); background: color-mix(in srgb, var(--color-surface) 45%, transparent); }
.widget-title, .widget .wp-block-heading { font-size: 15px; font-weight: 500; color: var(--color-text); margin: 0 0 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 7px 0; border-top: 1px solid var(--color-divider); }
.widget li:first-child { border-top: 0; padding-top: 0; }
.widget a { color: var(--color-neutral-300); text-decoration: none; }
.widget a:hover { color: var(--color-accent); }
.widget select, .widget input[type="search"], .widget input[type="text"], .widget input[type="email"] {
  width: 100%; min-height: 40px; background: transparent; color: var(--color-text);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 6px 10px; font: inherit;
}
.widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.widget .wp-block-search__button { background: transparent; color: var(--color-text); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 0 14px; cursor: pointer; }
.widget .wp-block-search__label { display: block; margin-bottom: 8px; color: var(--color-text); }
.widget_calendar table, .wp-block-calendar table { width: 100%; }
.wp-block-latest-posts__post-date { display: block; font-size: 12.5px; color: var(--color-neutral-500); }

/* ==========================================================================
   Comments
   ========================================================================== */
.nexa-comments { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--color-divider); }
.nexa-comments-title, .comment-reply-title { font-size: 22px; margin: 0 0 24px; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list .children { list-style: none; padding-inline-start: 28px; margin: 0; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--color-divider); font-size: 15px; line-height: 1.7; color: var(--color-neutral-300); }
.comment-author { display: flex; align-items: center; gap: 10px; color: var(--color-text); }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 12.5px; margin: 4px 0 8px; }
.comment-metadata a, .reply a { color: var(--color-neutral-500); text-decoration: none; }
.reply a { font-size: 13px; color: var(--color-accent); }
.comment-form { display: grid; gap: 14px; }
.comment-form label { display: block; font-size: 13.5px; margin-bottom: 6px; color: var(--color-neutral-300); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; box-sizing: border-box; background: transparent; color: var(--color-text);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 10px 12px; font: inherit;
}
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { margin: 0; }
.comment-notes, .logged-in-as { font-size: 13px; color: var(--color-neutral-500); margin: 0; }
