/* Algarve Blockchain Community - Faithful Recreation */
/* Colors: a=#fffffe (white), b=#272343 (dark purple), c=#ffd803 (yellow) */
/* Fonts: Figtree (body), Outfit (headings/buttons) */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Figtree, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #272343;
  background: #fffffe;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: Outfit, sans-serif;
  font-weight: 900;
  margin: 0;
}

h1 { font-size: 54px; line-height: 1.3; }
h2 { font-size: 36px; line-height: 1.3; }
h3 { font-size: 24px; line-height: 1.4; }
h4 { font-family: Outfit, sans-serif; font-weight: 400; font-size: 20px; line-height: 1.5; margin: 0; }
p { margin: 0; font-size: 16px; line-height: 1.5; }
small { font-size: 14px; line-height: 1.5; }

a { color: inherit; text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.display-2 { font-size: 96px; line-height: 1.2; }
.heading-1 { font-size: 54px; line-height: 1.3; }
.subheading-2 { font-size: 24px; line-height: 1.3; }

.text-center { text-align: center; }
.mt-3 { margin-top: 12px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.self-center { align-self: center; }

/* === PALETTE === */
.palette-a {
  background-color: #fffffe;
  color: #272343;
}
.palette-a .btn-primary {
  background-color: #ffd803;
  color: #272343;
  border-color: #ffd803;
}
.palette-a .btn-secondary {
  background-color: #fffffe;
  color: #272343;
  border-color: #272343;
}

.palette-b {
  background-color: #272343;
  color: #fffffe;
}
.palette-b .btn-primary {
  background-color: #ffd803;
  color: #272343;
  border-color: #ffd803;
}
.palette-b .btn-secondary {
  background-color: #272343;
  color: #fffffe;
  border-color: #fffffe;
}

.palette-c {
  background-color: #ffd803;
  color: #272343;
}
.palette-c .btn-primary {
  background-color: #272343;
  color: #fffffe;
  border-color: #272343;
}
.palette-c .btn-secondary {
  background-color: #ffd803;
  color: #272343;
  border-color: #272343;
}

/* === NAV === */
.site-nav {
  padding: 8px 0;
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-sizing: border-box;
}

.nav-logo {
  min-width: 216px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-link {
  font-family: Outfit, sans-serif;
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  margin-right: 24px;
}

.nav-link:hover {
  text-decoration: underline;
}

.nav-social {
  min-width: 216px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.nav-social a {
  display: inline-flex;
  padding: 5px;
}

.nav-social svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* === HAMBURGER (hidden on desktop) === */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger to X animation */
.site-nav.nav-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-nav.nav-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.site-nav.nav-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* === SECTIONS === */
.section {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* === HERO === */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background: white;
}

.hero-layout-3 {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  min-height: 640px;
}

/* Hero text stays dark (#272343) on palette-a hero */
/* No color override needed - inherits from palette-a */

.hero-layout-7 {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  width: 100%;
  text-align: center;
  padding: 0 16px;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 24px;
  font-family: Outfit, sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.012em;
  text-decoration: none;
  border: 1px solid;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
  text-decoration: none;
}

.button-row {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.button-row.center {
  justify-content: center;
}

/* === CONTENT BLOCKS === */
.content-block {
  max-width: 1440px;
  width: 100%;
  display: flex;
  padding: 0 16px;
  overflow: hidden;
}

.content-block.two-col .col {
  flex-basis: 50%;
  display: flex;
  align-self: stretch;
}

.content-block.three-col .col {
  flex-basis: 33.333%;
  display: flex;
  align-self: stretch;
}

.rich-text {
  flex-grow: 1;
}

.rich-text.self-center {
  flex-grow: 0;
}

.rich-text img {
  max-width: 100%;
  display: block;
}

.rich-text a {
  font-weight: 700;
}

.rich-text a:hover {
  text-decoration: underline;
}

.full-width-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === VIDEO === */
.video-container {
  width: 100%;
  max-width: 1440px;
  margin: 32px auto 0;
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

/* === YOUTUBE === */
.youtube-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
}

.youtube-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === GALLERY === */
.gallery-container {
  max-width: 1440px;
  width: 100%;
  padding: 0 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
}

.gallery-item {
  background-size: cover;
  background-position: center;
  border-radius: 0;
  width: 100%;
}

/* === FOOTER === */
.footer-inner {
  max-width: 1440px;
  width: 100%;
  padding: 0 16px;
  text-align: center;
}

/* === MOBILE === */
@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  .display-2 { font-size: 54px; }
  .heading-1 { font-size: 32px; }
  .subheading-2 { font-size: 24px; }

  /* Show hamburger on mobile */
  .nav-hamburger {
    display: block;
  }

  .nav-logo { min-width: auto; }

  /* Mobile menu: hidden by default, shown when .nav-open */
  .nav-links,
  .nav-social {
    display: none;
  }

  .site-nav.nav-open .nav-links,
  .site-nav.nav-open .nav-social {
    display: flex;
  }

  .site-nav.nav-open .nav-inner {
    flex-wrap: wrap;
  }

  .site-nav.nav-open .nav-links {
    order: 10;
    flex-basis: 100%;
    justify-content: center;
    padding: 16px 0 8px;
    border-top: 1px solid rgba(39, 35, 67, 0.15);
    margin-top: 8px;
  }

  .site-nav.nav-open .nav-links .nav-link {
    margin-right: 0;
    font-size: 18px;
  }

  .site-nav.nav-open .nav-social {
    order: 11;
    flex-basis: 100%;
    justify-content: center;
    padding: 8px 0 12px;
    min-width: auto;
  }
  
  .content-block.two-col,
  .content-block.three-col {
    flex-direction: column;
  }

  .content-block .col {
    flex-basis: 100% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-layout-3 {
    min-height: 300px;
  }

  .video-container {
    margin-top: 24px;
  }

  .youtube-player {
    margin-top: 16px;
  }
}

/* === HERO BLOCK (Vendors page) === */
.hero-block {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-block .hero-overlay {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  width: 100%;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* === CONTAINER === */
.container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* === VENDOR GRID === */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 48px;
}

.vendor-card {
  display: flex;
  flex-direction: column;
}

.vendor-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.vendor-info {
  padding-top: 12px;
}

.vendor-info h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.vendor-info h3 a {
  font-weight: 900;
}

.vendor-info p {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.vendor-info .btn {
  margin-top: auto;
}

/* === FOOTER SOCIAL === */
.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.footer-social a {
  display: inline-flex;
  padding: 5px;
  color: inherit;
}

.footer-social svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* === VENDORS MOBILE === */
@media (max-width: 768px) {
  .vendor-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-block {
    min-height: 200px !important;
  }
}


/* === 3-COLUMN GALLERY (Partners, Event Partners) === */
.gallery-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

/* Center incomplete last row items */
.gallery-grid-3col.center-last {
  justify-items: center;
}

/* For centering a single item on last row */
.gallery-grid-center-wrapper {
  display: flex;
  justify-content: center;
  grid-column: 1 / -1;
}

.gallery-grid-3col .gallery-grid-center-wrapper .gallery-item {
  width: calc(33.333% - 16px);
}

.gallery-grid .gallery-grid-center-wrapper .gallery-item {
  width: calc(25% - 18px);
}

/* === FOOTER COPYRIGHT === */
.footer-copyright {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.8;
}

/* === VENDOR HERO IMAGE === */
.vendor-hero-img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* === YOUTUBE SECTION === */
.youtube-section {
  max-width: 1440px;
  width: 100%;
  text-align: center;
  padding: 0 16px;
}

.youtube-section .youtube-player {
  margin-top: 48px;
}

@media (max-width: 768px) {
  .gallery-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .gallery-grid-center-wrapper .gallery-item {
    width: 100%;
  }
}
