/*
Theme Name: SOEC WordPress Theme  
Description: Complete SOEC theme with all functionality
Version: 1.0.0

File: style.css
Purpose: WordPress foundation styles, CSS custom properties, and global resets
Dependencies: None (this is the base file)
Load Order: 1st (required by WordPress)
*/

/* ===== CSS CUSTOM PROPERTIES (DESIGN TOKENS) ===== */
:root {
  /* Color Palette */
  --emerald-green: #059669;
  --forest-green: #1b5137;
  --highlight-color: #e1a038;
  --rust-red: #cc4020;
  --sage-green: #8ca280;
  --tab-color: #4f9aa8;
  --tab-hover: #4f9aa8;
  --text-color: #ffffff;
  --dropdown-bg: #4f9aa8;
  --shadow-color: #062735;
  
  /* Layout & Spacing */
  --base-spacing: clamp(1.5rem, 4vw, 3rem);
  --side-margin: clamp(var(--base-spacing), 8vw, calc(var(--base-spacing) * 4));
  --section-spacing: calc(var(--base-spacing) * 2);
  --content-max-width: 1400px;
  
  /* Navigation */
  --header-height: 65px;
  --top-margin: -60px;
  --search-width: 100px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-round: 50%;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(6, 39, 53, 0.1);
  --shadow-md: 0 4px 12px rgba(6, 39, 53, 0.25);
  --shadow-lg: 0 8px 24px rgba(6, 39, 53, 0.35);
  --shadow-hover: 0 16px 40px rgba(6, 39, 53, 0.35);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.4s ease;
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  /* Typography */
  --font-primary: 'Work Sans', sans-serif;
  --font-heading: 'Fraunces', serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  /* Z-Index Scale */
  --z-background: -1;
  --z-base: 1;
  --z-content: 10;
  --z-header: 100;
  --z-dropdown: 150;
  --z-overlay: 1000;
  --z-modal: 10000;
  --z-tooltip: 10001;
}

/* ===== RESPONSIVE DESIGN TOKENS ===== */
/* Adjust key variables at different breakpoints */
@media (max-width: 1200px) {
  :root {
    --menu-width: 145px;
    --search-width: 90px;
  }
}

@media (max-width: 1000px) {
  :root {
    --menu-width: 130px;
    --search-width: 80px;
  }
}

@media (max-width: 850px) {
  :root {
    --menu-width: 115px;
    --search-width: 70px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 57.5px;
  }
}

@media (max-width: 480px) {
  :root {
    --base-spacing: 1rem;
    --side-margin: var(--base-spacing);
    --section-spacing: calc(var(--base-spacing) * 1.5);
    --header-height: 52.5px;
  }
}

@media (min-width: 1400px) {
  :root {
    --base-spacing: 3rem;
  }
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%; /* 16px base */
  overflow-x: hidden; /* iOS Safari treats html as the real scroll root — body's
                          overflow-x:hidden alone doesn't reliably stop the page
                          being draggable into extra horizontal space caused by
                          100vw full-bleed sections (.section-wrapper etc.) */
}

body {
  background: var(--forest-green);
  font-family: var(--font-primary);
  font-weight: var(--font-weight-normal);
  line-height: 1.4;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-color);
}

/* ===== LAYOUT CONTAINERS ===== */
.container {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
  margin: 0;
  max-width: 100%;
  padding: 0;
  position: relative;
  z-index: var(--z-base);
}

/* Full-width section wrapper */
.section-wrapper {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 0;
  margin-bottom: var(--section-spacing);
  position: relative;
}

/* Background banner for sections */
.background-banner {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.8);
  bottom: calc(var(--base-spacing) * -0.5);
  left: 0;
  position: absolute;
  right: 0;
  top: calc(var(--base-spacing) * -0.5);
  z-index: 0;
  pointer-events: none;
}

.background-banner::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  bottom: 0;
  content: '';
  left: 0;
  position: absolute;
  width: 100%;
  right: 0;
  top: 0;
}

/* ===== UTILITY CLASSES ===== */
/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--base-spacing); }
.mt-2 { margin-top: var(--section-spacing); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--base-spacing); }
.mb-2 { margin-bottom: var(--section-spacing); }

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

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

/* Responsive display utilities */
@media (max-width: 768px) {
  .d-mobile-none { display: none !important; }
  .d-mobile-block { display: block !important; }
  .d-mobile-flex { display: flex !important; }
}

@media (min-width: 769px) {
  .d-desktop-none { display: none !important; }
  .d-desktop-block { display: block !important; }
  .d-desktop-flex { display: flex !important; }
}

/* */
body.mobile-preview-active {
  max-width: 375px !important;
  margin: 0 auto !important;
  box-shadow: 0 0 20px rgba(6, 39, 53, 0.35) !important;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  .container {
    margin: 0.5rem auto 0 auto;
    padding: 0 1.5rem;
  }
  
  /* Mobile container adjustments */
  body.mobile-content .container {
    padding: 0;
    margin: 0.5rem 0 0 0;
    max-width: 100vw;
    width: 100vw;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
/* Improve rendering performance for animations */
.gpu-accelerated {
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  will-change: transform;
}

/* Reduced motion preferences */
@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;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* Focus styles for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
  background: var(--forest-green);
  color: var(--text-color);
  left: -9999px;
  padding: 1rem;
  position: absolute;
  text-decoration: none;
  top: 0;
  z-index: var(--z-modal);
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.8);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.8);
  }
}

.cards-section-wrapper,
.enhanced-page-wrapper {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 0;
  margin-bottom: 2rem;
  position: relative;
}

/* Dark green text for page content */
.enhanced-page-content {
  color: var(--forest-green);
  padding: 0;
  max-width: 90%;
  margin: 0 auto;
}

.text-block .text-content {
  color: var(--forest-green);
  line-height: 1.6;
}

.text-block .text-content h2,
.text-block .text-content h3 {
  color: var(--rust-red);
}

/* ===== RESPONSIVE DESIGN TOKENS (Updated for Wider Tabs) ===== */
:root {
  --menu-width: 195px; /* 165px * 1.5 */
  --search-width: 150px; /* 100px * 1.5 */
}

@media (max-width: 1200px) {
  :root {
    --menu-width: 217.5px; /* 145px * 1.5 */
    --search-width: 135px; /* 90px * 1.5 */
  }
}

@media (max-width: 1000px) {
  :root {
    --menu-width: 195px; /* 130px * 1.5 */
    --search-width: 120px; /* 80px * 1.5 */
  }
}

@media (max-width: 850px) {
  :root {
    --menu-width: 172.5px; /* 115px * 1.5 */
    --search-width: 105px; /* 70px * 1.5 */
  }
}

/* ===== DESKTOP MENU - SVG SHAPES VERSION ===== */
.menu-container {
  align-items: flex-end;
  display: flex;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
  padding-bottom: 0;
  height: 75px;
  overflow: visible;
  z-index: var(--z-header); /* Use theme's z-index (100) */
  transition: all 0.3s ease;
}

.hList {
  align-items: flex-end;
  display: flex;
  list-style: none;
  height: 100%;
  margin: 0;
  padding: 0;
  margin-left: -13px;
  z-index: var(--z-content); /* 10 */
  transition: all 0.3s ease;
}

.hList > li {
  margin-left: -13px;
  z-index: var(--z-content);
  transition: all 0.3s ease;
}

.menu {
  display: block;
  position: relative;
  text-decoration: none;
  z-index: var(--z-content);
  height: 100%;
}

/* Menu Title - Responsive SVG Shape */
.menu-title {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  height: 100%;
  padding: 0 15px; /* Adjusted for wider tabs */
  position: relative;
  text-align: center;
  transition: all var(--transition-base);
  white-space: normal;
  width: var(--menu-width, 247.5px);
  word-wrap: break-word;
  overflow: visible;
  z-index: 110;
}

.menu-title-svg {
  position: absolute;
  top: -75px;
  left: 5px;
  width: var(--menu-width, 247.5px);
  height: 100px;
  z-index: -1;
  transition: all var(--transition-base);
}

.menu-title-svg path {
  fill: var(--tab-color);
  transition: fill var(--transition-base);
  filter: drop-shadow(0 6px 10px rgba(6, 39, 53, 0.5));
}

.menu-title:hover .menu-title-svg path {
  fill: var(--highlight-color);
}

.menu-title-text {
  position: relative;
  top: -35px;
  z-index: var(--z-base);
  padding: 0 10px;
  line-height: 1.2;
  transition: all var(--transition-base);
}

/* Dropdown - Responsive SVG Shape */
.menu-dropdown {
  background: none;
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  left: 5px;
  list-style: none;
  opacity: 0;
  padding: 20px 0;
  position: absolute;
  top: calc(100%);
  transform: translateY(-10px) scaleY(0);
  transform-origin: top center;
  transition: all var(--transition-smooth);
  visibility: hidden;
  width: var(--menu-width, 247.5px);
  z-index: var(--z-dropdown); /* 150 */
  overflow: visible;
  max-height: 0;
}

.menu-dropdown-svg {
  position: absolute;
  top: calc(100% + 200px);
  left: 0px;
  width: var(--menu-width, 247.5px);
  min-height: 500px;
  z-index: -1;
  transition: all var(--transition-base);
}

.menu-dropdown-svg path {
  fill: var(--dropdown-bg);
  filter: brightness(1.1) drop-shadow(0 6px 12px rgba(6, 39, 53, 0.5));
}

/* Dropdown animations */
@keyframes smoothSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scaleY(0);
    max-height: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    max-height: 500px;
    visibility: visible;
  }
}

@keyframes smoothSlideUp {
  0% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    max-height: 500px;
    visibility: visible;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scaleY(0);
    max-height: 0;
    visibility: hidden;
  }
}

@keyframes itemFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dropdown open/close */
.menu:hover .menu-dropdown {
  opacity: 1;
  visibility: visible;
  animation: smoothSlideDown 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.menu:not(:hover) .menu-dropdown {
  animation: smoothSlideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Dropdown items */
.menu-dropdown > li {
  top: 10px;
  color: var(--text-color);
  cursor: pointer;
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  padding: 10px 15px;
  text-align: center;
  transition: background-color var(--transition-fast);
  white-space: normal;
  word-wrap: break-word;
  opacity: 0;
  transform: translateY(-10px);
  position: relative;
  z-index: var(--z-base);
}

.menu:hover .menu-dropdown > li {
  animation: itemFadeIn 0.3s ease forwards;
}

.menu:hover .menu-dropdown > li:nth-child(1) { animation-delay: 0.1s; }
.menu:hover .menu-dropdown > li:nth-child(2) { animation-delay: 0.2s; }
.menu:hover .menu-dropdown > li:nth-child(3) { animation-delay: 0.3s; }
.menu:hover .menu-dropdown > li:nth-child(4) { animation-delay: 0.4s; }
.menu:hover .menu-dropdown > li:nth-child(5) { animation-delay: 0.5s; }

.menu-dropdown > li:hover {
  background-color: var(--highlight-color);
}

.menu:not(:hover) .menu-dropdown > li {
  opacity: 0;
  transform: translateY(-5px);
  transition: all var(--transition-fast);
}

/* Search Menu - SVG Shape - DEPRECATED (conflicts with header.css) */
.search-menu {
  display: block;
  position: relative;
  z-index: var(--z-content);
  height: 100%;
  /* top: -25px; REMOVED - was causing alignment issues */
}

.search-button {
  align-items: center;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  height: 100%;
  justify-content: center;
  transition: all var(--transition-base);
  width: var(--search-width, 150px);
  position: relative;
  overflow: visible;
}

.search-button .search-button-svg {
  position: absolute;
  top: -48px;
  left: -25px;
  width: var(--menu-width, 247.5px);
  height: 100px;
  z-index: -1;
  transform: scaleX(0.6);
  transition: all var(--transition-base);
}

.search-button-svg path {
  fill: var(--tab-color);
  transition: fill var(--transition-base);
  filter: drop-shadow(0 6px 10px rgba(6, 39, 53, 0.5));
}

.search-button:hover .search-button-svg path {
  fill: var(--highlight-color);
}

.search-button .search-icon {
  height: 24px;
  width: 24px;
  position: relative;
  top: -15px;
  z-index: var(--z-base);
  transition: all var(--transition-base);
}

.search-popup {
  background: var(--dropdown-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  padding: 20px;
  position: absolute;
  right: 0;
  top: calc(100% + 45px); /* Match dropdown offset */
  transform: translateY(-10px);
  transition: all var(--transition-base);
  visibility: hidden;
  width: 300px;
  z-index: var(--z-dropdown);
}

.search-popup.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.search-popup input {
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 16px;
  outline: none;
  padding: 12px 15px;
  transition: border-color var(--transition-base);
  width: 100%;
}

.search-popup input:focus {
  border-color: var(--tab-color);
}

.search-popup button {
  background: var(--highlight-color);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-color);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  margin-top: 10px;
  padding: 12px;
  transition: background-color var(--transition-base);
  width: 100%;
}

.search-popup button:hover {
  background: var(--rust-red);
}

/* Mobile menu adjustments */
@media (max-width: 1450px) {
  .menu-container {
    display: none;
  }
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: var(--z-overlay);
  }
  .hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition-base);
  }
}

/* ===== COMING SOON PAGE ===== */

.coming-soon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--color-forest-green) 0%, rgba(27, 81, 55, 0.8) 100%);
  color: white;
  text-align: center;
}

.coming-soon-content {
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out;
}

.coming-soon-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: -1px;
}

.coming-soon-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 20px;
  font-weight: 600;
  opacity: 0.95;
}

.coming-soon-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  opacity: 0.9;
  margin: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}