/* ===== Color Variables (Sober, Sensitive Theme) ===== */
:root {
  --bg: #f0f0f0;
  --card-bg: #ffffff;
  --text-muted: #6c757d;
  --accent: #47cdae;
  --dark: #212529;
  --nav-bg-trans: rgba(17, 19, 21, 0.7);
  --nav-bg-solid: #16191c;
  --navbar-height: 70px;
}

/* ===== Reset & Globals ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 70px;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ===== Navbar ===== */
#mainNavbar {
  background: var(--nav-bg-trans);
  backdrop-filter: blur(2px);
  padding: 0.75rem 1rem;
  transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#mainNavbar .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
}

.navbar-brand img {
  max-height: 35px;
}

#mainNavbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  position: relative;
  transition: color 0.3s;
}

#mainNavbar .nav-link:hover,
#mainNavbar .nav-link.active {
  color: var(--accent);
}

#mainNavbar .social-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-left: 0.75rem;
  transition: color 0.3s;
}

#mainNavbar .social-link:hover {
  color: var(--accent);
}

#mainNavbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

#mainNavbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar on scroll */
#mainNavbar.scrolled {
  background: var(--nav-bg-solid);
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile nav */
#mobileNav {
  text-align: center;
}

.social-icons-mobile {
  justify-content: center;
  font-size: 1.5rem;
}

/* First carousel image: always fully visible */
.carousel-media.first-image {
  object-fit: contain;
  background: #000;
  width: 100%;
  margin-top: var(--navbar-height, 70px);
  height: calc(100vh - var(--navbar-height));
}

/* ===== Hero Carousel ===== */
.hero-header {
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--nav-bg-solid);
}

/* Gradient overlay for text contrast */
.hero-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 10%);
  z-index: 1;
}

.carousel-media {
  object-fit: cover;
  height: 100vh;
  width: 100%;
}

/* Carousel controls above overlay */
.carousel-control-prev,
.carousel-control-next {
  z-index: 2;
}

/* ===== Sections ===== */
section {
  padding: 80px 0;
  scroll-margin-top: -36px;
}

.section-title {
  margin-bottom: 1rem;
}

.section-title h2 {
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

/* Alternating section backgrounds */
#trailer,
#galeria {
  background-color: #ffffff;
}

#sinopse,
#equipa,
#projeto {
  background-color: #f0f0f0;
}

/* ===== Specific Sections ===== */
#trailer {
  background: #f8f9fa;
}

#trailer .row {
  margin-top: -10px;
}

#trailer .section-title h2 {
  margin-bottom: 0rem;
}

@media (min-width: 992px) {
  #trailer .col-lg-8 {
    max-width: 676px;
  }
}


/* ===== Sponsor logos ===== */
.sponsor-logo {
  object-fit: contain;
  margin-top: 1rem;
}

.almalogo {
  max-height: 180px;
  max-width: 180px;
}

.masterlogo {
  max-height: 230px;
  max-width: 230px;
}

.belemlogo {
  max-height: 150px;
  max-width: 150px;
}

.matoslogo {
  max-height: 110px;
  max-width: 190px;
}

.florinelogo {
  max-height: 110px;
  max-width: 190px;
}

.sponsor-logo:hover {
  transform: scale(1.10);
  transition: transform 0.3s;
}

/* ===== Team cards ===== */
.team-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.team-card img {
  height: 280px;
  object-fit: cover;
  object-position: top;
}

/* ===== Gallery images ===== */
.gallery-img {
  height: 240px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s, filter 0.3s;
}

.gallery-img:hover {
  transform: scale(1.05);
  filter: brightness(0.9);
}

.lead {
  font-weight: bold;
}

/* ===== Footer ===== */
footer {
  background: #111217;
  color: #cbcbcb;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: #cbcbcb;
  text-decoration: underline;
}

footer hr {
  border-color: rgba(151, 151, 151, 0.27);
}

.web {
  font-size: 0.8rem;
  color: #8d8d8d;
  opacity: 0.9;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 991.98px) {
  html {
    scroll-padding-top: 66px;
  }
}

@media (max-width: 767.98px) {
  .section-title h2 {
    font-size: 2rem;
  }
  section {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  body, p, h1, h4, h5, h6 {
    font-size: 98%;
  }
}

@media (max-width: 480px) {
  body, p, h1, h4, h5, h6 {
    font-size: 95%;
  }
}