/* =========================================
   PA Carter site – Name & Place palette
   Single source of truth
   ========================================= */

:root {
  --pc-primary: #009F93;
  --pc-primary-hover: #007F75;
  --pc-on-primary: #ffffff;
}

/* ---------- Primary background blocks ---------- */
.bg-primary {
  background-color: var(--pc-primary) !important;
}

/* ---------- Divider ---------- */
.divider {
  background-color: var(--pc-primary) !important;
}

/* ---------- Text + icons ---------- */
.text-primary,
.bi {
  color: var(--pc-primary) !important;
}

/* ---------- Buttons ---------- */
.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary,
input.btn.btn-primary {
  background-color: var(--pc-primary) !important;
  border-color: var(--pc-primary) !important;
  color: var(--pc-on-primary) !important;
}

.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn.btn-primary:hover,
input.btn.btn-primary:hover {
  background-color: var(--pc-primary-hover) !important;
  border-color: var(--pc-primary-hover) !important;
  color: var(--pc-on-primary) !important;
}

.btn-primary:focus,
.btn-primary:active,
a.btn.btn-primary:focus,
a.btn.btn-primary:active,
button.btn.btn-primary:focus,
button.btn.btn-primary:active,
input.btn.btn-primary:focus,
input.btn.btn-primary:active {
  box-shadow: none !important;
  color: var(--pc-on-primary) !important;
}

/* ---------- Outline buttons ---------- */
.btn-outline-primary,
a.btn.btn-outline-primary,
button.btn.btn-outline-primary,
input.btn.btn-outline-primary {
  color: var(--pc-primary) !important;
  border-color: var(--pc-primary) !important;
  border: 1px solid var(--pc-primary) !important;
}

.btn-outline-primary:hover,
a.btn.btn-outline-primary:hover,
button.btn.btn-outline-primary:hover,
input.btn.btn-outline-primary:hover {
  background-color: var(--pc-primary) !important;
  border-color: var(--pc-primary) !important;
  color: var(--pc-on-primary) !important;
}

/* =========================
   Links – scoped, not global
   ========================= */

/* Light sections */
.page-section:not(.bg-primary) a:not(.btn) {
  color: var(--pc-primary) !important;
  text-decoration: underline;
}

.page-section:not(.bg-primary) a:not(.btn):hover {
  color: var(--pc-primary-hover) !important;
}

/* Dark sections */
.bg-primary a:not(.btn) {
  color: #ffffff !important;
  text-decoration: underline;
}

.bg-primary a:not(.btn):hover {
  color: #e6f7f5 !important;
}

/* Navbar safety */
.navbar a {
  text-decoration: none !important;
}
.navbar-dark {
  --bs-navbar-color: rgba(255, 255, 255, 1);
}
#mainNav .navbar-nav .nav-item .nav-link:hover,
#mainNav .navbar-nav .nav-item .nav-link:active,
#mainNav .navbar-nav .nav-item .nav-link.active {
    color: var(--pc-primary) !important;
    text-decoration: none;
}
#mainNav .navbar-brand {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

#mainNav.navbar-shrink .navbar-brand {
    color: #212529;
}
#mainNav,
#mainNav.navbar-shrink {
    --bs-navbar-brand-hover-color: var(--pc-primary);
}

#portfolio .portfolio-box-caption {
    background: rgba(0, 159, 147, 0.9) !important;
}
header.masthead {
  padding-top: 10rem;
  padding-bottom: calc(10rem - 4.5rem);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.8) 100%), url("../assets/img/bg-masthead-02.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
}
header.masthead h1, header.masthead .h1 {
font-size: 2.5rem;
}
header.masthead h2, header.masthead .h2 {
    font-size: 2rem;
  }
 /* Social icon links: no underline */
 a i.bi {
   text-decoration: none;
 }
 a:has(i.bi) {
   text-decoration: none !important;
 }
/* Book cover – default */
.book-cover {
    max-width: 750px;
    width: 100%;
    height: auto;
}
/* Subtle separation for talk blocks */
 .talk-panel {
     background-color: rgba(0, 0, 0, 0.03);
     padding: 1.5rem;
     border-radius: 0.5rem;
     height: 100%;
 }
 .talk-panel:nth-child(odd) {
     background-color: rgba(0, 0, 0, 0.025);
 }

 .talk-panel:nth-child(even) {
     background-color: rgba(0, 0, 0, 0.04);
 }
 /* Talk titles */
 .talk-panel h4 {
     color: var(--pc-primary);
 }
 #submitSuccessMessage {
     background-color: #e7f5f3;
     border: 1px solid #009f93;
     color: #0b4f4a;
     border-radius: 0.5rem;
     padding: 1rem 1.25rem;
     font-size: 0.85rem;
     font-weight: 600;
 }
 #submitErrorMessage {
     font-size: 0.95rem;
     background-color: #f8d7da;
     border-color: #f1aeb5;
     font-size: 0.85rem;
 }
  @media (min-width: 1200px) {
    header.masthead h2, header.masthead .h2 {
      font-size: 1.5rem;
    }
  }
  @media (min-width: 992px) {
    #mainNav.navbar-shrink .navbar-brand:hover {
        color: var(--pc-primary) !important;
        text-decoration: none !important;
    }
  }
/* Mobile navbar: force visible brand before scroll */
  @media (max-width: 991.98px) {

    #mainNav {
      background-color: #ffffff !important;
    }

    #mainNav .navbar-brand {
      color: #212529 !important;
      opacity: 1 !important;
    }

    /* Keep colour consistent even after shrink */
    #mainNav.navbar-shrink .navbar-brand {
      color: #212529 !important;
    }
  }
  /* Profile photo sizing */
  .profile-photo {
    width: 320px;
    height: 320px;
    object-fit: cover;
  }

/* Mobile: reduce profile photo */
@media (max-width: 767.98px) {
    .profile-photo {
        width: 200px;
        height: 200px;
    }
/* Masthead typography – mobile calm-down */
    header.masthead h1 {
        font-size: 1.8rem;
        line-height: 1.25;
        margin-bottom: 0.5rem;
    }
    header.masthead h2 {
        font-size: 1.25rem;
        line-height: 1.35;
        margin-top: 0;
    }
/* Mobile: soften book presence */
    .book-cover {
        max-width: 85%;
        margin-top: 0.5rem;
        margin-bottom: 1.5rem;
    }
}
