/*
Theme Name: LibrePower Theme
Theme URI: https://librepower.org
Description: Custom child theme for LibrePower - Open source on IBM Power
Author: SIXE
Author URI: https://sixe.es
Template: hello-elementor
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: librepower-theme
*/

/* ============================================
   LIBREPOWER - Complete Design System
   ============================================ */

/* ----- CSS Variables ----- */
:root {
  /* Brand Colors */
  --lp-deep-blue: #1a365d;
  --lp-teal: #2c7a7b;
  --lp-teal-hover: #236b6b;
  --lp-navy: #0f172a;
  --lp-navy-light: #1e293b;
  
  /* Machine Colors - Sietch */
  --lp-sietch-ochre: #c2a878;
  --lp-sietch-orange: #d97706;
  --lp-sietch-brown: #92400e;
  
  /* Machine Colors - Ix */
  --lp-ix-blue: #3b82f6;
  --lp-ix-cyan: #06b6d4;
  --lp-ix-silver: #94a3b8;
  
  /* Text Colors */
  --lp-text-primary: #f1f5f9;
  --lp-text-secondary: #94a3b8;
  --lp-text-dark: #1e293b;
  
  /* Supporting */
  --lp-success: #10b981;
  --lp-failure: #ef4444;
  --lp-border: #334155;
  --lp-border-hover: #475569;
  
  /* Typography */
  --lp-font-sans: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --lp-font-mono: 'IBM Plex Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Spacing */
  --lp-content-width: 750px;
  --lp-wide-width: 1100px;
  
  /* Transitions */
  --lp-transition: 0.2s ease;
}

/* ----- Google Fonts Import ----- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
body.elementor-page,
body.elementor-default {
  background-color: var(--lp-navy) !important;
  color: var(--lp-text-primary) !important;
  font-family: var(--lp-font-sans) !important;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6,
.elementor-heading-title {
  font-family: var(--lp-font-sans) !important;
  font-weight: 600 !important;
  color: var(--lp-text-primary) !important;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1, .elementor-widget-heading h1.elementor-heading-title { font-size: 3rem !important; }
h2, .elementor-widget-heading h2.elementor-heading-title { font-size: 2rem !important; }
h3, .elementor-widget-heading h3.elementor-heading-title { font-size: 1.5rem !important; }
h4, .elementor-widget-heading h4.elementor-heading-title { font-size: 1.25rem !important; }

p, .elementor-widget-text-editor p {
  color: var(--lp-text-secondary) !important;
  margin-bottom: 1.5rem;
  font-size: 18px;
  line-height: 1.7;
}

/* ----- Links ----- */
a {
  color: var(--lp-teal);
  text-decoration: none;
  transition: color var(--lp-transition);
}

a:hover {
  color: var(--lp-ix-cyan);
}

/* ----- Elementor Sections & Containers ----- */
.elementor-section,
.elementor-element.e-con {
  background-color: transparent !important;
}

.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: var(--lp-wide-width);
}

/* Dark section backgrounds */
.lp-bg-navy,
.elementor-section.lp-bg-navy {
  background-color: var(--lp-navy) !important;
}

.lp-bg-navy-light,
.elementor-section.lp-bg-navy-light {
  background-color: var(--lp-navy-light) !important;
}

/* ----- Buttons ----- */
.elementor-button,
.elementor-widget-button .elementor-button {
  font-family: var(--lp-font-sans) !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  border-radius: 6px !important;
  padding: 14px 28px !important;
  transition: all var(--lp-transition) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Primary Button (Teal) */
.elementor-button.elementor-button-primary,
.elementor-widget-button .elementor-button {
  background-color: var(--lp-teal) !important;
  color: white !important;
  border: none !important;
}

.elementor-button.elementor-button-primary:hover,
.elementor-widget-button .elementor-button:hover {
  background-color: var(--lp-teal-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 122, 123, 0.3);
}

/* Secondary Button (Outlined) */
.elementor-button.elementor-button-secondary,
.lp-btn-secondary {
  background-color: transparent !important;
  color: var(--lp-text-primary) !important;
  border: 1px solid var(--lp-border) !important;
}

.elementor-button.elementor-button-secondary:hover,
.lp-btn-secondary:hover {
  border-color: var(--lp-teal) !important;
  color: var(--lp-teal) !important;
  background-color: rgba(44, 122, 123, 0.1) !important;
}

/* ----- Cards ----- */
.lp-card,
.elementor-widget-icon-box .elementor-icon-box-wrapper {
  background-color: var(--lp-navy-light) !important;
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  padding: 32px !important;
  transition: all var(--lp-transition);
}

.lp-card:hover,
.elementor-widget-icon-box .elementor-icon-box-wrapper:hover {
  border-color: var(--lp-teal);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Card titles */
.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-title a {
  color: var(--lp-text-primary) !important;
  font-weight: 600 !important;
}

/* Card descriptions */
.elementor-widget-icon-box .elementor-icon-box-description {
  color: var(--lp-text-secondary) !important;
}

/* ----- Machine Badges ----- */
.lp-badge-sietch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(217, 119, 6, 0.15);
  color: var(--lp-sietch-orange);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.lp-badge-ix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--lp-ix-blue);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.lp-badge-failure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--lp-failure);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* ----- Machine Quote Boxes ----- */
.lp-quote-sietch {
  background-color: rgba(217, 119, 6, 0.08);
  border-left: 4px solid var(--lp-sietch-orange);
  padding: 24px 28px;
  border-radius: 0 12px 12px 0;
  margin: 32px 0;
  font-style: italic;
}

.lp-quote-sietch p {
  color: var(--lp-text-primary) !important;
  margin-bottom: 0;
}

.lp-quote-ix {
  background-color: rgba(59, 130, 246, 0.08);
  border-left: 4px solid var(--lp-ix-blue);
  padding: 24px 28px;
  border-radius: 0 12px 12px 0;
  margin: 32px 0;
  font-style: italic;
}

.lp-quote-ix p {
  color: var(--lp-text-primary) !important;
  margin-bottom: 0;
}

/* ----- Code Blocks ----- */
pre, code {
  font-family: var(--lp-font-mono) !important;
  background-color: #0d1117;
  border-radius: 8px;
}

code {
  padding: 3px 8px;
  font-size: 0.9em;
  color: var(--lp-ix-cyan);
}

pre {
  padding: 24px;
  overflow-x: auto;
  border: 1px solid var(--lp-border);
  margin: 24px 0;
}

pre code {
  padding: 0;
  background: none;
  color: var(--lp-text-primary);
  font-size: 15px;
  line-height: 1.6;
}

/* ----- Navigation ----- */
.elementor-nav-menu .elementor-item,
.elementor-nav-menu--main .elementor-item {
  font-family: var(--lp-font-sans) !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  color: var(--lp-text-secondary) !important;
  transition: color var(--lp-transition) !important;
  padding: 8px 16px !important;
}

.elementor-nav-menu .elementor-item:hover,
.elementor-nav-menu .elementor-item.elementor-item-active,
.elementor-nav-menu--main .elementor-item:hover,
.elementor-nav-menu--main .elementor-item.elementor-item-active {
  color: var(--lp-text-primary) !important;
}

/* Navigation dropdown */
.elementor-nav-menu--dropdown {
  background-color: var(--lp-navy-light) !important;
  border: 1px solid var(--lp-border) !important;
  border-radius: 8px !important;
}

/* Mobile menu */
.elementor-menu-toggle {
  color: var(--lp-text-primary) !important;
}

/* ----- Header ----- */
header.elementor-section,
.elementor-location-header {
  background-color: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lp-border);
}

/* Sticky header */
.elementor-sticky--active {
  background-color: rgba(15, 23, 42, 0.98) !important;
}

/* ----- Footer ----- */
footer.elementor-section,
.elementor-location-footer,
.lp-footer {
  background-color: var(--lp-navy) !important;
  border-top: 1px solid var(--lp-border);
  padding: 64px 0 32px !important;
}

.lp-footer p,
footer p {
  color: var(--lp-text-secondary) !important;
  font-size: 14px !important;
}

/* Footer links */
footer a,
.lp-footer a {
  color: var(--lp-text-secondary) !important;
}

footer a:hover,
.lp-footer a:hover {
  color: var(--lp-teal) !important;
}

/* ----- Hero Section ----- */
.lp-hero,
.elementor-section.lp-hero {
  padding: 140px 0 100px !important;
  text-align: center;
}

.lp-hero h1,
.lp-hero .elementor-heading-title {
  font-size: 3.5rem !important;
  margin-bottom: 24px !important;
  background: linear-gradient(135deg, var(--lp-text-primary) 0%, var(--lp-ix-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lp-hero p {
  font-size: 1.25rem !important;
  max-width: 650px;
  margin: 0 auto 40px !important;
  color: var(--lp-text-secondary) !important;
}

/* ----- Content Width ----- */
.lp-content-narrow {
  max-width: var(--lp-content-width);
  margin: 0 auto;
}

.lp-content-wide {
  max-width: var(--lp-wide-width);
  margin: 0 auto;
}

/* ----- Tags ----- */
.lp-tag {
  display: inline-block;
  background-color: var(--lp-navy-light);
  color: var(--lp-text-secondary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: color var(--lp-transition);
}

.lp-tag:hover {
  color: var(--lp-teal);
}

/* ----- Reading Meta ----- */
.lp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--lp-text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ----- Icons ----- */
.elementor-icon {
  color: var(--lp-teal) !important;
}

.elementor-widget-icon-box .elementor-icon {
  background-color: rgba(44, 122, 123, 0.15) !important;
  border-radius: 12px;
}

/* ----- Dividers ----- */
.elementor-divider-separator {
  border-color: var(--lp-border) !important;
}

/* ----- Forms ----- */
.elementor-field-textual,
input[type="text"],
input[type="email"],
textarea {
  background-color: var(--lp-navy-light) !important;
  border: 1px solid var(--lp-border) !important;
  border-radius: 8px !important;
  color: var(--lp-text-primary) !important;
  padding: 14px 18px !important;
  font-family: var(--lp-font-sans) !important;
  font-size: 16px !important;
}

.elementor-field-textual:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--lp-teal) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 122, 123, 0.2);
}

.elementor-field-textual::placeholder {
  color: var(--lp-text-secondary) !important;
}

/* ----- Lists ----- */
.elementor-widget-text-editor ul,
.elementor-widget-text-editor ol {
  color: var(--lp-text-secondary);
  padding-left: 24px;
}

.elementor-widget-text-editor li {
  margin-bottom: 8px;
}

/* ----- Images ----- */
.elementor-widget-image img {
  border-radius: 12px;
}

/* ----- Testimonials - HIDE FAKE ONES ----- */
.elementor-testimonial,
.elementor-widget-testimonial {
  display: none !important;
}

/* ----- Counter Widget ----- */
.elementor-counter-number-wrapper,
.elementor-counter-title {
  color: var(--lp-text-primary) !important;
}

.elementor-counter-number {
  color: var(--lp-teal) !important;
}

/* ----- Social Icons ----- */
.elementor-social-icon {
  background-color: var(--lp-navy-light) !important;
  color: var(--lp-text-secondary) !important;
  transition: all var(--lp-transition) !important;
}

.elementor-social-icon:hover {
  background-color: var(--lp-teal) !important;
  color: white !important;
}

/* ----- Star Rating - Hide ----- */
.elementor-star-rating,
.elementor-widget-star-rating {
  display: none !important;
}

/* ----- Scroll to Top ----- */
.lp-scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--lp-navy-light);
  color: var(--lp-text-primary);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--lp-transition);
  border: 1px solid var(--lp-border);
  z-index: 999;
}

.lp-scroll-top:hover {
  background-color: var(--lp-teal);
  border-color: var(--lp-teal);
}

/* ----- Machine-specific page styles ----- */

/* Sietch Page */
body.page-sietch .lp-hero,
body.page-sietch header {
  border-bottom-color: var(--lp-sietch-orange) !important;
}

body.page-sietch .elementor-button {
  background-color: var(--lp-sietch-orange) !important;
}

body.page-sietch .elementor-button:hover {
  background-color: var(--lp-sietch-brown) !important;
}

/* Ix Page */
body.page-ix .lp-hero,
body.page-ix header {
  border-bottom-color: var(--lp-ix-blue) !important;
}

body.page-ix .elementor-button {
  background-color: var(--lp-ix-blue) !important;
}

body.page-ix .elementor-button:hover {
  background-color: #2563eb !important;
}

/* ----- Blog Posts ----- */
.lp-post-card {
  background-color: var(--lp-navy-light);
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  padding: 28px;
  transition: all var(--lp-transition);
}

.lp-post-card:hover {
  border-color: var(--lp-teal);
  transform: translateY(-4px);
}

.lp-post-title {
  color: var(--lp-text-primary) !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
}

.lp-post-excerpt {
  color: var(--lp-text-secondary) !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

.lp-post-meta {
  font-size: 14px;
  color: var(--lp-text-secondary);
  margin-top: 16px;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  h1, .elementor-widget-heading h1.elementor-heading-title { font-size: 2.5rem !important; }
  h2, .elementor-widget-heading h2.elementor-heading-title { font-size: 1.75rem !important; }
  
  .lp-hero h1,
  .lp-hero .elementor-heading-title {
    font-size: 2.75rem !important;
  }
  
  .lp-hero {
    padding: 100px 0 80px !important;
  }
}

@media (max-width: 768px) {
  body { font-size: 17px; }
  
  h1, .elementor-widget-heading h1.elementor-heading-title { font-size: 2.25rem !important; }
  h2, .elementor-widget-heading h2.elementor-heading-title { font-size: 1.5rem !important; }
  h3, .elementor-widget-heading h3.elementor-heading-title { font-size: 1.25rem !important; }
  
  .lp-hero {
    padding: 80px 0 60px !important;
  }
  
  .lp-hero h1,
  .lp-hero .elementor-heading-title {
    font-size: 2rem !important;
  }
  
  .lp-hero p {
    font-size: 1.1rem !important;
  }
  
  .elementor-button,
  .elementor-widget-button .elementor-button {
    padding: 12px 24px !important;
  }
  
  .lp-card,
  .elementor-widget-icon-box .elementor-icon-box-wrapper {
    padding: 24px !important;
  }
  
  pre {
    padding: 16px;
    font-size: 14px;
  }
}

/* ----- Utility Classes ----- */
.text-teal { color: var(--lp-teal) !important; }
.text-sietch { color: var(--lp-sietch-orange) !important; }
.text-ix { color: var(--lp-ix-blue) !important; }
.text-muted { color: var(--lp-text-secondary) !important; }
.text-primary { color: var(--lp-text-primary) !important; }

.bg-navy { background-color: var(--lp-navy) !important; }
.bg-navy-light { background-color: var(--lp-navy-light) !important; }

.border-teal { border-color: var(--lp-teal) !important; }
.border-sietch { border-color: var(--lp-sietch-orange) !important; }
.border-ix { border-color: var(--lp-ix-blue) !important; }

/* ----- Hide Placeholder Images ----- */
img[src*="wireframe"],
img[src*="placeholder"] {
  display: none !important;
}

/* ----- Elementor Editor Compatibility ----- */
.elementor-editor-active body {
  background-color: var(--lp-navy) !important;
}
