/**
 * Miele Technológie — prémiový dizajn s CSS premennými.
 * PREČO: Externý súbor namiesto inline <style> — Elementor/Woodmart kompatibilita.
 */
:root {
  --em-miele-red: #8c0014;
  --em-bg-light: #f7f7f7;
  --em-text-dark: #1a1a1a;
  --em-text-muted: #555555;
  --em-radius: 12px;
  --em-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.em-tech-container {
  margin: 60px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--em-text-dark);
}

.em-tech-header {
  text-align: left;
  margin-bottom: 30px;
}

.em-tech-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 10px 0;
  color: var(--em-text-dark);
}

/* Grid — auto-fill pre responzívne stĺpce */
.em-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* Karta technológie */
.em-tech-card {
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: var(--em-radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--em-transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.em-tech-card:hover {
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

.em-tech-card img {
  width: auto;
  height: 60px;
  object-fit: contain;
  margin-bottom: 20px;
  transition: transform 0.5s ease;
}

.em-tech-card:hover img {
  transform: scale(1.08);
}

.em-tech-card h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--em-text-dark);
}

/* Karta bez obrázku — centrovaný text */
.em-tech-card-text-only {
  justify-content: center;
  padding: 20px;
  min-height: 120px;
}

.em-tech-card-text-only h4 {
  font-size: 15px;
}

/* Hover "+" indikátor klikateľnosti */
.em-tech-card-plus {
  position: absolute;
  bottom: 15px;
  color: var(--em-miele-red);
  font-weight: 300;
  font-size: 24px;
  opacity: 0;
  transition: var(--em-transition);
  transform: translateY(10px);
}

.em-tech-card:hover .em-tech-card-plus {
  opacity: 1;
  transform: translateY(0);
}

/* Modal overlay — glassmorphism */
.em-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.em-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal obsah */
.em-modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  border-radius: 16px;
  overflow-y: auto;
  position: relative;
  transform: scale(0.96) translateY(20px);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  opacity: 0;
}

.em-modal-overlay.active .em-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close button — CSS pseudo-elements X */
.em-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: #f1f1f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  z-index: 10;
}

.em-modal-close::before,
.em-modal-close::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  background: #333;
}

.em-modal-close::before { transform: rotate(45deg); }
.em-modal-close::after { transform: rotate(-45deg); }
.em-modal-close:hover { background: #e2e2e2; }

/* Hero obrázok v modáli */
.em-modal-hero {
  width: 100%;
  height: 320px;
  background: var(--em-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.em-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Video wrapper — 16:9 aspect ratio */
.em-modal-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  width: 100%;
}

.em-modal-video-wrapper iframe,
.em-modal-video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Textový obsah modálu */
.em-modal-body {
  padding: 40px;
}

.em-modal-body h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--em-text-dark);
  line-height: 1.2;
}

.em-modal-body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--em-text-muted);
  margin: 0;
}

/* Scrollbar */
.em-modal-content::-webkit-scrollbar { width: 8px; }
.em-modal-content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 0 16px 16px 0; }
.em-modal-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 8px; }
.em-modal-content::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* Responsivita */
@media (max-width: 768px) {
  .em-tech-container { margin: 40px 0; }
  .em-tech-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
  .em-tech-card { min-height: 140px; padding: 20px 10px; }
  .em-tech-card img { height: 40px; margin-bottom: 12px; }
  .em-tech-card h4 { font-size: 14px; }
  .em-modal-hero { height: 220px; padding: 20px; }
  .em-modal-body { padding: 30px 20px; }
  .em-modal-body h2 { font-size: 22px; }
}
