/* CSS Reset and Global Styles */
:root {
  --color-primary: #007a8a; /* Teal/Turquoise - Inspired by UCC logo colors */
  --color-secondary: #ffc000; /* Vibrant Gold/Yellow for accents/CTAs */
  --color-dark: #333333;
  --color-light: #cfecec;
  --color-white: #ffffff;
  --font-heading: "Poppins", sans-serif;
  --font-body: "Open Sans", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-white);
}

/* Utility Classes */
.container {
  width: 90%;
  max-width: 900px;
  text-align: left;
  margin: auto;
  padding: 40px 0;
}

.text-center {
  text-align: center;
}

/* --- Header and Navigation --- */
.header {
  background-color: var(--color-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.h2 {
  font-family: var(--font-heading);
  font-size: 2.5em;
  margin-bottom: 10px;
  text-align: center;
}

.h3 {
  font-family: var(--font-heading);
  font-size: 2em;
  margin-bottom: 10px;
  text-align: center;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo h1 {
  font-family: var(--font-heading);
  font-size: 1.8em;
  color: var(--color-primary);
}

.logo title {
  text-decoration: none;
  color: var(--color-primary);
}

.logo span {
  color: var(--color-secondary);
}

.nav-links a {
  text-decoration: none;
  color: var(--color-dark);
  margin-left: 25px;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.page-navbar {
  display: flex;
  justify-content: flex-end; /* Pushes content to the far right */
  align-items: center;
  padding: 5px 0;
}

.page-nav-links {
  margin-bottom: 5px;
}

.page-nav-links a {
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  font-size: 0.9em;
  gap: 15px;
  transition: color 0.3s;
}
.page-nav-links a:hover {
  color: var(--color-primary);
}

/* --- Hero Section with Carousel --- */
.hero {
  position: relative;
  height: 70vh; /* Viewport height */
  min-height: 450px;
  display: flex; /* This helps center hero-content if needed */
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Important for containing images */
}

/* Overlay for the hero content */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay */
  z-index: 5; /* Below content, above images */
}

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures images cover the area without distortion */
  opacity: 0; /* Hidden by default */
  transition: opacity 1.5s ease-in-out; /* Smooth fade transition */
  z-index: 1; /* Below the overlay and content */
}

.carousel-image.active {
  opacity: 1; /* Active image is visible */
  z-index: 2; /* Bring active image above others */
}

.hero-content {
  position: relative;
  z-index: 10; /* Ensure content is above overlay and images */
  color: var(--color-white);
  max-width: 800px;
  margin: auto;
  padding: 20px;
  text-align: center; /* Ensure text alignment for hero-content */
}

.hero-content h2 {
  font-family: var(--font-heading);
  font-size: 3.5em;
  margin-bottom: 15px;
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.3em;
  margin-bottom: 30px;
  font-weight: 300;
}

/* --- Buttons (CTA Style) --- */
.btn {
  display: inline-block;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-dark);
  border: 2px solid var(--color-secondary);
  margin: 0 10px;
}

.btn-primary:hover {
  background-color: #e6b200;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  margin: 0 10px;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* --- Welcome/Mission Section --- */
.welcome-section {
  background-color: var(--color-light);
  padding: 40px 0;
}
.welcome-section h2 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 2.7em;
  margin-bottom: 15px;
  text-align: center;
}

.welcome-section h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 2.2em;
  margin-bottom: 15px;
  text-align: center;
}

.welcome-section h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 1.8em;
  margin-bottom: 15px;
  text-align: center;
}

.welcome-section p {
  max-width: 900px;
  margin: 0 auto 30px auto;
  font-size: 1.3em;
}

.welcome-section ul {
  max-width: 900px;
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.welcome-section ol {
  max-width: 900px;
  list-style-type: decimal;
  padding-left: 20px;
  margin-bottom: 20px;
}

.welcome-section li {
  max-width: 900px;
  margin-bottom: 10px;
  line-height: 1.5;
}
/* --- Core Values/Service Info Section --- */
.info-cards {
  display: flex;
  gap: 20px;
  padding: 40px 0;
}

.card {
  flex: 1;
  background-color: var(--color-white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 2em; /* Use a font icon or an image here */
  color: var(--color-primary);
  margin-bottom: 15px;
}

.card h4 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin-bottom: 10px;
}

/* --- Footer --- */
.footer {
  background-color: var(--color-dark);
  color: var(--color-light);
  padding: 40px 0;
  font-size: 0.9em;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer h5 {
  color: var(--color-secondary);
  font-family: var(--font-heading);
  margin-bottom: 10px;
}

.footer-column p,
.footer-column a {
  color: var(--color-light);
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
}

.footer-column a:hover {
  color: var(--color-secondary);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    margin-top: 15px;
  }

  .nav-links a {
    margin: 0 10px;
  }

  .page-nav-links {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin-bottom: 10px;
  }

  .hero {
    height: 50vh;
  }

  .hero-content h2 {
    font-size: 2.5em;
  }

  .info-cards {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
  }
}
/* --- Scroll-to-Top Button --- */
#scroll-to-top {
  /* CRITICAL: This makes the button stick to the viewport */
  position: fixed;
  bottom: 20px;
  right: 20px;

  /* CRITICAL FIX: Hides the button by default */
  display: none;
  z-index: 999;

  /* Styling */
  border: none;
  outline: none;
  background-color: var(--color-secondary); /* Gold button */
  color: var(--color-dark);
  cursor: pointer;
  padding: 15px 18px;
  border-radius: 50%;
  font-size: 1.5em;
  line-height: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
}

#scroll-to-top:hover {
  background-color: #e6b200;
}

/* --- Scroll-to-Top Button (For completeness) --- */
#scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 999;
  border: none;
  outline: none;
  background-color: var(--color-secondary);
  color: var(--color-dark);
  cursor: pointer;
  padding: 15px 18px;
  border-radius: 50%;
  font-size: 1.5em;
  line-height: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
}

#scroll-to-top:hover {
  background-color: #e6b200;
}

/* --- Responsive Two-Column List (Replaces Table) --- */
.responsive-list {
  display: flex; /* CRITICAL: Enables horizontal alignment */
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 1em;
  align-items: center;
}

.responsive-list:last-child {
  border-bottom: none;
}

.header-row {
  font-family: var(--font-heading);
  font-size: 1.1em;
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.responsive-list .col-left {
  /* Minister name column */
  flex-basis: 60%;
  font-weight: 600;
}

.responsive-list .col-right {
  /* Service Dates column */
  flex-basis: 40%;
  text-align: right;
}

.ministers-list-wrapper {
  max-width: 650px; /* The desired maximum width for the list */
  margin: 30px auto 0; /* Centers the block horizontally, adds 30px margin on top */
}

/* --- Mobile Responsiveness: Stack columns vertically --- */
@media (max-width: 650px) {
  /* When the screen is narrower than the list container, the list will stack. 
       This ensures the list is always readable. */
  .ministers-list-wrapper {
    max-width: 100%; /* Allows it to expand to fill the screen on mobile */
    padding: 0 15px; /* Optional: adds a little padding on the sides for small screens */
  }
  
  .responsive-list {
    /* Stack items vertically on small screens */
    flex-direction: column;
    padding: 15px 0;
    align-items: flex-start;
  }

  .responsive-list .col-left,
  .responsive-list .col-right {
    /* Let columns take full width on mobile */
    flex-basis: 100%;
    text-align: left;
    padding: 2px 0;
  }

  .responsive-list .col-right {
    /* Make the dates less prominent on mobile */
    font-size: 0.9em;
    color: #666;
  }

  .header-row {
    /* Hide the header row on mobile */
    display: none;
  }
}

/* 1. The main container for the video player */
.video-responsive-container {
    /* Sets the relative positioning context */
    position: relative; 
    /* The video width will fill its parent container (the 700px width we set) */
    width: 100%; 
    /* Hide the overflow of the iframe */
    overflow: hidden;
    /* This creates the 16:9 aspect ratio: (9 / 16) * 100 = 56.25% */
    padding-top: 56.25%; 
    /* Add some space below each video */
    margin-bottom: 20px; 
}

/* 2. Styles for the actual iframe player */
.video-responsive-container iframe {
    /* Positions the iframe over the entire padded area */
    position: absolute;
    top: 0;
    left: 0;
    /* Forces the iframe to fill the 16:9 container perfectly */
    width: 100%;
    height: 100%;
}