/*
Theme Name:      Biopharma Logistics
Theme URI:       https://biopharma-logistics.com
Author:          Biopharma Logistics GmbH
Author URI:      https://biopharma-logistics.com
Description:     Arctic Precision dark child theme for Biopharma Logistics GmbH — pharmaceutical logistics, cold chain transport, life sciences. Optimised for Elementor.
Version:         1.4.0
Template:        astra
Requires at least: 6.2
Tested up to:    6.7
Requires PHP:    8.0
License:         GNU General Public License v2.0 or later
License URI:     https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:     biopharma-logistics
Tags:            custom-menu, custom-logo, full-width-template, accessibility-ready, dark
*/

/* ============================================================
   BRAND TOKENS — Arctic Precision
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-page:     #07111F;
  --bg-hero:     #0A1628;
  --bg-section:  #0D1F3C;
  --bg-card:     #112649;

  /* Brand blues */
  --brand:       #0284C7;
  --brand-mid:   #0EA5E9;
  --brand-light: #38BDF8;

  /* Signal / status */
  --signal:      #00E5A0;

  /* Text */
  --text-primary: #FFFFFF;
  --text-hi:      #F0F6FC;
  --text-lo:      #8B949E;

  /* Borders */
  --border:      rgba(255, 255, 255, 0.07);

  /* Department accents */
  --dept-cold:     #0284C7;
  --dept-air:      #4F46E5;
  --dept-sea:      #0F766E;
  --dept-clinical: #059669;
  --dept-customs:  #D97706;
  --dept-courier:  #9333EA;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Montserrat', sans-serif;

  /* Layout */
  --max-width: 1152px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 0.75em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem;    font-weight: 700; }

p  { color: var(--text-lo); line-height: 1.7; margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a  { color: var(--brand-mid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-light); text-decoration: underline; }

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

ul, ol { padding-left: 1.5rem; }
li { color: var(--text-lo); }

strong { color: var(--text-primary); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-main {
  min-height: 60vh;
}

/* ============================================================
   SKIP LINK (Accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  overflow: visible;
}

/* ============================================================
   SITE HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 17, 31, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 2rem;
}

/* Branding */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-branding .custom-logo-link img,
.site-branding .custom-logo {
  height: 36px;
  width: auto;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}
.site-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.site-title a:hover {
  color: var(--brand-mid);
  text-decoration: none;
}

.site-description {
  display: none; /* Hidden — tagline shown in hero */
}

/* Primary navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-navigation ul li { margin: 0; }

.main-navigation ul li a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-hi);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_item > a {
  color: var(--brand-mid);
  text-decoration: none;
}

/* CTA button in nav */
.main-navigation ul li.menu-item-contact > a,
.main-navigation ul li.nav-cta > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: background 0.2s, transform 0.1s;
}
.main-navigation ul li.menu-item-contact > a:hover,
.main-navigation ul li.nav-cta > a:hover {
  background: var(--brand-mid);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  gap: 6px;
  align-items: center;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-hero);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.site-footer .footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.footer-brand .site-title-footer {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-lo);
  max-width: 320px;
  line-height: 1.6;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav ul li a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-lo);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav ul li a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-lo);
  margin: 0;
}

.footer-legal-links {
  display: flex;
  gap: 24px;
}
.footer-legal-links a {
  font-size: 0.8rem;
  color: var(--text-lo);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  transition: color 0.2s;
}
.footer-legal-links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ============================================================
   PAGE CONTENT (for non-Elementor pages)
   ============================================================ */
.entry-header {
  padding: 120px 0 60px;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--border);
}

.entry-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0;
}

.entry-content {
  padding: 64px 0;
}

.entry-content p,
.entry-content li {
  font-size: 0.9375rem;
  color: var(--text-lo);
  line-height: 1.8;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2rem;
}

/* ============================================================
   BUTTONS (utility classes for non-Elementor content)
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover {
  background: var(--brand-mid);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  text-decoration: none;
}

/* ============================================================
   ASTRA HEADER OVERRIDES — Arctic Precision
   ============================================================ */

/* Header — fully transparent on all pages (incl. above-header row) */
#masthead,
.ast-above-header-wrap,
.ast-above-header-bar,
.main-header-bar,
.ast-primary-header-bar,
.main-header-bar-wrap {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* All header links — white */
#masthead .main-header-bar .menu-link,
#masthead .main-header-bar a,
#masthead .ast-builder-grid-row a {
  color: var(--text-primary) !important;
}

#masthead .main-header-bar .menu-link:hover,
#masthead .main-header-bar a:hover {
  color: var(--brand-mid) !important;
  text-decoration: none !important;
}

/* Phone number in HTML widget */
#masthead .ast-header-html a[href^="tel:"],
#masthead .ast-builder-html-element a {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
}

/* Dropdown arrow icons */
#masthead .ast-arrow-svg path {
  fill: var(--text-primary) !important;
}

/* Dropdown sub-menu — glass */
#masthead .sub-menu {
  background: rgba(10, 22, 40, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3) !important;
}

#masthead .sub-menu .menu-link,
#masthead .sub-menu a {
  color: var(--text-primary) !important;
  font-weight: 500;
}

#masthead .sub-menu li:hover > a,
#masthead .sub-menu li:hover > .menu-link {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

/* Sub-menu — dark glass (replicated from Astra Custom CSS for theme consistency) */

/* TranslatePress language switcher — remove glass dropdown */
.trp-language-switcher .sub-menu,
.trp-language-switcher > div {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ============================================================
   ELEMENTOR OVERRIDES
   — Ensures Elementor pages get correct backgrounds
   ============================================================ */
.elementor-page .site-main,
.elementor-page .entry-content {
  padding: 0;
}

/* Remove default Elementor section padding if set by theme */
.elementor-section-wrap {
  background: transparent;
}

/* Elementor full-width page — no padding top for fixed header */
body.page-template-page-fullwidth .site-main {
  padding-top: 0;
}

body:not(.page-template-page-fullwidth) .site-main {
  padding-top: 72px; /* offset for fixed header */
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  padding: 160px 0 80px;
  text-align: center;
}
.error-404 h1 {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 0;
  line-height: 1;
}
.error-404 h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-top: 16px;
}
.error-404 p {
  color: var(--text-lo);
  font-size: 1rem;
  max-width: 480px;
  margin: 16px auto 32px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  /* Header */
  .site-header .container { height: 64px; }
  .menu-toggle { display: flex; }

  .main-navigation {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-hero);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
  }
  .main-navigation.toggled { display: flex; }
  .main-navigation ul { flex-direction: column; gap: 0; width: 100%; }
  .main-navigation ul li a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .main-navigation ul li:last-child a { border-bottom: none; }

  /* Footer */
  .site-footer .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-nav ul { flex-direction: column; gap: 12px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-legal-links { flex-direction: column; gap: 8px; }
}

/* ============================================================
   SCROLL REVEAL — Section entrance animations (matches localhost:3000)
   ============================================================ */
.bp-will-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.bp-will-reveal.bp-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ASTRA FOOTER — hide Above Footer row (empty, can't configure via Astra Free)
   ============================================================ */
.ast-above-footer-wrap,
#ast-above-footer-wrap,
#ast-footer-widgets {
  display: none !important;
}
