/* styles.css - FINAL FIXED VERSION: Stable Mobile Menu (No Flicker, Reliable Show/Hide on Resize) */

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #002b5c;
  color: white;
  padding: 10px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  flex-wrap: wrap;
}

header .logo {
  max-width: 130px;
  height: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  background-color: #f0eeee;
  padding: 5px;
  border-radius: 3px;
}

.company-logo {
  max-width: 250px;
  height: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 3px;
}

/* Hamburger Toggle Button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2.2rem;
  font-weight: bold;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}

header nav a {
  color: white;
  text-decoration: none;
  padding: 8px 0;
  display: block;
}

header nav a.active,
header nav a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: auto;
}

/* HERO SECTION */
.hero {
  background: url('../assets/banner.png') no-repeat center center;
  background-size: cover;
  padding: 60px 20px;
  border-radius: 5px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0 auto;
  max-width: 90%;
  font-weight: 700;
}

.hero p {
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  margin-top: 15px;
  font-size: 1.1rem;
}

h1 {
  font-size: 45px;
}

.card {
  background: white;
  padding: 20px;
  margin: 15px 0;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  background: #005baa;
  color: white;
  text-decoration: none;
  border-radius: 3px;
  font-size: 0.95rem;
  text-align: center;
  transition: background 0.2s;
}

.button:hover {
  background: #004a8f;
}

footer {
  background: #002b5c;
  color: white;
  text-align: center;
  padding: 15px 0;
  margin-top: auto;
}

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

footer a:hover {
  color: #ffffff;
}

/* Forms */
form input,
form textarea {
  margin: 5px 0;
  padding: 10px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box;
  font-size: 1rem;
}

form button {
  margin-top: 15px;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  cursor: pointer;
}

/* Custom grid for contact form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    padding: 50px 15px;
  }

  .hero h1 {
    font-size: 1.8rem;
    max-width: 100%;
  }

  .card {
    margin: 10px 0;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  /* SHOW HAMBURGER */
  .nav-toggle {
    display: block;
  }

  /* Desktop menu hidden */
  header nav ul {
    flex-direction: column;
    background: #002b5c;
    width: 100%;
    gap: 0;
    text-align: center;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0;
  }

  /* Open state */
  header nav ul.open {
    max-height: 600px;
    padding: 20px 0;
  }

  header nav a {
    color: white !important;
    padding: 16px 20px;
    font-size: 1.2rem;
    transition: background 0.2s;
  }

  header nav a:hover {
    background: rgba(255,255,255,0.15);
  }

  /* Dropdown positioning */
  header .header-content {
    position: relative;
  }

  header nav {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    max-width: 80vw;
    z-index: 1000;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header .logo {
    max-width: 100px;
  }

  .hero {
    padding: 40px 15px;
  }

  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .container {
    width: 95%;
  }

  .card {
    padding: 15px;
  }

  .button {
    width: 100%;
    padding: 12px;
  }

  form input,
  form textarea {
    padding: 12px;
  }
}

/* Desktop: always show menu, hide button */
@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }

  header nav ul {
    display: flex !important;
  }
}

/* Active page */
header nav a.active {
  font-weight: bold;
  text-decoration: underline;
}

/* Optional right-aligned image inside .card */
.card-with-image {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.card-with-image .card-text {
  flex: 1;
  min-width: 250px; /* prevents text from collapsing too much */
  align-self: center;
}

.card-with-image img {
  flex: 0 0 auto;
  max-width: 100px;        /* adjust this value to your preference */
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  object-fit: cover;
}

img.bio {
    max-width: 220px;      /* or try 180px–280px depending on your preference */
    height: auto;          /* keeps the aspect ratio */
    display: block;        /* removes bottom gap and allows margin centering if needed */
    margin: 0 0 1.2em;  
}


/* On mobile: stack image below text */
@media (max-width: 768px) {
  .card-with-image {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .card-with-image img {
    max-width: 220px;
    margin: 0 auto;
  }
}

table.day-timetable {
    width: 100%;
    max-width: 580px;          /* slightly wider overall to give room for the time column */
    margin: 1.5em 0;           /* spacing above/below, no auto → left-aligned by default */
    border-collapse: collapse;
    font-size: 0.95em;
}

table.day-timetable th,
table.day-timetable td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #ddd;
}

/* Make the first column (Time) wider and prevent wrapping */
table.day-timetable th:first-child,
table.day-timetable td:first-child {
    width: 140px;              /* adjust between 120–160px depending on your longest time format */
    white-space: nowrap;       /* ← this is the key: prevents text wrap in time column */
    min-width: 120px;          /* fallback for very narrow screens */
}

table.day-timetable th {
    background-color: #f5f5f5;
    font-weight: 600;
}

table.day-timetable tr:nth-child(even) {
    background-color: #fafafa;
}

table.day-timetable caption {
    caption-side: top;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 0.6em;
    color: #333;
    text-align: left;          /* align caption with the left-aligned table */
}