/* ===========================
 RESET
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* ===========================
 NAVBAR
=========================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  background: #1B2A41;
  color: black;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  z-index: 1000; /* stays above everything */
}

.navbar .logo {
  font-weight: bold;
  font-size: 30px;
  letter-spacing: 2px;
}

.navbar .logo img {
  height: 60px;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  font-size: 20px;
  gap: 25px;
}

.navbar .nav-links li a {
  color: rgb(240, 240, 240);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s;
}

.navbar .nav-links li a:hover {
  color: rgb(235, 195, 64);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: rgb(240, 240, 240);
  margin: 3px 0;
  transition: 0.3s;
}

.menu-toggle:checked ~ .hamburger span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle:checked ~ .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked ~ .hamburger span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* ===========================
 HOME / INDEX
=========================== */
.intro {
  background: #2f82b9;
  color: white;
  padding: 100px 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
}

.intro-content {
  max-width: 800px;
  margin-left: 80;
}

/* Home page intro: make it taller and left-aligned for prominence */
.intro.home {
  padding: 100px 20px;
  justify-content: flex-start;
  text-align: left;
}

.intro.home .intro-content {
  margin-left: 80px;
}

.intro h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  color: white;
}

.intro h1 {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.intro p {
  font-size: 18px;
  line-height: 1.6;
}

.content {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;

  background-image: url("/images/Penguin-World-Map.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  height: 500px;
  padding: 40px 20px;
}
.info-section {
  padding: 50px 50px;
  min-height: 100vh;
  background: #688d9e;
}

.content-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin-left: 80px;
  color:#ffd700;
  padding: 20px 30px;
  border-radius: 20px;
  background-color: #9aa7af;
  transition: background-color 0.3s ease;
}

.content .btn {
  background-color: #3292ce;   /* Blue background */
  color: white;                /* White text */
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.content .btn:hover {
  background-color: #2c7cb5; /* Slightly darker blue on hover */
}
.content-box h2 { font-size: 40px; font-weight: 900; text-transform: uppercase; margin-bottom: 10px; }

/* ===========================
 KEY REGISTER SECTION
=========================== */
.key-register {
  width: 100%;
  padding: 40px 20px;
  background: #2f82b9;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.key-register .container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  max-width: 980px;
  width: 100%;
}

.key-register .box {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px 24px;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  min-width: 220px;
  min-height: 200px;
}

.key-register .box h2 {
  margin: 0 0 12px 0;
  font-size: 1.5rem;
}

.key-register .box p {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.key-register .box span {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
}

/* ---------- Header ---------- */
header {
  position: relative;
  height: 35vh;
  display: flex;
  align-items: center;
  justify-content: center; /* centers horizontally */
  text-align: center; /* centers text alignment */
  color: white;
  background: linear-gradient(135deg, #1b1d22 0%, #131316 100%);
  background-image: url('https://www.transparenttextures.com/patterns/asfalt-light.png');
  overflow: hidden;
}

header .overlay { position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(130, 179, 102, 0.25), rgba(0, 0, 0, 0.85)); }
.header-content { position: relative; z-index: 2; max-width: 800px; padding: 0 20px; animation: fadeIn 1s ease forwards; }
header h1 { font-size: 3rem; font-weight: 700; margin-bottom: 0.6rem; color: white; }
header p { font-weight: 300; font-size: 1.1rem; opacity: 0.9; color: white; }
.highlight { color: rgb(235, 195, 64); }

/* ===========================
 GAMES
=========================== */
.games-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding: 60px 20px;
  background: #688d9e;
  min-height: 100vh;
}

.game-card { position: relative; width: 300px; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.1); transition: transform 0.3s; }
.game-card:hover { transform: translateY(-8px); }
.game-image { position: relative; width: 100%; height: 0; padding-top: 56.25%; overflow: hidden; }
.game-image img { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; display:block; }
.game-hover { position:absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.75); color:white; display:flex; align-items:center; justify-content:center; text-align:center; padding:20px; opacity:0; transition: opacity 0.3s ease; }
.game-image:hover .game-hover { opacity:1; }
.game-card h3 { font-size:22px; font-weight:800; text-align:center; padding:10px; color:#030303; text-transform:uppercase; }

/* Slideshow / Home (also used on games) */
.slideshow-container { width: 50%; margin: auto; text-align: center; }
.image-wrapper { display:flex; align-items:center; justify-content:center; position:relative; }
#slideshow { max-width:75%; max-height:75%; width:auto; height:auto; border-radius:40px; display:block; }
.slide-text { margin-top:10px; height:180px; overflow:hidden; }
.slide-text h3 { margin:6px 0 4px; font-size:18px; }
.slide-text p { margin:0; font-size:20px; color:#ffffff; font-weight:bold; }
.nav { position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,0.6); color:white; border:none; width:44px; height:44px; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:24px; z-index:10; }
.nav.prev { left:50px; }
.nav.next { right:50px; }
.nav.prev:hover, .nav.next:hover { filter: drop-shadow(0 0 8px rgba(255,220,0,0.8)) drop-shadow(0 0 16px rgba(255,200,0,0.6)) drop-shadow(0 0 26px rgba(255,180,0,0.4)); }
.indicators { height:20px; display:flex; justify-content:center; align-items:center; }
.indicator { width:30px; height:4px; background:#ccc; margin:0 4px; cursor:pointer; }
.indicator.active { background:#333; }

/* ===========================
 TEAM
=========================== */
.team-grid-section { display:grid; grid-template-columns: repeat(auto-fit, minmax(400px,1fr)); gap:1em; padding:30px 20px; justify-items:center; align-items:center; background:#688d9e; min-height:100vh; }
.team-section-title { grid-column: 1 / -1; text-align:center; font-size:2.5em; font-weight:bold; color:#ffd700; margin-bottom:1em; text-shadow:0 2px 8px rgba(0,0,0,0.4); }
.team-member-card { position:relative; width:310px; height:310px; background:white; border-radius:12px; overflow:hidden; box-shadow:0 8px 20px rgba(0,0,0,0.1); transition: transform 0.3s, box-shadow 0.3s, filter 0.3s; cursor:pointer; padding-top:5px; }
.team-member-image { width:300px; height:300px; overflow:hidden; margin:0 auto; border-radius:12px; }
.team-member-image img { width:100%; height:100%; object-fit:cover; display:block; object-position:center; }
.team-member-card h3, .team-member-card .center-text h4 { position:absolute; width:100%; left:0; text-align:center; color:white; z-index:2; text-shadow:0 2px 6px rgba(0,0,0,0.7); margin:0; padding:0.3em 0; }
.team-member-card h3 { top:20px; font-size:1.5em; }
.team-member-card .center-text h4 { bottom:20px; font-size:1.1em; }
.team-member-card::before { content:""; position:absolute; inset:0; background:rgba(0,0,0,0.3); z-index:1; transition: background 0.3s; }
.team-member-card:hover { transform:translateY(-5px); box-shadow:0 0 20px 6px rgba(255,215,0,0.7); }
.team-member-card:hover img { filter:brightness(1.1); }
.team-member-card:hover::before { background:rgba(0,0,0,0.15); }
.center-text { text-align:center; font-weight:700; font-size:20px; }

/* Modal for team (kept with team styles) */
.modal { position: fixed; z-index:2000; top:0; left:0; width:100%; height:100%; overflow:auto; background:rgba(0,0,0,0.5); display:flex; align-items:center; justify-content:center; }
.modal-content { display:flex; flex-direction:row-reverse; align-items:center; background:rgb(55,138,177); padding:20px; border-radius:12px; width:800px; height:400px; box-shadow:0 2px 10px rgba(0,0,0,0.2); position:relative; gap:20px; }
#modal-img { width:auto; max-width:350px; max-height:350px; border-radius:12px; object-fit:contain; display:block; }
.modal-text { flex:1; display:flex; flex-direction:column; justify-content:center; text-align:center; }
.modal-text h3#modal-name { font-size:2rem; font-weight:bold; margin-bottom:0.3em; }
.modal-text h4#modal-role { font-size:1.3rem; font-weight:600; margin-bottom:0.5em; color:#ffd700; }
.modal-text p#modal-description { font-size:1.1rem; font-weight:400; margin:0 auto; max-width:90%; line-height:1.4; color:#fff; font-weight:bolder; }
.close { position:absolute; top:10px; right:20px; font-size:28px; font-weight:bold; cursor:pointer; }

/* ===========================
 LIFE
=========================== */
.life-section { padding:50px 50px; min-height:100vh; background:#688d9e; }
.container-values { max-width:1200px; margin:10px auto 80px; padding:40px 30px; background:#8d8d8f; border-radius:12px; box-shadow:0 8px 25px rgba(0,0,0,0.3); }
.intro-values { background:#2f82b9; color:white; padding:100px 20px; display:flex; justify-content:flex-start; align-items:center; margin-bottom:20px; text-align:center; }
.intro p { color:white; font-weight:300; max-width:700px; margin:0 auto 1rem; }
.grid-section { display:grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap:30px; }
.grid-card { background:#232527; border-radius:10px; padding:30px; border:1px solid #2f3135; transition:all 0.3s ease; box-shadow:0 0 0 rgba(130,179,102,0); }
.grid-card:hover { transform:translateY(-6px); box-shadow:0 8px 25px rgba(17,179,255,0.25); border-color:rgb(235,195,64); }
.grid-card h2 { color:rgb(235,195,64); font-size:1.4rem; margin-bottom:0.6rem; }
.grid-card p { color:white; font-weight:300; font-size:0.95rem; }
.grid-card ul { list-style:none; padding:0; margin-top:10px; }
.grid-card ul li { background:#ffffff; border-left:4px solid rgb(235,195,64); margin:10px 0; padding:10px 14px; border-radius:6px; font-weight:300; transition:background 0.3s ease; }
.grid-card ul li:hover { background:#61b2e7; }

/* ===========================
 CAREERS / JOBS
=========================== */
.job-list-container { display:flex; flex-direction:column; gap:12px; padding:15px; margin:10; list-style:none; max-width:600px; box-sizing:border-box; }
.job-item { margin:0; }
.job-title { display:block; width:100%; background-color:#4caf50; color:white; border:none; padding:12px 15px; font-size:16px; cursor:pointer; border-radius:6px; text-align:left; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.job-title:hover { background-color:#45a049; box-shadow:0 0 10px rgba(255,255,0,0.7); }

.job-description-overlay { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); display:flex; align-items:center; justify-content:center; z-index:9999; opacity:0; visibility:hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.job-description-overlay.open { opacity:1; visibility:visible; }
.job-description-popup { position:relative; background:rgb(55,138,177); color:#fff; border-radius:12px; padding:30px 40px; width:90%; max-width:800px; max-height:80vh; overflow-y:auto; box-shadow:0 0 20px rgba(0,0,0,0.3); font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display:flex; flex-direction:column; gap:15px; transform:scale(0.8); transition: transform 0.3s ease; }
.job-description-overlay.open .job-description-popup { transform:scale(1); }
.close-btn { position:absolute; top:15px; right:20px; font-size:1.8rem; color:white; cursor:pointer; background:none; border:none; transition: color 0.3s; }
.close-btn:hover { color:#000; }
.job-description-popup::-webkit-scrollbar { width:8px; }
.job-description-popup::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.3); border-radius:4px; }

.job-description-content h1,.job-description-content h2,.job-description-content h3,.job-description-content h4,.job-description-content h5,.job-description-content h6 { color:#fff; margin-bottom:0.5em; }
.job-description-content p, .job-description-content li { color:#fff; margin-bottom:0.5em; }
.job-description-content a { color:#000; text-decoration:underline; }
.job-description-content .apply-button { display:inline-block; background-color:#ffd700; color:#000; padding:10px 20px; text-decoration:none; border-radius:8px; font-weight:bold; font-size:1rem; margin-top:15px; cursor:pointer; transition: all 0.2s ease; }
.job-description-content .apply-button:hover { background-color:#ffec70; color:#000; transform:scale(1.05); }

/* ===========================
 CONTACT
=========================== */
.contact-section { padding:60px 20px; background:#688d9e; color:#222; min-height:100vh; }
.contact-container { max-width:1000px; margin:0 auto; display:flex; gap:40px; flex-wrap:wrap; justify-content:space-between; }
.contact-form { flex:1 1 500px; display:flex; flex-direction:column; gap:15px; }
.contact-form label { font-weight:bold; margin-bottom:5px; }
.contact-form input, .contact-form textarea { padding:12px; border-radius:6px; border:1px solid #ccc; font-size:16px; width:100%; }
.contact-form textarea { resize:vertical; }
.contact-form .btn { background:#3292ce; color:white; border:none; padding:14px 20px; border-radius:6px; cursor:pointer; font-weight:bold; width:fit-content; }
.contact-form .btn:hover { background:#2479ad; }
.contact-info { flex:1 1 300px; background:white; padding:20px 30px; border-radius:10px; box-shadow:0 6px 12px rgba(0,0,0,0.1); }
.contact-info h3 { margin-bottom:15px; font-size:22px; font-weight:700; }

/* ===========================
 PRIVACY / TERMS (Markdown content)
=========================== */
#md-content { color:white; line-height:1.6; font-size:large; }
.loading { font-style:italic; color:#666; }
.error { color:red; font-weight:bold; }
.btn-back { margin-top:20px; margin-bottom:20px; display:inline-block; }

/* ===========================
 FOOTER / UTILS
=========================== */
.btn { display:inline-flex; align-items:center; gap:8px; background:#aaaaaa; color:#111; font-weight:bold; padding:10px 20px; border-radius:8px; text-decoration:none; transition:background 0.3s; }
.btn:hover { background:#e0c6a0; }

/* Specific overrides so page-local buttons keep their intended appearance
   (reordering earlier moved the generic .btn after some page-specific rules) */
.content .btn {
  background-color: #3292ce;   /* Blue background */
  color: white;
  padding: 10px 10px;
}
.content .btn:hover {
  background-color: #2c7cb5;
}
/* key-register uses a grey register button and slightly smaller container */
.key-register .container { max-width: 980px; }
.key-register .box { min-width: 220px; }
.key-register .box .btn {
  background-color: #9b9b9b; /* grey register button */
  color: #fff;
  padding: 12px 20px;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.key-register .box .btn:hover {
  background-color: #8a8a8a;
}
/* Active / focus: show blue state when clicked or focused */
.key-register .box .btn:active,
.key-register .box .btn:focus,
.key-register .box .btn:focus-visible {
  background-color: #3292ce; /* blue on click */
  color: #fff;
  outline: none;
  box-shadow: 0 6px 18px rgba(50,146,206,0.12);
}
.footer { background:#0c3753; padding:20px 40px; font-size:14px; }
.footer-container { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; }
.footer-left p { color: rgb(240,240,240); }
.footer-center { display:flex; gap:20px; }
.footer-center a { text-decoration:none; color: rgb(240,240,240); font-weight:500; transition: color 0.3s; }
.footer-center a:hover { color: rgb(235,195,64); }
.footer-right { display:flex; align-items:flex-start; gap:15px; }
.footer-right .language select { padding:4px 6px; border-radius:5px; border:1px solid #aaa; }
.footer-right .social a img { width:40px; height:40px; padding:2px; color: rgb(240,240,240); filter:grayscale(100%); transition:filter 0.3s; }
.footer-right .social a img:hover { filter:grayscale(0%); }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity:0; transform:translateY(20px);} to { opacity:1; transform:translateY(0); } }

/* Small utility tweaks for better scaling */
img, video, iframe { max-width:100%; height:auto; }

/* ===========================
   RESPONSIVE STYLES
   Applies breakpoints for tablets and phones
=========================== */

@media (max-width: 1024px) {
  .navbar { padding:20px 24px; height:auto; }
  .navbar .logo { font-size:24px; }
  .navbar .logo img { height:48px; }
  .navbar .nav-links { font-size:18px; gap:16px; }

  .intro { padding:80px 20px; }
  .intro h1 { font-size:32px; }
  .intro p { font-size:17px; }

  .content { height:auto; background-attachment:scroll; padding:30px 20px; }
  .content-box { margin-left:0; max-width:520px; margin:20px auto; }

  .key-register .container { gap:24px; padding:0 16px; }

  .team-grid-section { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .game-card { width:280px; }
}

@media (max-width: 768px) {
  .navbar { padding:12px 16px; }
  .navbar .nav-links { font-size:16px; gap:12px; flex-wrap:wrap; }
  .navbar .logo img { height:44px; }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #1B2A41;
    flex-direction: column;
    padding: 20px 0;
    display: none;
    z-index: 999;
  }

  .menu-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-links li {
    text-align: center;
    margin: 10px 0;
  }

  .intro { padding:60px 16px; flex-direction:column; text-align:center; }
  .intro-content { margin-left:0; max-width:100%; }
  .intro h1 { font-size:28px; }
  .intro p { font-size:16px; }

  .content { padding:20px 14px; background-attachment:scroll; }
  .content-box { padding:16px; margin:0 auto; }

  .key-register { flex-direction:column; padding:30px 14px; text-align:center; }
  .key-register .container { flex-direction:column; align-items:center; }
  .key-register .box { max-width:100%; width:100%; }

  .games-section { padding:30px 14px; }
  .game-card { width:100%; max-width:420px; }

  .team-member-card, .team-member-image { width:100%; height:auto; }

  .contact-container { flex-direction:column; padding:0 14px; }
  .contact-form { flex:1 1 100%; }
  .contact-info { flex:1 1 100%; width:100%; }

  .job-description-popup { width:95%; max-width:640px; padding:20px; }

  .modal-content { width:95%; height:auto; flex-direction:column; padding:16px; }
  #modal-img { max-width:100%; max-height:320px; margin:0 auto; }

  .slideshow-container { width:100%; }
  .nav.prev { left:10px; }
  .nav.next { right:10px; }
}

@media (max-width: 480px) {
  .navbar { padding:10px 12px; }
  .navbar .logo { font-size:20px; }
  .navbar .logo img { height:40px; }

  header h1 { font-size:1.6rem; }
  .intro h1 { font-size:22px; }
  .intro p { font-size:15px; }

  .content { padding:16px; }
  .content-box h2 { font-size:28px; }

  .team-section-title { font-size:1.4em; }
  .team-member-card { padding-top:0; }

  .games-section { padding:20px 10px; }
  .game-card { width:100%; }

  .footer { padding:14px 16px; }
  .footer-container { flex-direction:column; gap:8px; }

  .contact-form .btn { width:100%; }
}

/* End responsive */

/* ===========================
   Small-screen tweaks: typography, images, forms
   Improves readability and touch targets on phones/tablets
=========================== */

:root {
  --base-font: 16px;
  --heading-scale: 1.25;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: var(--base-font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* responsive headings (keeps hierarchy but reduces large sizes on small screens) */
h1 { font-size: 2.25rem; line-height: 1.15; }
h2 { font-size: 1.75rem; line-height: 1.2; }
h3 { font-size: 1.25rem; }

/* Ensure card and grid images behave consistently */
.team-member-image img,
.game-image img,
.grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Keep modal image contained to its area */
#modal-img { object-fit: contain; }

/* Make buttons and job titles easier to tap */
.btn, .job-title, .close-btn, .close {
  min-height: 44px;
  padding: 12px 16px;
  font-size: 16px;
}

/* Forms: bigger fields on small screens */
.contact-form input,
.contact-form textarea,
.contact-form select {
  font-size: 16px;
  padding: 14px 12px;
}

/* Useful small-screen overrides */
@media (max-width: 768px) {
  :root { --base-font: 15px; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.45rem; }
  .content-box, .modal-content, .job-description-popup { padding: 16px; }
  .job-title, .btn { font-size: 15px; padding: 12px 14px; }
}

@media (max-width: 480px) {
  :root { --base-font: 14px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  h3 { font-size: 1.05rem; }

  /* Make interactive controls full-width and stack comfortably */
  .job-title, .btn { display: block; width: 100%; box-sizing: border-box; }
  .contact-form input, .contact-form textarea { width: 100%; }

  /* Reduce card paddings and ensure images scale down neatly */
  .game-card, .team-member-card, .grid-card { padding: 8px; }
  .team-member-image, .game-image { width: 100%; height: auto; padding-top: 0; }
}
