<!-- /includes/header.php -->
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title><?php echo $title; ?></title>

  <style>
    body {
      margin: 0;
      padding: 0;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background: #f7f7f8;
      color: #222;
    }
    .container {
      max-width: 900px;
      margin: 0 auto;
      text-align: left;
    }
    img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    }
    h1 {
      font-weight: 600;
      margin-bottom: 1rem;
    }
    p {
      color: #555;
      margin-bottom: 2rem;
    }

    /* Top Navigation Bar */
    .topnav {
      background: #111;
      padding: 0;
      margin: 0;
      width: 100%;
      position: sticky;
      top: 0;
      z-index: 1000;
      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    }
    
    .nav-container {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      padding: 0 20px;
    }
    
    .nav-logo {
	display: flex; 
	align-items: center;
    }

    .nav-logo img { 
	height: 40px; /* consistent logo size */ 
	width: auto; 
    }

    .nav-menu {
      list-style: none;
      display: flex;
      margin-left: auto;
      padding: 0;
    }
    
    .nav-item {
      position: relative;
    }
    
    .nav-item > a {
      display: block;
      padding: 15px 20px;
      color: #eee;
      text-decoration: none;
      font-size: 15px;
    }
    
    .nav-item > a:hover {
      background: #222;
    }
    
    /* Dropdown Menu */
    .dropdown {
      display: none;
      position: absolute;
      background: #222;
      list-style: none;
      padding: 0;
      margin: 0;
      min-width: 180px;
      border-radius: 0 0 4px 4px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    
    .dropdown li a {
      display: block;
      padding: 12px 16px;
      color: #ddd;
      text-decoration: none;
      font-size: 14px;
    }
    
    .dropdown li a:hover {
      background: #333;
      color: #fff;
    }
    
    /* Show dropdown on hover */
    .nav-item:hover .dropdown {
      display: block;
    }

    .nav-item > a,
    .dropdown li a {
     transition: background 0.25s ease, color 0.25s ease;
    }

    .topnav {
      border-bottom: 1px solid #222;
    }

    .dropdown {
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.25s ease, transform 0.25s ease;
      pointer-events: none;
    }
    
    .nav-item:hover .dropdown {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }

    .nav-item:hover > a {
      background: #1a1a1a;
      color: #76b900;
    }
    
    .dropdown li a {
      border-bottom: 1px solid #333;
    }
    
    .dropdown li:last-child a {
      border-bottom: none;
    }
    
        .topnav {
      box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    }

    /* Hamburger icon (hidden on desktop) */
    .hamburger {
      display: none;
      flex-direction: column;
      cursor: pointer;
      padding: 10px;
    }
    
    .hamburger span {
      height: 3px;
      width: 25px;
      background: #eee;
      margin: 4px 0;
      transition: 0.3s;
    }

    /* MOBILE MODE */
    @media (max-width: 900px) {
    
      .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        background: #111;
        width: 100%;
        flex-direction: column;
        padding: 0;
      }
    
      .nav-menu.mobile-active {
        display: flex;
      }
    
      .nav-item {
        width: 100%;
      }
    
      .nav-item > a {
        padding: 15px;
        border-bottom: 1px solid #222;
      }
    
      /* Dropdowns become tap-to-open */
      .dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
      }
    
      .nav-item:hover .dropdown {
        display: none; /* disable hover on mobile */
      }
    
      .nav-item.open .dropdown {
        display: block;
      }
    
      /* Show hamburger on mobile */
      .hamburger {
        display: flex;
        margin-left: auto;
      }

      /* Footer */
      .footer {
        background: #111;
        color: #ccc;
        padding: 30px 0 20px 0;
        font-size: 14px;
      }
      
      .footer-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
      }
      
      .footer-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 16px;
        color: #eee;
      }
      
      .footer-logo img {
        height: 32px;
        width: auto;
      }
      
      .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
      }
      
      .footer-links a {
        color: #ccc;
        text-decoration: none;
        transition: color 0.2s ease;
      }
      
      .footer-links a:hover {
        color: #fff;
      }
      
      .footer-bottom {
        text-align: center;
        color: #777;
        margin-top: 20px;
        font-size: 13px;
      }

    }

    /* SLIDESHOW / GALLERY SYSTEM */
    .gallery-block {
      width: 600px;
      height: 400px;
      position: relative;
      margin: 0 auto 20px auto;
      overflow: hidden;
      border-radius: 8px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
      background-color: white;
    }
    
    .gallery-block img {
      width: 100%;
      height: 100%;
      object-fit: contain;     /* <-- prevents cropping */
      background-color: white;  /* optional */
      position: absolute;
      top: 0;
      left: 0;
      opacity: 0;
      transition: opacity 1s ease-in-out;
    }

    .gallery-caption {
     text-align: center;
     font-size: 18px;
     color: #333;
     margin-top: 10px;
     opacity: 1;
     transition: opacity 1s ease-in-out; 
    }

    .gallery-video {
      width: 600px;
      height: 400px;
      object-fit: cover;
      background: #000;
      display: block;
      margin: 0 auto; /* centers inside table cell */
      border: none; /* Added to ensure iframe and video look the same */
    }
    .video-caption {
      text-align: center;
      font-size: 14px;
      margin-top: 6px;
      color: #444;
    }

    .section { border:1px solid #ccc; padding:20px; margin-bottom:20px; display:none; }
    .visible { display:block; }
    input[type=text], input[type=email] { width:300px; padding:8px; margin-bottom:10px; }
    button { padding:8px 16px; }
    .msg { margin:10px 0; color:#d00; }
    .thumb { border:1px solid #ccc; padding:5px; margin-bottom:10px; display:flex; align-items:center; gap:10px; }
    .thumb img { border:1px solid #ccc; }
    .progress-container { width:300px; height:10px; background:#eee; margin:10px 0; }
    .progress-bar { width:0%; height:100%; background:#4caf50; }

    #uploaded-list {
        text-align: center;
    }

    #uploaded-list .thumb {
        margin: 10px auto;
        text-align: center;
        display: inline-block;
    }

    #uploaded-list {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
     
    /* 
    #uploaded-list {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    */

    th.active-sort {
        background-color: #eef;
        font-weight: bold;
    }

  </style>
</head>
