/* CSS Variables for Brand Consistency */
:root {
  --primary-blue: #0078a9;
  --primary-orange: #ea5000;
  --text-dark: #212121;
  --text-light: #ffffff;
  --bg-light: #f8f8f8;
  --font-main: 'Frutiger', 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
  --transition-speed: 0.2s;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.site-header {
  background-color: var(--text-light);
  padding: 0.75rem 2rem;
  /* Reduced padding for tighter header */
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10;
}

.site-header .logo-container {
  display: block;
}

.site-header .logo {
  max-width: 100px;
  /* Reduced by 50% from 200px */
  height: auto;
  display: block;
}

/* Hero Section */
.hero {
  background-color: var(--primary-blue);
  color: var(--text-light);
  text-align: center;
  padding: 3.5rem 2rem;
  /* Reduced by ~40% from 6rem to decrease banner height */
  position: relative;
  background-size: cover;
  background-position: center;
}

.hero.secondary-hero {
  background-image: url('../images/screw_conveyor_hero.png');
}

.hero.hp-hero {
  background-image: url('../images/hp_installation_hero.png');
}

/* Optional Overlay if image is too bright */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 120, 169, 0.4);
  /* Brand blue tint, slightly more transparent */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero h2,
.hero .subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 400;
  opacity: 0.9;
}

/* Main Content Area */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.link-category {
  margin-bottom: 4rem;
}

.category-title {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 2px solid var(--primary-orange);
  padding-bottom: 0.5rem;
  display: inline-block;
  font-weight: 700;
}

/* Container to center the inline-block title */
.link-category>h2 {
  display: block;
  max-width: max-content;
  margin: 0 auto 2rem auto;
}

.action-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
  /* Stretch children vertically by default */
}

/* Responsive layout for larger screens to support multiple cards wrapping */
@media (min-width: 768px) {
  .action-cards {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    /* Ensure cards in the same row take up equal height */
  }
}

/* Action Cards */
.card {
  background-color: var(--text-light);
  border-top: 4px solid var(--primary-blue);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 450px;
  /* Increased max-width allowing cards to stretch wider */
  flex: 1 1 350px;
  /* grow, shrink, flex-basis */
  padding: 2.5rem;
  text-align: center;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  /* Push the button to the bottom */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--primary-blue);
}

/* Primary Button Style (Hydronix Orange) */
.btn-primary {
  display: inline-block;
  background-color: var(--primary-orange);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1rem 2rem;
  font-size: 1rem;
  transition: background-color var(--transition-speed);
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #cc4500;
  /* Darker orange on hover */
  outline: none;
}

.btn-primary:active {
  background-color: #a83900;
}