/* ========================================
   Fab Academy Lisboa - Bootstrap 5 + Swiss Design
   ======================================== */

/* Swiss Design Principles:
   - Minimal ornamentation
   - Grid-based layouts
   - Sans-serif typography (Helvetica/Arial)
   - Clean geometric shapes
   - Strong use of white space
   - Bold use of color and contrast
   - Functional asymmetry
*/

:root {
  /* Swiss Design Color Palette */
  --swiss-black: #000000;
  --swiss-white: #FFFFFF;
  --swiss-red: #FF0000;
  --swiss-gray-dark: #333333;
  --swiss-gray-mid: #999999;
  --swiss-gray-light: #E5E5E5;

  /* Fab Academy Brand Colors */
  --fab-blue: #003e83;
  --fab-dark: #003e83;
  --fab-gray: #6c757d;
  --fab-light: #f8f9fa;
  --fab-highlight: #f4f5c1;

  /* Typography Scale (Swiss Modular) */
  --font-base: 1.6rem;
  --font-scale: 1.25;
}

/* ========================================
   TYPOGRAPHY - Swiss International Style
   ======================================== */

* {
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Arial", sans-serif;
  font-size: var(--font-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--swiss-black);
  background-color: var(--swiss-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Arial", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

h1 {
  font-size: 4.8rem;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 3.6rem;
}

h3 {
  font-size: 2.8rem;
  letter-spacing: 0.05em;
}

h4 {
  font-size: 2rem;
  letter-spacing: 0.08em;
}

p {
  margin-bottom: 2rem;
  font-size: 1.8rem;
  line-height: 1.6;
}

a {
  color: var(--swiss-black);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--fab-dark);
}

/* ========================================
   BUTTONS - Swiss Minimalist
   ======================================== */

.button,
.btn {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Arial", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 1.5rem 4rem;
  border: 2px solid var(--swiss-black);
  background-color: var(--swiss-white);
  color: var(--swiss-black);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.button:hover,
.btn:hover {
  background-color: var(--swiss-black);
  color: var(--swiss-white);
  border-color: var(--swiss-black);
}

.button-primary {
  background-color: var(--fab-dark);
  border-color: var(--fab-dark);
  color: var(--swiss-white);
}

.button-primary:hover {
  background-color: var(--fab-highlight);
  border-color: var(--swiss-black);
  color: var(--swiss-black);
}

.button-outline {
  background-color: transparent;
  border-color: var(--swiss-black);
  color: var(--swiss-black);
}

.button-outline:hover {
  background-color: var(--swiss-black);
  color: var(--swiss-white);
}

/* ========================================
   LAYOUT - Grid System
   ======================================== */

.container {
  max-width: 1200px;
  padding-left: 3rem;
  padding-right: 3rem;
}

.section {
  padding: 10rem 0;
}

/* ========================================
   MOBILE HEADER
   ======================================== */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background-color: var(--fab-dark);
  z-index: 1000;
  padding: 0 3rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--fab-dark);
}

.mobile-header img {
  height: 3.2rem;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
}

/* ========================================
   HERO SECTION - Swiss Bold Typography
   ======================================== */

.hero {
  background-color: var(--fab-dark);
  padding: 0;
  text-align: center;
  position: relative;
  border-bottom: 4px solid var(--swiss-black);
  line-height: 0;
}

.hero .container {
  padding: 0;
  margin: 0 auto;
}

.hero .row {
  margin: 0;
}

.hero .col-12 {
  padding: 0;
}

@media (max-width: 768px) {
  .hero {
    padding-top: 6rem;
  }
}

.banner-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  vertical-align: bottom;
  line-height: 0;
}

.fab-academy-logo {
  position: fixed;
  top: 3rem;
  left: 3rem;
  z-index: 999;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  height: 6rem;
  width: auto;
}

.fab-academy-logo.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .fab-academy-logo {
    display: none;
  }
}

/* Language Selector */
.language-selector {
  position: fixed;
  top: 3rem;
  right: 3rem;
  z-index: 1000;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-selector a,
.language-selector span {
  color: var(--swiss-black);
  text-decoration: none;
  transition: color 0.2s ease;
}

.language-selector a:hover {
  color: var(--fab-dark);
}

.language-selector.scrolled {
  background-color: var(--swiss-white);
  padding: 1rem 2rem;
  border: 2px solid var(--swiss-black);
}

@media (max-width: 768px) {
  .hero .language-selector {
    display: none;
  }

  .mobile-header .language-selector {
    position: static;
  }

  .mobile-header .language-selector a,
  .mobile-header .language-selector span {
    color: var(--swiss-white);
  }
}

/* ========================================
   ASSIGNMENTS SECTION - Swiss Grid
   ======================================== */

.assignments {
  padding: 10rem 0;
  background-color: var(--swiss-gray-light);
  border-bottom: 4px solid var(--swiss-black);
}

.section-subtitle {
  font-size: 1.8rem;
  color: var(--swiss-gray-mid);
  text-align: center;
  margin-top: -1rem;
  margin-bottom: 5rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 5rem 0;
}

.carousel-nav {
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  background-color: var(--fab-dark);
  color: var(--swiss-white);
  border: 2px solid var(--fab-dark);
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav:hover:not(:disabled) {
  background-color: var(--fab-highlight);
  color: var(--swiss-black);
  border-color: var(--swiss-black);
}

.carousel-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.assignments-carousel {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.assignments-grid {
  display: flex;
  gap: 2rem;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-wrap: nowrap;
}

.assignments-grid > div {
  flex: 0 0 calc(100% / 3);
  min-width: calc(100% / 3);
}

.assignment-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 3px solid var(--swiss-black);
  background-color: var(--swiss-white);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.assignment-card:hover {
  border-color: var(--fab-dark);
  transform: translateY(-0.5rem);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.assignment-card img {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.assignment-card:hover img {
  filter: grayscale(0%);
}

.assignment-card h4 {
  padding: 1.5rem;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background-color: var(--fab-dark);
  color: var(--swiss-white);
  text-align: center;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assignment-card:hover h4 {
  background-color: var(--fab-highlight);
  color: var(--swiss-black);
}

@media (max-width: 768px) {
  .assignments-grid > div {
    flex: 0 0 calc(100% / 2);
    min-width: calc(100% / 2);
  }

  .carousel-wrapper {
    gap: 1rem;
    margin: 3rem 0;
  }

  .carousel-nav {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
  }
}

@media (max-width: 550px) {
  .assignments-grid > div {
    flex: 0 0 100%;
    min-width: 100%;
  }

  .carousel-wrapper {
    gap: 1rem;
  }

  .carousel-nav {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.2rem;
  }
}

/* ========================================
   FEATURES SECTION - Swiss Boxes
   ======================================== */

.features {
  padding: 10rem 0;
  background-color: var(--swiss-white);
  border-bottom: 4px solid var(--swiss-black);
}

.features h3 {
  text-align: center;
  margin-bottom: 3rem;
}

.features > .container > .row:first-of-type p {
  font-size: 2rem;
  color: var(--swiss-gray-mid);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 6rem;
  line-height: 1.6;
}

.feature-box {
  background-color: var(--swiss-white);
  border: 3px solid var(--swiss-black);
  padding: 3rem;
  height: 100%;
  transition: all 0.2s ease;
}

.feature-box:hover {
  background-color: var(--fab-highlight);
  border-color: var(--swiss-black);
}

.feature-box h4 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--swiss-black);
  letter-spacing: 0.1em;
}

.feature-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-box li {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  color: var(--swiss-black);
  line-height: 1.5;
  position: relative;
  padding-left: 2rem;
}

.feature-box li::before {
  content: "—";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.features .button {
  display: block;
  margin: 4rem auto 0;
  max-width: fit-content;
}

/* ========================================
   PROGRAM DETAILS SECTION
   ======================================== */

.program-details {
  background-color: var(--swiss-gray-light);
  padding: 10rem 0;
  border-bottom: 4px solid var(--swiss-black);
}

.program-details h3 {
  text-align: center;
  margin-bottom: 5rem;
}

.program-image {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 5rem;
  display: block;
  border: 3px solid var(--swiss-black);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.program-image:hover {
  transform: scale(0.98);
}

.program-details h4 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--swiss-black);
  letter-spacing: 0.1em;
  border-bottom: 3px solid var(--swiss-black);
  padding-bottom: 1rem;
}

.program-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.program-details li {
  font-size: 1.7rem;
  margin-bottom: 1.5rem;
  color: var(--swiss-gray-dark);
  line-height: 1.6;
  position: relative;
  padding-left: 2.5rem;
}

.program-details li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-size: 2.4rem;
  line-height: 1.3;
  color: var(--swiss-black);
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */

.experience {
  background-color: var(--swiss-white);
  padding: 10rem 0;
  border-bottom: 4px solid var(--swiss-black);
}

.experience h3 {
  text-align: center;
  margin-bottom: 5rem;
}

.lab-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 0 0 5rem;
}

.lab-image {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  border: 3px solid var(--swiss-black);
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.lab-image:hover {
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .lab-images {
    grid-template-columns: 1fr;
  }
}

.experience-text {
  max-width: 900px;
  margin: 0 auto;
}

.experience-text p {
  font-size: 1.8rem;
  line-height: 1.7;
  margin-bottom: 3rem;
  color: var(--swiss-gray-dark);
  text-align: justify;
}

.experience-inline-image {
  width: 100%;
  max-width: 100%;
  margin: 4rem auto;
  display: block;
  border: 3px solid var(--swiss-black);
}

/* ========================================
   CAREERS SECTION
   ======================================== */

.careers {
  background-color: var(--swiss-gray-light);
  padding: 10rem 0;
  border-bottom: 4px solid var(--swiss-black);
}

.careers h3 {
  text-align: center;
  margin-bottom: 5rem;
}

.career-image {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 5rem;
  display: block;
  border: 3px solid var(--swiss-black);
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.career-image:hover {
  filter: grayscale(0%);
}

.careers h4 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--swiss-black);
  letter-spacing: 0.1em;
  border-bottom: 3px solid var(--swiss-black);
  padding-bottom: 1rem;
}

.careers ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.careers li {
  font-size: 1.7rem;
  margin-bottom: 1.5rem;
  color: var(--swiss-gray-dark);
  line-height: 1.6;
  position: relative;
  padding-left: 2.5rem;
}

.careers li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-size: 2.4rem;
  line-height: 1.3;
  color: var(--swiss-black);
}

/* ========================================
   CTA SECTION - Swiss Bold Statement
   ======================================== */

.cta {
  background-color: var(--fab-dark);
  padding: 12rem 0;
  color: var(--swiss-white);
  text-align: center;
  position: relative;
  border-bottom: 4px solid var(--swiss-black);
}

.cta .program-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
  z-index: 0;
  border: none;
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta h2 {
  color: var(--swiss-white);
  font-size: 3.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cta p {
  color: var(--swiss-white);
  font-size: 2rem;
  margin-bottom: 3rem;
  font-weight: 500;
}

.cta .button {
  background-color: var(--swiss-white);
  border-color: var(--swiss-white);
  color: var(--fab-dark);
  font-size: 1.6rem;
  padding: 2rem 5rem;
}

.cta .button:hover {
  background-color: var(--fab-highlight);
  border-color: var(--swiss-black);
  color: var(--swiss-black);
}

/* ========================================
   PARTNERS SECTION - Swiss Grid
   ======================================== */

.partners {
  padding: 8rem 0;
  background-color: var(--swiss-white);
  text-align: center;
}

.partners h3 {
  font-size: 1.8rem;
  color: var(--swiss-gray-mid);
  margin-bottom: 5rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.partner-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.partner-logos.institutional {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 2px solid var(--swiss-black);
}

.partner-logo {
  height: 5rem;
  width: auto;
  filter: grayscale(100%) brightness(0);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.partner-logo:hover {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

.partner-logo.no-filter {
  filter: none;
  opacity: 0.8;
}

.partner-logo.no-filter:hover {
  opacity: 1;
}

/* Specific logo adjustments */
.partner-logos.institutional img[alt="IPL"] {
  height: 6.5rem;
}

.partner-logos.institutional img[alt="ESELx"] {
  height: 6rem;
}

.partner-logos.institutional img[alt="POLITEC&ID"] {
  height: 7rem;
}

@media (max-width: 768px) {
  .partner-logo {
    height: 4rem;
  }

  .partner-logos.institutional img[alt="IPL"] {
    height: 5.2rem;
  }

  .partner-logos.institutional img[alt="ESELx"] {
    height: 4.8rem;
  }

  .partner-logos.institutional img[alt="POLITEC&ID"] {
    height: 5.6rem;
  }
}

/* ========================================
   ASSIGNMENT PAGES
   ======================================== */

.assignment-header {
  padding: 8rem 0;
  background-color: var(--fab-dark);
  border-bottom: 4px solid var(--swiss-black);
  text-align: center;
}

.assignment-header h1 {
  color: var(--swiss-white);
  font-size: 4.2rem;
  margin-bottom: 1rem;
}

.assignment-header h2 {
  color: var(--swiss-white);
  opacity: 0.8;
  font-size: 2rem;
  margin-bottom: 0;
  font-weight: 400;
}

.assignment-content {
  padding: 8rem 0;
  background-color: var(--swiss-white);
}

.assignment-featured-image {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 5rem;
  display: block;
  border: 3px solid var(--swiss-black);
}

.assignment-description {
  max-width: 900px;
  margin: 0 auto;
}

.assignment-description h3 {
  font-size: 2.4rem;
  margin: 4rem 0 2rem;
  color: var(--swiss-black);
  text-align: left;
  border-bottom: 3px solid var(--swiss-black);
  padding-bottom: 1rem;
}

.assignment-description h3:first-child {
  margin-top: 0;
}

.assignment-description p {
  font-size: 1.8rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  color: var(--swiss-gray-dark);
}

.assignment-description ul {
  margin-bottom: 3rem;
  padding-left: 0;
  list-style: none;
}

.assignment-description li {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
  padding-left: 2.5rem;
  position: relative;
}

.assignment-description li::before {
  content: "—";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.assignment-note {
  background-color: var(--swiss-gray-light);
  border-left: 4px solid var(--swiss-black);
  padding: 2.5rem;
  margin: 4rem 0;
}

.assignment-note p {
  margin-bottom: 0;
  font-size: 1.7rem;
  font-weight: 500;
}

.assignment-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 6rem;
  gap: 2rem;
}

.assignment-navigation .button {
  flex: 1;
}

.assignment-footer {
  background-color: var(--fab-dark);
  padding: 4rem 0;
  text-align: center;
  border-top: 4px solid var(--swiss-black);
}

.assignment-footer p {
  color: var(--swiss-white);
  opacity: 0.7;
  margin: 0;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .assignment-navigation {
    flex-direction: column;
  }
}

/* ========================================
   UTILITY CLASSES - Swiss Design
   ======================================== */

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-4 {
  margin-top: 4rem;
}

.mb-4 {
  margin-bottom: 4rem;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  html {
    font-size: 58%;
  }

  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .section {
    padding: 6rem 0;
  }

  h1 {
    font-size: 3.6rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  h3 {
    font-size: 2.4rem;
  }

  .hero {
    border-bottom: 2px solid var(--swiss-black);
  }

  .assignments,
  .features,
  .program-details,
  .experience,
  .careers,
  .cta {
    border-bottom: 2px solid var(--swiss-black);
  }
}

@media (max-width: 550px) {
  html {
    font-size: 56%;
  }

  .button,
  .btn {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
  }
}

/* ========================================
   SCROLL TO TOP
   ======================================== */

.scroll-top {
  display: inline-block;
  line-height: 0;
}

.scroll-top:hover {
  opacity: 0.8;
}
