/* ============================================================
   AIESEC IN BERN - MAIN STYLESHEET
   PLACEHOLDER brand colors/fonts below - moderator should
   replace with official AIESEC in Bern branding.
   ============================================================ */
:root {
  --color-primary: #037ef3;   /* PLACEHOLDER brand color */
  --color-secondary: #ec1c24; /* PLACEHOLDER brand color */
  --color-dark: #1a1a1a;
  --color-light: #f7f7f7;
  --font-main: "Helvetica Neue", Arial, sans-serif; /* PLACEHOLDER brand font */
  --header-height: 70px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-dark);
  line-height: 1.55;
}
a { color: var(--color-primary); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { 
  max-width: 1100px; margin: 0 auto; padding: 0 20px; 
}
.member-description {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.related-events { width: 100%; }

.card-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #e5e5e5;
  height: var(--header-height);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo { height: 40px; }
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-dark);
}
.logo-text {
  font-weight: 600;
  font-size: 1rem;
  font-stretch: semi-condensed;
}
.aiesec-global-logo { height: 30px; width: auto; }
.aiesec-logo-item { padding-left: 12px; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--color-dark); }

.nav-list { display: flex; list-style: none; margin: 0; padding: 0; gap: 28px; align-items: center; }
.nav-item { 
  position: relative;
}
.nav-item > a { font-weight: 600; padding: 10px 0; display: inline-block; color: var(--color-dark); }
.nav-item > a:hover { color: var(--color-primary); }

.dropdown {
  list-style: none; margin: 0; padding: 8px 0;
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid #e5e5e5; box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown li a { display: block; padding: 10px 16px; font-weight: 400; color: var(--color-dark); }
.dropdown li a:hover { background: var(--color-light); color: var(--color-primary); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-dark); color: #eee; margin-top: 60px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 40px 20px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px;
}
.site-footer h3 { color: #fff; margin-top: 0; }
.site-footer a { color: #ccc; }
.site-footer a:hover { color: #fff; }
.footer-pages ul { list-style: none; padding: 0; margin: 0; }
.footer-pages li { margin-bottom: 8px; }
.social-links { display: flex; gap: 16px; margin-top: 8px; }
.footer-bottom { text-align: center; padding: 16px 0; border-top: 1px solid #333; font-size: 0.85rem; color: #999; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 4px;
  font-weight: 600; margin-top: 16px; cursor: pointer; border: none;
}
.btn-primary { 
  background: var(--color-primary); 
  color: #fff;
  font-size:xx-large
}
.btn-primary:hover { background: #025bb5; }
.btn-secondary { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }

/* ---------- Hero Carousel ---------- */
.hero-carousel { position: relative; height: 60vh; min-height: 380px; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; text-align: center;
  opacity: 0; transition: opacity .8s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.hero-slide h1 { position: relative; color: #fff; font-size: 2.4rem; padding: 0 20px; max-width: 800px; }
.carousel-prev, .carousel-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(255,255,255,0.25); color: #fff; border: none; font-size: 2rem;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
}
.carousel-prev { left: 16px; } .carousel-next { right: 16px; }

.hero-image {
  height: 40vh; min-height: 260px; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; text-align: center; position: relative;
}
.hero-image::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
.hero-image h1, .hero-image .btn { position: relative; color: #fff; z-index: 1; }

/* ---------- Membership teaser ---------- */
.membership-teaser { text-align: center; padding: 50px 20px; }
.subtitle { font-size: 1.2rem; }

/* ---------- Scrollable card rows ---------- */
.scroll-row-wrapper { position: relative; }
.scroll-row {
  display: flex; gap: 18px; overflow-x: auto; padding: 10px 0 20px; scroll-behavior: smooth;
}
.scroll-btn {
  position: absolute; top: 40%; background: #fff; border: 1px solid #ddd; border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer; z-index: 2; font-size: 1.2rem;
}
.scroll-left { left: -10px; } .scroll-right { right: -10px; }

.card {
  flex: 0 0 260px; border: 1px solid #eee; border-radius: 8px; overflow: hidden;
  background: #fff; color: inherit; transition: box-shadow .2s ease;
}
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.card-image { height: 150px; background-size: cover; background-position: center; background-color: #ddd; }
.card-body { padding: 12px 14px; }
.card-body h4 { margin: 0 0 6px; font-size: 1rem; }
.card-meta { font-size: 0.85rem; color: #666; margin: 2px 0; }

/* ---------- About / member grid ---------- */
.about-image { 
  margin: 20px 0; border-radius: 8px; 
  width: 40rem;
}
.member-grid, .department-grid, .participate-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px;
}
.member-card { text-align: center; background: var(--color-light); padding: 16px; border-radius: 8px; }
.member-card img { border-radius: 50%; width: 100px; height: 100px; object-fit: cover; margin: 0 auto 10px; }

/* ---------- Event / opportunity list rows ---------- */
.event-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.event-row {
  display: flex; gap: 16px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; background: #fff;
}
.event-row-image { flex: 0 0 220px; background-size: cover; background-position: center; background-color: #ddd; min-height: 140px; }
.event-row-body { padding: 14px 16px; }
.event-short-desc { color: #444; }
.hint { color: #777; font-size: 0.9rem; }
.empty-state { text-align: center; color: #888; padding: 30px 0; }

/* ---------- Opportunities accordion ---------- */
#opportunitiesTree { margin-top: 20px; }
.opp-country > summary, .opp-entity > summary {
  cursor: pointer; padding: 12px 16px; font-weight: 700; background: var(--color-light);
  border: 1px solid #eee; border-radius: 6px; margin-bottom: 6px;
}
.opp-entity { margin: 8px 0 8px 20px; }
.opp-entity > summary { font-weight: 600; background: #fff; }
.opp-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  border: 1px solid #eee; border-radius: 6px; padding: 12px; margin: 8px 0 8px 20px;
}
.opp-item-image { width: 100px; height: 80px; background-size: cover; background-position: center; border-radius: 6px; background-color: #ddd; flex-shrink: 0; }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.testimonial-box { border: 1px solid #eee; border-radius: 8px; padding: 16px; display: block; color: inherit; }
.testimonial-box img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.testimonial-header { display: flex; gap: 20px; align-items: flex-start; margin-top: 20px; }
.testimonial-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }
.testimonial-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.testimonial-gallery img { width: 160px; height: 120px; object-fit: cover; border-radius: 6px; }
.quote { font-style: italic; color: #444; }

/* ---------- Exchanges: benefits + flowchart ---------- */
.benefit-callouts { display: flex; justify-content: space-around; padding: 40px 0; gap: 20px; }
.callout {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.callout-icon { 
  width: 3rem;
  height: 3rem;
 }
.flow-section { padding: 40px 0; text-align: center; }
.flow-step {
  background: var(--color-light); border: 1px solid #ddd; border-radius: 8px;
  padding: 14px 20px; max-width: 480px;
}
.flow-highlight { background: var(--color-primary); color: #fff; border-color: var(--color-primary); font-weight: 600; }
.flow-branches { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.flow-branches .flow-step { flex: 1 1 200px; }

/* ---------- Participate ---------- */
.participate-grid { grid-template-columns: repeat(3, 1fr); }
.participate-cell { display: block; text-align: center; color: inherit; }
.participate-cell img { border-radius: 8px; height: 200px; object-fit: cover; width: 100%; }
.department-grid { grid-template-columns: repeat(6, 1fr); text-align: center; }
.department-item { cursor: pointer; padding: 16px; border-radius: 8px; background: var(--dept-color, var(--color-light)); color: var(--dept-on-color, #fff); transition: transform .15s ease, box-shadow .15s ease; }
.department-item:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.department-item p { color: var(--dept-on-color, #fff); font-weight: 600; }
.department-icon { display: flex; justify-content: center; align-items: center; height: 3.5rem; margin-bottom: 8px; }
.department-icon-img { width: 3rem; height: 3rem; object-fit: contain; }
.closing-motivation { text-align: center; padding: 50px 0; }
.motivation-lines p { font-size: 1.2rem; font-weight: 600; margin: 6px 0; }
.sponsor-row { text-align: center; padding: 30px 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none;
  align-items: center; justify-content: center; z-index: 200;
}
.lightbox.active { display: flex; }
.lightbox-content { background: var(--dept-light, #fff); padding: 30px; border-radius: 8px; max-width: 720px; width: 90%; position: relative; color: #1a1a1a; }
.lightbox-close { position: absolute; top: 8px; right: 14px; background: none; border: none; font-size: 1.6rem; cursor: pointer; z-index: 2; color: #1a1a1a; }
.lightbox-body { display: flex; gap: 24px; align-items: stretch; }
.lightbox-image { flex: 0 0 200px; width: 200px; min-height: 200px; background-size: cover; background-position: center; background-color: rgba(255,255,255,0.5); border-radius: 8px; }
.lightbox-text { flex: 1; min-width: 0; }
.lightbox-text h3 { margin-top: 0; color: var(--dept-color, inherit); }
.lightbox-text p { margin: 0 0 12px; }
.lightbox-text p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .lightbox-body { flex-direction: column; }
  .lightbox-image { flex: 0 0 auto; width: 100%; min-height: 160px; }
}

/* ---------- Lightbox ---------- */
.about-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.narrow-article{
  max-width: 70%;

}

/* ============================================================
   RESPONSIVE (mobile-first equivalents)
   ============================================================ */
@media (max-width: 900px) {
  .member-grid, .department-grid, .participate-grid, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: var(--header-height); left: 0; right: 0;
    background: #fff; border-top: 1px solid #eee; max-height: 0; overflow: hidden;
    transition: max-height .25s ease;
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .nav-list { flex-direction: column; gap: 0; padding: 10px 20px; }
  .nav-item > a { padding: 12px 0; }
  /* dropdowns become accordions on mobile */
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; display: none; padding-left: 12px;
  }
  .has-dropdown.open .dropdown { display: block; }
  .event-row { flex-direction: column; }
  .event-row-image { width: 100%; min-height: 180px; }
  .opp-item { flex-direction: column-reverse; align-items: stretch; }
  .opp-item-image { width: 100%; height: 140px; }
  .testimonial-header { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .member-grid, .department-grid, .participate-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .benefit-callouts { flex-direction: column; }
  .hero-slide h1 { font-size: 1.6rem; }
}

