/*
Theme Name: BARN Rebuilt
Theme URI: https://barn.com.np/
Author: BARN
Description: Custom WordPress theme rebuilt for Board of Airlines Representatives in Nepal.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: barn-rebuilt
*/

:root {
  --barn-blue: #103f73;
  --barn-sky: #1f75bc;
  --barn-ink: #172033;
  --barn-muted: #667085;
  --barn-line: #dde5ee;
  --barn-soft: #f4f8fb;
  --barn-gold: #c99a2e;
  --barn-white: #ffffff;
  --barn-radius: 8px;
  --barn-shadow: 0 16px 42px rgba(23, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--barn-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--barn-white);
}

a {
  color: var(--barn-blue);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--barn-sky);
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--barn-line);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--barn-ink);
  font-weight: 800;
  line-height: 1.15;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.brand small {
  display: block;
  color: var(--barn-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--barn-line);
  background: var(--barn-white);
  color: var(--barn-blue);
  width: 42px;
  height: 42px;
  border-radius: var(--barn-radius);
  font-size: 24px;
  cursor: pointer;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  color: var(--barn-ink);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--barn-radius);
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: var(--barn-soft);
  color: var(--barn-blue);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--barn-white);
  background:
    linear-gradient(90deg, rgba(16, 63, 115, 0.94), rgba(16, 63, 115, 0.62)),
    url("assets/images/team-photo.jpg") center/cover;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: end;
  min-height: 560px;
  padding: 96px 0 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--barn-gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
}

.hero p {
  max-width: 720px;
  margin: 24px 0 0;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--barn-radius);
  font-weight: 800;
}

.button.primary {
  color: var(--barn-white);
  background: var(--barn-gold);
}

.button.secondary {
  color: var(--barn-white);
  border-color: rgba(255, 255, 255, 0.7);
}

.button.outline {
  color: var(--barn-blue);
  background: var(--barn-white);
  border-color: var(--barn-line);
}

.hero-stat {
  padding: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--barn-radius);
}

.hero-stat strong {
  display: block;
  font-size: 48px;
  line-height: 1;
}

.section {
  padding: 76px 0;
}

.section.alt {
  background: var(--barn-soft);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head h2,
.content h2 {
  margin: 0;
  color: var(--barn-blue);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--barn-muted);
}

.logo-grid,
.card-grid,
.member-grid,
.post-grid {
  display: grid;
  gap: 18px;
}

.logo-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.logo-tile,
.card,
.member-card,
.post-card,
.contact-card {
  background: var(--barn-white);
  border: 1px solid var(--barn-line);
  border-radius: var(--barn-radius);
}

.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-height: 132px;
  padding: 22px;
  color: var(--barn-blue);
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.logo-tile:hover,
.logo-tile:focus {
  color: var(--barn-blue);
  border-color: var(--airline-accent, var(--barn-sky));
  box-shadow: 0 18px 34px rgba(23, 32, 51, 0.11);
  transform: translateY(-2px);
}

.logo-tile img {
  width: 100%;
  max-width: 94px;
  max-height: 72px;
  object-fit: contain;
}

.logo-tile strong {
  color: var(--airline-accent, var(--barn-blue));
  font-size: 28px;
  letter-spacing: 0.04em;
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 24px;
}

.card h3,
.member-card h3,
.post-card h3 {
  margin: 0 0 10px;
  color: var(--barn-blue);
  line-height: 1.25;
}

.card p,
.post-card p {
  margin: 0;
  color: var(--barn-muted);
}

.member-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.member-card {
  min-height: 168px;
  padding: 22px;
}

.member-card img {
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
  object-fit: cover;
  border-radius: 999px;
}

.member-card .role {
  display: block;
  color: var(--barn-gold);
  font-weight: 800;
}

.member-card .rep {
  display: block;
  margin-top: 8px;
  color: var(--barn-muted);
  font-size: 14px;
}

.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  overflow: hidden;
}

.post-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--barn-soft);
}

.post-card-body {
  padding: 22px;
}

.post-card time {
  display: block;
  margin-bottom: 10px;
  color: var(--barn-muted);
  font-size: 13px;
  font-weight: 700;
}

.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  padding: 64px 0;
}

.content {
  max-width: 820px;
}

.content-wide {
  max-width: none;
}

.content h1 {
  margin: 0 0 24px;
  color: var(--barn-blue);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.content p {
  margin: 0 0 18px;
}

.content ul {
  padding-left: 20px;
}

.page-hero {
  color: var(--barn-white);
  background: linear-gradient(90deg, var(--barn-blue), #24689f);
}

.page-hero .container {
  padding: 70px 0;
}

.sidebar {
  align-self: start;
  padding: 24px;
  background: var(--barn-soft);
  border-radius: var(--barn-radius);
}

.sidebar h2 {
  margin: 0 0 14px;
  color: var(--barn-blue);
  font-size: 18px;
}

.sidebar ul {
  margin: 0 0 28px;
  padding-left: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contact-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
  margin: 28px 0;
}

.contact-panel {
  padding: 34px;
  color: var(--barn-white);
  background: linear-gradient(135deg, var(--barn-blue), #24689f);
  border-radius: var(--barn-radius);
}

.contact-panel h2 {
  margin: 0 0 14px;
  color: var(--barn-white);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.contact-panel p {
  max-width: 620px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.contact-map {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 28px;
  color: var(--barn-white);
  background:
    linear-gradient(rgba(16, 63, 115, 0.25), rgba(16, 63, 115, 0.25)),
    repeating-linear-gradient(35deg, #d9e6f2 0 12px, #eef5fa 12px 24px);
  border: 1px solid var(--barn-line);
  border-radius: var(--barn-radius);
}

.contact-map span {
  display: inline-flex;
  padding: 10px 14px;
  color: var(--barn-white);
  background: var(--barn-blue);
  border-radius: var(--barn-radius);
  font-weight: 800;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.gallery-item {
  overflow: hidden;
  background: var(--barn-white);
  border: 1px solid var(--barn-line);
  border-radius: var(--barn-radius);
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 12px 14px;
  color: var(--barn-muted);
  font-size: 14px;
  font-weight: 700;
}

.contact-card {
  padding: 24px;
}

.contact-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--barn-gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-card h2 {
  margin: 0 0 10px;
  color: var(--barn-blue);
  font-size: 20px;
  line-height: 1.25;
}

.contact-card p {
  margin: 0;
  color: var(--barn-muted);
}

.site-footer {
  color: #d8e5f2;
  background: #0c2d52;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 16px;
  color: var(--barn-white);
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 10px;
}

.site-footer a {
  color: #d8e5f2;
}

.copyright {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #a9bfd5;
  font-size: 14px;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    display: none;
    background: var(--barn-white);
    border-bottom: 1px solid var(--barn-line);
  }

  .site-nav.is-open {
    display: block;
  }

  .primary-menu {
    display: block;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0;
  }

  .primary-menu a {
    width: 100%;
  }

  .hero-inner,
  .content-wrap,
  .contact-feature,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: 520px;
  }

  .card-grid,
  .post-grid,
  .contact-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .brand span {
    max-width: 210px;
  }

  .hero-inner {
    padding: 72px 0 44px;
  }

  .section {
    padding: 54px 0;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 12px;
  }

  .card-grid,
  .post-grid,
  .contact-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
