/* =============================================================================
   Air Portal — Custom Styles

   All Air Portal brand overrides and custom component styles live here,
   loaded after the Agency Jekyll Theme so our rules take precedence.

   Design tokens are defined as CSS custom properties in :root so colours,
   fonts, and spacing can be updated in one place.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Design Tokens
   ----------------------------------------------------------------------------- */
:root {
  --ap-navy: #193457;
  --ap-navy-dark: #122a45;
  --ap-orange: #ff9901;
  --ap-orange-hover: #e68a00;
  --ap-white: #fff;
  --ap-nav-link: rgba(255, 255, 255, 0.85);
  --ap-overlay: rgba(38, 88, 146, 0.4);
  --ap-btn-light-hover: #e2e6ea;
  --ap-light-bg: #c8ccd2;
  --ap-card-bg: rgba(255, 255, 255, 0.1);
  --ap-text: rgba(255, 255, 255, 0.85);
  --ap-text-muted: rgba(255, 255, 255, 0.7);
  --ap-text-dark: #3a3f47;
  --ap-text-dark-muted: #5a6270;
  --ap-font: 'Century Gothic', 'Raleway', Arial, Helvetica, sans-serif;
  --ap-radius: 0.5rem;
  --ap-radius-sm: 4px;
  --ap-transition: 0.2s ease;
  --ap-transition-slow: 0.3s ease;
}

/* -----------------------------------------------------------------------------
   Theme Overrides — Global
   ----------------------------------------------------------------------------- */
body {
  font-family: var(--ap-font);
  background-color: var(--ap-navy);
}

/* !important needed — Bootstrap's .bg-light sets its own background */
.page-section {
  background-color: var(--ap-navy) !important;
  color: var(--ap-white);
  padding: 40px 0;
}

section#contact {
  background-image: url('../img/map-image.png');
  background-repeat: no-repeat;
  background-position: center;
}

.section-heading,
.page-section h2,
section#contact .section-heading {
  color: var(--ap-orange);
  font-family: var(--ap-font);
  font-weight: 400;
  font-size: 2.1875rem;
  text-transform: lowercase !important; /* theme forces uppercase */
  text-align: left;
}

.section-subheading {
  color: var(--ap-text-muted);
  font-family: var(--ap-font) !important;
  font-weight: 400;
  font-size: 1.0625rem;
  font-style: normal !important; /* theme forces italic */
  text-align: left;
  text-transform: none !important; /* theme forces uppercase */
}

.page-section h4,
.page-section h5,
.portfolio-caption h4 {
  color: var(--ap-orange);
  font-family: var(--ap-font);
  font-weight: 400;
}

/* !important needed — Bootstrap's .text-muted uses !important */
.page-section .text-muted,
.page-section p {
  color: var(--ap-text) !important;
}

.service-heading {
  color: var(--ap-orange);
}

.btn-primary {
  background-color: var(--ap-orange);
  border-color: var(--ap-orange);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--ap-orange-hover);
  border-color: var(--ap-orange-hover);
}

/* -----------------------------------------------------------------------------
   Light Section Variant
   ----------------------------------------------------------------------------- */
.page-section--light {
  background-color: var(--ap-light-bg) !important;
}

.page-section--light .section-heading,
.page-section--light h2 {
  color: var(--ap-orange);
}

.page-section--light p,
.page-section--light .text-muted {
  color: var(--ap-text-dark) !important;
}

/* Card overlay text sits on a dark blue scrim — keep it white */
.page-section--light .feature-card-hover .card-overlay p {
  color: var(--ap-white) !important;
}

.page-section--light .section-subheading {
  color: var(--ap-text-dark-muted) !important;
}

.page-section--light .testimonial-card {
  background: var(--ap-white);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.page-section--light .testimonial-role {
  color: var(--ap-text-dark-muted) !important;
}

.page-section--light .testimonial-author {
  border-top-color: var(--ap-orange);
}

.page-section--light .form-control {
  color: var(--ap-text-dark);
  background-color: var(--ap-white);
  border: 1px solid #bcc0c7;
}

.page-section--light .form-control::placeholder {
  color: var(--ap-text-dark-muted);
}

/* -----------------------------------------------------------------------------
   Theme Overrides — Navbar
   ----------------------------------------------------------------------------- */
#mainNav {
  background-color: var(--ap-navy);
  border: none;
  box-shadow: none;
  padding: 0.75rem 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  transition: padding var(--ap-transition-slow), min-height var(--ap-transition-slow);
}

#mainNav .navbar-brand img {
  height: 73px;
}

#mainNav .navbar-nav .nav-link {
  color: var(--ap-nav-link) !important; /* theme uses !important on nav link colours */
  font-family: var(--ap-font);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: normal !important; /* theme forces letter-spacing */
  text-transform: none !important; /* theme forces uppercase */
  line-height: 21px;
  padding: 10px 20px !important;
  white-space: nowrap;
}

#mainNav .navbar-nav .nav-link:hover,
#mainNav .navbar-nav .nav-link.active,
#mainNav .navbar-nav .nav-link:focus-visible {
  color: var(--ap-orange) !important;
}

#mainNav.navbar-shrink {
  background-color: var(--ap-navy);
  padding: 0.25rem 0;
  min-height: 70px;
}

#mainNav.navbar-shrink .navbar-brand img {
  height: 50px;
}

#mainNav .navbar-toggler {
  background-color: transparent;
  border: none;
  padding: 0.25rem 0.75rem;
}

#mainNav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* -----------------------------------------------------------------------------
   Theme Overrides — Masthead
   ----------------------------------------------------------------------------- */
.masthead {
  background-color: var(--ap-navy);
  background-image: none !important; /* theme sets background-image inline */
  padding-top: 150px;
  padding-bottom: 2rem;
}

.masthead .container {
  position: relative;
  z-index: 1;
}

.masthead .intro-text {
  padding: 0;
}

/* -----------------------------------------------------------------------------
   Theme Overrides — Portfolio, Timeline, Team
   ----------------------------------------------------------------------------- */
.portfolio-caption {
  background-color: var(--ap-navy);
}

.timeline > li .timeline-panel {
  background-color: var(--ap-navy);
}

.timeline > li .timeline-image {
  background-color: var(--ap-orange);
}

.timeline:before {
  background-color: var(--ap-orange);
}

.team-member img.rounded-circle {
  object-fit: cover;
  object-position: center 0%;
  width: 175px;
  height: 175px;
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.team-member .social-buttons {
  margin-top: 1rem;
}

/* -----------------------------------------------------------------------------
   Theme Overrides — Footer
   ----------------------------------------------------------------------------- */
/* !important needed — theme sets footer background */
.footer {
  background-color: var(--ap-navy) !important;
  color: var(--ap-text-muted);
  padding: 1.25rem 0;
  font-size: 0.875rem;
}

.footer .social-buttons {
  margin-bottom: 0;
}

.social-buttons .list-inline-item a {
  background-color: transparent;
  border: none;
  box-shadow: none;
  width: auto;
  height: auto;
  font-size: 1.25rem;
  color: var(--ap-orange);
  padding: 0 0.5rem;
}

.social-buttons .list-inline-item a:hover,
.social-buttons .list-inline-item a:focus-visible {
  background-color: transparent;
  color: var(--ap-dark);
}

.footer .social-buttons .list-inline-item a:hover,
.footer .social-buttons .list-inline-item a:focus-visible {
  color: var(--ap-white);
}

.footer .quicklinks {
  margin-bottom: 0;
}

.footer .quicklinks a {
  color: var(--ap-text-muted);
  text-decoration: underline;
}

.footer .quicklinks a:hover,
.footer .quicklinks a:focus-visible {
  color: var(--ap-orange);
}

.footer .quicklinks .list-inline-item + .list-inline-item {
  margin-left: 1.5rem;
}

.footer .text-md-right {
  text-align: right;
}

@media (max-width: 767px) {
  .footer .text-md-right {
    text-align: center;
    margin-top: 1rem;
  }
  .footer .quicklinks {
    margin-top: 1rem;
  }
}

/* -----------------------------------------------------------------------------
   Custom Components — Hero
   ----------------------------------------------------------------------------- */
.hero-image-box {
  border: 1px solid var(--ap-orange);
  border-radius: var(--ap-radius-sm);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  aspect-ratio: 21 / 9;
}

.hero-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image-box .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem;
}

.hero-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-overlay-content img.hero-logo {
  height: 55px;
  width: auto;
}

.hero-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 280px;
}

.hero-overlay-content .hero-text {
  color: var(--ap-orange);
  font-size: 19px;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.hero-phrase {
  white-space: nowrap;
}

.hero-overlay-content .hero-subtext {
  color: var(--ap-white);
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Custom Components — Feature Cards (Services)
   ----------------------------------------------------------------------------- */
.service-description {
  text-align: left;
  font-size: 0.9375rem;
  line-height: 1.4;
  margin-bottom: 2rem;
}

.feature-card {
  border: 1px solid var(--ap-orange);
  border-radius: var(--ap-radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: transform var(--ap-transition);
}

.feature-card:hover {
  transform: translateY(-3px);
}

.feature-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.feature-card-body {
  padding: 1rem;
  background-color: var(--ap-navy);
}

.feature-card-body p {
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Custom Components — Feature Hover Cards (Portfolio)
   ----------------------------------------------------------------------------- */
.feature-card-hover {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid var(--ap-orange);
  border-radius: var(--ap-radius);
  overflow: hidden;
  cursor: default;
}

.feature-card-hover .card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: rgba(25, 52, 87, 0.85);
  color: var(--ap-orange);
  font-family: var(--ap-font);
  font-size: 1.125rem;
  font-weight: 600;
  transition: opacity var(--ap-transition-slow);
}

.feature-card-hover .card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(25, 52, 87, 0.9);
  opacity: 0;
  transition: opacity var(--ap-transition-slow);
}

.feature-card-hover .card-overlay p {
  color: var(--ap-white);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

.feature-card-hover:hover .card-overlay {
  opacity: 1;
}

.feature-card-hover:hover .card-title {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .feature-card-hover .card-overlay,
  .feature-card-hover .card-title {
    transition: none;
  }
}

/* -----------------------------------------------------------------------------
   Custom Components — CTA Banners
   ----------------------------------------------------------------------------- */
.cta-banner {
  padding: 4rem 0;
  background-color: var(--ap-orange) !important;
}

.cta-banner-heading {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.cta-banner-text {
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.cta-banner .btn-light {
  background-color: var(--ap-white);
  color: var(--ap-navy);
  border: none;
  font-weight: 700;
}

.cta-banner .btn-light:hover,
.cta-banner .btn-light:focus-visible {
  background-color: var(--ap-btn-light-hover);
  color: var(--ap-navy);
}

/* -----------------------------------------------------------------------------
   Custom Components — Stats
   ----------------------------------------------------------------------------- */
.stats-section {
  padding: 1.5rem 0 40px;
}

section#services {
  padding-bottom: 0 !important;
}

.stats-title {
  color: var(--ap-orange);
  font-family: var(--ap-font);
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: none !important;
  text-align: center;
  margin-bottom: 2rem;
}

.stats-card {
  border: 1px solid var(--ap-orange);
  border-radius: var(--ap-radius);
  padding: 2rem 1.5rem;
}

.stats-prefix {
  color: var(--ap-orange) !important;
  font-size: 1rem;
  margin-bottom: 0;
  text-transform: none;
}

.stats-number {
  color: var(--ap-orange);
  font-family: var(--ap-font);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.1;
  text-transform: none !important;
  text-align: center !important;
}

.stats-label {
  color: var(--ap-orange) !important;
  font-size: 1rem;
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Custom Components — Customers
   ----------------------------------------------------------------------------- */
.customer-card {
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--ap-orange);
  border-radius: var(--ap-radius);
  transition: transform var(--ap-transition);
}

.customer-card:hover {
  transform: translateY(-5px);
}

.customer-icon {
  color: var(--ap-orange);
  margin-bottom: 1.5rem;
}

/* -----------------------------------------------------------------------------
   Custom Components — Testimonials
   ----------------------------------------------------------------------------- */
#testimonials .row:last-child {
  align-items: stretch;
  row-gap: 1.5rem;
}

.testimonial-card {
  background: var(--ap-card-bg);
  border-radius: var(--ap-radius);
  padding: 2rem 2rem 1.25rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  width: 100%;
  display: flex;
  flex-direction: column;
}


/* !important needed — icon inherits section colour override */
.testimonial-card .fa-quote-left {
  color: var(--ap-orange) !important;
}

.testimonial-text {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
}

.testimonial-author {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 2px solid var(--ap-orange);
  height: 5rem;
  display: flex;
  align-items: flex-start;
}

/* !important needed — overrides .page-section p colour */
.testimonial-role {
  font-size: 0.85rem;
  color: var(--ap-text-muted) !important;
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Custom Components — Client Logo Carousel
   ----------------------------------------------------------------------------- */
.client-carousel {
  overflow: hidden;
  width: 100%;
  padding: 2rem 0;
}

.client-track {
  display: flex;
  align-items: center;
  animation: scroll-left 30s linear infinite;
  width: max-content;
}

.client-track:hover {
  animation-play-state: paused;
}

.client-item {
  flex: 0 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-item img {
  max-height: 72px;
  max-width: 180px;
  object-fit: contain;
  transition: opacity var(--ap-transition-slow);
}

.client-item img:hover {
  opacity: 0.8;
}

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -----------------------------------------------------------------------------
   Section Spacing — remove trailing margins from last-row cards
   ----------------------------------------------------------------------------- */
#portfolio .row:last-child > [class*="col"]:nth-last-child(-n+3) {
  margin-bottom: 0 !important;
}


#customers .client-carousel {
  padding-bottom: 0;
  margin-bottom: -16px;
}

#team .team-member {
  margin-bottom: 0;
}

#customers .customer-card {
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Accessibility — Reduced Motion
   ----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .client-track {
    animation: none;
  }
  .feature-card:hover,
  .customer-card:hover {
    transform: none;
  }
}

/* -----------------------------------------------------------------------------
   Responsive — Hero Mobile
   ----------------------------------------------------------------------------- */
@media (max-width: 575px) {
  .hero-overlay-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .hero-overlay-content img.hero-logo {
    height: 25px;
  }
  .hero-text-group {
    max-width: 100%;
  }
  .hero-overlay-content .hero-text {
    font-size: 0.9375rem;
  }
  .hero-overlay-content .hero-subtext {
    font-size: 0.75rem;
  }
}
