/*
Theme Name: BNWP WikiConnect
Theme URI: https://bnwp.org/
Description: WordPress conversion of the Bangla WikiConnect Hugo/static website. Includes templates for posts, projects and persona/team profiles.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: bnwp
*/

/* Theme styles are loaded from assets/css. */


/* BNWP polish patch: fonts, navigation, language switcher, cards, dark mode */
@font-face {
  font-family: "BNWP Bengali";
  src: local("Kalpurush"), local("Kalpurush ANSI");
  unicode-range: U+0980-09FF;
  font-display: swap;
}

@font-face {
  font-family: "BNWP English";
  src: local("Segoe UI"), local("Segoe UI Variable"), local("Arial");
  unicode-range: U+0000-007F, U+0080-00FF, U+0100-024F;
  font-display: swap;
}

:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
  --bs-font-sans-serif: "BNWP English", "BNWP Bengali", "Segoe UI", Kalpurush, Arial, sans-serif !important;
  --bs-body-font-family: var(--bs-font-sans-serif) !important;
}

html, body, button, input, select, textarea, .navbar, .dropdown-menu {
  font-family: var(--bs-font-sans-serif) !important;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.navbar-brand h4,
.navbar-brand span {
  line-height: 1.25;
}

#accessibilityMenu {
  align-items: center;
  gap: .25rem;
}

#langSwitcher .dropdown-menu,
#colorModeToogler .dropdown-menu,
.navbar .dropdown-menu {
  min-width: 12.5rem;
  padding: .45rem;
  border-radius: .75rem;
  border: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 .75rem 2rem rgba(0,0,0,.12);
}

.dropdown-item,
.navbar .dropdown-item {
  border-radius: .55rem;
  padding: .55rem .75rem;
  color: var(--bs-body-color);
  font-weight: 600;
  text-decoration: none;
}

.dropdown-item:hover,
.dropdown-item:focus,
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-emphasis-color);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--bs-primary);
  color: #fff;
}

.navbar .nav-link {
  font-weight: 700;
  text-decoration: none;
}

[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] header,
[data-bs-theme="dark"] footer,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-top {
  border-color: #36414a !important;
}

.bnwp-member-card {
  min-height: 320px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .25rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bnwp-member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 .75rem 2rem rgba(0,0,0,.12);
  border-color: rgba(var(--bs-primary-rgb), .45) !important;
}

.bnwp-member-avatar,
.cots__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
}

.bnwp-member-avatar img,
.cots__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cots__name,
#TeamMembers h3.cots__name {
  font-size: 1.45rem;
  line-height: 1.25;
  margin-top: .5rem;
  margin-bottom: .25rem;
}

.bnwp-member-username {
  font-size: .95rem;
  color: var(--bs-secondary-color);
  word-break: break-word;
}

.bnwp-member-link {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
}

img {
  max-width: 100%;
}

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .bg-body-tertiary {
  background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .shadow-lg,
[data-bs-theme="dark"] .shadow {
  box-shadow: 0 1rem 3rem rgba(0,0,0,.45) !important;
}

/* Hero capsule buttons */
.front-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    text-align: left !important;
}

.front-hero-buttons .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    padding: 12px 24px !important;
    border-radius: 24px !important;
    margin: 0 !important;
}

/* Mobile hero buttons */
@media (max-width: 576px) {
    .front-hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: auto !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        margin-top: 18px;
    }

    .front-hero-buttons .btn {
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        padding: 12px 24px !important;
        border-radius: 24px !important;
        align-self: flex-start !important;
        text-align: center;
    }
}

/* Project archive button */
.bnwp-project-archive-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.bnwp-capsule-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    border-radius: 24px !important;
    width: auto !important;
    min-width: auto !important;
    max-width: max-content !important;
    margin: 0 !important;
}

@media (max-width: 576px) {
    .bnwp-capsule-btn {
        padding: 12px 24px !important;
        border-radius: 24px !important;
        font-size: 0.95rem;
    }
}

/* Header logo */
.bnwp-header-brand {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.bnwp-header-logo {
    width: 36px !important;
    height: auto !important;
    max-width: 36px !important;
    display: inline-block !important;
    flex-shrink: 0;
}

.bnwp-header-title {
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.2;
}

/* Mobile header logo */
@media (max-width: 576px) {
    .bnwp-header-brand {
        gap: 8px;
        margin-right: 0 !important;
    }

    .bnwp-header-logo {
        width: 30px !important;
        max-width: 30px !important;
    }

    .bnwp-header-title {
        font-size: 1.1rem;
    }
}

/* Light mode color */
html[data-bs-theme="light"],
html[data-bs-theme="light"] body,
html[data-bs-theme="light"] main,
html[data-bs-theme="light"] .bg-body,
html[data-bs-theme="light"] .bg-white,
html[data-bs-theme="light"] .card {
    background-color: #F8F9FA !important;
}