/*
Theme Name: Nexus
Theme URI: https://themeforest.net/item/nexus-corporate-agency-wordpress-theme
Author: Nexus Themes
Author URI: https://nexusthemes.com
Description: Nexus is a premium corporate and agency WordPress theme built for modern businesses. Featuring a clean, professional design with advanced customization options, Elementor compatibility, WooCommerce integration, and a comprehensive set of custom post types and widgets.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
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, two-columns, right-sidebar, left-sidebar, footer-widgets, custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, accessibility-ready, blog, e-commerce, portfolio

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* =============================================================================
   CSS CUSTOM PROPERTIES — Design System
   ============================================================================= */

:root {

  /* --- Brand Colors --- */
  --nexus-primary:         #2dae43;
  --nexus-primary-light:   #4cc863;
  --nexus-primary-dark:    #1f8a32;
  --nexus-secondary:       #4cc863;
  --nexus-secondary-light: #7ad88d;
  --nexus-secondary-dark:  #1f8a32;
  --nexus-accent:          #F4A261;
  --nexus-accent-light:    #F7B87A;
  --nexus-accent-dark:     #E08C42;

  /* --- Neutral Colors --- */
  --nexus-white:       #FFFFFF;
  --nexus-off-white:   #F8F9FB;
  --nexus-gray-50:     #F9FAFB;
  --nexus-gray-100:    #F3F4F6;
  --nexus-gray-200:    #E5E7EB;
  --nexus-gray-300:    #D1D5DB;
  --nexus-gray-400:    #9CA3AF;
  --nexus-gray-500:    #6B7280;
  --nexus-gray-600:    #4B5563;
  --nexus-gray-700:    #374151;
  --nexus-gray-800:    #1F2937;
  --nexus-gray-900:    #111827;
  --nexus-black:       #0A0B0D;

  /* --- Semantic Colors --- */
  --nexus-bg:           #FFFFFF;
  --nexus-bg-alt:       #F8F9FB;
  --nexus-text:         #374151;
  --nexus-text-light:   #6B7280;
  --nexus-text-muted:   #9CA3AF;
  --nexus-heading:      #111827;
  --nexus-link:         #2dae43;
  --nexus-link-hover:   #4cc863;
  --nexus-border:       #E5E7EB;
  --nexus-border-dark:  #D1D5DB;

  /* --- Status Colors --- */
  --nexus-success:  #10B981;
  --nexus-warning:  #F59E0B;
  --nexus-error:    #EF4444;
  --nexus-info:     #3B82F6;

  /* --- Typography --- */
  --nexus-font-heading:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --nexus-font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --nexus-font-mono:     'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;

  /* --- Font Sizes (Major Third Scale) --- */
  --nexus-text-xs:   0.75rem;    /* 12px */
  --nexus-text-sm:   0.875rem;   /* 14px */
  --nexus-text-base: 1rem;       /* 16px */
  --nexus-text-md:   1.125rem;   /* 18px */
  --nexus-text-lg:   1.25rem;    /* 20px */
  --nexus-text-xl:   1.5rem;     /* 24px */
  --nexus-text-2xl:  1.875rem;   /* 30px */
  --nexus-text-3xl:  2.25rem;    /* 36px */
  --nexus-text-4xl:  3rem;       /* 48px */
  --nexus-text-5xl:  3.75rem;    /* 60px */
  --nexus-text-6xl:  4.5rem;     /* 72px */

  /* --- Font Weights --- */
  --nexus-weight-thin:       100;
  --nexus-weight-light:      300;
  --nexus-weight-regular:    400;
  --nexus-weight-medium:     500;
  --nexus-weight-semibold:   600;
  --nexus-weight-bold:       700;
  --nexus-weight-extrabold:  800;
  --nexus-weight-black:      900;

  /* --- Line Heights --- */
  --nexus-leading-none:    1;
  --nexus-leading-tight:   1.25;
  --nexus-leading-snug:    1.375;
  --nexus-leading-normal:  1.5;
  --nexus-leading-relaxed: 1.625;
  --nexus-leading-loose:   2;

  /* --- Letter Spacing --- */
  --nexus-tracking-tighter: -0.05em;
  --nexus-tracking-tight:   -0.025em;
  --nexus-tracking-normal:   0em;
  --nexus-tracking-wide:     0.025em;
  --nexus-tracking-wider:    0.05em;
  --nexus-tracking-widest:   0.1em;

  /* --- Spacing Scale --- */
  --nexus-space-0:    0;
  --nexus-space-px:   1px;
  --nexus-space-0-5:  0.125rem;  /* 2px */
  --nexus-space-1:    0.25rem;   /* 4px */
  --nexus-space-2:    0.5rem;    /* 8px */
  --nexus-space-3:    0.75rem;   /* 12px */
  --nexus-space-4:    1rem;      /* 16px */
  --nexus-space-5:    1.25rem;   /* 20px */
  --nexus-space-6:    1.5rem;    /* 24px */
  --nexus-space-8:    2rem;      /* 32px */
  --nexus-space-10:   2.5rem;    /* 40px */
  --nexus-space-12:   3rem;      /* 48px */
  --nexus-space-14:   3.5rem;    /* 56px */
  --nexus-space-16:   4rem;      /* 64px */
  --nexus-space-20:   5rem;      /* 80px */
  --nexus-space-24:   6rem;      /* 96px */
  --nexus-space-28:   7rem;      /* 112px */
  --nexus-space-32:   8rem;      /* 128px */

  /* --- Border Radius --- */
  --nexus-radius-none:  0;
  --nexus-radius-sm:    0.25rem;   /* 4px */
  --nexus-radius-md:    0.5rem;    /* 8px */
  --nexus-radius-lg:    0.75rem;   /* 12px */
  --nexus-radius-xl:    1rem;      /* 16px */
  --nexus-radius-2xl:   1.5rem;    /* 24px */
  --nexus-radius-3xl:   2rem;      /* 32px */
  --nexus-radius-full:  9999px;

  /* --- Box Shadows --- */
  --nexus-shadow-xs:   0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --nexus-shadow-sm:   0 2px 4px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --nexus-shadow-md:   0 4px 12px 0 rgba(0, 0, 0, 0.08), 0 2px 6px 0 rgba(0, 0, 0, 0.05);
  --nexus-shadow-lg:   0 10px 30px 0 rgba(0, 0, 0, 0.10), 0 4px 12px 0 rgba(0, 0, 0, 0.06);
  --nexus-shadow-xl:   0 20px 50px 0 rgba(0, 0, 0, 0.12), 0 8px 20px 0 rgba(0, 0, 0, 0.08);
  --nexus-shadow-2xl:  0 30px 80px 0 rgba(0, 0, 0, 0.15);
  --nexus-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --nexus-shadow-none:  none;
  --nexus-shadow-primary: 0 8px 30px rgba(10, 36, 99, 0.25);
  --nexus-shadow-accent:  0 8px 30px rgba(244, 162, 97, 0.35);

  /* --- Transitions --- */
  --nexus-transition-fast:    all 0.15s ease;
  --nexus-transition-base:    all 0.25s ease;
  --nexus-transition-slow:    all 0.4s ease;
  --nexus-transition-slower:  all 0.6s ease;
  --nexus-transition-spring:  all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-Index --- */
  --nexus-z-below:   -1;
  --nexus-z-base:     0;
  --nexus-z-raised:   10;
  --nexus-z-dropdown: 100;
  --nexus-z-sticky:   200;
  --nexus-z-overlay:  300;
  --nexus-z-modal:    400;
  --nexus-z-toast:    500;
  --nexus-z-tooltip:  600;

  /* --- Dimensions --- */
  --nexus-container-sm:  640px;
  --nexus-container-md:  768px;
  --nexus-container-lg:  1024px;
  --nexus-container-xl:  1200px;
  --nexus-container-2xl: 1400px;
  --nexus-header-height: 80px;
  --nexus-sidebar-width: 340px;

  /* --- Gradients --- */
  --nexus-gradient-primary:   linear-gradient(135deg, var(--nexus-primary) 0%, var(--nexus-secondary) 100%);
  --nexus-gradient-accent:    linear-gradient(135deg, var(--nexus-accent) 0%, var(--nexus-accent-dark) 100%);
  --nexus-gradient-dark:      linear-gradient(135deg, #0A0B0D 0%, #1F2937 100%);
  --nexus-gradient-overlay:   linear-gradient(to bottom, rgba(10,36,99,0.6) 0%, rgba(10,36,99,0.9) 100%);
  --nexus-gradient-light:     linear-gradient(135deg, #F8F9FB 0%, #FFFFFF 100%);
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --nexus-bg:           #111827;
    --nexus-bg-alt:       #1F2937;
    --nexus-text:         #D1D5DB;
    --nexus-text-light:   #9CA3AF;
    --nexus-heading:      #F9FAFB;
    --nexus-border:       #374151;
  }
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--nexus-font-body);
  font-size: var(--nexus-text-base);
  font-weight: var(--nexus-weight-regular);
  line-height: var(--nexus-leading-relaxed);
  color: var(--nexus-text);
  background-color: var(--nexus-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--nexus-font-heading);
  font-weight: var(--nexus-weight-bold);
  line-height: var(--nexus-leading-tight);
  letter-spacing: var(--nexus-tracking-tight);
  color: var(--nexus-heading);
  margin-bottom: var(--nexus-space-4);
}

h1, .h1 { font-size: clamp(var(--nexus-text-3xl), 5vw, var(--nexus-text-5xl)); }
h2, .h2 { font-size: clamp(var(--nexus-text-2xl), 4vw, var(--nexus-text-4xl)); }
h3, .h3 { font-size: clamp(var(--nexus-text-xl), 3vw, var(--nexus-text-3xl)); }
h4, .h4 { font-size: clamp(var(--nexus-text-lg), 2.5vw, var(--nexus-text-2xl)); }
h5, .h5 { font-size: clamp(var(--nexus-text-base), 2vw, var(--nexus-text-xl)); }
h6, .h6 { font-size: var(--nexus-text-md); }

p {
  margin-bottom: var(--nexus-space-4);
  max-width: 70ch;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--nexus-text-md);
  font-weight: var(--nexus-weight-medium);
  line-height: var(--nexus-leading-relaxed);
  color: var(--nexus-text-light);
}

.text-small {
  font-size: var(--nexus-text-sm);
}

.text-muted {
  color: var(--nexus-text-muted);
}

strong, b {
  font-weight: var(--nexus-weight-bold);
}

em, i {
  font-style: italic;
}

mark {
  background-color: rgba(244, 162, 97, 0.25);
  color: inherit;
  padding: 0 var(--nexus-space-1);
  border-radius: var(--nexus-radius-sm);
}

small {
  font-size: var(--nexus-text-sm);
}

del {
  color: var(--nexus-text-muted);
  text-decoration: line-through;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub { bottom: -0.25em; }
sup { top: -0.5em; }

/* =============================================================================
   LINKS
   ============================================================================= */

a {
  color: var(--nexus-link);
  text-decoration: none;
  transition: var(--nexus-transition-fast);
}

a:hover {
  color: var(--nexus-link-hover);
}

a:focus-visible {
  outline: 2px solid var(--nexus-secondary);
  outline-offset: 2px;
  border-radius: var(--nexus-radius-sm);
}

/* =============================================================================
   LISTS
   ============================================================================= */

ul, ol {
  padding-left: var(--nexus-space-6);
  margin-bottom: var(--nexus-space-4);
}

ul li,
ol li {
  margin-bottom: var(--nexus-space-2);
  line-height: var(--nexus-leading-relaxed);
}

ul ul,
ol ol,
ul ol,
ol ul {
  margin-top: var(--nexus-space-2);
  margin-bottom: 0;
}

dl {
  margin-bottom: var(--nexus-space-4);
}

dt {
  font-weight: var(--nexus-weight-semibold);
  color: var(--nexus-heading);
  margin-bottom: var(--nexus-space-1);
}

dd {
  margin-left: var(--nexus-space-6);
  margin-bottom: var(--nexus-space-3);
  color: var(--nexus-text-light);
}

/* =============================================================================
   CODE & PRE
   ============================================================================= */

code,
kbd,
samp {
  font-family: var(--nexus-font-mono);
  font-size: 0.875em;
}

code {
  background-color: var(--nexus-gray-100);
  color: var(--nexus-primary);
  padding: 0.125em 0.375em;
  border-radius: var(--nexus-radius-sm);
  border: 1px solid var(--nexus-gray-200);
}

kbd {
  background-color: var(--nexus-gray-800);
  color: var(--nexus-white);
  padding: 0.125em 0.5em;
  border-radius: var(--nexus-radius-sm);
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

pre {
  font-family: var(--nexus-font-mono);
  font-size: var(--nexus-text-sm);
  background-color: var(--nexus-gray-900);
  color: var(--nexus-gray-100);
  padding: var(--nexus-space-6);
  border-radius: var(--nexus-radius-lg);
  overflow-x: auto;
  margin-bottom: var(--nexus-space-6);
  line-height: var(--nexus-leading-relaxed);
  tab-size: 2;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* =============================================================================
   BLOCKQUOTE
   ============================================================================= */

blockquote {
  border-left: 4px solid var(--nexus-primary);
  padding: var(--nexus-space-4) var(--nexus-space-6);
  margin: var(--nexus-space-8) 0;
  background-color: var(--nexus-gray-50);
  border-radius: 0 var(--nexus-radius-md) var(--nexus-radius-md) 0;
}

blockquote p {
  font-size: var(--nexus-text-md);
  font-style: italic;
  color: var(--nexus-gray-700);
  margin-bottom: var(--nexus-space-2);
}

blockquote cite {
  font-size: var(--nexus-text-sm);
  color: var(--nexus-text-muted);
  font-style: normal;
}

blockquote cite::before {
  content: '— ';
}

/* =============================================================================
   HORIZONTAL RULE
   ============================================================================= */

hr {
  border: none;
  border-top: 1px solid var(--nexus-border);
  margin: var(--nexus-space-8) 0;
}

/* =============================================================================
   IMAGES & MEDIA
   ============================================================================= */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: var(--nexus-space-8) 0;
}

figcaption {
  font-size: var(--nexus-text-sm);
  color: var(--nexus-text-muted);
  text-align: center;
  margin-top: var(--nexus-space-2);
  font-style: italic;
}

.wp-caption {
  max-width: 100%;
  margin-bottom: var(--nexus-space-6);
}

.wp-caption-text,
.gallery-caption {
  font-size: var(--nexus-text-sm);
  color: var(--nexus-text-muted);
  text-align: center;
  margin-top: var(--nexus-space-2);
  font-style: italic;
}

/* Alignment classes */
.alignleft {
  float: left;
  margin: var(--nexus-space-2) var(--nexus-space-6) var(--nexus-space-4) 0;
}

.alignright {
  float: right;
  margin: var(--nexus-space-2) 0 var(--nexus-space-4) var(--nexus-space-6);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--nexus-space-4);
}

.alignwide {
  margin-left: calc(50% - 50vw + 2rem);
  margin-right: calc(50% - 50vw + 2rem);
  max-width: calc(100vw - 4rem);
  width: calc(100vw - 4rem);
}

.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

/* =============================================================================
   TABLES
   ============================================================================= */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--nexus-space-6);
  font-size: var(--nexus-text-sm);
}

thead {
  background-color: var(--nexus-gray-50);
}

th {
  font-weight: var(--nexus-weight-semibold);
  color: var(--nexus-heading);
  text-align: left;
  padding: var(--nexus-space-3) var(--nexus-space-4);
  border-bottom: 2px solid var(--nexus-border);
  white-space: nowrap;
}

td {
  padding: var(--nexus-space-3) var(--nexus-space-4);
  border-bottom: 1px solid var(--nexus-border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: var(--nexus-gray-50);
}

.table-striped tbody tr:nth-child(even) {
  background-color: var(--nexus-gray-50);
}

.table-bordered {
  border: 1px solid var(--nexus-border);
  border-radius: var(--nexus-radius-md);
  overflow: hidden;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--nexus-border);
}

/* Responsive tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--nexus-space-6);
}

/* =============================================================================
   FORMS
   ============================================================================= */

label {
  display: inline-block;
  font-size: var(--nexus-text-sm);
  font-weight: var(--nexus-weight-medium);
  color: var(--nexus-heading);
  margin-bottom: var(--nexus-space-2);
}

input,
textarea,
select {
  display: block;
  width: 100%;
  padding: var(--nexus-space-3) var(--nexus-space-4);
  font-family: var(--nexus-font-body);
  font-size: var(--nexus-text-base);
  font-weight: var(--nexus-weight-regular);
  line-height: var(--nexus-leading-normal);
  color: var(--nexus-text);
  background-color: var(--nexus-white);
  border: 1px solid var(--nexus-border-dark);
  border-radius: var(--nexus-radius-md);
  transition: var(--nexus-transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--nexus-secondary);
  box-shadow: 0 0 0 3px rgba(62, 146, 204, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--nexus-text-muted);
  opacity: 1;
}

input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--nexus-gray-100);
  color: var(--nexus-text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--nexus-space-3) center;
  background-size: 1.25em;
  padding-right: var(--nexus-space-10);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  display: inline-block;
  vertical-align: middle;
  margin-right: var(--nexus-space-2);
  border-radius: var(--nexus-radius-sm);
  accent-color: var(--nexus-primary);
  cursor: pointer;
}

input[type="radio"] {
  border-radius: 50%;
}

.form-group {
  margin-bottom: var(--nexus-space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--nexus-space-4);
}

.form-help {
  font-size: var(--nexus-text-xs);
  color: var(--nexus-text-muted);
  margin-top: var(--nexus-space-1);
}

.form-error {
  font-size: var(--nexus-text-xs);
  color: var(--nexus-error);
  margin-top: var(--nexus-space-1);
}

.form-success {
  font-size: var(--nexus-text-xs);
  color: var(--nexus-success);
  margin-top: var(--nexus-space-1);
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--nexus-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

input.is-valid,
textarea.is-valid,
select.is-valid {
  border-color: var(--nexus-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Search form */
.search-form {
  display: flex;
  gap: var(--nexus-space-2);
}

.search-form input[type="search"] {
  flex: 1;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--nexus-space-2);
  padding: var(--nexus-space-3) var(--nexus-space-6);
  font-family: var(--nexus-font-body);
  font-size: var(--nexus-text-base);
  font-weight: var(--nexus-weight-semibold);
  line-height: 1;
  letter-spacing: var(--nexus-tracking-wide);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--nexus-radius-md);
  cursor: pointer;
  transition: var(--nexus-transition-base);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
  position: relative;
  overflow: hidden;
}

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

/* Primary Button */
.btn-primary,
input[type="submit"] {
  background-color: var(--nexus-primary);
  color: var(--nexus-white);
  border-color: var(--nexus-primary);
  box-shadow: var(--nexus-shadow-primary);
}

.btn-primary:hover,
input[type="submit"]:hover {
  background-color: var(--nexus-primary-dark);
  border-color: var(--nexus-primary-dark);
  color: var(--nexus-white);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(10, 36, 99, 0.3);
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--nexus-secondary);
  color: var(--nexus-white);
  border-color: var(--nexus-secondary);
}

.btn-secondary:hover {
  background-color: var(--nexus-secondary-dark);
  border-color: var(--nexus-secondary-dark);
  color: var(--nexus-white);
  transform: translateY(-2px);
}

/* Accent Button */
.btn-accent {
  background-color: var(--nexus-accent);
  color: var(--nexus-white);
  border-color: var(--nexus-accent);
  box-shadow: var(--nexus-shadow-accent);
}

.btn-accent:hover {
  background-color: var(--nexus-accent-dark);
  border-color: var(--nexus-accent-dark);
  color: var(--nexus-white);
  transform: translateY(-2px);
}

/* Outline Button */
.btn-outline {
  background-color: transparent;
  color: var(--nexus-primary);
  border-color: var(--nexus-primary);
}

.btn-outline:hover {
  background-color: var(--nexus-primary);
  color: var(--nexus-white);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--nexus-white);
  border-color: var(--nexus-white);
}

.btn-outline-white:hover {
  background-color: var(--nexus-white);
  color: var(--nexus-primary);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--nexus-text);
  border-color: var(--nexus-border);
}

.btn-ghost:hover {
  background-color: var(--nexus-gray-100);
  border-color: var(--nexus-border-dark);
  color: var(--nexus-heading);
}

/* Size variants */
.btn-sm {
  padding: var(--nexus-space-2) var(--nexus-space-4);
  font-size: var(--nexus-text-sm);
}

.btn-lg {
  padding: var(--nexus-space-4) var(--nexus-space-8);
  font-size: var(--nexus-text-md);
}

.btn-xl {
  padding: var(--nexus-space-5) var(--nexus-space-10);
  font-size: var(--nexus-text-lg);
  border-radius: var(--nexus-radius-lg);
}

/* Full width */
.btn-block {
  display: flex;
  width: 100%;
}

/* Loading state */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nexus-spin 0.6s linear infinite;
  margin-left: var(--nexus-space-2);
}

/* Disabled state */
.btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Icon buttons */
.btn-icon {
  padding: var(--nexus-space-3);
  border-radius: var(--nexus-radius-md);
  aspect-ratio: 1;
}

/* =============================================================================
   BADGES & LABELS
   ============================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--nexus-space-1) var(--nexus-space-3);
  font-size: var(--nexus-text-xs);
  font-weight: var(--nexus-weight-semibold);
  line-height: 1;
  letter-spacing: var(--nexus-tracking-wide);
  text-transform: uppercase;
  border-radius: var(--nexus-radius-full);
  white-space: nowrap;
}

.badge-primary {
  background-color: rgba(10, 36, 99, 0.1);
  color: var(--nexus-primary);
}

.badge-secondary {
  background-color: rgba(62, 146, 204, 0.1);
  color: var(--nexus-secondary);
}

.badge-accent {
  background-color: rgba(244, 162, 97, 0.15);
  color: var(--nexus-accent-dark);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--nexus-success);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--nexus-warning);
}

.badge-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--nexus-error);
}

/* =============================================================================
   ALERT MESSAGES
   ============================================================================= */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--nexus-space-3);
  padding: var(--nexus-space-4);
  border-radius: var(--nexus-radius-md);
  margin-bottom: var(--nexus-space-4);
  border: 1px solid transparent;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #065f46;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #92400e;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #991b1b;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
  color: #1e40af;
}

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

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--nexus-space-4);
  z-index: var(--nexus-z-toast);
  padding: var(--nexus-space-2) var(--nexus-space-4);
  background-color: var(--nexus-primary);
  color: var(--nexus-white) !important;
  border-radius: var(--nexus-radius-md);
  font-size: var(--nexus-text-sm);
  font-weight: var(--nexus-weight-semibold);
  transition: top 0.1s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--nexus-space-4);
}

/* Screen reader text */
.screen-reader-text,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus,
.sr-only:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  overflow: auto;
  position: static;
  width: auto;
  white-space: normal;
}

/* High contrast mode */
@media (forced-colors: active) {
  .btn,
  button {
    forced-color-adjust: auto;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes nexus-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes nexus-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes nexus-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes nexus-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes nexus-fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nexus-fade-down {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nexus-slide-in-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes nexus-slide-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes nexus-scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes nexus-count-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes nexus-preloader-bar {
  0%   { width: 0%; }
  100% { width: 100%; }
}

/* =============================================================================
   WOOCOMMERCE BASE STYLES
   ============================================================================= */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  padding: var(--nexus-space-4) var(--nexus-space-5);
  border-radius: var(--nexus-radius-md);
  margin-bottom: var(--nexus-space-4);
  display: flex;
  align-items: center;
  gap: var(--nexus-space-3);
  font-size: var(--nexus-text-sm);
}

.woocommerce-message {
  background-color: rgba(16, 185, 129, 0.08);
  border-left: 4px solid var(--nexus-success);
  color: #065f46;
}

.woocommerce-error {
  background-color: rgba(239, 68, 68, 0.08);
  border-left: 4px solid var(--nexus-error);
  color: #991b1b;
}

.woocommerce-info {
  background-color: rgba(59, 130, 246, 0.08);
  border-left: 4px solid var(--nexus-info);
  color: #1e40af;
}

.woocommerce .star-rating {
  display: inline-flex;
  gap: 2px;
  color: var(--nexus-warning);
  font-size: var(--nexus-text-sm);
}

.price {
  font-size: var(--nexus-text-xl);
  font-weight: var(--nexus-weight-bold);
  color: var(--nexus-primary);
}

.price del {
  font-size: var(--nexus-text-base);
  font-weight: var(--nexus-weight-regular);
  color: var(--nexus-text-muted);
}

ins {
  text-decoration: none;
}

.onsale {
  display: inline-flex;
  align-items: center;
  padding: var(--nexus-space-1) var(--nexus-space-3);
  background-color: var(--nexus-error);
  color: var(--nexus-white);
  font-size: var(--nexus-text-xs);
  font-weight: var(--nexus-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--nexus-tracking-wide);
  border-radius: var(--nexus-radius-full);
}

.add_to_cart_button,
.single_add_to_cart_button {
  background-color: var(--nexus-primary);
  color: var(--nexus-white);
  border: 2px solid var(--nexus-primary);
  border-radius: var(--nexus-radius-md);
  padding: var(--nexus-space-3) var(--nexus-space-6);
  font-weight: var(--nexus-weight-semibold);
  cursor: pointer;
  transition: var(--nexus-transition-base);
  font-family: var(--nexus-font-body);
  font-size: var(--nexus-text-base);
}

.add_to_cart_button:hover,
.single_add_to_cart_button:hover {
  background-color: var(--nexus-primary-dark);
  border-color: var(--nexus-primary-dark);
  color: var(--nexus-white);
  transform: translateY(-2px);
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

/* Display */
.d-none   { display: none; }
.d-block  { display: block; }
.d-flex   { display: flex; }
.d-grid   { display: grid; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

/* Flex */
.flex-wrap    { flex-wrap: wrap; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }

/* Text */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Text colors */
.text-primary   { color: var(--nexus-primary); }
.text-secondary { color: var(--nexus-secondary); }
.text-accent    { color: var(--nexus-accent); }
.text-white     { color: var(--nexus-white); }
.text-dark      { color: var(--nexus-heading); }
.text-light     { color: var(--nexus-text-light); }

/* Background */
.bg-primary   { background-color: var(--nexus-primary); }
.bg-secondary { background-color: var(--nexus-secondary); }
.bg-accent    { background-color: var(--nexus-accent); }
.bg-white     { background-color: var(--nexus-white); }
.bg-dark      { background-color: var(--nexus-gray-900); }
.bg-light     { background-color: var(--nexus-gray-50); }
.bg-alt       { background-color: var(--nexus-bg-alt); }

/* Spacing helpers */
.m-0  { margin: 0; }
.p-0  { padding: 0; }
.mt-auto { margin-top: auto; }
.mb-0    { margin-bottom: 0; }

/* Width */
.w-full  { width: 100%; }
.w-auto  { width: auto; }
.h-full  { height: 100%; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

/* Border radius */
.rounded     { border-radius: var(--nexus-radius-md); }
.rounded-lg  { border-radius: var(--nexus-radius-lg); }
.rounded-full { border-radius: var(--nexus-radius-full); }

/* Shadow */
.shadow-sm { box-shadow: var(--nexus-shadow-sm); }
.shadow-md { box-shadow: var(--nexus-shadow-md); }
.shadow-lg { box-shadow: var(--nexus-shadow-lg); }

/* Clearfix */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* =============================================================================
   RTL SUPPORT
   ============================================================================= */

[dir="rtl"] body {
  direction: rtl;
}

[dir="rtl"] .alignleft {
  float: right;
  margin: var(--nexus-space-2) 0 var(--nexus-space-4) var(--nexus-space-6);
}

[dir="rtl"] .alignright {
  float: left;
  margin: var(--nexus-space-2) var(--nexus-space-6) var(--nexus-space-4) 0;
}

[dir="rtl"] blockquote {
  border-left: none;
  border-right: 4px solid var(--nexus-primary);
  border-radius: var(--nexus-radius-md) 0 0 var(--nexus-radius-md);
}

[dir="rtl"] select {
  background-position: left var(--nexus-space-3) center;
  padding-right: var(--nexus-space-4);
  padding-left: var(--nexus-space-10);
}

/* =============================================================================
   WORDPRESS SPECIFIC CLASSES
   ============================================================================= */

.sticky {
  /* WordPress sticky post */
}

.bypostauthor {
  /* WordPress author comment */
}

.wp-block-image figcaption {
  font-size: var(--nexus-text-sm);
  color: var(--nexus-text-muted);
  text-align: center;
}

.gallery {
  display: grid;
  gap: var(--nexus-space-4);
  margin-bottom: var(--nexus-space-6);
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }

.gallery-item {
  overflow: hidden;
  border-radius: var(--nexus-radius-md);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--nexus-transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.05);
}
