/* ===== Global Reset ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f4f6f8;
  color: #333;
  line-height: 1.6;
}

/* ===== Header & Navigation ===== */
header {
  background: #0a3d62;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

header img {
  height: 55px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

/* ===== Hero Section ===== */
.hero {
  background: url('../images/home.jpeg') center/cover no-repeat;
  padding: 90px 20px;
  color: white;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  max-width: 900px;
  margin: auto;
}

/* ===== Page Sections ===== */
section {
  background: #fff;
  margin: 25px auto;
  padding: 25px;
  max-width: 1100px;
  border-radius: 8px;
}

h2 {
  color: #0a3d62;
  margin-top: 0;
}

/* ===== Cards & Events ===== */
.card-grid {
  display: grid;
}

.card {
  background: #f9fbfd;
  padding: 20px;
  border-radius: 6px;
  width: 15cm;
  height: 10cm;
  object-fit: cover;
}

.card img {
  width: 100%;
  border-radius: 6px;
}

/* ===== Alumni Grid ===== */
.alumni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  text-align: center;
}

.alumni-grid img {
  width: 100%;
  max-width: 3cm;
  height: 4cm;
  object-fit: cover;
  border-radius: 6px;
}

.alumni-grid p {
  font-size: 14px;
  margin: 6px 0 0;
}

/* ===== Footer ===== */
footer {
  background: #0a3d62;
  color: #fff;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  font-size: 14px;
}

/* ===== MOBILE VIEW ===== */
@media (max-width: 768px) {

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  nav {
    justify-content: center;
    margin-top: 10px;
  }

  .hero {
    padding: 60px 15px;
  }

  .hero h1 {
    font-size: 24px;
  }

  section {
    margin: 15px;
    padding: 20px;
  }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {

  nav a {
    font-size: 14px;
  }

  .hero h1 {
    font-size: 20px;
  }

  section {
    padding: 16px;
  }

  footer {
    font-size: 13px;
  }
}

/* ===== Alumni Grid Improvements for Small Screens ===== */

/* Tablets & small phones */
@media (max-width: 600px) {
  .alumni-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .alumni-grid img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

/* Very small phones (<= 480px) */
@media (max-width: 480px) {
  .alumni-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .alumni-grid img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .alumni-grid p {
    font-size: 13px;
    line-height: 1.3;
  }
}

/* Extra small devices (<= 360px) */
@media (max-width: 360px) {
  .alumni-grid {
    grid-template-columns: 1fr;
  }

  .alumni-grid img {
    max-width: 180px;
    margin: auto;
  }
}

/* ===== Card Grid(Event Page) Improvements for Small Screens ===== */

/* Tablets & small phones */
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .card-grid img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

/* Very small phones (<= 480px) */
@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card-grid img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .card-grid p {
    font-size: 13px;
    line-height: 1.3;
  }
}

/* Extra small devices (<= 360px) */
@media (max-width: 360px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-grid img {
    max-width: 180px;
    margin: auto;
  }
  
  .map {
    height: 150px;
    width: 100px;
  }
}
