/* ------------------------------ */
/*  Reset and Global Styles      */
/* ------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent any animated element from causing horizontal page scroll */
body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ------------------------------ */
/*  Top Navigation               */
/* ------------------------------ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  width: 100%;
  background-color: #f7f7f7;
  border-bottom: 1px solid #dee2e6;
}

.top-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.top-nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s ease, transform 0.2s ease;
  padding: 0.25rem 0.1rem;
}

.top-nav-links a:hover {
  color: #007bff;
  transform: translateY(-1px);
}

/* ------------------------------ */
/*  Language Switcher            */
/* ------------------------------ */
.language-switcher {
  display: flex;
  gap: 16px;
  align-items: center;
}

.language-switcher img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.language-switcher img:hover {
  transform: translateY(-1px);
  filter: brightness(1.2);
}

/* ------------------------------ */
/*  Header & Canvas              */
/* ------------------------------ */
.header {
  position: relative;
  overflow: hidden;
  padding: 0px 20px 2px;
}

#header-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 140px;
}

/* ------------------------------ */
/*  Logo                         */
/* ------------------------------ */
.logo-wrapper {
  position: relative;

  width: 200px;
  height: 200px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.static-logo {
  z-index: 2;
}

/* ------------------------------ */
/*  Project Name & Slogan        */
/* ------------------------------ */
.text-container {
  display: flex;
  flex-direction: column;
  gap: 2px;

}

.project-name {
  font-size: 3 rem;
  line-height: 1;
  color: #000;

}

.slogan {
  font-size: 1.5rem;
  line-height: 2;
  color: #777;

}
/* ══════════════════════════════════════════════
   LANDING PANEL
══════════════════════════════════════════════ */
.landing-panel {
  width: 100%;
  /* initial visible state */
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    max-height 0.6s ease;
  max-height: 800px;
  overflow: hidden;
}

/* Slide-up + fade-out when logging in */
.landing-panel.hiding {
  opacity: 0;
  transform: translateY(-30px);
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

.landing-inner {
  display: flex;
  gap: 20px;
  align-items: stretch;
 
}

/* Project description block */
.project-description {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
}

.desc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.desc-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #e8f1ff;
  color: #0055cc;
  border-radius: 4px;
  padding: 3px 9px;
}

.desc-duration {
  font-size: 0.82rem;
  color: #888;
  font-weight: 500;
}

.desc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.desc-text {
  font-size: 0.86rem;
  color: #444;
  line-height: 1.65;
  margin-bottom: 6px;
}

.desc-meta {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.desc-meta-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desc-meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #999;
  margin-bottom: 4px;
}

.desc-meta-item {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
}

.desc-meta-link {
  font-size: 0.82rem;
  color: #007bff;
  text-decoration: none;
  line-height: 1.5;
  display: block;
}

.desc-meta-link:hover {
  text-decoration: underline;
}

.consortium-col {
  gap: 1px;
}

.consortium-col .desc-meta-item {
  line-height: 1.5;
}
.consortium-col .desc-meta-label {
  margin-bottom: 2px;
}

/* Login card */
.login-card {
  flex: 0 0 290px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 123, 255, 0.1);
  border: 1px solid #d0e7ff;
  padding: 18px 22px 18px;
  display: flex;
  flex-direction: column;
}

.login-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 0.02em;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.02em;
}

.field-group input {
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 7px;
  font-size: 0.95rem;
  color: #222;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.field-group input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
  background: #fff;
}

.login-error {
  font-size: 0.85rem;
  color: #dc3545;
  background: #fff5f5;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
}

.login-btn {
  margin-top: auto;
  padding: 11px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, transform 0.15s ease;
}

.login-btn:hover {
  background: #0062cc;
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════════════
   APP PANEL (drop zone + buttons)
══════════════════════════════════════════════ */
.app-panel {
  /* hidden initially */
  opacity: 0;
  transform: translateY(40px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 0.6s ease 0.15s,
    transform 0.6s ease 0.15s,
    max-height 0.65s ease 0.1s;
}

.app-panel.visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 1200px;
  pointer-events: auto;
}

/* ------------------------------ */
/*  Main Content Layout          */
/* ------------------------------ */
.main-content {
  display: flex;
  justify-content: space-between;
  margin: 12px auto 8px auto;
  width: 100%;
  padding: 0 20px;
  gap: 25px;
  margin-bottom:20px;
}

.left-section {
  flex: 1;
  background-color: #fff;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.button-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ------------------------------ */
/*  Module Groups                */
/* ------------------------------ */
.module-group {
  display: flex;
  flex-direction: column;
}

.flight_prep-group,
.scheduling-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ------------------------------ */
/*  Drop Zone                    */
/* ------------------------------ */
.drop-zone-header {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 5px;
}

.drop-zone {
  width: 100%;
  height: 300px;
  background-color: #e0e0e0;
  border: 2px dashed #aaa;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.drop-zone:hover {
  border-color: #007bff;
  background-color: #d6eaf8;
}

.drop-zone span {
  margin-bottom: 20px;
}

/* ------------------------------ */
/*  Status & Spinner             */
/* ------------------------------ */
#statusMessage {
  font-size: 1.5rem;
  color: #007bff;
  padding: 5px;
  background-color: #f0f8ff;
  text-align: center;
}

#droneSpinner {
  width: 250px;
  height: 250px;
  margin: 0 auto;
  display: none;
}

/* Progress bar */
#uploadProgressContainer {
  margin-top: 8px;
  border-radius: 6px;
  overflow: hidden;
  background: #e9ecef;
  height: 26px;
}

#uploadProgressBar {
  height: 100%;
  background: #007bff;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease;
}

/* ------------------------------ */
/*  Partner Logos Carousel       */
/* ------------------------------ */
.carousel-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 8px 20px;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;   /* prevent animated slides from bleeding outside */
  max-width: 100%;
}

.carousel-half {
  flex: 1 1 48%;
  text-align: center;
  min-width: 280px;
}

.carousel-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logos {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  padding: 5px 0;
  background-color: #f7f7f7;
  border-radius: 12px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.02);
  max-width: 100%;   /* never wider than its parent */
  width: 100%;
}

.logos:before,
.logos:after {
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  content: "";
  z-index: 2;
  pointer-events: none;
}

.logos:before {
  left: 0;
  background: linear-gradient(to left, rgba(247, 247, 247, 0), #f7f7f7);
}

.logos:after {
  right: 0;
  background: linear-gradient(to right, rgba(247, 247, 247, 0), #f7f7f7);
}

.logos:hover .logos-slide {
  animation-play-state: paused;
}

.logos-slide {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  animation: slide 30s linear infinite;
}

.carousel-slide {
  display: inline-block;
}

.carousel-slide img {
  height: 40px;
  margin: 0 10px;
  vertical-align: middle;
  opacity: 0.85;
  filter: grayscale(30%) brightness(95%);
  transition: all 0.3s ease;
}

.carousel-slide img:hover {
  transform: scale(1.1);
  opacity: 1;
  filter: grayscale(0%) brightness(105%);
}

@keyframes slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ------------------------------ */
/*  Footer                       */
/* ------------------------------ */
.footer {
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: 5px;
}

.eu-nrw-section a {
  display: inline-flex;
  align-items: center;
}

.footer-logo {
  height: 80px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-logo:hover {
  opacity: 1;
}

.legal-links {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.legal-links a {
  color: #666;
  text-decoration: none;
  margin: 0 0.5em;
}

.legal-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.85rem;
  color: #888;
  margin-top: 6px;
}

.version-holder {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 4px;
}

/* Success / error messages */
.success-message {
  margin-top: 8px;
  padding: 8px 12px;
  background: #d4edda;
  color: #155724;
  border-radius: 6px;
  font-size: 0.9rem;
}

.message.error {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ------------------------------ */
/*  Responsive                   */
/* ------------------------------ */
@media (max-width: 768px) {

  /* ── Top bar ── */
  .top-bar {
    padding: 8px 12px;
    gap: 8px;
  }

  /* Horizontal scroll instead of wrapping — no line-breaks mid-nav */
  .top-nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE/Edge */
    padding-bottom: 2px;
  }
  .top-nav-links::-webkit-scrollbar { display: none; }

  .top-nav-links a {
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .language-switcher img {
    width: 32px;
    height: 32px;
  }

  /* ── Header ── */
  .header {
    padding: 0 12px 2px;
  }

  .header-inner {
    flex-direction: row;        /* keep logo + text side by side */
    align-items: center;
    min-height: 80px;
    gap: 12px;
    padding: 8px 0;
  }

  .logo-wrapper {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
  }

  .project-name {
    font-size: 1.7rem;
    line-height: 1.1;
  }

  .slogan {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #888;
  }

  /* ── Landing panel ── */
  .landing-panel {
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
    max-height: 2000px;   /* large enough for stacked layout; keeps transition working */
  }

  .landing-inner {
    flex-direction: column;
    gap: 12px;
  }

  /* Login card sits below description — natural DOM order */
  .login-card {
    order: unset;
    flex: 0 0 auto;
    width: 100%;
    padding: 14px 16px 14px;
  }

  /* Project description comes first — natural DOM order */
  .project-description {
    order: unset;
    padding: 14px 16px;
  }

  .desc-title {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }

  .desc-text {
    font-size: 0.82rem;
  }

  .desc-meta {
    flex-direction: column;
    gap: 12px;
  }

  /* ── App panel ── */
  .main-content {
    flex-direction: column;
    width: 100%;
    padding: 0 12px;
    gap: 14px;
    box-sizing: border-box;
  }

  .drop-zone {
    height: 160px;
  }

  .drop-zone-header {
    font-size: 1rem;
  }

  /* ── Carousels ── */
  .carousel-section {
    flex-direction: column;
    width: 100%;
    padding: 8px 12px;
    gap: 12px;
    box-sizing: border-box;
  }

  .carousel-half {
    flex: 1 1 100%;
  }

  .carousel-slide img {
    height: 32px;
  }

  /* ── Footer ── */
  .footer-logo {
    height: 56px;
  }

  .legal-links {
    font-size: 0.8rem;
  }
}