/* Layout Styles */

html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: white;
  background: #eaeaea;
  background-attachment: fixed;
}

main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  text-align: center;
  overflow-y: auto;
}

h1 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 40px;
  transition: all 0.3s ease;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 4.75vw;
  padding-right: 4.75vw;
  padding-top: 1rem;
  padding-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
  background-color: #f1f1f1;
  max-height: 100px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
  flex: 1;
}

.logo {
  display: flex;
  align-items: center;
  color: #050f66;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 800;
  flex-shrink: 0;
}

.logo img {
  height: 60px;
  margin-right: 128px;
  padding: 5px;
}

.logo a {
  color: #050f66;
  text-decoration: none;
}

/* Navigation */
nav {
  display: block;
  flex: 1;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 60px;
}

nav li {
  margin: 0;
}

nav li p {
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: #0f1b4b;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.underline {
  border-bottom: 2px solid #0f1b4b;
  padding-bottom: 2px;
  display: inline-block;
  transition: all 0.3s ease;
}

.underline:hover {
  border-bottom-color: #a7c5eb;
}

.underline:hover a {
  color: #a7c5eb;
}

nav a:hover {
  color: #a7c5eb;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.social-icons a {
  color: #0f1b4b;
  margin-left: 20px;
  font-size: 18px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #a7c5eb;
}

/* Hide mobile social icons on desktop */
.social-icons-mobile {
  display: none;
}

/* Show desktop social icons */
.social-icons-desktop {
  display: flex;
}

/* Hamburger Menu - Hidden by default */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  background: rgba(15, 27, 75, 0.1);
  border: 2px solid #0f1b4b;
  border-radius: 5px;
  z-index: 1000;
  width: 28px;
  height: 28px;
  position: relative;
}

.hamburger span {
  width: 16px;
  height: 2px;
  background-color: #0f1b4b;
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hamburger span:nth-child(1) {
  top: 5px;
}

.hamburger span:nth-child(2) {
  top: 12px;
}

.hamburger span:nth-child(3) {
  top: 19px;
}

.hamburger.active span:nth-child(1) {
  top: 12px;
  transform: translateX(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: 12px;
  transform: translateX(-50%) rotate(-45deg);
}

/* Text Display Elements */
.text-display {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 15px 30px;
  margin-bottom: 30px;
  min-width: 200px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.text-display.highlight {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Footer */
footer {
  text-align: right;
  padding: 0.5rem;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
  background-color: #f1f1f1;
  color: #0f1b4b;
}

/* Tablet/Small Desktop - Below 1280px */
@media (max-width: 1280px) {
  .logo img {
    margin-right: 60px;
  }

  nav ul {
    gap: 30px;
  }

  nav a {
    font-size: 14px;
  }
}

/* Tablet - Below 1024px */
@media (max-width: 1024px) {
  .logo img {
    margin-right: 40px;
    height: 50px;
  }

  nav ul {
    gap: 20px;
  }

  nav a {
    font-size: 13px;
  }
}

/* Mobile Landscape - Below 768px */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 15px;
    gap: 0;
    max-height: none;
    align-items: center;
  }

  .header-left {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    position: relative;
    flex: 0 0 auto;
  }

  .logo {
    justify-content: center;
    flex: 0 0 auto;
  }

  .logo img {
    margin-right: 0;
    height: 50px;
  }

  
  .header-left nav {
    display: none;
  }


  .hamburger {
    display: flex !important;
    position: relative;
    flex: 0 0 auto;
  }

  
  .social-icons-desktop {
    display: none !important;
  }

  
  .social-icons-mobile {
    display: flex !important;
    justify-content: center;
    width: 100%;
    padding-top: 15px;
    padding-bottom: 10px;
  }

  .social-icons-mobile a {
    margin: 0 15px;
  }

  /* Collapsible nav for mobile */
  .header-left nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #f1f1f1;
    z-index: 999;
  }

  .header-left nav.active {
    display: block !important;
    max-height: 600px;
    padding: 15px 0;
  }

  nav ul {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    width: 100%;
  }

  footer {
    padding-right: 3rem;
  }

  .keypad {
    width: 200px;
  }

  .keypad button {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .text-display {
    font-size: 20px;
    padding: 12px 25px;
    min-width: 150px;
  }

}

/* Mobile Portrait - Below 640px */
@media (max-width: 640px) {
  header {
    padding: 10px;
  }

  .logo img {
    height: 40px;
  }

  nav a {
    font-size: 14px;
  }

  footer {
    padding-right: 2rem;
    font-size: 10px;
  }
}
