/* Shared styles for Polarix UiT website */

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #E3DEE3;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    padding-bottom: 120px;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
header {
    background: rgba(15, 15, 35, 0.95);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 200px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #33BFF2;
    text-shadow: 0 0 10px rgba(100, 181, 246, 0.5);
}

.back-link {
    background: rgba(100, 181, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(100, 181, 246, 0.2);
    transform: translateY(-2px);
}

/* Main content */
main {
    margin-top: 100px;
    padding: 2rem 0;
}

#about p strong {
  font-size: 1.2rem;
  line-height: 1.2;
  color: #FFFFFF;
}

p {
  font-size: 1rem;
  line-height: 1.6;  /* improves readability */
}

/* Content sections */
.content-section {
    background: rgba(25, 25, 50, 0.6);
    margin-bottom: 2rem;
    padding: 3rem 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.content-section h2 {
    color: #E3DEE3;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px rgba(100, 181, 246, 0.3);
    text-align: center;
    font-size: 2rem;
}

/* Social bar styles */
.social-bar {
    background: rgba(10, 10, 25, 0.98);
    padding: 1rem 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.social-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 0.85rem;
    color: #ffffff;
}

.contact-info .email {
    color: #33BFF2;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info .email:hover {
    color: #90caf9;
}

.copyright {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: #33BFF2;
    background: rgba(100, 181, 246, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(100, 181, 246, 0.3);
    border-color: rgba(100, 181, 246, 0.3);
}

.social-links a.linkedin:hover {
    color: #0077b5;
    background: rgba(0, 119, 181, 0.1);
    box-shadow: 0 5px 15px rgba(0, 119, 181, 0.3);
}

.social-links a.twitter:hover {
    color: #1da1f2;
    background: rgba(29, 161, 242, 0.1);
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.3);
}

.social-links a.instagram:hover {
    color: #e4405f;
    background: rgba(228, 64, 95, 0.1);
    box-shadow: 0 5px 15px rgba(228, 64, 95, 0.3);
}

.social-links a.discord:hover {
    color: #7289da;
    background: rgba(114, 137, 218, 0.1);
    box-shadow: 0 5px 15px rgba(114, 137, 218, 0.3);
}

.social-links a.github:hover {
    color: #f0f6fc;
    background: rgba(240, 246, 252, 0.1);
    box-shadow: 0 5px 15px rgba(240, 246, 252, 0.3);
}

.social-links a.youtube:hover {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }

    nav ul {
        margin-top: 1rem;
    }

    nav ul li {
        margin: 0 1rem;
    }

    main {
        margin-top: 140px;
    }

    .social-bar-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .contact-info {
        order: 2;
        align-items: center;
    }

    .social-links {
        order: 1;
        gap: 1rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
    }

    .copyright {
        order: 3;
        font-size: 0.75rem;
    }
}

.feature,
.sponsor-item {
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect for feature boxes */
.feature:hover {
    background: rgba(40, 40, 80, 0.8); /* slightly lighter bluish tone */
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.4); /* subtle glow */
}

/* Hover effect for sponsor boxes */
.sponsor-item:hover {
    background: rgba(40, 40, 80, 0.8);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.4);
}

.btn {
    display: inline-block;
    padding: 0.1rem 0.1rem;   /* smaller inside space */
    background: #33BFF2;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;       /* smaller text */
    border-radius: 30px;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 1rem;
}

.btn:hover {
    background: #90caf9;
    box-shadow: 0 5px 15px rgba(100, 181, 246, 0.4);
    transform: translateY(-3px);
}

.hero {
    position: relative;             /* allow overlay + video positioning */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    transition: min-height 0.6s ease, padding 0.6s ease;
    overflow: hidden;               /* prevents video overflow */
}


.hero-logo {
  transition: max-width 0.6s ease, transform 0.6s ease;
}

/* On scroll */
.hero.scrolled {
  min-height: 60vh;           /* can shrink height if you want */
  align-items: center;        /* keep horizontally centered */
  padding-top: 300px;             /* remove extra top padding */
}

.hero-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero.scrolled .hero-logo {
  max-width: 200px;           /* smaller, but still centered */
  transform: translateY(0); /* stays in place below header */
  margin-bottom: 2.5rem;        /* optional spacing */
}

.hero.scrolled .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.hero-credit {
  position: absolute;
  bottom: 10px;   /* distance from bottom */
  right: 15px;    /* distance from right */
  font-size: 0.70rem;  /* small text */
  color: rgba(255, 255, 255, 0.7); /* subtle, semi-transparent white */
  z-index: 2;  /* above the video + overlay */
}

.hero-credit a {
  color: inherit;         /* match text color */
  text-decoration: none;  /* no underline by default */
}

.hero-credit a:hover {
  text-decoration: underline; /* underline on hover */
}

/* ---------- Section sizing: content-sized + adjustable padding ---------- */
/* Put this at the end of css/shared-styles.css so it overrides earlier rules */

:root {
  --section-vertical-padding: 3rem;       /* default desktop padding (top & bottom) */
  --section-vertical-padding-mobile: 1.5rem;  /* default mobile padding (top & bottom) */
}

.section,
.sponsors,
.content-section {
  padding: var(--section-vertical-padding) 0;
  min-height: auto;
  display: block !important;
  align-items: normal !important;
}

.section--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-vertical-padding) 0;
  min-height: auto;
}

#about, #projects, #sponsors, #contact {
  padding: var(--section-vertical-padding) 0;
}

#about.section--tight,
#about.section-tight {
  padding: calc(var(--section-vertical-padding) * 0.6);
}

@media (max-width: 768px) {
  .section,
  .sponsors,
  .content-section {
    padding: var(--section-vertical-padding-mobile) 0;
  }
  .section--centered {
    padding: calc(var(--section-vertical-padding-mobile) * 1.1) 0;
  }
}

footer {
  min-height: auto !important;
  padding: 2rem 0;
}

/* ---------- Remove leftover large bottom spacing (place at end of shared-styles.css) ---------- */

:root {
  --section-vertical-padding: 5rem;
}

/* Force sections to size to content and limit bottom padding/margins */
.section,
.sponsors,
.content-section,
.slideshow-container,
.project-hero {
  min-height: auto !important;
  padding-top: var(--section-vertical-padding);
  padding-bottom: var(--section-vertical-padding);
  margin-bottom: 0 !important; /* remove large gap between sections */
  display: block !important;
  align-items: normal !important;
}

/* Some page rules use margin-bottom on inner containers — zero them where appropriate */
.section > .container,
.sponsors > .container,
.content-section > .container,
.slideshow-container > .container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Remove bottom margin on the last child inside containers so card grids don't leave a gap */
.section > .container > :last-child,
.content-section > .container > :last-child,
.sponsors > .container > :last-child {
  margin-bottom: 0 !important;
}

/* Reduce slideshow-specific large bottom gap */
.slideshow-container {
  margin-bottom: 1rem !important;
  padding-bottom: var(--section-vertical-padding);
}

/* Footer safety: prevent accidental full-viewport footer */
footer {
  min-height: auto !important;
  padding: 2rem 0 !important;
}

/* Responsive: smaller padding on mobile */
@media (max-width: 768px) {
  :root { --section-vertical-padding: 1rem; }
  .section,
  .sponsors,
  .content-section,
  .slideshow-container {
    padding-bottom: var(--section-vertical-padding);
  }
}

/* Background video setup */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2; /* stay behind overlay + content */
    pointer-events: none;        /* video should not intercept clicks */
}

@supports not (object-fit: cover) {
  .hero-video {
    /* stretch/center fallback: keep it covering the hero as best as possible */
    width: auto;
    height: 100%;
    min-width: 100%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Dark overlay for contrast */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 40, 0.4);
    z-index: -1;
}

/* Keep logo + text above */
.hero-logo,
.hero-content {
    position: relative;
    z-index: 1;
}
