*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: #111111;
  background: #ffffff;
}
.image-gallery{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  max-width: 100%;
  padding: 10px;
  box-sizing: border-box;
}
.image-gallery img{
  flex: 1 1 calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);
  height: auto;
  border: 5px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
img {
  max-width: 100%;
  height: auto;
}

h1 {
  margin: 0;
  padding: 0;
  font-size: 28px;
  line-height: 1.25;
  font-family: Arial, Helvetica, sans-serif;
  color: black;
}

h2 {
  margin: 0;
  padding: 0;
  line-height: 1.2;
  font-size: 17px;
  color: black;
}
h3 {
  margin: 0 0 10px 0;
  padding: 0 0 8px 0;
  font-size: 1.25em;
  color: #ffffff;
}
p {
  margin: 0;
  padding: 0;
  line-height: 1.6;
}
section {
  margin: 0 25px 25px 25px;
  padding: 20px 25px;
  background: #ffffff;
  border-radius: 8px;
}
/* ---------- 2. Header: logo (left) + nav (right), floating over hero ---------- */
.main-header {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 10;                    /* always above hero */
display: flex;
flex-direction: row;
justify-content: space-between; /* logo left, nav right */
align-items: center;
gap: 20px;
margin: 0;
padding: 15px 30px;
background: #000000;
border-radius: 0;
text-align: left;
}

.logo-link {
  display: block;
  line-height: 0;
}

.site-logo {
  display: block;
  height: 60px;
  width: auto;
}

/* ---------- 3. Navigation ---------- */
nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  padding: 0px;
}

nav a {
  display: inline-block;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  background-color: transparent;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
/* 4. Add an interactive hover effect */
nav a:hover,
nav a:focus-visible {
  background-color: #e02020;
}

/* ---------- 5. Hero ---------- */
.broadcast-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 110px 20px 60px;
  overflow: hidden;
  background-color: #000000;
  background-image:
  linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 30%),
  linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35) ),
  url("images/hero-bg.JPG");
  background-size: cover;            /* fills the whole area */
  background-position: center;       /* keeps the image centered */
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
}

.hero-content-box {
  width: 100%;
  max-width: 800px;
  padding: 40px 20px;
  text-align: center;
}

.hero-tagline {
  margin-bottom: 28px;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: bold;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  background-color: #e02020;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background-color: #b81818;
}

.btn-cta .arrow::after{
  content: "\2192"
}

/* ---------- 5. Intro text under the hero ---------- */
body > h1 {
  margin: 50px 20px 8px 20px;                   /* targets only the "Welcome to MAPHAKS" heading */
}

.hero-description {
  margin: 0 20px 30px 20px;
  font-size: 1.1rem;
  color: #444444;
}
  /* ---------- 6. Article ---------- */
  .centered-box {
    width: 90%;                 /* Occupies most of the screen on mobile devices */
    max-width: 650px;           /* Stops expanding on desktop for ideal reading length */
    margin: 0 auto;             /* Centers the container on the page */
    text-align: justify;
    hyphens: auto;              /* Justifies the text inside */
  }
  .centered-box p{
    line-height: 1.7;
  }

  .centered-box a {
    color:#e02020;
  }

/* Article photo (an <img> placed directly inside <body>) */
body > img {
  display: block;
  width: 100%;
  max-width: min(500px, calc(100% - 50px));
  height: auto;
  margin: 25px auto;
  padding: 8px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* "Latest News" and "More Stories" headings */
.section-title {
display: inline-block;
margin: 40px 0 30px 0;
padding-bottom: 10px;
font-size: 2.2rem;
font-weight: bold;
line-height: 1.2;
letter-spacing: 1px;
text-transform: uppercase;
color: #000000;
border-bottom: 4px solid #e02020;
}

/* ---------- 7. Footer ---------- */
footer {
  position: relative;
  z-index: 20;                      /* always above the heros */
  display: block;
  clear: both;
  margin: 40px 0 0 0;
  padding: 20px 15px;
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

footer a {
  color: #e02020;         /* Replace with your preferred color or hex code */
  text-decoration: none;
}
footer a:hover,
footer a:focus-visible {
  color: #e02020;         /* Changes color when someone hover over the link */
  text-decoration: underline;   /* optional: adds underline back on hover */
}

/* ---------- Three information boxes side by side ---------- */
/* Sections 4, 5 and 6 are the three "Information" boxes */
.info-box {
  float: left;
  width: calc(33.333% - 33px);
  margin: 0 0 25px 25px;
  background: #e02020;
  color: #ffffff;
}
.info-box {
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.info-box a{
display: flex;
flex-direction: column;
justify-content: center;
min-height: 180px;
padding: 30px 25px;
color: #ffffff;
text-decoration: none;
}

.info-box:hover{
background-color: #b81818;
transform: translateY(-4px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.info-box a:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -6px;
}

/* ---------- Mobile (screens 700px wide or narrower) ---------- */
@media (max-width: 700px) {
  .main-header {
    flex-direction: column;         /* logo on top, nav below */
    gap: 10px;
    padding: 15px;
  }
  .site-logo {
    height: 45px;
  }
  nav {
    justify-content: center;
    margin-left: 0;
  }
  nav a {
    padding: 6px 12px;
    font-size: 14px;
  }

  .broadcast-hero {
    padding-top: 160px;
  }
  .info-box {
    float: none;
    width: auto;
    margin: 0 25px 25px 25px;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

nav a[aria-current="page"] {
  background-color: #e02020;
}

body .main-header.portfolio-header {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  z-index: 10;
  margin: 0;
  padding: 15px 30px;
  background: #000000;
}
 body .portfolio-hero {
   position: relative;
   width: 100%;
   min-height: 50vh;
   margin: 0;
   padding: 60px 20px;

    background-image:
     linear-gradient(
       rgba(0, 0, 0, 0.45),
       rgba(0, 0, 0, 0.45)
       ),
     url("images/portfolio-bg.png");

     background-size: cover;
     background-position: center;
     background-repeat: no-repeat;

   }

 .broadcast-hero .hero-tagline {
   margin-bottom: 0;
   color: #ffffff;
 }

 .portfolio-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 25px;
   max-width: 1100px;
   margin: 50px auto 0 auto;
   padding: 0 25px
 }

 .portfolio-card {
   overflow: hidden;
   background: #ffffff;
   border: 1px solid #dddddd;
   border-radius: 8px;
   box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
   text-align: left;
   transition: transform 0.2s ease, box-shadow 0.2s ease;
 }

 .portfolio-card:hover {
   transform: translateY(-4px);
   box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
 }

 .portfolio-card a {
   display: flex;
   flex-direction: column;
   height: 100%;
   color: inherit;
   text-decoration: none;
 }

 .portfolio-card a:focus-visible {
   outline: 3px solid #e02020;
   outline-offset: -3px;
 }

 .portfolio-card img {
   display: block;
   width: 100%;
   aspect-ratio: 4 / 3;
   object-fit: cover;
 }

 .card-body {
   flex: 1;
   padding: 18px 20px 22px 20px;
   color: #111111;
 }

.card-body p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444444;
}

@media screen and (max-width: 768px) {
  .main-header {
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
    }

  .main-header nav {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 15px;
}

.broadcast-hero {
    min-height: 65vh;
    padding: 60px 20px;
    background-position: center
}

.hero-content-box {
    max-width: 90%;
}

.hero-content-box h1 {
    font-size: 2.5rem;
}

.portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px;
}

.portfolio-card {
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

@media screen and (max-width: 480px) {

.main-header {
    padding: 12px 10px;
  }

.main-header nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

.main-header nav a{
    font-size: 14px;
  }

.site-logo {
  max-width: 130px;
  height: auto;
}

.braodcast-hero {
  min-height: 55vh;
  padding: 40px 15px;
}

.hero-content-box {
  width: 100%;
  max-width: 100%;
}
.portfolio-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 15px 10px;
  }

.portfolio-card {
  width: 100%;
  padding: 15px;
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 1.4rem;
}

p {
  font-size: 15px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

footer {
  padding: 20px 10px;
  text-align: center;
}
}
