/* Google Fonts are loaded via <link> tags in HTML to avoid CORB warnings */
/* @import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap&subset=greek,greek-ext,latin,latin-ext"); */
/* @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Greek:wght@400;500;600;700&display=swap"); */
/* @import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&subset=greek&display=swap"); */

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    background: url('../images/Background_final.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed; 
    min-height: var(--viewport-min-height, 100vh);
    
}

.hidden {
    display: none !important;
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to right, #020617, #1e3a8a, #020617);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

header::after {
  content: "";
  position: absolute;
  bottom: 0; 
  left: 0;
  width: 100%;
  height: 0;
  background: transparent;
  box-shadow: none;
}



.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flame-icon-wrapper {
    position: relative;
}

.flame-glow {
    position: absolute;
    inset: 0;
    background: url('../images/Background_final.png');
    border-radius: 50%;
    filter: blur(16px);
    opacity: 0.5;
}

.flame-icon {
    position: relative;
    color: #3b82f6;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8));
}

.logo-text {
    font-size: 1.875rem;
    background: linear-gradient(to right, #60a5fa, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #93c5fd;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.mobile-menu-btn:hover {
    color: #ffffff;
}

.desktop-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.desktop-nav a,
.mobile-nav a {
    color: #bfdbfe;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #ffffff;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8));
}

.mobile-nav {
    padding: 1rem 0;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Team Section */
.team-section {
    position: relative;
    padding: 4rem 0;
    overflow: visible;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    
}

.bg-radial {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(30, 58, 138, 0.2), transparent);
}

.container {
    position: relative;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    z-index: 10;
    overflow: visible;
}

/* Team section needs wider container for 4-column grids */
.team-section .container {
    max-width: 1680px;
    padding: 0 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .team-section .container {
        padding: 0 1rem;
        max-width: 100%;
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

@media (max-width: 480px) {
    .team-section .container {
        padding: 0 0.75rem;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.title-underline {
    height: 4px;
    width: 8rem;
    background: linear-gradient(to right, #3b82f6, #06b6d4, #2563eb);
    margin: 0 auto;
    border-radius: 9999px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Team section - prevent horizontal overflow */
.team-section {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* Subsection with proper spacing */
.subsection {
    margin-bottom: 6rem;
    overflow: visible;
    max-width: 100%;
}

.subsection:last-child {
    margin-bottom: 2rem;
}

.subsection-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 100%;
}

.subsection-title {
    font-size: 2rem;
    background: linear-gradient(to right, #60a5fa, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    font-weight: 700;
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    text-align: center;
}

.subsection-underline {
    height: 2px;
    width: 12rem;
    background: linear-gradient(to right, transparent, #3b82f6, transparent);
    margin: 1rem auto 0;
    border-radius: 9999px;
}

/* Cards Grid with proper spacing */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    justify-items: center;
    align-items: start;
    overflow: visible;
    max-width: 100%;
}

/* Scientific Committee - 3 cards per row on desktop */
#scientificGrid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    margin: 0 auto;
    gap: 2.5rem;
}

/* Legal/Regulatory Support - 3 cards per row on desktop */
#legalRegulatoryGrid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    margin: 0 auto;
    gap: 2.5rem;
}

/* Administrative Support - 3 cards per row on desktop */
#administrativeGrid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    margin: 0 auto;
    gap: 2.5rem;
}

/* 4-column grid (Implementation Team only) - same card size as others */
.cards-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Founder - 1 card centered directly under title "Ιδρύτρια - CEO" */
.founder-subsection {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.founder-grid {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

.founder-grid .team-card {
    flex: 0 0 auto;
    min-width: min(320px, calc(100% - 2rem));
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 400px) {
    .founder-grid .team-card {
        min-width: 0;
    }
}

.founder-grid .member-name {
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

.founder-grid .member-position {
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
}

/* Team Card Flip Styles */
.team-card {
    height: 620px;
    width: 100%;
    max-width: 380px;
    min-width: 0;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.card-container {
    position: relative;
    width: 100%;
    height: 620px;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    overflow: visible;
    pointer-events: auto;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 620px;
    -webkit-transition: transform 0.6s ease;
    transition: transform 0.6s ease;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    border-radius: 1.5rem;
    overflow: visible;
    pointer-events: auto;
}

.card-inner.is-flipped {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 620px;
    border-radius: 1.5rem;
    overflow: hidden;
    max-width: 100%;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    pointer-events: auto;
}

.card-front {
    background: url('../images/Background_final.png');
    -webkit-transform: rotateY(0deg);
    transform: rotateY(0deg);
}

.card-back {
    background: url('../images/Background_final.png');
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.flip-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
    font-family: inherit;
    pointer-events: auto;
}

.flip-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Front Card Content */
.card-front-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    padding-bottom: 3rem; /* Space for flip button */
    min-width: 0; /* Allow flex children to shrink */
    overflow: hidden;
}


.card-gradient-overlay {
    position: absolute;
    inset: 0;
    background: url('../images/Background_final.png');
    opacity: 0.5;
    pointer-events: none;
}

.card-image-section {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.image-glow {
    position: absolute;
    inset: 0;
    background: url('../images/Background_final.png');
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.5;
    transition: opacity 0.3s;
    pointer-events: none;
}

.team-card:hover .image-glow {
    opacity: 0.75;
}

.image-container {
    position: relative;
    width: 256px;
    height: 256px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-info {
    position: relative;
    text-align: center;
    z-index: 10;
    min-width: 0;
    hyphens: none;
}

.member-name {
    color: #ffffff;
    font-size: 1.875rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    word-break: break-word;
    overflow-wrap: break-word;
}

.member-position {
    color: #93c5fd;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
    word-break: normal !important;
    overflow-wrap: break-word;
    hyphens: none !important;
    -webkit-hyphens: none !important;
}

.info-divider {
    height: 4px;
    width: 4rem;
    background: linear-gradient(to right, #3b82f6, #06b6d4, #2563eb);
    margin: 0 auto;
    border-radius: 9999px;
}

/* Back Card Content */
.card-back-content {
    position: relative;
    height: 100%;
    padding: 2rem;
    padding-bottom: 3rem; /* Space for flip button */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.back-decorative-1,
.back-decorative-2 {
    position: absolute;
    width: 256px;
    height: 256px;
    border-radius: 50%;
    filter: blur(80px);
}

.back-decorative-1 {
    top: 0;
    right: 0;
    background: url('../images/Background_final.png');
}

.back-decorative-2 {
    bottom: 0;
    left: 0;
    background: url('../images/Background_final.png');
}

.back-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.4);
    pointer-events: none;
}

.back-header {
    position: relative;
    margin-bottom: 1.5rem;
}

.back-name {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    word-break: break-word;
    overflow-wrap: break-word;
}

.back-position {
    color: #bfdbfe;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
}

.back-divider {
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.5), rgba(6, 182, 212, 0.5), transparent);
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.back-bio-section {
    position: relative;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0;
    padding-bottom: 0.5rem;
}

.back-bio-section::-webkit-scrollbar {
    width: 10px;
}

.back-bio-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.back-bio-section::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.6);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.back-bio-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.8);
}

.member-bio {
    color: #f3f4f6;
    font-size: 1rem;
    line-height: 1.75;
    word-break: break-word;
    overflow-wrap: break-word;
}

.social-links {
    position: relative;
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.social-link {
    color: #93c5fd;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.social-icon {
    width: 22px;
    height: 22px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
    transition: all 0.3s;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.7);
}

/* Prevent tooltip from overlapping with Flamey */
.back-to-top::before,
.back-to-top::after {
    display: none !important;
    content: none !important;
}

/* Remove tooltip completely */
.back-to-top[title],
.back-to-top[aria-label] {
    pointer-events: auto;
}

/* Hide any tooltip text */
.back-to-top[title]:hover::before,
.back-to-top[aria-label]:hover::before {
    display: none !important;
    content: none !important;
}

/* Ensure back-to-top doesn't overlap with chat toggle */
@media (max-width: 767px) {
    .back-to-top {
        left: 1rem;
        bottom: 6rem;
    }
}

.main-header {
  padding: 1rem 2rem;
  border-bottom: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  position: relative;
  z-index: 100;
  max-width: 100%;
  overflow-x: hidden;
}

.main-header::after,
.main-header::before {
  display: none !important;
  content: none !important;
  height: 0 !important;
  width: 0 !important;
}

header.main-header {
  border-bottom: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

header.main-header::after,
header.main-header::before {
  display: none !important;
  content: none !important;
  height: 0 !important;
  width: 0 !important;
}

.main-header .header-container {
  max-width: min(1400px, 100%);
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  border: none !important;
  border-bottom: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.main-header .header-container::after,
.main-header .header-container::before {
  display: none !important;
  content: none !important;
}

.main-header .logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.main-header .header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.main-header .lang-switcher {
  background: rgba(155, 93, 255, 0.2);
  border: 1px solid rgba(155, 93, 255, 0.4);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.main-header .lang-switcher:hover {
  background: rgba(155, 93, 255, 0.3);
  transform: translateY(-2px);
}

.main-header .lang-switcher:active {
  transform: translateY(0);
}

.main-header .lang-switcher:focus-visible {
  outline: 3px solid rgba(120, 200, 255, 0.95);
  outline-offset: 3px;
  border-radius: 14px;
}

.main-header .lang-switcher .lang-flag {
  width: 1.25em;
  height: auto;
  vertical-align: middle;
  margin-right: 0.35em;
}

/* Login / Signup / Logout buttons - shared across all pages with header */
.main-header .btn-login {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.625rem 1.25rem;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.9375rem;
  will-change: transform, box-shadow;
}

.main-header .btn-login:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.main-header .btn-login:focus-visible {
  outline: 3px solid rgba(120, 200, 255, 0.95);
  outline-offset: 3px;
  border-radius: 14px;
}

.main-header .btn-signup {
  background: linear-gradient(135deg, #39F2FF 0%, #9B5DFF 100%);
  border: none;
  border-radius: 8px;
  padding: 0.625rem 1.25rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(57, 242, 255, 0.4),
              0 0 15px rgba(155, 93, 255, 0.3);
  font-size: 0.9375rem;
  will-change: transform, box-shadow;
}

.main-header .btn-signup:hover {
  transform: translate3d(0, -4px, 0) scale(1.05);
  box-shadow: 0 10px 30px rgba(57, 242, 255, 0.6),
              0 0 25px rgba(155, 93, 255, 0.5);
}

.main-header .btn-signup:focus-visible {
  outline: 3px solid rgba(120, 200, 255, 0.95);
  outline-offset: 3px;
  border-radius: 14px;
}

.main-header #logoutBtn {
  background-color: #9B5DFF;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.main-header #logoutBtn:hover {
  background-color: #8B4DFF;
}

.main-header #logoutBtn:focus-visible {
  outline: 3px solid rgba(120, 200, 255, 0.95);
  outline-offset: 3px;
  border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .main-header .lang-switcher:hover {
    transform: none !important;
  }
  .main-header .btn-login:hover,
  .main-header .btn-signup:hover {
    transform: none !important;
  }
}

.main-header .logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem; /*0.4rem*/
  font-weight: 300;
  text-decoration: none;
  color: rgb(212, 207, 223);
}

.main-header .logo h4 {
  font-family: var(--font-secondary);
  font-size: 1.25rem; /*1rem*/
  font-weight: 500;
  margin: 0;
}

.main-header .logo img {
  height: 100px;
}

.main-header .logo-text {
  display: block;
  font-size: 0.85rem;
  color: rgb(212, 207, 223);
  line-height: 1.5;
  margin-top: 0.25rem;
  width: 100%;
  font-family: "Noto Sans", "Noto Sans Greek", "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  font-variant-ligatures: normal;
  letter-spacing: normal;
  font-variant: normal;
}

.main-header .logo-text p {
  font-size: 0.85rem;
  margin: 0;
  white-space: normal;
  display: block;
  font-family: "Noto Sans", "Noto Sans Greek", "Inter", system-ui, -apple-system, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  letter-spacing: 0.01em;
}

.main-header .logo-text span {
  font-family: "Noto Sans", "Noto Sans Greek", "Inter", system-ui, -apple-system, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main-header .buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.main-header .btn-secondary a  {
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 300;
  color: rgb(255, 255, 255);
  background: rgba(255, 255, 255, 0.044);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.092);
  transition: background 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05)
}

.main-header .buttons a:hover {
  background: rgba(255, 255, 255, 0.2);
}
#langBtn {
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 300;
  color: rgb(255, 255, 255);
  background: rgba(255, 255, 255, 0.044);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.092);
  transition: background 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer; /* για να φαίνεται clickable */
}

#langBtn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.main-header .burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 30px;
  height: 22px;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 1001;
}

.main-header .burger div {
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.main-header .burger.open div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.main-header .burger.open div:nth-child(2) {
  opacity: 0;
}
.main-header .burger.open div:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.main-header .mobile-nav {
  position: absolute;
  top: 100%;
  right: 2rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  padding: 1rem;
  border-radius: 12px;
  flex-direction: column;
  gap: 0.5rem;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.main-header .mobile-nav a {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  display: block;
  text-decoration: none;
  color: white;
  border-radius: 8px;
  transition: background 0.3s;
}

.main-header .mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.main-header .mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .main-header nav .buttons {
    display: none;
  }
  .main-header .burger {
    display: flex;
  }
}

.main-footer h2,
.main-footer p {
  margin: 0;
}

.main-footer {
  position: relative;   
  color: #d8dee9;
  font-family: "Inter", sans-serif;
  padding: 0rem 2rem 3rem 2rem;
}


.main-footer::before {
  content: "";
  position: absolute;
  top: 0;   
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #a78bfa, transparent);
  box-shadow: 0 0 10px #a78bfa;
}

.main-footer .footer-content-wrapper {
  max-width: 100%;
  width: 100%;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 2rem 2rem 2rem;
  padding-right: 120px; /* Extra padding to avoid chatbot overlap */
}

.main-footer .footer-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end; 
  gap: 2rem;
}

.main-footer .footer-left h2 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 1.5rem;
  font-family: 'Manrope', sans-serif;
}

.main-footer .footer-left p {
  color: #cdd3df;
  font-weight: 300;
  margin-bottom: 1.5rem; 
}

.main-footer .footer-links {
  display: flex;
  flex-wrap: wrap; 
  gap: 0.5rem;
  font-size: 0.95rem;
}

.main-footer .footer-links a {
  color: #cdd3df;
  text-decoration: none;
  transition: color 0.2s;
}

.main-footer .footer-links a:hover {
  color: #ffffff;
}

.main-footer .footer-right {
  flex-shrink: 0;
  margin-left: auto;
}

.main-footer .developer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.main-footer .footer-right .developer a {
  height: 28px;
  min-width: 0; 
  display: flex;
  align-items: center;
}

.main-footer .footer-right .developer a img {
  height: 60px;
  width: auto;
  object-fit: contain;
  vertical-align: middle; 
}

.main-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem; 
  padding-top: 1.5rem; 
}

.main-footer .footer-bottom .copyright {
  font-size: 0.9rem;
  color: #9aa0ae;
}

.main-footer .socials {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.main-footer .socials a {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  text-decoration: none;
}

.main-footer .socials a {
  color: #cdd3df;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 1.25rem; 
  vertical-align: middle;
}

.main-footer .socials a:hover {
  color: #fff;
}

/* Force social icons to be visible and aligned */
.main-footer .socials {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  flex-wrap: wrap !important;
}

.main-footer .socials a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.main-footer .socials a i,
.main-footer .socials a svg {
  font-size: 1.3rem !important;
  width: auto !important;
  height: auto !important;
  color: #ffffff !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hide any dot separators between socials */
.main-footer .socials span {
  display: none !important;
}

/* Use inline SVG masks for socials to avoid font/icon load issues */
.main-footer .socials a {
  position: relative;
  width: 22px;
  height: 22px;
  color: #ffffff;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
}

.main-footer .socials a i,
.main-footer .socials a svg {
  display: none !important;
}

.main-footer .socials a::before {
  content: "";
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: block;
}

.main-footer .socials a[aria-label="Facebook"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23FFFFFF' d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z'/></svg>");
}

.main-footer .socials a[aria-label="Instagram"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23FFFFFF' d='M7 2h10a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5zm0 2a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3H7zm5 3a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm0 2.2A2.8 2.8 0 1 0 12 16a2.8 2.8 0 0 0 0-5.8zm5.5-3.7a1.3 1.3 0 1 1 0 2.6 1.3 1.3 0 0 1 0-2.6z'/></svg>");
}

.main-footer .socials a[aria-label="TikTok"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23FFFFFF' d='M15.5 2H19c.1 1.5 1.1 3.6 3 4v3.5c-1.8-.1-3.2-.8-4.5-1.7v6.8A6.9 6.9 0 0 1 10 21C6.7 21 4 18.3 4 15s2.7-6 6-6c.3 0 .6 0 .9.1v3.4A3 3 0 1 0 13 15V2z'/></svg>");
}

.main-footer .socials a[aria-label="Linkedin"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23FFFFFF' d='M4.5 3.5a2 2 0 1 1 0 4 2 2 0 0 1 0-4zM3 8.5h3v12H3zM9 8.5h3v1.7c.6-.9 1.7-1.9 3.5-1.9 2.3 0 4 1.5 4 4.7v7.5h-3v-6.7c0-1.6-.6-2.7-2-2.7-1.2 0-2 .8-2.3 1.7-.1.2-.2.6-.2 1v6.7H9z'/></svg>");
}

.main-footer .socials a[aria-label="X (Twitter)"]::before,
.main-footer .socials a[aria-label="Twitter"]::before,
.main-footer .socials a[aria-label="X"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23FFFFFF' d='M4 3h4.5l3.3 4.6L15.8 3H20l-5.6 7.4L20 21h-4.5l-3.4-5-3.6 5H4l6-7.8z'/></svg>");
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .desktop-nav {
        display: none;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .subsection-title {
        font-size: 1.5rem;
    }

    .subsection {
        margin-bottom: 4rem;
    }

    .subsection-header {
        margin-bottom: 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        justify-items: center;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    /* On mobile, all grids become 1 column and fit viewport */
    #legalRegulatoryGrid,
    #administrativeGrid,
    .cards-grid-4,
    #scientificGrid,
    .founder-grid {
        width: 100%;
        max-width: 100%;
    }

    /* Ensure grid items don't overflow */
    .cards-grid {
        justify-items: stretch;
    }

    .cards-grid .team-card {
        justify-self: center;
    }

    .image-container {
        width: 180px;
        height: 180px;
        max-width: min(180px, 50vw);
    }

    .member-name {
        font-size: 1.5rem;
    }

    .member-position {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .team-card {
        height: auto;
        min-height: 560px;
        max-width: min(400px, calc(100vw - 2rem));
        width: 100%;
        min-width: 0;
    }

    .card-container,
    .card-inner,
    .card-front,
    .card-back {
        height: 560px;
    }

    .founder-grid .team-card {
        min-width: 0;
        max-width: min(380px, calc(100vw - 2rem));
        width: 100%;
    }

    /* Card content - tighter padding on mobile for triplets */
    .card-front-content {
        padding: 1.25rem;
        padding-bottom: 2.5rem;
    }

    .card-back-content {
        padding: 1.25rem;
        padding-bottom: 2.5rem;
    }

    .back-bio-section {
        -webkit-overflow-scrolling: touch;
    }

    .back-name {
        font-size: 1.25rem;
    }

    .back-position {
        font-size: 0.9rem;
    }
}

/* Small mobile - extra compact */
@media (max-width: 480px) {
    .team-section .subsection {
        margin-bottom: 3rem;
    }

    .team-card {
        height: auto;
        min-height: 500px;
        max-width: min(100%, calc(100vw - 1.5rem));
    }

    .card-container,
    .card-inner,
    .card-front,
    .card-back {
        height: 500px;
    }

    .image-container {
        width: 140px;
        height: 140px;
        max-width: min(140px, 45vw);
    }

    .member-name {
        font-size: 1.2rem;
    }

    .member-position {
        font-size: 0.85rem;
        line-height: 1.35;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .subsection-title {
        font-size: 1.25rem;
    }

    .card-front-content {
        padding: 1rem;
        padding-bottom: 2.25rem;
    }

    .card-back-content {
        padding: 1rem;
        padding-bottom: 2.25rem;
    }

    .back-name {
        font-size: 1.1rem;
    }

    .back-position {
        font-size: 0.85rem;
    }

    .member-bio {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    .founder-grid .team-card {
        max-width: calc(100vw - 1.5rem);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        justify-items: center;
        width: 100%;
    }

    /* On tablet: 2 columns for 3-person sections */
    #scientificGrid,
    #legalRegulatoryGrid,
    #administrativeGrid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }

    .cards-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }

    .team-card {
        max-width: 100%;
        width: 100%;
    }

    .subsection {
        margin-bottom: 5rem;
    }
}

@media (min-width: 1025px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        width: 100%;
    }

    /* Desktop: 3 cards per row for these sections */
    #scientificGrid,
    #legalRegulatoryGrid,
    #administrativeGrid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }

    .cards-grid-4 {
        grid-template-columns: repeat(4, 1fr);
        max-width: min(1600px, 100%);
        width: 100%;
        margin: 0 auto;
    }
}

/* ============================================
   RESPONSIVE HEADER & FOOTER FIXES
   Mobile-first approach for all breakpoints
   ============================================ */

/* Tablet breakpoint (max-width: 1024px) */
@media (max-width: 1024px) {
    .main-header {
        padding: 0.75rem 1.5rem;
    }
    
    .main-header .header-container {
        gap: 1.5rem;
    }
    
    .main-header .logo img {
        height: 80px;
    }
    
    .main-header .logo-text {
        font-size: 0.8rem;
    }
    
    .main-footer .footer-content-wrapper {
        padding: 1.5rem 1.5rem;
        padding-right: 100px;
    }
}

/* Mobile breakpoint (max-width: 768px) */
@media (max-width: 768px) {
    /* HEADER MOBILE FIXES */
    .main-header {
        padding: 0.5rem 1rem;
    }
    
    .main-header .header-container {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .main-header .logo-wrapper {
        flex: 0 0 auto;
        max-width: 60%;
    }
    
    .main-header .logo img {
        height: 60px;
        max-width: 100%;
    }
    
    .main-header .logo-text {
        font-size: 0.7rem;
        display: none; /* Hide tagline on mobile */
    }
    
    .main-header .header-actions {
        gap: 0.4rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .main-header .lang-switcher {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .main-header .btn-login,
    .main-header .btn-signup,
    .main-header .buttons a,
    .main-header .btn-secondary a,
    #logoutBtn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
    
    /* FOOTER MOBILE FIXES */
    .main-footer {
        padding: 0 1rem 2rem 1rem;
    }
    
    .main-footer .footer-content-wrapper {
        padding: 1.5rem 1rem;
        padding-right: 1rem; /* Remove extra padding on mobile */
    }
    
    .main-footer .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .main-footer .footer-left {
        width: 100%;
    }
    
    .main-footer .footer-left h2 {
        font-size: 1.25rem;
    }
    
    .main-footer .footer-left p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .main-footer .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .main-footer .footer-links span {
        display: none; /* Hide dot separators on mobile */
    }
    
    .main-footer .footer-right {
        width: 100%;
        margin-left: 0;
    }
    
    .main-footer .developer {
        font-size: 0.85rem;
    }
    
    .main-footer .footer-right .developer a img {
        height: 45px;
    }
    
    .main-footer .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .main-footer .footer-bottom .copyright {
        font-size: 0.75rem;
        line-height: 1.5;
        word-break: break-word;
    }
    
    .main-footer .socials {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .main-footer .socials a {
        width: 28px;
        height: 28px;
    }
    
    .main-footer .socials span {
        display: none !important;
    }
}

/* Small mobile breakpoint (max-width: 480px) */
@media (max-width: 480px) {
    /* HEADER SMALL MOBILE */
    .main-header {
        padding: 0.5rem 0.75rem;
    }
    
    .main-header .header-container {
        gap: 0.5rem;
    }
    
    .main-header .logo-wrapper {
        max-width: 50%;
    }
    
    .main-header .logo img {
        height: 50px;
    }
    
    .main-header .header-actions {
        gap: 0.3rem;
    }
    
    .main-header .lang-switcher {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .main-header .btn-login,
    .main-header .btn-signup,
    .main-header .buttons a,
    .main-header .btn-secondary a,
    #logoutBtn {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    
    /* FOOTER SMALL MOBILE */
    .main-footer {
        padding: 0 0.75rem 1.5rem 0.75rem;
    }
    
    .main-footer .footer-content-wrapper {
        padding: 1rem 0.75rem;
    }
    
    .main-footer .footer-left h2 {
        font-size: 1.1rem;
    }
    
    .main-footer .footer-left p {
        font-size: 0.8rem;
    }
    
    .main-footer .footer-links {
        font-size: 0.8rem;
        gap: 0.4rem 0.6rem;
    }
    
    .main-footer .footer-links a {
        display: inline-block;
    }
    
    .main-footer .developer {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
    
    .main-footer .footer-right .developer a img {
        height: 40px;
    }
    
    .main-footer .footer-bottom .copyright {
        font-size: 0.7rem;
    }
    
    .main-footer .socials a {
        width: 24px;
        height: 24px;
    }
}

/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.main-header,
.main-footer {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure images don't overflow */
.main-header img,
.main-footer img {
    max-width: 100%;
    height: auto;
}
