/* =========================================================
   PNTV Africa – app.css
   Global foundation only
   ---------------------------------------------------------
   Contains:
   - Brand variables
   - Reset / base
   - Container
   - Header
   - Navigation
   - Mobile navigation
   - Search overlay
   - Footer
   - Newsletter modal

   IMPORTANT:
   Homepage/component typography and card styling belong
   in their respective page/component CSS files.
   ========================================================= */


/* =========================================================
   1. BRAND VARIABLES
   ========================================================= */

:root {

  /* Brand */
  --navy:          #05305A;
  --navy-dark:     #021F3A;
  --navy-mid:      #032843;

  --white:         #FFFFFF;

  --gold:          #FFCA26;
  --orange:        #FF8C1A;
  --orange-hover:  #FF9B20;

  /* Neutrals */
  --gray-50:       #F1F5F9;
  --gray-100:      #E2E8F0;
  --gray-200:      #CBD5E1;
  --gray-300:      #94A3B8;
  --gray-400:      #64748B;
  --gray-500:      #475569;
  --gray-600:      #334155;
  --gray-700:      #1E293B;
  --gray-800:      #0F172A;
  --gray-900:      #020617;

  /* Typography */
  --font:          'Montserrat', Arial, sans-serif;
  --text-base:     1rem;
  --leading:       1.6;

  /* Layout */
  --container:     1280px;
  --container-wide: 1440px;

  /* Radius */
  --radius:        12px;
  --radius-sm:     8px;

  /* Shadows */
  --shadow:        0 4px 20px rgba(5, 48, 90, 0.08);
  --shadow-hover:  0 12px 32px rgba(5, 48, 90, 0.14);

  /* Motion */
  --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* =========================================================
   2. RESET & BASE
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition);
}

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  max-width: 100%;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 202, 38, 0.55);
  outline-offset: 2px;
}


/* =====================================================
   PNTV AFRICA – MOBILE/TABLET FIXED HEADER
   Keeps the header visible while scrolling
   ===================================================== */

@media (max-width: 1099px) {

    html,
    body {
        overflow-x: clip;
    }

    .site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 5000;

        margin: 0;
        transform: none !important;

        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;

        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    }

    /*
     * Prevent the fixed header from covering the page content.
     * The header height is determined by the actual header contents.
     */
    .site-main {
        padding-top: 86px;
    }

}


/* =====================================================
   SMALL MOBILE
   ===================================================== */

@media (max-width: 600px) {

    .site-header {
        z-index: 5000;
    }

    .site-main {
        padding-top: 76px;
    }

}


/* =====================================================
   VERY SMALL MOBILE
   ===================================================== */

@media (max-width: 400px) {

    .site-main {
        padding-top: 72px;
    }

}


/* =========================================================
   3. CONTAINER
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 1920px) {
  .container {
    max-width: var(--container-wide);
    padding-left: 2rem;
    padding-right: 2rem;
  }
}


/* =========================================================
   4. ACCESSIBILITY
   ========================================================= */

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;

  background: var(--gold);
  color: var(--navy-dark);

  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);

  font-weight: 700;
  line-height: 1;
}

.skip-link:focus {
  top: 1rem;
}


/* =========================================================
   5. SITE HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: linear-gradient(
    180deg,
    var(--navy-dark) 0%,
    var(--navy-mid) 55%,
    var(--navy) 75%,
    var(--orange) 92%,
    var(--gold) 100%
  );

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}


/* ---------------------------------------------------------
   Header top
   --------------------------------------------------------- */

.header-top {
  background: transparent;
  border-bottom: none;
}

.header-top-inner {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 1.5rem;
  padding: 0.85rem 0;
}


/* ---------------------------------------------------------
   Logo
   --------------------------------------------------------- */

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  display: block;

  width: auto;
  height: 48px;

  object-fit: contain;

  filter: drop-shadow(
    0 2px 4px rgba(0, 0, 0, 0.35)
  );
}

@media (min-width: 768px) {
  .logo {
    height: 54px;
  }
}


/* ---------------------------------------------------------
   Header actions
   --------------------------------------------------------- */

.header-actions {
  display: flex;
  align-items: center;

  gap: 0.75rem;
  margin-left: auto;

  flex-shrink: 0;
}


/* ---------------------------------------------------------
   Search / mobile buttons
   --------------------------------------------------------- */

.search-toggle,
.mobile-menu-toggle {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--white);

  border-radius: 50%;

  transition:
    background-color var(--transition),
    color var(--transition);
}

.search-toggle:hover,
.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.search-toggle svg {
  stroke: var(--white);
}


/* =========================================================
   6. WATCH LIVE BUTTON
   ========================================================= */

.live-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;

  background: #FF0000;
  color: var(--white);

  font-size: 0.875rem;
  font-weight: 700;

  padding: 0.55rem 1.2rem;

  border-radius: 999px;

  letter-spacing: 0.02em;
  white-space: nowrap;

  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.35);

  transition:
    background-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.live-button:hover {
  background: #E60000;

  transform: translateY(-1px);

  box-shadow:
    0 6px 18px rgba(255, 0, 0, 0.45);
}


/* Hide old live dot */

.live-button .live-dot {
  display: none;
}


/* Play icon */

.live-button::before {
  content: '';

  display: inline-block;

  width: 0;
  height: 0;

  border-style: solid;
  border-width: 6px 0 6px 10px;

  border-color:
    transparent
    transparent
    transparent
    var(--white);

  margin-right: 2px;
}


/* =========================================================
   7. HAMBURGER
   ========================================================= */

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;

  width: 22px;
  height: 2px;

  background: var(--white);

  border-radius: 2px;

  transition: all 0.3s ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';

  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}


/* =========================================================
   8. DESKTOP NAVIGATION
   ========================================================= */

/*
   The navigation is positioned over the header so that
   the logo remains on the left and actions remain on
   the right while the menu stays centered.
*/

.header-bottom {
  display: none;
}

@media (min-width: 1100px) {

  .header-bottom {
    display: block;

    position: absolute;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    pointer-events: none;

    background: transparent;
    border: none;
  }

  .header-bottom .container {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;
  }

  .primary-nav {
    display: block !important;
    pointer-events: auto;
  }

  .mobile-menu-toggle {
    display: none !important;
  }


  /* -------------------------------------------------------
     Navigation list
     ------------------------------------------------------- */

  .primary-nav ul,
  .primary-nav .nav-list,
  .primary-nav > ul {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: nowrap;

    gap: 0.1rem;

    list-style: none;

    margin: 0;
    padding: 0;
  }


  /* -------------------------------------------------------
     Navigation items
     ------------------------------------------------------- */

  .primary-nav li {
    position: relative;

    margin: 0;
    padding: 0;

    list-style: none;
  }


  /* -------------------------------------------------------
     Navigation links
     ------------------------------------------------------- */

  .primary-nav a {
    display: block;

    padding: 0.7rem 0.85rem;

    font-size: 0.875rem;
    font-weight: 600;

    color: rgba(255, 255, 255, 0.92);

    white-space: nowrap;

    border-radius: 6px;

    transition:
      color var(--transition),
      background-color var(--transition);
  }

  .primary-nav a:hover,
  .primary-nav a:focus {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
  }

  .primary-nav a.active,
  .primary-nav .current-menu-item > a,
  .primary-nav li.active > a {
    color: var(--gold);
  }


  /* -------------------------------------------------------
     Dropdowns
     ------------------------------------------------------- */

  .primary-nav li ul,
  .primary-nav .sub-menu {
    display: none;

    position: absolute;

    top: 100%;
    left: 0;

    min-width: 180px;

    background: var(--navy-dark);

    border-radius: var(--radius-sm);

    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.35);

    padding: 0.5rem 0;

    z-index: 100;
  }

  .primary-nav li:hover > ul,
  .primary-nav li:hover > .sub-menu {
    display: block;
  }

  .primary-nav li ul a,
  .primary-nav .sub-menu a {
    padding: 0.6rem 1.1rem;

    font-size: 0.85rem;

    white-space: nowrap;
  }
}


/* =========================================================
   9. MOBILE / TABLET NAVIGATION
   ========================================================= */

@media (max-width: 1099px) {

  .header-bottom {
    display: none;
  }

  .primary-nav {
    display: none;
  }
}


/* ---------------------------------------------------------
   Mobile menu open state
   --------------------------------------------------------- */

.site-header.nav-open .header-bottom {
  display: block;

  position: absolute;

  top: 100%;
  left: 0;
  right: 0;

  background: var(--navy-dark);

  border-bottom:
    3px solid var(--gold);

  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.30);

  z-index: 999;
}

.site-header.nav-open .primary-nav {
  display: block !important;
}

.site-header.nav-open .primary-nav ul {
  display: flex;

  flex-direction: column;

  padding: 0.75rem 0;
}

.site-header.nav-open .primary-nav a {
  display: block;

  width: 100%;

  padding: 0.9rem 1.5rem;

  color: rgba(255, 255, 255, 0.90);

  border-bottom:
    1px solid rgba(255, 255, 255, 0.06);
}

.site-header.nav-open .primary-nav a:hover,
.site-header.nav-open .primary-nav a:focus {
  color: var(--gold);

  background:
    rgba(255, 255, 255, 0.05);
}


/* =========================================================
   10. SEARCH OVERLAY
   ========================================================= */

.search-overlay {
  position: fixed;

  inset: 0;

  z-index: 2000;

  display: flex;

  align-items: center;
  justify-content: center;

  background:
    rgba(2, 31, 58, 0.95);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-content {
  position: relative;

  width: min(600px, 90%);
}

.search-close {
  position: absolute;

  top: -3rem;
  right: 0;

  color: var(--white);

  font-size: 2rem;
  line-height: 1;
}

.search-form {
  display: flex;

  gap: 0.5rem;
}

.search-form input {
  flex: 1;

  min-width: 0;

  padding: 1rem 1.25rem;

  border:
    2px solid rgba(255, 255, 255, 0.20);

  border-radius: var(--radius);

  background:
    rgba(255, 255, 255, 0.08);

  color: var(--white);

  font-size: 1.125rem;
}

.search-form input::placeholder {
  color:
    rgba(255, 255, 255, 0.50);
}

.search-form input:focus {
  outline: none;

  border-color: var(--gold);

  background:
    rgba(255, 255, 255, 0.10);
}

.search-form button {
  flex-shrink: 0;

  background: var(--gold);

  color: var(--navy-dark);

  font-weight: 700;

  padding: 0 1.5rem;

  border-radius: var(--radius);

  transition:
    background-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.search-form button:hover {
  background: var(--orange);

  transform: translateY(-1px);
}


/* =========================================================
   11. SITE FOOTER
   ========================================================= */

.site-footer {
  background: var(--navy-dark);

  color:
    rgba(255, 255, 255, 0.85);

  padding: 4rem 0 0;

  margin-top: 4rem;
}

.footer-grid {
  display: grid;

  grid-template-columns: 1fr;

  gap: 2.5rem;

  padding-bottom: 3rem;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.10);
}

@media (min-width: 768px) {

  .footer-grid {
    grid-template-columns:
      1.6fr 1fr 1fr 1fr;

    gap: 2rem;
  }
}


/* ---------------------------------------------------------
   Footer logo
   --------------------------------------------------------- */

.footer-logo {
  width: auto;
  height: 48px;

  margin-bottom: 1.25rem;

  filter:
    drop-shadow(
      0 1px 3px rgba(0, 0, 0, 0.40)
    );
}


/* ---------------------------------------------------------
   Footer description
   --------------------------------------------------------- */

.footer-description {
  max-width: 320px;

  margin-bottom: 1.5rem;

  font-size: 0.9375rem;

  line-height: 1.65;

  color:
    rgba(255, 255, 255, 0.70);
}


/* ---------------------------------------------------------
   Footer social links
   --------------------------------------------------------- */

.footer-social {
  display: flex;

  gap: 0.75rem;
}

.footer-social a {
  width: 40px;
  height: 40px;

  display: flex;

  align-items: center;
  justify-content: center;

  background:
    rgba(255, 255, 255, 0.08);

  border-radius: 50%;

  color: var(--white);

  transition:
    background-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.footer-social a:hover {
  background: var(--gold);

  color: var(--navy-dark);

  transform: translateY(-2px);
}


/* ---------------------------------------------------------
   Footer headings
   --------------------------------------------------------- */

.footer-heading {
  margin-bottom: 1.25rem;

  font-size: 0.875rem;
  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.06em;

  color: var(--gold);
}


/* ---------------------------------------------------------
   Footer links
   --------------------------------------------------------- */

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  font-size: 0.9375rem;

  color:
    rgba(255, 255, 255, 0.75);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-links .view-all {
  color: var(--gold);
  font-weight: 600;
}


/* =========================================================
   12. FOOTER BOTTOM
   ========================================================= */

.footer-bottom {
  padding: 1.5rem 0;
}

.footer-legal {
  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 1rem;

  text-align: center;

  font-size: 0.875rem;

  color:
    rgba(255, 255, 255, 0.55);
}

@media (min-width: 768px) {

  .footer-legal {
    flex-direction: row;

    justify-content: space-between;

    text-align: left;
  }
}

.legal-links {
  display: flex;

  flex-wrap: wrap;

  gap: 1.25rem;

  justify-content: center;
}

.legal-links a:hover {
  color: var(--gold);
}


/* =========================================================
   13. NEWSLETTER MODAL
   ========================================================= */

.newsletter-modal {
  position: fixed;

  inset: 0;

  z-index: 3000;

  display: flex;

  align-items: center;
  justify-content: center;

  background:
    rgba(2, 31, 58, 0.90);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.newsletter-modal.active {
  opacity: 1;
  visibility: visible;
}

.newsletter-modal-content {
  position: relative;

  width: min(420px, 92%);

  padding: 2.5rem;

  background: var(--white);

  border-radius: var(--radius);

  text-align: center;
}

.newsletter-modal-close {
  position: absolute;

  top: 1rem;
  right: 1.25rem;

  color: var(--gray-500);

  font-size: 1.5rem;

  line-height: 1;
}

.newsletter-modal-close:hover {
  color: var(--navy);
}

.newsletter-modal h3 {
  color: var(--navy);

  margin-bottom: 0.5rem;
}

.newsletter-form {
  display: flex;

  flex-direction: column;

  gap: 0.75rem;

  margin:
    1.5rem 0 1rem;
}

.newsletter-form input {
  padding: 0.85rem 1rem;

  border:
    2px solid var(--gray-200);

  border-radius: var(--radius-sm);

  font-size: 1rem;

  color: var(--gray-800);

  background: var(--white);
}

.newsletter-form input:focus {
  outline: none;

  border-color: var(--gold);
}

.newsletter-form button {
  background:
    linear-gradient(
      135deg,
      var(--orange),
      var(--gold)
    );

  color: var(--navy-dark);

  font-weight: 700;

  padding: 0.9rem;

  border-radius: var(--radius-sm);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.newsletter-form button:hover {
  transform: translateY(-1px);

  box-shadow:
    0 6px 16px rgba(255, 140, 26, 0.25);
}

.newsletter-privacy {
  font-size: 0.8rem;

  color: var(--gray-500);
}


/* =========================================================
   14. NEWSLETTER SECTION OVERRIDE
   ---------------------------------------------------------
   This is intentionally limited to the newsletter component.
   It does NOT globally style all h3 elements.
   ========================================================= */

.newsletter-section h3 {
  color: var(--white) !important;
}


/* =========================================================
   15. SMALL SCREEN ADJUSTMENTS
   ========================================================= */

@media (max-width: 640px) {

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header-top-inner {
    gap: 0.75rem;
  }

  .logo {
    height: 46px;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .search-toggle,
  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }

  .live-button {
    font-size: 0.78rem;
    padding: 0.5rem 0.85rem;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form button {
    min-height: 46px;
    padding: 0.75rem 1rem;
  }

  .newsletter-modal-content {
    padding: 2rem 1.25rem;
  }
}


/* =========================================================
   END OF GLOBAL APP CSS
   ========================================================= */


@media (max-width: 767px) {

    .header-top-inner {
        padding: 0.55rem 0;
    }

    .logo {
        height: 48px;
        width: auto;
    }

    .search-toggle,
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

}