/*
Theme Name: mc4 Theme
Theme URI: https://renew.mc4.ch
Description: Modern WordPress theme with Elementor compatibility. Dark/light mode, responsive, professional design.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 8.0
Author: MC4 IT GmbH
Author URI: https://renew.mc4.ch
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mc4-clean-theme
Domain Path: /languages
Tags: elementor, responsive, dark-mode, modern, gutenberg, business

Copyright: © 2024 MC4 IT GmbH. All rights reserved.
Compatible with: WordPress 6.0+, Elementor (free & pro)
*/

/* ==========================================================================
   MC4 DESIGN SYSTEM - TOKENS
   ========================================================================== */

:root {
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Colors - Brand (CORRECTED) */
  --color-orange: #F48C06;      /* Main orange - matches logo */
  --color-green: #2BDD43;
  --color-dark-bg: #1E293B;
  --color-card-bg: #2A3450;
  --color-text-light: #FFFFFF;
  --color-text-muted: #9CA3AF;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Transitions */
  --tr-fast: 150ms ease-out;
  --tr-smooth: 300ms ease-out;
}

/* Light mode overrides */
body.light-mode {
  --color-dark-bg: #FFFFFF;
  --color-card-bg: #F5F5F5;
  --color-text-light: #1E293B;
  --color-text-muted: #64748B;
}

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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-dark-bg) !important;
  color: var(--color-text-muted) !important;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  transition: background-color var(--tr-smooth), color var(--tr-smooth);
}

/* Headings - WHITE with last word ORANGE pattern */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-text-light) !important;
  line-height: 1.2;
  margin: 0 0 var(--space-md) 0;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Force Elementor heading titles to WHITE */
.elementor-heading-title {
  color: var(--color-text-light) !important;
}

/* Light mode headings - ALSO WHITE */
body.light-mode .elementor-heading-title {
  color: var(--color-text-light) !important;
}

/* Heading accent class for last word in ORANGE */
.heading-accent {
  color: var(--color-orange) !important;
}

/* Links - DEFAULT FARBE (nicht orange) */
a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--tr-fast);
}

a:hover {
  opacity: 0.8;
}

/* ==========================================================================
   HEADER STYLING
   ========================================================================== */

#site-header {
  background-color: var(--color-dark-bg) !important;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-card-bg);
}

/* All header text - white */
#site-header a,
#site-header .site-nav a,
.elementor-location-header,
header .elementor-widget,
header .elementor-widget-text-editor,
header .elementor-widget-text-editor p,
header [role="banner"],
header [role="banner"] p,
header [role="banner"] span,
header [role="navigation"],
header [role="navigation"] a,
header .elementor-heading-title,
.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3,
.elementor-widget-heading h4,
.elementor-widget-heading h5,
.elementor-widget-heading h6 {
  color: var(--color-text-light) !important;
}

#site-header .site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
}

#site-header .site-nav a {
  font-weight: 500;
  transition: color var(--tr-fast);
}

#site-header .site-nav a:hover {
  color: var(--color-orange) !important;
}

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

button,
.button,
[role="button"],
input[type="submit"],
input[type="button"] {
  font-family: var(--font-heading);
  font-weight: 800;
  padding: var(--space-sm) var(--space-md);
  border: none;
  cursor: pointer;
  transition: all var(--tr-smooth);
  display: inline-block;
  text-decoration: none;
}

/* Primary button - ORANGE CTA */
.btn-primary,
.elementor-button,
button.elementor-button,
button.elementor-button-success,
.elementor-button-success {
  background-color: #E85D04 !important;
  color: #FFFFFF !important;
}

.btn-primary:hover,
.elementor-button:hover,
button.elementor-button:hover,
button.elementor-button-success:hover,
.elementor-button-success:hover {
  background-color: #d64c00 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(232, 93, 4, 0.3);
}

/* Secondary button */
.btn-secondary {
  background-color: var(--color-green) !important;
  color: var(--color-text-light) !important;
}

.btn-secondary:hover {
  background-color: #1fb335 !important;
}

/* Force button text and icon to WHITE - override span rules */
.elementor-button-text,
.elementor-button-icon {
  color: #FFFFFF !important;
}

/* Light mode button text - MUST BE WHITE */
body.light-mode .elementor-button-text,
body.light-mode .elementor-button-icon {
  color: #FFFFFF !important;
}

/* ==========================================================================
   CONTENT STRUCTURE
   ========================================================================== */

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

.site-content {
  flex: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Elementor Integration (neutral) */
.elementor-section {
  position: relative;
}

.elementor-container {
  max-width: 1200px;
}

/* ==========================================================================
   IMAGES
   ========================================================================== */

img {
  max-width: 100%;
  height: auto;
}

.wp-post-image,
.wp-caption img {
  display: block;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
}

th, td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-card-bg);
}

th {
  background-color: var(--color-card-bg);
  color: var(--color-text-light);
  font-weight: 800;
}

/* ==========================================================================
   BLOCKS & GUTENBERG
   ========================================================================== */

.wp-block-quote {
  border-left: 4px solid var(--color-orange);
  padding-left: var(--space-md);
  margin-left: 0;
}

.wp-block-separator {
  background-color: var(--color-card-bg);
  margin: var(--space-lg) 0;
}

/* ==========================================================================
   FOOTER STYLING
   ========================================================================== */

#site-footer {
  background-color: var(--color-dark-bg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-card-bg);
}

/* Elementor Footer - White Text */
.elementor-section .elementor-widget-heading h2,
.elementor-section .elementor-widget-heading h3,
.elementor-section .elementor-widget-heading h4,
footer .elementor-widget-text-editor p,
footer .elementor-widget-text-editor,
footer [role="contentinfo"] p,
footer [role="contentinfo"],
.elementor-location-footer {
  color: var(--color-text-light) !important;
}

footer a {
  color: var(--color-orange) !important;
}

footer a:hover {
  opacity: 0.8;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .container {
    padding: 0 var(--space-md);
  }

  #site-header .site-nav ul {
    gap: 1rem;
    font-size: 14px;
  }
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--color-orange);
  color: var(--color-text-light);
  padding: var(--space-sm);
  text-decoration: none;
  z-index: 9999;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

/* ==========================================================================
   UTILITY
   ========================================================================== */

.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;
}
