/* ==========================================
   LTA Web Development Systems I - WDS-101
   Stylesheet: style.css
   Author: Ebenezer Nicholas (Nico Lane)
   ========================================== */

/* Root Variables & Reset */
:root {
  --lta-green: #40B060;
  --lta-blue: #0070B0;
  --text-dark: #1F2A37;
  --bg-light: #F0F6FA;
  --white: #FFFFFF;
  --gray-border: #D1D5DB;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
}

/* (a) Grouped Selectors */
h1, h2, h3 {
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.25;
  color: var(--lta-blue);
  margin-bottom: 1rem;
}

/* (b) Flexbox Navigation Bar */
header {
  background-color: var(--white);
  border-bottom: 2px solid var(--bg-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-bar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-container img {
  height: 40px;
  width: auto;
}

.logo-container span {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--lta-blue);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* (a) Descendant + Chained Selectors */
nav ul li a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--lta-blue);
}

nav ul li a.active {
  color: var(--lta-blue);
  border-bottom: 2px solid var(--lta-green);
}

/* Active Page Button Style */
nav ul li a.active-btn {
  background-color: var(--lta-blue);
  color: var(--white);
  border-radius: 4px;
  padding: 0.5rem 1rem;
}

nav ul li a.active-btn:hover {
  background-color: #005a8d;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 112, 176, 0.85), rgba(64, 176, 96, 0.85)), url('../images/hero.jpg') no-repeat center center/cover;
  color: var(--white);
  text-align: center;
  padding: 6rem 2rem;
}

.hero h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

.btn-primary {
  display: inline-block;
  background-color: var(--lta-green);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #359650;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* (a) Child Combinator */
section > p:first-of-type {
  font-size: 1.05rem;
  color: #5A6372;
}

/* (c) CSS Grid for Highlights / Cards */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  grid-auto-rows: minmax(180px, auto);
  margin-top: 2rem;
}

.card {
  background-color: var(--bg-light);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Move green top-border on card hover */
section article {
  border-top: 3px solid transparent;
  transition: border-top 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

section article:hover {
  border-top: 3px solid var(--lta-green);
}

/* (d) Attribute Selectors for Forms & Links */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-border);
  border-radius: 4px;
  font-family: inherit;
}

input[type="email"] {
  border-left: 4px solid var(--lta-blue);
}

input[type="tel"] {
  border-left: 4px solid var(--lta-green);
}

a[target="_blank"]::after {
  content: " \2197";
  color: var(--lta-blue);
  font-size: 0.85em;
}

img[alt*="campus"] {
  border-radius: 12px;
}

/* Tables & Zebra Striping */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-border);
}

th {
  background-color: var(--lta-blue);
  color: var(--white);
}

/* (e) Structural Pseudo-class: Zebra Striping */
tbody tr:nth-child(even) {
  background-color: var(--bg-light);
}

/* Footer */
footer {
  background-color: var(--lta-blue);
  color: var(--white);
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

footer p {
  font-size: 0.9rem;
}