/* ============================================
   Optima Elektronik Manufaktur - Custom Styles
   Tailwind CSS CDN + Custom Overrides
   ============================================ */

/* --- Custom Theme Variables --- */
:root {
  --color-primary: #1a3a5c;
  --color-primary-light: #2a5a8c;
  --color-primary-dark: #0f2640;
  --color-secondary: #e63946;
  --color-accent: #f4a261;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-dark: #1a1a2e;
  --color-border: #e0e0e0;
  --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition-speed: 0.3s;
}

/* --- Global Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary-light) var(--color-bg-light);
}

/* --- Header --- */
.header-shadow {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow var(--transition-speed) ease;
}

/* --- Hero Full Screen --- */
.hero-fullscreen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-fullscreen .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-fullscreen .hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero-fullscreen .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 0;
}

/* --- Page Banner --- */
.page-banner {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

.page-banner .page-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(26, 58, 92, 0.85) 0%,
    rgba(15, 38, 64, 0.9) 100%
  );
  z-index: 1;
}

.page-banner .page-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  padding: 2rem 1.5rem;
}

.page-banner .page-banner-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-banner .page-banner-content p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Animation delay utilities */
.animation-delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
}

.animation-delay-400 {
  animation-delay: 0.4s;
  opacity: 0;
}

.animation-delay-600 {
  animation-delay: 0.6s;
  opacity: 0;
}

/* --- Dropdown Menu --- */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--color-bg);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  z-index: 1000;
  border-top: 3px solid var(--color-primary);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.dropdown-menu a:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

/* --- Mobile Menu --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 100vw;
  height: 100%;
  background-color: var(--color-bg);
  z-index: 9999;
  transition: right var(--transition-speed) ease;
  overflow-y: auto;
  padding: 2rem;
}

.mobile-menu.active .mobile-menu-panel {
  right: 0;
}

.mobile-menu-panel .mobile-dropdown-toggle {
  padding: 1.5rem 1.25rem !important;
  font-size: 1.25rem !important;
  min-height: 72px !important;
  line-height: 1.5 !important;
}

.mobile-menu-panel .mobile-dropdown-toggle .dropdown-arrow {
  width: 28px !important;
  height: 28px !important;
}

.mobile-menu-panel .mobile-dropdown-content {
  display: none;
  padding-left: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.mobile-menu-panel .mobile-dropdown.active .mobile-dropdown-content {
  display: block;
}

.mobile-menu-panel .mobile-dropdown-content a {
  padding: 1.25rem 1.5rem !important;
  font-size: 1.125rem !important;
  min-height: 64px !important;
  line-height: 1.5 !important;
}

.mobile-menu-panel > .space-y-1 > a {
  padding: 1.5rem 1.25rem !important;
  font-size: 1.25rem !important;
  min-height: 72px !important;
  line-height: 1.5 !important;
}

/* Override Tailwind's default small sizing for mobile menu */
.mobile-menu-panel .space-y-1 > * {
  margin-bottom: 0.25rem;
}

/* Make language switcher items bigger too */
.mobile-menu-panel .mobile-lang-item {
  padding: 1.25rem 1rem !important;
  font-size: 1.125rem !important;
  min-height: 64px !important;
}

/* --- Language Switcher --- */
.language-switcher {
  position: relative;
}

.language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 140px;
  background-color: var(--color-bg);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  z-index: 1001;
}

.language-switcher.active .language-dropdown {
  display: block;
}

.language-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color var(--transition-speed) ease;
}

.language-dropdown a:hover,
.language-dropdown a.active {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

/* --- Section Styles --- */
.section-padding {
  padding: 5rem 1.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

/* --- Card Styles --- */
.card {
  background-color: var(--color-bg);
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* --- Button Styles --- */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
  text-decoration: none;
}

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

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, transform var(--transition-speed) ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-white {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: #ffffff;
  color: var(--color-primary);
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
  text-decoration: none;
}

.btn-white:hover {
  background-color: var(--color-bg-light);
  transform: translateY(-2px);
}

/* --- Footer --- */
.footer {
  background-color: var(--color-bg-dark);
  color: #cccccc;
}

.footer a {
  color: #cccccc;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.footer a:hover {
  color: #ffffff;
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: var(--font-family);
  color: var(--color-text);
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.form-input::placeholder {
  color: #999999;
}

textarea.form-input {
  min-height: 150px;
  resize: vertical;
}

/* --- Responsive Utilities --- */
@media (max-width: 768px) {
  .page-banner {
    min-height: 200px;
  }

  .page-banner .page-banner-content h1 {
    font-size: 1.75rem;
  }

  .section-padding {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .hero-fullscreen .hero-content h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .page-banner .page-banner-content h1 {
    font-size: 1.5rem;
  }

  .hero-fullscreen .hero-content h1 {
    font-size: 1.5rem;
  }
}
