/* ============================================================
   Aerospace Almedalen – main.css
   Laddas via functions.php / wp_enqueue_style()
   Typsnitt (Inter + JetBrains Mono) laddas separat från Google Fonts.
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --navy:       #0A1628;
  --navy-mid:   #0E2040;
  --blue:       #1B6EC2;
  --blue-light: #4FA3E0;
  --gold:       #E8A000;
  --white:      #FFFFFF;
  --gray-bg:    #F2F5F9;
  --gray-mid:   #DDE3EC;
  --text:       #1A1A2E;
  --text-sub:   #5A6A80;
  --radius:     8px;
  --shadow:     0 2px 16px rgba(10,22,40,0.10);
  --shadow-lg:  0 8px 40px rgba(10,22,40,0.18);
  --transition: 0.25s ease;
  --max-w:      1140px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }

.section-label {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 900;
  line-height: 1.15; color: var(--text); margin-bottom: 16px;
}
.section-desc {
  font-size: 1.1rem; color: var(--text-sub);
  max-width: 640px; margin-bottom: 48px;
}
.text-center { text-align: center; }

/* ============================================================
   KNAPPAR
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius);
  font-weight: 700; font-size: 0.95rem;
  transition: var(--transition); cursor: pointer;
  border: none; text-decoration: none; font-family: inherit;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover {
  background: #1559a0; transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(27,110,194,0.4);
  text-decoration: none; color: white;
}
.btn-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue); color: white;
  text-decoration: none;
}
.btn-outline-white {
  background: transparent; color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  border-color: white; background: rgba(255,255,255,0.07);
  text-decoration: none; color: white;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,22,40,0.97);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  height: 64px; display: flex; align-items: center;
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; width: 100%;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: white; font-weight: 700; font-size: 0.9rem;
  letter-spacing: 0.02em; text-decoration: none;
}
.nav-logo img { height: 36px; width: auto; } /* anpassad logotyp */
.nav-logo:hover { text-decoration: none; opacity: 0.9; }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,0.75); font-size: 0.875rem;
  font-weight: 500; transition: color var(--transition);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { color: white; }
.nav-links li { list-style: none; } /* WP wp_nav_menu genererar <li> */
.nav-links ul { display: flex; gap: 32px; list-style: none; }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none;
  border: none; flex-shrink: 0;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: white; border-radius: 2px; transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navy); flex-direction: column; padding: 24px;
    gap: 20px; border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .nav-links ul { flex-direction: column; gap: 20px; }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100vh; background: var(--navy);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  padding: 80px 24px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(27,110,194,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(79,163,224,0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0A1628 0%, #0E2040 60%, #0A1628 100%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.06;
  background-image:
    linear-gradient(rgba(79,163,224,1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,163,224,1) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(27,110,194,0.25);
  border: 1px solid rgba(79,163,224,0.3);
  border-radius: 100px; padding: 6px 16px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--blue-light); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 32px;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px;
  background: var(--blue-light); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 900;
  color: white; line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-title span { color: var(--blue-light); }

.hero-date {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.65); font-weight: 500;
  letter-spacing: 0.05em; margin-bottom: 40px;
}
.hero-date strong { color: rgba(255,255,255,0.9); }

.hero-logo {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  margin-bottom: 48px; opacity: 0.85;
}
.hero-logo img { height: 56px; width: auto; } /* anpassad logotyp */
.hero-logo-mark {
  width: 64px; height: 64px;
  background: rgba(27,110,194,0.3);
  border: 2px solid rgba(79,163,224,0.4);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.hero-logo-text {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 60px;
}
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.3); color: white; }
.hero-actions .btn-outline:hover { border-color: white; background: rgba(255,255,255,0.07); }

.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.4); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  animation: bounce 2.5s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   INTRODUKTIONSTEXT
   ============================================================ */
#intro { background: var(--white); padding: 96px 0; }
.intro-inner { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.intro-inner h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 900;
  line-height: 1.2; color: var(--text); margin-bottom: 32px;
}
.intro-inner p,
.intro-inner .intro-content p {
  font-size: 1.05rem; color: var(--text-sub);
  margin-bottom: 20px; line-height: 1.8;
}
.intro-inner p:first-of-type,
.intro-inner .intro-content p:first-of-type {
  color: var(--text); font-size: 1.15rem; font-weight: 500;
}

/* ============================================================
   VIDEOPLACEHOLDER
   ============================================================ */
#video { background: var(--gray-bg); padding: 80px 0; }
.video-wrapper { max-width: 900px; margin: 0 auto; }
.video-placeholder {
  aspect-ratio: 16/9; background: var(--navy); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px; position: relative;
  overflow: hidden; box-shadow: var(--shadow-lg); cursor: pointer;
}
.video-placeholder::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(27,110,194,0.2) 0%, transparent 70%);
}
.video-play-btn {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: var(--transition);
}
.video-placeholder:hover .video-play-btn {
  background: var(--blue); border-color: var(--blue); transform: scale(1.08);
}
.video-play-btn svg { margin-left: 4px; }
.video-label { color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 500; position: relative; }
.video-title { color: white; font-size: 1.1rem; font-weight: 700; position: relative; }
.video-embed iframe { width: 100%; height: 100%; border: none; }

/* ============================================================
   PROGRAM – TIDSLINJE
   ============================================================ */
#program { background: var(--white); padding: 80px 0; }
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue), rgba(27,110,194,0.1));
}
.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item::before {
  content: ''; position: absolute; left: -34px; top: 14px;
  width: 10px; height: 10px; background: var(--blue); border-radius: 50%;
  border: 2px solid white; box-shadow: 0 0 0 3px rgba(27,110,194,0.25);
}

/* ============================================================
   EVENT-KORT – bild vänster / innehåll höger (desktop)
   ============================================================ */
.event-card {
  background: white; border: 1px solid var(--gray-mid);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.event-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* Med bild: horisontell layout */
.event-card.has-image { display: flex; align-items: stretch; }

/* Bildkolumn – vänster, ~42% */
.card-img {
  width: 42%; flex-shrink: 0;
  background: var(--gray-bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; position: relative;
  border-right: 1px solid var(--gray-mid);
  min-height: 240px; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card-img svg { opacity: 0.4; position: relative; }
.card-img-label { color: var(--text-sub); font-size: 0.78rem; position: relative; }

/* Innehållskolumn – höger */
.card-body {
  flex: 1; display: flex; flex-direction: column;
  padding: 20px 24px; min-width: 0;
}

/* Innehåll inuti card-body */
.card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin-bottom: 14px;
}
.time-badge {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem; font-weight: 500; color: white;
  background: var(--navy); padding: 4px 10px;
  border-radius: 4px; letter-spacing: 0.05em; flex-shrink: 0;
}
.organizer-link { font-size: 0.8rem; color: var(--text-sub); }
.organizer-link a { color: var(--blue); font-weight: 500; }
.card-title { font-size: 1.15rem; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 12px; }
.card-desc { font-size: 0.92rem; color: var(--text-sub); line-height: 1.7; margin-bottom: 16px; }
.card-desc p { margin-bottom: 12px; }

.card-participants h4 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-sub); margin-bottom: 10px;
}
.participant-list li {
  font-size: 0.875rem; color: var(--text); padding: 6px 0;
  border-bottom: 1px solid var(--gray-bg); display: flex; gap: 6px; flex-wrap: wrap;
}
.participant-list li:last-child { border-bottom: none; }
.participant-name { font-weight: 600; }
.participant-meta { color: var(--text-sub); }

/* Deltagarbilder – grid */
.participant-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 12px;
}
.participant-card {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center;
}
.participant-photo {
  width: 100%; aspect-ratio: 1; background: var(--gray-bg);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; border: 1px dashed var(--gray-mid);
  overflow: hidden;
}
.participant-photo img { width: 100%; height: 100%; object-fit: cover; }
.participant-photo svg { opacity: 0.35; }
.participant-card-name { font-size: 0.78rem; font-weight: 600; line-height: 1.3; }
.participant-card-title { font-size: 0.7rem; color: var(--text-sub); line-height: 1.3; }

/* Deltagarbilder – horisontell scroll-snap */
.participant-slider {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  gap: 12px; margin-top: 12px; padding-bottom: 8px; scrollbar-width: none;
}
.participant-slider::-webkit-scrollbar { display: none; }
.participant-slide {
  scroll-snap-align: start; flex: 0 0 120px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center;
}
.participant-slide .participant-photo { width: 88px; height: 88px; }

/* Mobil: stapla bild och innehåll */
@media (max-width: 768px) {
  .event-card.has-image { flex-direction: column; }
  .card-img {
    width: 100%; aspect-ratio: 16/9; min-height: unset;
    border-right: none; border-bottom: 1px solid var(--gray-mid);
  }
  .participant-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   BILDGALLERI
   ============================================================ */
#gallery { background: var(--gray-bg); padding: 80px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 768px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.gallery-item:nth-child(3n+1) { background: #c8d4e0; }
.gallery-item:nth-child(3n+2) { background: #b8ccde; }
.gallery-item:nth-child(3n+3) { background: #ccd8e8; }
.gallery-item svg { opacity: 0.35; position: relative; }

.gallery-overlay {
  position: absolute; inset: 0; background: rgba(10,22,40,0.75);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  padding: 16px; opacity: 0; transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay,
.gallery-item:focus .gallery-overlay { opacity: 1; }

.gallery-caption { color: white; font-size: 0.85rem; font-weight: 500; line-height: 1.4; }
.gallery-caption span { color: rgba(255,255,255,0.6); font-size: 0.75rem; display: block; }

/* Lightbox */
#lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox[aria-hidden="true"] { opacity: 0; pointer-events: none; }
.lightbox-inner { max-width: 860px; width: 90%; position: relative; }
.lightbox-img {
  width: 100%; aspect-ratio: 4/3; background: #1a2a3a;
  border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3); font-size: 0.9rem;
}
.lightbox-img img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-caption { color: white; padding: 16px 0 8px; font-size: 0.9rem; }
.lightbox-close {
  position: absolute; top: -40px; right: 0;
  background: none; border: none; color: white;
  font-size: 1.5rem; cursor: pointer; padding: 8px; line-height: 1;
}

/* ============================================================
   PARTNERS
   ============================================================ */
#partners { background: var(--white); padding: 80px 0; }
.partner-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 48px;
}
@media (max-width: 900px) { .partner-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }

.partner-card {
  border: 1px solid var(--gray-mid); border-radius: var(--radius);
  padding: 24px 16px; display: flex; flex-direction: column;
  align-items: center; gap: 12px; text-align: center;
  text-decoration: none; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.partner-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(27,110,194,0.12);
  transform: translateY(-2px); text-decoration: none;
}
.partner-logo-box {
  width: 100%; height: 56px; background: var(--gray-bg);
  border-radius: 6px; display: flex; align-items: center;
  justify-content: center; border: 1px dashed var(--gray-mid); overflow: hidden;
}
.partner-logo-box img { max-height: 44px; width: auto; object-fit: contain; }
.partner-name { font-size: 0.82rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.partner-url { font-size: 0.72rem; color: var(--blue); }

/* ============================================================
   SIDFOT
   ============================================================ */
footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 64px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.footer-col h3 {
  color: white; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px;
}
.contact-name { color: white; font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.contact-role { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.contact-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; margin-bottom: 8px; color: rgba(255,255,255,0.7);
}
.contact-item a { color: var(--blue-light); }

.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-link {
  width: 40px; height: 40px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); transition: var(--transition); text-decoration: none;
}
.social-link:hover {
  background: var(--blue); border-color: var(--blue);
  color: white; text-decoration: none; transform: translateY(-2px);
}

.archive-list { }
.archive-list li { margin-bottom: 8px; }
.archive-list a {
  color: rgba(255,255,255,0.6); font-size: 0.875rem;
  transition: color var(--transition); text-decoration: none;
}
.archive-list a:hover { color: var(--blue-light); text-decoration: none; }

.footer-bottom {
  padding: 24px 0; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-bottom-logo {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.4); font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.3); }

/* ============================================================
   SIDOR (page.php / single.php)
   ============================================================ */
.page-hero { background: var(--navy); padding: 80px 0 64px; }
.page-content h1, .page-content h2, .page-content h3 {
  color: var(--text); margin: 32px 0 16px;
}
.page-content p { margin-bottom: 20px; }
.page-content a { color: var(--blue); }
.page-content img { border-radius: var(--radius); margin: 24px 0; }

/* ============================================================
   WORDPRESS-SPECIFIKT
   ============================================================ */

/* Justifier anpassad logotyp i nav */
.custom-logo { height: 36px; width: auto; display: block; }
.custom-logo-link { display: flex; align-items: center; }

/* Navigationsmenyer genererade av wp_nav_menu */
.nav-links > ul { display: contents; }
.nav-links > ul > li > a {
  color: rgba(255,255,255,0.75); font-size: 0.875rem;
  font-weight: 500; transition: color var(--transition); text-decoration: none;
}
.nav-links > ul > li > a:hover { color: white; }

/* Sidfots-meny */
.archive-list > ul { list-style: none; }
.archive-list > ul > li { margin-bottom: 8px; }
.archive-list > ul > li > a {
  color: rgba(255,255,255,0.6); font-size: 0.875rem;
  transition: color var(--transition); text-decoration: none;
}
.archive-list > ul > li > a:hover { color: var(--blue-light); }

/* Screen reader text */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}
