/*
Theme Name:   Nexus
Theme URI:    https://jetechnik.com
Author:       Jesús Ángel Hernández / Jetechnik
Author URI:   https://jetechnik.com
Description:  Nexus is a minimal, ultra-lightweight blank-canvas theme built for Elementor. Zero predefined styles — total freedom to design any website. Compatible with Elementor Free and Pro, WooCommerce, and all major plugins.
Version:      1.0.2
Requires at least: 6.0
Tested up to: 6.7
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:  nexus
Tags:         one-column, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, block-patterns, full-site-editing

Nexus WordPress Theme, Copyright © 2026 Jesús Ángel Hernández / Jetechnik
Nexus is distributed under the terms of the GNU GPL
*/

/* ============================================================
   NEXO BASE RESET — Minimal and unopinionated
   All visual design is meant to be done via Elementor
   ============================================================ */

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

:root {
  /* Customizer-driven CSS variables */
  --nexus-primary:       #1A3F7A;
  --nexus-secondary:     #1F8C7A;
  --nexus-accent:        #D9581A;
  --nexus-text:          #2C2C3A;
  --nexus-text-light:    #6B6B7D;
  --nexus-bg:            #FFFFFF;
  --nexus-bg-alt:        #F5F5F5;
  --nexus-border:        #E0E0E0;
  --nexus-radius:        8px;
  --nexus-font-body:     'sans-serif';
  --nexus-font-heading:  'sans-serif';
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--nexus-font-body);
  color: var(--nexus-text);
  background-color: var(--nexus-bg);
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
  color: var(--nexus-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--nexus-accent);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--nexus-font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.5em;
  color: var(--nexus-text);
}

p {
  margin-top: 0;
  margin-bottom: 1em;
  line-height: 1.7;
}

/* Lists */
ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
th, td {
  padding: 10px 12px;
  border: 1px solid var(--nexus-border);
  text-align: left;
}
th {
  background: var(--nexus-bg-alt);
  font-weight: 700;
}

/* Forms */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  max-width: 100%;
}

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--nexus-border);
  margin: 2em 0;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--nexus-primary);
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
  color: var(--nexus-text-light);
  font-style: italic;
}

/* Code */
code, pre {
  font-family: 'Courier New', monospace;
  background: var(--nexus-bg-alt);
  border-radius: 4px;
}
code { padding: 2px 6px; font-size: 0.9em; }
pre  { padding: 1em; overflow-x: auto; margin-bottom: 1em; }

/* ─── LAYOUT WRAPPERS ──────────────────────────────────────── */

.nexus-site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nexus-content-area {
  flex: 1 0 auto;
}

.nexus-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ─── HEADER ───────────────────────────────────────────────── */

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

.nexus-site-header .nexus-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  flex-wrap: wrap;
  gap: 16px;
}

/* Site branding */
.nexus-site-branding {
  flex-shrink: 0;
}

.nexus-site-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.nexus-site-title a {
  text-decoration: none;
  color: inherit;
}

.nexus-site-tagline {
  margin: 0;
  font-size: 0.8rem;
  color: var(--nexus-text-light);
}

.nexus-custom-logo-link img {
  max-height: 60px;
  width: auto;
}

/* Navigation */
.nexus-nav-primary {
  display: flex;
  align-items: center;
}

.nexus-nav-primary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nexus-nav-primary ul li {
  position: relative;
}

.nexus-nav-primary ul li a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--nexus-text);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--nexus-radius);
  transition: background 0.2s, color 0.2s;
}

.nexus-nav-primary ul li a:hover,
.nexus-nav-primary ul li.current-menu-item > a {
  background: rgba(0,0,0,0.06);
  color: var(--nexus-primary);
}

/* Dropdown */
.nexus-nav-primary ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-radius: var(--nexus-radius);
  padding: 8px;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 999;
}

.nexus-nav-primary ul li:hover > ul {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Mobile menu toggle */
.nexus-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--nexus-border);
  border-radius: var(--nexus-radius);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ─── FOOTER ───────────────────────────────────────────────── */

.nexus-site-footer {
  flex-shrink: 0;
  padding: 40px 0 24px;
  background: var(--nexus-bg-alt);
  border-top: 1px solid var(--nexus-border);
}

.nexus-footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.nexus-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--nexus-border);
  font-size: 0.85rem;
  color: var(--nexus-text-light);
}

.nexus-footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nexus-footer-nav ul li a {
  text-decoration: none;
  color: var(--nexus-text-light);
  font-size: 0.85rem;
}

.nexus-footer-nav ul li a:hover {
  color: var(--nexus-primary);
}

/* ─── SIDEBAR ──────────────────────────────────────────────── */

.nexus-page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.nexus-sidebar .widget {
  margin-bottom: 32px;
}

.nexus-sidebar .widget-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--nexus-primary);
}

/* ─── POSTS / ARCHIVE ──────────────────────────────────────── */

.nexus-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.nexus-post-card {
  background: #fff;
  border-radius: var(--nexus-radius);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}

.nexus-post-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.nexus-post-thumbnail img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.nexus-post-card-body {
  padding: 24px;
}

.nexus-post-meta {
  font-size: 0.78rem;
  color: var(--nexus-text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.nexus-post-title {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.nexus-post-title a {
  text-decoration: none;
  color: var(--nexus-text);
}

.nexus-post-title a:hover {
  color: var(--nexus-primary);
}

.nexus-post-excerpt {
  font-size: 0.9rem;
  color: var(--nexus-text-light);
  line-height: 1.65;
  margin-bottom: 16px;
}

.nexus-read-more {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--nexus-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── SINGLE POST ──────────────────────────────────────────── */

.nexus-single-header {
  margin-bottom: 32px;
}

.nexus-single-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.nexus-single-content {
  max-width: 780px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.nexus-post-featured-image {
  margin-bottom: 36px;
  border-radius: var(--nexus-radius);
  overflow: hidden;
}

.nexus-post-tags,
.nexus-post-categories {
  margin-top: 32px;
  font-size: 0.88rem;
}

/* ─── PAGINATION ───────────────────────────────────────────── */

.nexus-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}

.nexus-pagination .page-numbers {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nexus-pagination .page-numbers a,
.nexus-pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--nexus-radius);
  border: 1px solid var(--nexus-border);
  text-decoration: none;
  color: var(--nexus-text);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nexus-pagination .page-numbers .current,
.nexus-pagination .page-numbers a:hover {
  background: var(--nexus-primary);
  color: #fff;
  border-color: var(--nexus-primary);
}

/* ─── 404 PAGE ─────────────────────────────────────────────── */

.nexus-404-page {
  text-align: center;
  padding: 80px 20px;
}

.nexus-404-code {
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--nexus-primary);
  opacity: 0.15;
  margin-bottom: -20px;
}

.nexus-404-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

/* ─── SEARCH RESULTS ───────────────────────────────────────── */

.nexus-search-header {
  margin-bottom: 36px;
}

.nexus-search-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* ─── COMMENTS ─────────────────────────────────────────────── */

.nexus-comments-area {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--nexus-border);
}

.nexus-comments-title {
  font-size: 1.4rem;
  margin-bottom: 28px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

.comment-body {
  padding: 20px;
  border-radius: var(--nexus-radius);
  background: var(--nexus-bg-alt);
  margin-bottom: 16px;
}

.comment-author .fn { font-weight: 700; }
.comment-metadata { font-size: 0.8rem; color: var(--nexus-text-light); margin-bottom: 10px; }

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--nexus-border);
  border-radius: var(--nexus-radius);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--nexus-primary);
}

.comment-form .submit {
  background: var(--nexus-primary);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 40px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.comment-form .submit:hover {
  background: var(--nexus-accent);
}

/* ─── 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;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--nexus-primary);
  color: #fff;
  padding: 12px 24px;
  z-index: 9999;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ─── ELEMENTOR COMPATIBILITY ──────────────────────────────── */

/* Remove default padding on Elementor pages */
.elementor-page .nexus-content-area {
  padding: 0;
}

/* Full-width Elementor section support */
.elementor-section.elementor-section-stretched {
  width: 100vw !important;
  max-width: 100vw !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* ─── WOOCOMMERCE ──────────────────────────────────────────── */

.woocommerce-page .nexus-container,
.woocommerce .nexus-container {
  max-width: 1200px;
}

.wc-block-grid__product-image img {
  height: auto;
}

/* ─── PRINT ─────────────────────────────────────────────────  */

@media print {
  .nexus-site-header,
  .nexus-site-footer,
  .nexus-sidebar,
  .nexus-nav-primary {
    display: none !important;
  }
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nexus-nav-primary {
    display: none;
    width: 100%;
  }

  .nexus-nav-primary.is-open {
    display: block;
  }

  .nexus-nav-primary ul {
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
  }

  .nexus-menu-toggle {
    display: block;
  }

  .nexus-page-with-sidebar {
    grid-template-columns: 1fr;
  }

  .nexus-footer-widgets {
    grid-template-columns: 1fr;
  }

  .nexus-footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
