/* Apply box-sizing globally to prevent layout overflow */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Style the header */
.header {
  background-color: #f1f1f1;
  padding: 20px;
  text-align: left;
}

/* Style the top navigation bar */
.topnav {
  overflow: hidden;
  background-color: #333;
  position: sticky;       /* Makes the nav stick to the top */
  top: 0;                 /* Tells it to stick exactly at the top edge */
  z-index: 1000;          /* Keeps it floating above all other text/images */
}

/* Clear floats inside navigation */
.topnav:after {
  content: "";
  display: table;
  clear: both;
}

/* Style the topnav links */
.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

/* Manuals Multi-Column Layout */
.manual-links-container {
  column-count: 1; /* 1 column on mobile */
  column-gap: 30px;
  margin-top: 20px;
}

/* Prevent links from breaking in half across columns */
.manual-links-container p {
  break-inside: avoid; 
  page-break-inside: avoid;
  margin-bottom: 12px;
  line-height: 1.4;
}

.manual-links-container a {
  text-decoration: none;
  color: #0d6efd; /* Standard link blue */
  font-weight: 500;
}

.manual-links-container a:hover {
  text-decoration: underline;
  color: #0a58ca;
}



/* Change color on hover */
.topnav a:hover {
  background-color: #ddd;
  color: #000;
}

/* Active navigation item styling */
.topnav a.active {
  background-color: #4CAF50;
  color: #fff;
}

/* Mobile navigation toggle icon */
.topnav .icon {
  display: none;
}

/* Main Container / Row: Constrained & Centered for comfortable reading */
.row {
  max-width: 900px;     /* Limits line length on large/desktop monitors */
  margin: 0 auto;        /* Centers content horizontally */
  padding: 0 15px;       /* Prevents text from touching edge on small screens */
}

/* Clear floats after row container */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Layout Columns inside row */
.column {
  float: left;
  width: 100%;           /* Full width inside the centered row container */
  padding: 15px 0;
}
/* Amazon Affiliate Callout Box */
.amazon-callout {
  background-color: #fffaf0;
  border-left: 5px solid #ff9900;
  padding: 25px;
  border-radius: 0 8px 8px 0;
  margin-top: 40px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.amazon-callout h3 {
  margin-top: 0;
  color: #212529;
}

.btn-amazon {
  background-color: #ff9900;
  color: #111 !important; /* Forces text to stay dark, overriding any global blue link styles */
  padding: 12px 24px;
  text-decoration: none !important;
  font-weight: bold;
  border-radius: 4px;
  display: inline-block;
  margin-top: 20px;
}

.btn-amazon:hover {
  background-color: #e68a00; /* Slightly darker orange on hover */
  color: #000 !important;
}

.amazon-disclaimer {
  font-size: 0.8rem;
  color: #666;
  margin-top: 15px;
}

/* Support for side-by-side columns if needed */
.column.half {
  width: 50%;
}
/* Style all links inside your main layout columns */
.column a,
.step-text a,
.manual-card a {
  color: #0000EE; /* The traditional web link blue */
  text-decoration: underline;
}

/* Add a slight color change when the user hovers over the link */
.column a:hover,
.step-text a:hover,
.manual-card a:hover {
  color: #0056b3; /* A slightly darker blue on hover */
  text-decoration: none; /* Optional: removing the underline on hover adds a nice tactile feel */
}

/* EXCEPTION: Ensure buttons inside columns don't get forced to have underlines */
.column a.btn-primary {
  color: #ffffff; /* Keep button text white */
  text-decoration: none; /* Keep button text without underlines */
}

/* Style the footer */
.footer {
  background-color: #f1f1f1;
  padding: 10px;
  text-align: center;
  font-size: 0.8em;
}

/* Responsive Images / Media Class */
.responsive {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Creates a responsive grid: 1 column on mobile, 2 columns on desktop */
.manual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .manual-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Styles individual category boxes */
.manual-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.manual-card h3 {
  margin-top: 0;
  color: #0056b3;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

/* Cleans up the list presentation */
.manual-card ul {
  list-style-type: none;
  padding-left: 0;
}

.manual-card li {
  margin-bottom: 12px;
  line-height: 1.5;
}

.manual-card a {
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.manual-card a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.step-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  }
  
  .step-card p {
    margin: 0;
    line-height: 1.6;
    color: #333;
  }

  /* On screens larger than 600px, place image and text side-by-side */
  @media (min-width: 600px) {
    .step-card {
      flex-direction: row;
      align-items: center;
    }
    .step-card .step-img {
      flex: 0 0 45%; /* Image takes up 45% of the card width */
    }
    .step-card .step-text {
      flex: 1; /* Text takes up the rest */
    }
  }
/* ========================================== */
/* SEARCH PAGE COMPONENT STYLES               */
/* ========================================== */
.search-container-box {
  max-width: 650px;
  margin: 50px auto;
  padding: 30px 20px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-container-box h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #222222;
}

.search-container-box p {
  color: #666666;
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.site-search-form {
  display: flex;
  gap: 10px;
}

.site-search-form input[type="search"] {
  flex: 1;
  padding: 12px 15px;
  font-size: 1rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  outline: none;
}

.site-search-form input[type="search"]:focus {
  border-color: #0056b3;
}

.site-search-form button {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: bold;
  background-color: #0056b3;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.site-search-form button:hover {
  background-color: #004085;
}

/* Mobile Responsiveness */
@media (max-width: 500px) {
  .site-search-form {
    flex-direction: column;
  }
  
  .site-search-form button {
    width: 100%;
  }
}
/* Centers the button in its container */
.button-container {
  text-align: center;
  margin-top: 20px;
}

/* Modern Button Styling */
.btn-primary {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff; /* Changed to white text for better contrast */
  background-color: #0056b3; /* Your original blue used as the background */
  text-decoration: none;
  padding: 12px 30px;
  border-radius: 8px; /* Soft rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effects */
}

/* Hover State */
.btn-primary:hover {
  background-color: #004085; /* Darker blue when hovered */
  transform: translateY(-2px); /* Lifts the button slightly */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Slightly larger shadow on hover */
  color: #ffffff;
}

/* ==========================================
   Mobile Responsive Rules (Max-width: 600px)
   ========================================== */
@media screen and (max-width: 600px) {
  /* Hide standard nav links except the first item on small screens */
  .topnav a:not(:first-child) {
    display: none;
  }

  /* Display hamburger menu icon */
  .topnav a.icon {
    float: right;
    display: block;
  }

  /* Expanded mobile navbar menu state */
  .topnav.responsive {
    position: relative;
  }
  
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }

  /* Stack columns full width on mobile */
  .column,
  .column.half {
    width: 100%;
    padding: 10px 0;
  }
}