/* css/styles.css */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

/* Color palette */
:root {
  --primary: #18acfb;
  --secondary: #64ff3d;
  --btn-color: #b91c1c; /* Initial red for buttons */
  --dark: #111;
  --light: #f5f5f5;
  --white: #fff;
  --transition: 0.3s;
}

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

/* Base styles */
body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: linear-gradient(to bottom, #3c3c3c 0, #222 100%);
  background-repeat: repeat-x;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  height: 60px; /* Fixed height to contain larger logo */
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Align menu items to the right */
  position: relative;
  height: 100%;
}
.logo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Roboto", sans-serif;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.logo span {
  color: var(--secondary);
}
/* two-line sub-text next to logo */
.logo-subtext {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  font-family: "Roboto", sans-serif;
  position: absolute;
  left: 11rem;
  top: 60%;
  transform: translateY(-50%);
  font-size: 1.25rem; /* half of 4.5rem */
  line-height: 1.25rem; /* so two lines stack up to 4.5rem */
  color: var(--primary);
  text-align: left;
}
.logo-subtext .second {
  color: var(--secondary);
}
.logo-subtext div + div {
  margin-top: 0; /* already spaced by line-height */
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.nav-links li {
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--light);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background var(--transition);
}
.nav-links a:hover {
  background: var(--dark);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  width: 100%;
  height: 3px;
  background: var(--light);
  display: block;
  position: relative;
  transition: transform var(--transition), background var(--transition),
    opacity var(--transition);
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger::before {
  top: -8px;
}
.hamburger::after {
  top: 8px;
}

/* Hero */
.hero {
  position: relative;
  height: 90vh;
  background: url("../images/m113-hero_4.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.hero-content {
  position: relative;
  color: var(--white);
  animation: fadeInDown 1s ease-out both;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  background: var(--btn-color);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn:hover {
  opacity: 0.85;
}

/* Sections */
.section {
  padding: 4rem 0;
}
.section:nth-child(even) {
  background: var(--white);
}
.section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  position: relative;
}
.section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--secondary);
  margin: 0.5rem auto 1.5rem;
}
.section .sub {
  text-align: center;
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 2rem;
}

/* Grid & Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.card {
  background: var(--white);
  padding: 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
/* Align contact-info under form */
.contact-info {
  max-width: 600px;      /* same as .contact-form */
  margin: 1.5rem auto 0;  /* top-space, auto-center */
  font-size: 0.95rem;
}
.contact-info p {
  margin: 0.5rem 0;
}


/* Footer */
.footer {
  background: var(--primary);
  color: var(--white);
  padding: 2rem 0;
}
.footer .footer-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer .flag {
  width: 32px;
  height: auto;
}

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

/* Hamburger → “X” */
.nav-toggle.open .hamburger {
  background: transparent;
}
.nav-toggle.open .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    background: var(--dark);
    height: 100vh;
    width: 200px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: right var(--transition);
  }
  .nav-links.open {
    right: 0;
  }
}
