/* ==========================================================================
   IEEE WIE – University of Macedonia
   Stylesheet

   Contents
     1. Design tokens (colors) & base styles
     2. Layout helpers & buttons
     3. Header (logos + group name)
     4. Hero
     5. Sections (shared) & cards
     6. Events
     7. News
     8. About us
     9. Join us (form)
    10. FAQs
    11. Footer
    12. Mobile (max-width: 760px)
    13. Reduced motion
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS & BASE STYLES
   Brand colors come from the IEEE WIE identity guidelines.
   ========================================================================== */

:root {
  --purple: #772583;   /* primary */
  --blue:   #00629B;   /* accent */
  --lightpurple:  #a441b3;   /* accent */
  --gray:   #75787B;   /* secondary text */
  --ink:    #2b2b2e;   /* body text */
  --tint:   #F1E9F3;   /* light purple background */
  --line:   #E3D6E6;   /* borders & dividers */
  --bg:     #fff;
}

:root {
  color-scheme: light;   /* the logo is only allowed on light backgrounds */
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);       /* phone notches */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after{
  box-sizing: inherit;
}

html {
  -webkit-text-size-adjust: 100%;   /* phones never inflate the text */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;   /* space kept above an anchor when scrolling to it */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Open Sans", Calibri, Arial, sans-serif;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-weight: 300;
  color: var(--purple);
  line-height: 1.15;
  margin: 0;
}

h2 {
  font-size: clamp(30px, 5vw, 42px);
  margin-bottom: 28px;
}

h3 {
  font-size: 20px;
  font-weight: 600;
}

/* Elements with the "hidden" attribute stay hidden (used by the events tabs) */
[hidden] {
  display: none !important;
}


/* ==========================================================================
   2. LAYOUT HELPERS & BUTTONS
   ========================================================================== */

/* Centered content column used by every section */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Default button: green, pill-shaped */
.btn {
  display: inline-block;
  padding: 14px 26px;
  text-decoration: none;
  background: var(--blue);
  color: #1c2b06;
  border: 0;
  font: 700 16px "Open Sans", sans-serif;
  cursor: pointer;
  border-radius: 999px;
}

.btn:hover {
  background: #8fd12e;
}

/* Variant: white button (e.g. "See our events") */
.btn.ghost {
  background: #fff;
  color: var(--purple);
  margin-left: 10px;
}

/* Variant: blue button (e.g. "Join us") */
.btn.blue {
  background: var(--blue);
  color: #fff;
}

.btn.blue:hover {
  background: #0a77b8;
}


/* ==========================================================================
   3. HEADER (logos + group name)
   The header sits inside the hero, so it shares the hero's gradient.
   ========================================================================== */

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
}

/* "multiply" makes the white background of the logo images transparent */
.site-header img {
  mix-blend-mode: multiply;
}

.site-header .logo-wie {
  width: 100px;
  height: 100px;
}

.site-header .logo-uom {
  width: 100px;
  height: 100px;
  margin-left: auto;   /* pushes the university logo to the right edge */
}

.site-header .brand-name {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  color: var(--purple);
}

.site-header .brand-name span {
  display: block;
  font-weight: 400;
  color: var(--gray);
  font-size: 16px;
}

/* ==========================================================================
   3b. NAVIGATION (under the logos)
   No background of its own: the hero gradient shows through.
   On desktop it is a row of links; on mobile see section 12.
   ========================================================================== */


.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width:100%;
  gap: 0 28px;
}

.nav-menu a {
  display: block;
  padding: 14px 0;
  color: var(--purple);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

/* Blue underline on hover / keyboard focus */
.nav-menu a:hover,
.nav-menu a:focus-visible {
  box-shadow: inset 0 -3px 0 var(--blue);
}

/* The menu button (three lines) only exists on mobile */
.nav-toggle {
  display: none;
}

/* ==========================================================================
   4. HERO
   Gradient background + faint circuit pattern on the left-to-right fade.
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: 0 0 88px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;    /* fallback for older browsers */
  min-height: 100svh;   /* exactly the visible screen height */
  background: linear-gradient(
    100deg,
    #fff 0%,
    #fff 24%,
    #EFE3F3 52%,
    #D9D2EE 76%,
    #C9E3F2 100%
  );
  color: var(--ink);
  animation: fade-in 1.5s ease-out;
}

@keyframes fade-in {
  from { 
    opacity: 0;
    transform: translateY(20px); }
  to   { 
    opacity: 1;
    transform: translateY(0); }
}


/* Faint circuit pattern, fading in from the left */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/pattern-hero.svg") 0 0 / 360px 360px;
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 62%);
  mask-image: linear-gradient(100deg, transparent 18%, #000 62%);
  pointer-events: none;
}

/* Keeps the content above the ::before pattern */
.hero .container {
  position: relative;
}

/* Two columns: text on the left, illustration on the right */
.hero > .container {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  width: 100%;
  flex: 1;
  align-content: center;
}

.hero-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  text-align: left;  
}

/* Illustration above the main title */
.hero-main .hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.hero-main .hero-art img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 50vh;
  height: auto;
  object-fit: contain;
}

.hero-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  text-align: left;  
}

/* Illustration above the main title */
.hero-main .hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.hero-main .hero-art img {
  display: block;
  width: 100%;
  max-width: 400px;
  max-height: 32vh;
  height: auto;
  object-fit: contain;
}

.hero h1 {
  color: var(--purple);
  font-size: clamp(30px, 5vw, 42px);
  margin-bottom: 28px;
}

/* Description text: right column on desktop */
.hero .hero-text {
  max-width: 46ch;
  font-size: 19px;
  margin: 0;
  justify-self: end;
  color: #3d3d42;
}

.hero .btn.ghost {
  box-shadow: inset 0 0 0 2px var(--purple);   /* purple outline */
}

/* Tangerine font for the main hero title*/

.tangerine-bold {
  font-family: "Purple Purse", serif;
  font-weight: 500;
  font-style: normal;
}


/* ==========================================================================
   5. SECTIONS (shared) & CARDS
   ========================================================================== */

section {
  padding: 72px 0;
}

/* Tinted sections (News, Join us): light purple + faint circuit pattern */
section.section-tinted {
  background: url("assets/pattern-section.svg") 0 0 / 360px 360px, var(--tint);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Horizontal scroll row (Events, News) with Netflix-style arrows.
   .carousel-track scrolls sideways, the arrows are added by script.js logic. */
.carousel {
  position: relative;
}

.carousel[hidden] {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;          /* room for focus outlines */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;         /* hide the scrollbar (Firefox) */
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}

.carousel-track::-webkit-scrollbar {
  display: none;                 /* hide the scrollbar (Chrome, Safari) */
}

.carousel-track > .card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.carousel-track .card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-track .card > p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pop-up with the full article */
.article-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: 85vh;
  padding: 32px 28px 28px;
  border: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  overflow-y: auto;
}

.article-dialog::backdrop {
  background: rgba(0, 0, 0, .55);
}

.article-dialog h3 {
  margin: 6px 0 16px;
}

.article-body p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.6;
}

.article-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: var(--purple);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body:has(.article-dialog[open]) {
  overflow: hidden;   /* page behind the pop-up does not scroll */
}

/* Message shown when a list has no items */
.empty-message {
  flex: 1;
  margin: 0;
  padding: 24px 0;
  color: var(--gray);
  font-size: 16px;
}

/* "All news": the row turns into a grid that shows every item (see script.js) */
.carousel.is-expanded .carousel-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  overflow: visible;
}

.carousel.is-expanded .carousel-btn {
  display: none;
}

.carousel.is-expanded .carousel-track > .card {
  flex: none;
}

/* Back / forward arrows, centered vertically over the edges of the row */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  margin-right: -23px;
  margin-left: -23px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  cursor: pointer;
  opacity: 1;            /* always visible, no hover needed */
  transition: opacity .2s, background .2s;
}

.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }

.carousel-btn svg {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
}

.carousel-btn:hover {
  background: var(--blue);
}

/* Everything fits on screen: no arrows (script.js adds .is-scrollable when needed) */
.carousel:not(.is-scrollable) .carousel-btn {
  display: none;
}

/* Nothing more to scroll in that direction: the arrow fades out */
.carousel-btn:disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 760px) {
  .carousel-track > .card { flex-basis: 78%; }
  .carousel-btn { width: 38px; height: 38px; }
  .carousel-prev { left: -6px; }
  .carousel-next { right: -6px; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-tinted .card {
  border-color: transparent;
}

.card p {
  margin: 0;
  color: #4a4a4f;
  font-size: 15px;
}

.card-date {
  font-weight: 700;
  color: var(--blue);
  font-size: 15px;
}

.card .card-link {
  margin-top: auto;   /* keeps the link at the bottom of the card */
  font-weight: 600;
  font-size: 15px;
}

/* Placeholder image at the top of a card (replace with a real photo later).
   Purple gradient with a blue diagonal stripe and a cut bottom-left corner. */
.placeholder-img {
  height: 130px;
  margin: -22px -22px 6px;
  background:
    linear-gradient(135deg, transparent 0 62%, var(--blue) 62% 74%, transparent 74%),
    linear-gradient(135deg, var(--purple), #a45bb0);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.section-note {
  font-size: 14px;
  color: var(--gray);
  margin-top: 18px;
}


/* ==========================================================================
   6. EVENTS
   Tabs switch between the "upcoming" and "past" lists (see script.js).
   ========================================================================== */

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tabs button {
  border-radius: 999px;
  font: 600 15px "Open Sans", sans-serif;
  padding: 10px 20px;
  border: 2px solid var(--purple);
  background: #fff;
  color: var(--purple);
  cursor: pointer;
}

/* Active tab */
.tabs button[aria-selected="true"] {
  background: var(--purple);
  color: #fff;
}


/* ==========================================================================
   7. NEWS
   Uses the shared .carousel and .card styles (section 5).
   ========================================================================== */


/* ==========================================================================
   8. ABOUT US
   ========================================================================== */

/* Block titles inside About us: What We Do / Why Join Us? / Our Vision */
.about-block {
  margin-top: 64px;
}

.about-block:first-of-type {
  margin-top: 0;
}

.about-heading {
  font-size: clamp(24px, 3.5vw, 30px);
  margin-bottom: 12px;
}

/* Heading with an icon on its left (used by "Our Vision") */
.about-heading-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-heading-icon svg {
  width: 44px;
  height: 44px;
  flex: none;
  fill: none;
  stroke: currentColor;   /* same purple as the heading text */
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-intro {
  max-width: 70ch;
  margin: 0 0 24px;
}

/* "What We Do": four illustrated cards with a purple top edge */
.feature-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  border-left: 2px solid var(--purple);
  border-right: 2px solid var(--purple);
  padding: 20px;
}

/* Illustration at the top of each card.
   The images are cropped to their content; object-fit keeps their proportions. */
.feature-icon {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--purple);
  margin: 16px 0 8px;
}

.feature p {
  margin: 0;
  font-size: 15px;
  color: #4a4a4f;
}

/* "Why Join Us?": light purple panel with a cut bottom-right corner */
.why-panel {
  background: var(--tint);
  padding: 32px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}

.perks {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.perk {
  border-top: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
  padding-top: 14px;
  padding-bottom: 14px;
  padding-left: 14px;
  padding-right: 14px;
}

.perk-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--purple);
  margin: 0 0 6px;
}

.perk p {
  margin: 0;
  font-size: 15px;
}

/* "Our Vision": large statement with a purple bar on the left */
.vision {
  max-width: 60ch;
  margin: 0;
  padding: 6px 0 6px 24px;
  border-left: 6px solid var(--purple);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 300;
  line-height: 1.4;
  color: var(--purple);
}

/* Team members */
.team {
  margin-top: 64px;
}

.team-title {
  margin-bottom: 18px;
}

.team-subtitle {
  margin: 28px 0 16px;
  color :var(--purple);
}

.team-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.person {
  text-align: left;
  color:var(--purple);
}

/* Photo placeholder with a cut bottom-right corner */
.person .avatar {
  aspect-ratio: 1;
  background: var(--line);
  margin-bottom: 10px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
  width: 150px; /* Ρύθμισε το μέγεθος ανάλογα με το design σου */
  height: 150px;
  border-radius: 50%; /* Ή 8px/12px αν θέλεις τετράγωνο με στρογγυλεμένες γωνίες */
  object-fit: cover; /* Εξασφαλίζει ότι η εικόνα γεμίζει το πλαίσιο χωρίς να παραμορφώνεται */
  display: block;

}

/* Alt κείμενο μέσα στο frame όταν η φωτογραφία λείπει */
.person .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 18px;
  text-align: center;
  overflow: hidden;
}

.person .avatar-fallback span {
  display: block;
  color: var(--purple);
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.person b {
  display: block;
}

.person span {
  color: var(--gray);
  font-size: 15px;
}

.linkedin-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 22px;
  height: 22px;
  margin-top: 6px;
  margin-bottom: 20px;
  color:#fff;
  background-color: #0a66c2;
  border-radius: 4px;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;

}

.linkedin-link:hover, .linkedin-link:focus-visible {
  transform: translateY(-2px);
  background-color: #004182;
  color: #fff;
}

.linkedin-link svg {
  display: block;
  width:16px;
  height:16px;
  fill: currentColor;
}


/* ==========================================================================
   9. JOIN US (benefits list + form)
   ========================================================================== */

.join-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.benefits-list {
  padding-left: 20px;
  margin: 0;
}

.benefits-list li {
  margin-bottom: 8px;
}



/* Google Form embed: fluid card, works on desktop and mobile */
.join-grid > * {
  min-width: 0;            /* lets grid columns shrink instead of overflowing */
}

.google-form-container {
  width: 100%;
  max-width: 640px;
  justify-self: end;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(119, 37, 131, 0.10);
  overflow: hidden;
}

.google-form-container iframe {
  display: block;
  width: 100%;
  height: clamp(480px, 70vh, 620px);   /* the rest of the form scrolls inside */
  border: 0;
}


/* ==========================================================================
   10. FAQs
   Accordion built on <details>/<summary>; no JavaScript needed.
   ========================================================================== */

details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  max-width: 780px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  color: var(--purple);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

summary::-webkit-details-marker {
  display: none;   /* hides the default arrow in Safari */
}

/* "+" when closed, "–" when open */
summary::after {
  content: "+";
  font-size: 26px;
  line-height: 1;
  color: var(--blue);
}

details[open] summary::after {
  content: "–";
}

details p {
  margin: 12px 0 0;
  max-width: 62ch;
}


/* ==========================================================================
   11. FOOTER
   ========================================================================== */

footer {
  background: var(--purple);
  color: #fff;
  padding: 44px 0;
  
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}

/* Tagline in the Bitcount Ink font (loaded in the <head> of index.html) */
.footer-tagline {
  width: 100%;
  margin: 0;
  font-family: "Purple Purse", serif;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
  font-variation-settings:
    "slnt" 0,
    "CRSV" 0.5,
    "ELSH" 0,
    "ELXP" 0,
    "SZP1" 0,
    "SZP2" 0,
    "XPN1" 0,
    "XPN2" 0,
    "YPN1" 0,
    "YPN2" 0;
  font-size: clamp(26px, 6vw, 46px);
  line-height: 1.2;
  color: #fff;
}

.footer-logos {
  display: flex;
  gap: 28px;
  align-items: center;
}

.footer-logos .logo-wie {
  width: 110px;
}

/* The university logo is purple, so it sits on a small white plate */
.footer-logos .logo-uom {
  width: 76px;
  padding: 6px;
  background: #fff;
  border-radius: 8px;
}

.footer-logos .logo-ieee {
  width: 150px;
  padding: 6px;
  border-radius: 8px;
  height: auto;
}

/* Social media icon buttons: white with a purple icon */
/* Title above the social buttons */
.footer-social-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* Social media icon buttons: white circles with a purple icon */
.social-links {
  display: flex;
  gap: 40px;
}

.social-links a {
  width: 46px;
  height: 46px;
  display: grid;
  border-radius: 20%;   /* fully round; use e.g. 14px for rounded squares */
  place-items: center;
  background: #fff;
  color: var(--purple);
}

.social-links a:hover {
  background: var(--tint);
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer-note {
  width: 100%;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.footer-note a {
  color: #fff;
}

.copyright{
  width: 100%;
  margin:10px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

/* ==========================================================================
   Horizontal carousels (Events + News)  -  Netflix style
   The cards sit in one row. There is no scrollbar: the arrows on the sides
   move the row back/forward (the arrows are added by enhancements.js).
   Swiping, trackpad and keyboard arrows still work.
   ========================================================================== */

.carousel {
  position: relative;
}

.grid.scroll-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                /* Firefox: no scrollbar */
  -ms-overflow-style: none;
}

.grid.scroll-row::-webkit-scrollbar {
  display: none;                        /* Chrome / Safari / Edge: no scrollbar */
}

/* The [hidden] attribute must still win over display: flex (Past events tab) */
.grid.scroll-row[hidden] {
  display: none;
}

.grid.scroll-row > .card {
  flex: 0 0 min(300px, 82%);
  scroll-snap-align: start;
}

/* Arrow buttons: full-height purple fades on the left / right edge */
.carousel-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgba(119, 37, 131, 0.78);   /* translucent purple bar, like Netflix's dark one */
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(119, 37, 131, 0.95);
}

.carousel-btn--prev {
  left: 0;
}

.carousel-btn--next {
  right: 0;
}

.carousel-btn svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

/* Like Netflix: the arrows appear when the pointer is over the row */
.carousel:hover .carousel-btn,
.carousel:focus-within .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover svg {
  transform: scale(1.3);
}

/* Touch screens have no hover, so the arrows are always visible (a bit narrower) */
@media (hover: none) {
  .carousel-btn {
    opacity: 1;
    width: 34px;
  }
}


/* ==========================================================================
   Subteams  -  timeline (About us)
   A vertical line in the middle, a round icon on it for every subteam and
   the cards alternating left / right (like the news timeline).
   ========================================================================== */

.timeline {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 4px 0;
}

/* The vertical line */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  border-radius: 2px;
  background: #d3e0ea;
}

.tl-item {
  --tl-accent: var(--purple);
  position: relative;
  width: 50%;
  padding-right: 56px;          /* space for the icon and the arrow */
  margin-bottom: 40px;
}

.tl-item:nth-child(2) { --tl-accent: var(--blue); }
.tl-item:nth-child(3) { --tl-accent: var(--lightpurple); }

.tl-item:last-child {
  margin-bottom: 0;
}

/* Every second card goes to the right side */
.tl-item:nth-child(even) {
  margin-left: 50%;
  padding-right: 0;
  padding-left: 56px;
}

/* Round icon, centered on the line */
.tl-icon {
  position: absolute;
  top: 0;
  right: -24px;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tl-accent);
  box-shadow: 0 0 0 5px #fff, 0 2px 10px rgba(0, 0, 0, 0.22);
}

.tl-item:nth-child(even) .tl-icon {
  right: auto;
  left: -24px;
}

.tl-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* The card */
.tl-card {
  position: relative;
  padding: 24px 28px 26px;
  background: #f0f0f0;
  border-bottom: 3px solid #c9c9c9;
  box-shadow: 0 2px 8px rgba(43, 43, 46, 0.08);
}

/* Little arrow pointing to the line */
.tl-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #f0f0f0;
}

.tl-item:nth-child(even) .tl-card::after {
  right: auto;
  left: -10px;
  border-left: 0;
  border-right: 10px solid #f0f0f0;
}

.tl-card h4 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--purple);
}

.tl-card p {
  margin: 0;
  font-size: 15px;
  color: #4a4a4f;
}

/* Mobile: line on the left, all cards on the right of it */
@media (max-width: 760px) {
  .timeline::before {
    left: 24px;
  }

  .tl-item,
  .tl-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 68px;
    padding-right: 0;
  }

  .tl-icon,
  .tl-item:nth-child(even) .tl-icon {
    left: 0;
    right: auto;
  }

  .tl-item .tl-card::after,
  .tl-item:nth-child(even) .tl-card::after {
    right: auto;
    left: -10px;
    border-left: 0;
    border-right: 10px solid #f0f0f0;
  }
}


/* ==========================================================================
   Screen sizes (responsive scaling)

   --u is the "size unit". It is 1px on phones, tablets and laptops up to
   1366px wide, and grows smoothly on bigger screens (about 1.2px at 1920px,
   1.5px at 2560px). Every size written as calc(N * var(--u)) scales with it,
   so text, images, logos and spacing grow together on big screens.
   Only the screens wider than 760px are touched here; phones keep the
   rules of the MOBILE section.
   ========================================================================== */

:root {
  --u: clamp(1px, calc(0.45px + 100vw / 2480), 2.2px);
}

/* Team: centered rows, so 3 or 4 people always sit in the middle (all screens) */
.team-title {
  text-align: start;
}

.team-subtitle {
  text-align: center;
}

.grid.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 16px;
}

.team-grid .person {
  flex: 0 1 150px;
  text-align: center;
}

.person .avatar {
  margin: 0 auto 12px;
}



@media (min-width: 761px) {

  /* Content width: wider than before, so there is less empty space at the sides */
  .container {
    max-width: clamp(1080px, 90vw, 2200px);
    padding: 0 calc(20 * var(--u));
  }

  /* Base text */
  body { font-size: calc(17 * var(--u)); }
  h2 { font-size: clamp(30px, 5vw, calc(42 * var(--u))); margin-bottom: calc(28 * var(--u)); }
  h3 { font-size: calc(20 * var(--u)); }
  section { padding: calc(72 * var(--u)) 0; }

  .btn { font-size: calc(16 * var(--u)); padding: calc(14 * var(--u)) calc(26 * var(--u)); }

  /* Header: bigger logos */
  .site-header { gap: calc(18 * var(--u)); padding: calc(14 * var(--u)) calc(20 * var(--u)); }
  .site-header .logo-wie,
  .site-header .logo-uom { width: calc(100 * var(--u)); height: calc(100 * var(--u)); }
  .site-header .brand-name { font-size: calc(20 * var(--u)); }
  .site-header .brand-name span { font-size: calc(18 * var(--u)); }
  .nav-menu a { font-size: calc(15 * var(--u)); padding: calc(14 * var(--u)) 0; }

  /* Hero: bigger picture and text */
  .hero { padding-bottom: calc(88 * var(--u)); }
  .hero > .container { margin-top: calc(36 * var(--u)); gap: calc(40 * var(--u)); }
  .hero h1 { font-size: clamp(30px, 5vw, calc(42 * var(--u))); margin-bottom: calc(28 * var(--u)); }
  .hero .hero-text { font-size: calc(19 * var(--u)); margin-right: clamp(0px, 4vw, calc(50 * var(--u))); }
  .hero-main .hero-art { margin-bottom: calc(20 * var(--u)); }
  .hero-main .hero-art img { max-width: calc(640 * var(--u)); max-height: 52vh; }

  /* Cards (Events, News) */
  .carousel-track { gap: calc(20 * var(--u)); }
  .carousel-track > .card { flex-basis: calc(300 * var(--u)); }
  .card { padding: calc(22 * var(--u)); gap: calc(10 * var(--u)); }
  .card p,
  .card-date,
  .card .card-link { font-size: calc(15 * var(--u)); }
  .placeholder-img {
    height: calc(130 * var(--u));
    margin: calc(-22 * var(--u)) calc(-22 * var(--u)) calc(6 * var(--u));
  }

  /* About us */
  .about-block { margin-top: calc(88 * var(--u)); }
  .about-heading,
  .team-title { font-size: clamp(24px, 3.5vw, calc(30 * var(--u))); }
  .about-heading-icon svg { width: calc(44 * var(--u)); height: calc(44 * var(--u)); }
  .feature-grid { gap: calc(20 * var(--u)); }
  .feature { padding: calc(22 * var(--u)); }
  .feature-icon { height: calc(150 * var(--u)); }
  .feature-title,
  .perk-title { font-size: calc(18 * var(--u)); }
  .feature p,
  .perk p { font-size: calc(15 * var(--u)); }
  .why-panel { padding: calc(32 * var(--u)); }
  .perks { gap: calc(24 * var(--u)); }
  .perk { padding: calc(14 * var(--u)); }
  .vision { font-size: clamp(20px, 3vw, calc(26 * var(--u))); }

  /* Team */
  .team { margin-top: calc(88 * var(--u)); }
  .team-subtitle { font-size: calc(20 * var(--u)); margin: calc(28 * var(--u)) 0 calc(16 * var(--u)); }
  .grid.team-grid { gap: calc(36 * var(--u)) calc(56 * var(--u)); }
  .team-grid .person { flex-basis: calc(230 * var(--u)); }
  .person .avatar { width: calc(150 * var(--u)); height: calc(150 * var(--u)); }
  .person b { font-size: calc(18 * var(--u)); }
  .person span { font-size: calc(16 * var(--u)); }
  .linkedin-link { width: calc(26 * var(--u)); height: calc(26 * var(--u)); }
  .linkedin-link svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }

  /* Join us */
  .join-grid { gap: calc(40 * var(--u)); }
  .google-form-container { max-width: calc(640 * var(--u)); }
  .google-form-container iframe { height: clamp(480px, 70vh, calc(620 * var(--u))); }

  /* FAQs */
  details { max-width: calc(900 * var(--u)); padding: calc(18 * var(--u)) 0; }
  summary { font-size: calc(18 * var(--u)); }
  summary::after { font-size: calc(26 * var(--u)); }

  /* Footer */
  footer { padding: calc(44 * var(--u)) 0; }
  .footer-tagline { font-size: clamp(26px, 6vw, calc(46 * var(--u))); }
  .footer-logos { gap: calc(28 * var(--u)); }
  .footer-logos .logo-wie { width: calc(110 * var(--u)); }
  .footer-logos .logo-uom { width: calc(76 * var(--u)); padding: calc(6 * var(--u)); }
  .footer-logos .logo-ieee { width: calc(150 * var(--u)); }
  .footer-social-title { font-size: calc(18 * var(--u)); }
  .social-links { gap: calc(40 * var(--u)); }
  .social-links a { width: calc(46 * var(--u)); height: calc(46 * var(--u)); }
  .social-links svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
  .footer-note { font-size: calc(14 * var(--u)); }
  .copyright { font-size: calc(12 * var(--u)); }
}

/* Laptops with a low screen (e.g. 1366x768): less vertical space, same sizes */
@media (min-width: 761px) and (max-height: 800px) {
  .hero { padding-bottom: calc(48 * var(--u)); }
  .hero > .container { margin-top: calc(12 * var(--u)); }
  .hero-main .hero-art img { max-height: 42vh; }
  .hero h1 { margin-bottom: calc(18 * var(--u)); }
}

/* Phones: footer logos wrap instead of pushing the page wider than the screen */
@media (max-width: 760px) {
  .footer-logos { flex-wrap: wrap; gap: 16px 22px; }
  .footer-logos .logo-ieee { width: 110px; }
}

/* Tablets / small laptops */
@media (min-width: 761px) and (max-width: 1000px) {
  .hero > .container { gap: 24px; }
  .hero .hero-text { font-size: 17px; }
  .nav-menu { gap: 0 16px; }
}

/* ==========================================================================
   12. MOBILE (max-width: 760px)
   Kept at the end of the file so these rules override the ones above.
   ========================================================================== */

@media (max-width: 760px) {
  /* Form: full width; fixed height, the rest scrolls inside the form */
  .google-form-container {
    max-width: none;
    justify-self: stretch;
    border-radius: 8px;
  }

  .google-form-container iframe {
    height: 70vh;
    min-height: 440px;
    max-height: 560px;
  }
  /* Two-column layouts become one column */
  .join-grid {
    grid-template-columns: 1fr;
  }

  .hero > .container {
  grid-template-columns: 1fr;
  gap: 28px;
}

/* Hide illustration on mobile */
.hero-art {
  display: none;
}

  

  /* Mobile order: title, description, buttons.
     The left column dissolves so its children can be reordered with the text. */
  .hero-main {
    display: contents;
  }

  .hero-main h2 {
    order: 1;
  }

  .hero .hero-text {
    order: 2;
    justify-self: start;
    max-width: none;
    font-size: 17px;
  }

  .hero-buttons {
    order: 3;
  }

  /* Header: smaller logos and name so all three fit in one row */
  .site-header {
    gap: 10px;
    padding: 10px 14px;
  }

  .site-header .logo-wie,
  .site-header .logo-uom {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }

  .site-header .brand-name {
    font-size: 15px;
    min-width: 0;
  }

  .site-header .brand-name span {
    font-size: 12px;
  }

  /* Hero: illustration hidden, less padding */
  .hero-art {
    display: none;
  }

  .hero {
    padding: 0 0 64px;
  }

  section {
    padding: 52px 0;
  }

  .btn.ghost {
    margin: 12px 0 0;
  }

    /* Navigation: the links hide behind a button with three lines */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    margin: 8px 0;
    padding: 0 10px;
    background: #fff;
    border: 2px solid var(--purple);
    border-radius: 12px;
    cursor: pointer;
  }

  .nav-toggle-bar {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: var(--purple);
    transition: transform 0.2s, opacity 0.2s;
  }

  /* While the menu is open, the three lines turn into an X */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Menu: hidden until the button adds the "is-open" class (see script.js) */
  .nav-menu {
    display: none;
    flex-direction: column;
    padding-bottom: 10px;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(119, 37, 131, 0.15);
  }

  .nav-menu a:hover,
  .nav-menu a:focus-visible {
    box-shadow: none;
    color: var(--blue);
  }
}


/* ==========================================================================
   13. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

    .nav-toggle-bar {
    transition: none;
  }
}

/* ==========================================================================
   EMAIL ICON MENU (built by script.js)
   ========================================================================== */

.email-menu {
  position: absolute;
  z-index: 50;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

.email-menu[hidden] {
  display: none;
}

.email-menu a,
.email-menu button {
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--purple);
  font: 600 15px "Open Sans", sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.email-menu a:hover,
.email-menu button:hover {
  background: var(--tint);
}
 
/* ==========================================================================
   SCROLL ANIMATIONS (set up by script.js)
   Everything is scoped under .has-reveal, which script.js adds only when the
   animations can run, so without JavaScript nothing is hidden.
   ========================================================================== */

/* Elements that slide in from the side must not create a sideways scrollbar */
body {
  overflow-x: clip;
}

.has-reveal .reveal {
  opacity: 0;
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.has-reveal .reveal[data-reveal="up"]    { transform: translateY(28px); }
.has-reveal .reveal[data-reveal="left"]  { transform: translateX(-36px); }
.has-reveal .reveal[data-reveal="right"] { transform: translateX(36px); }
.has-reveal .reveal[data-reveal="zoom"]  { transform: translateY(18px) scale(0.94); }

.has-reveal .reveal[data-reveal="pop"] {
  transform: scale(0.5);
  transition-duration: 0.6s, 0.6s;
  transition-timing-function: ease, cubic-bezier(0.34, 1.56, 0.64, 1);   /* small bounce */
}

/* Mobile: the timeline cards are all on one side, so they rise instead of sliding */
@media (max-width: 760px) {
  .has-reveal .tl-item.reveal[data-reveal="left"],
  .has-reveal .tl-item.reveal[data-reveal="right"] {
    transform: translateY(28px);
  }
}

/* Final state (must stay after the rules above) */
.has-reveal .reveal[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .has-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

