/* ============================================
   RMPrintFix.com — Custom Stylesheet
   Color Palette:
     Primary / Deep Navy:  #0a192f
     Secondary / Slate:    #1e3a5f
     Accent / Light Blue:  #64ffda (subtle)
     White:                #ffffff
     Light BG:             #f4f6f9
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --rm-navy:       #0a192f;
  --rm-navy-dark:  #060f1e;
  --rm-slate:      #1e3a5f;
  --rm-accent:     #64ffda;
  --rm-white:      #ffffff;
  --rm-light:      #f4f6f9;
  --rm-text:       #333333;
  --rm-text-muted: #6c757d;
  --rm-transition: 0.3s ease;
}

/* ---------- Global Resets & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--rm-text);
  background-color: var(--rm-white);
  padding-top: 56px; /* offset for fixed navbar */
  line-height: 1.7;
}

::selection {
  background: var(--rm-navy);
  color: var(--rm-white);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--rm-light);
}
::-webkit-scrollbar-thumb {
  background: var(--rm-navy);
  border-radius: 4px;
}

/* ============================================
   NAVBAR
   ============================================ */
#mainNavbar {
  background: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(100, 255, 218, 0.1);
  transition: background var(--rm-transition), box-shadow var(--rm-transition);
  padding: 0.5rem 0;
}

#mainNavbar.scrolled {
  background: rgba(10, 25, 47, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-size: 1.4rem;
  color: var(--rm-white) !important;
  letter-spacing: -0.5px;
}

.brand-rm {
  color: var(--rm-accent);
  font-weight: 800;
}

.nav-link {
  color: rgba(255, 255, 255, 0.75) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: color var(--rm-transition), background var(--rm-transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--rm-accent) !important;
  background: rgba(100, 255, 218, 0.08);
}

/* Navbar toggler customization */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.6rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.25);
}

.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(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, var(--rm-navy) 0%, var(--rm-navy-dark) 50%, #0d2137 100%);
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(100, 255, 218, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(30, 58, 95, 0.4) 0%, transparent 50%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.015) 2px,
      rgba(255, 255, 255, 0.015) 4px
    );
  z-index: 2;
}

.hero-banner .container {
  z-index: 3;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-badge {
  background: rgba(100, 255, 218, 0.15) !important;
  color: var(--rm-accent) !important;
  border: 1px solid rgba(100, 255, 218, 0.3);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-heading {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  color: var(--rm-white);
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-form {
  max-width: 600px;
}

.search-input {
  border: 2px solid transparent;
  background: var(--rm-white);
  border-radius: 8px 0 0 8px !important;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  transition: border-color var(--rm-transition);
}

.search-input:focus {
  border-color: var(--rm-accent);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.15);
}

.btn-search {
  background: var(--rm-navy);
  color: var(--rm-white);
  border: 2px solid var(--rm-navy);
  font-weight: 600;
  border-radius: 0 8px 8px 0 !important;
  transition: background var(--rm-transition), transform var(--rm-transition);
}

.btn-search:hover {
  background: var(--rm-slate);
  border-color: var(--rm-slate);
  color: var(--rm-white);
  transform: translateY(-1px);
}

/* Search suggestions dropdown */
.search-suggestions {
  max-width: 600px;
}

.search-suggestion-item {
  background: var(--rm-white);
  color: var(--rm-text);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin-bottom: 2px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--rm-transition);
}

.search-suggestion-item:hover {
  background: var(--rm-light);
}

/* ============================================
   SECTION SPACING
   ============================================ */
.section-spacing {
  padding: 5rem 0;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-label {
  display: inline-block;
  color: var(--rm-slate);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
}

.section-title {
  color: var(--rm-navy);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* ============================================
   CATEGORY CARDS
   ============================================ */
.category-card {
  border-radius: 12px;
  transition: transform var(--rm-transition), box-shadow var(--rm-transition);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(10, 25, 47, 0.12) !important;
}

.category-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rm-navy), var(--rm-slate));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rm-accent);
  font-size: 1.6rem;
}

/* ============================================
   GUIDE CARDS
   ============================================ */
.guide-card {
  border-radius: 12px;
  transition: transform var(--rm-transition), box-shadow var(--rm-transition);
  cursor: pointer;
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(10, 25, 47, 0.1) !important;
}

.guide-thumb {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--rm-navy);
}

.badge-category {
  background: var(--rm-navy) !important;
  color: var(--rm-white) !important;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.3em 0.65em;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-type {
  background: rgba(100, 255, 218, 0.15) !important;
  color: #0a7d5c !important;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.3em 0.65em;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   PAGE HEADER (Sub-pages)
   ============================================ */
.page-header {
  position: relative;
  padding: 7rem 0 3rem;
  background: linear-gradient(135deg, var(--rm-navy) 0%, var(--rm-navy-dark) 100%);
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(100, 255, 218, 0.05) 0%, transparent 50%);
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.01) 2px,
      rgba(255, 255, 255, 0.01) 4px
    );
}

/* ============================================
   CONTACT FORM
   ============================================ */
.form-control,
.form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: border-color var(--rm-transition), box-shadow var(--rm-transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--rm-accent);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.12);
  outline: none;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: var(--rm-navy);
  border-color: var(--rm-navy);
  font-weight: 600;
  border-radius: 8px;
  transition: background var(--rm-transition), transform var(--rm-transition);
}

.btn-primary:hover {
  background: var(--rm-slate);
  border-color: var(--rm-slate);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--rm-navy);
  border-color: var(--rm-navy);
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--rm-transition);
}

.btn-outline-primary:hover {
  background: var(--rm-navy);
  border-color: var(--rm-navy);
  color: var(--rm-white);
  transform: translateY(-1px);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: linear-gradient(180deg, var(--rm-navy-dark), #030a15);
  padding-top: 4rem;
}

.footer-brand {
  font-size: 1.3rem;
  color: var(--rm-white);
  text-decoration: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--rm-transition), padding-left var(--rm-transition);
}

.footer-links a:hover {
  color: var(--rm-accent);
  padding-left: 4px;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--rm-navy);
  color: var(--rm-white);
  border: 2px solid var(--rm-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--rm-transition);
  z-index: 999;
}

.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background: var(--rm-slate);
  transform: translateY(-3px);
}

/* ============================================
   FILTER BUTTONS (All Guides page)
   ============================================ */
.filter-btn.active,
.filter-btn:hover {
  background: var(--rm-navy) !important;
  border-color: var(--rm-navy) !important;
  color: var(--rm-white) !important;
}

/* ============================================
   STEP NUMBERS (How It Works)
   ============================================ */
.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rm-navy), var(--rm-slate));
  color: var(--rm-accent);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(10, 25, 47, 0.2);
}

/* ============================================
   FEATURED BLOG CARD
   ============================================ */
.featured-card {
  border-radius: 16px;
  transition: transform var(--rm-transition), box-shadow var(--rm-transition);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(10, 25, 47, 0.12) !important;
}

.featured-thumb {
  background-size: cover;
  background-position: center;
  background-color: var(--rm-navy);
  min-height: 280px;
}

/* ============================================
   BRAND TILES
   ============================================ */
.brand-tile {
  background: var(--rm-white);
  border: 2px solid #e8ecf1;
  transition: all var(--rm-transition);
}

.brand-tile:hover {
  border-color: var(--rm-navy);
  background: var(--rm-navy);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(10, 25, 47, 0.15);
}

.brand-tile:hover .brand-tile-icon {
  color: var(--rm-accent);
}

.brand-tile:hover span {
  color: var(--rm-white) !important;
}

.brand-tile-icon {
  font-size: 2rem;
  color: var(--rm-navy);
  transition: color var(--rm-transition);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.accordion-button {
  color: var(--rm-navy) !important;
  background: var(--rm-white);
  border: none;
  box-shadow: none !important;
  padding: 1.1rem 1.25rem;
  font-size: 1rem;
}

.accordion-button:not(.collapsed) {
  background: var(--rm-white);
  color: var(--rm-navy) !important;
}

.accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.15) !important;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230a192f'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   CTA / NEWSLETTER SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--rm-navy) 0%, var(--rm-navy-dark) 50%, #0d2137 100%);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(100, 255, 218, 0.06) 0%, transparent 50%);
}

.newsletter-input {
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--rm-white);
  border-radius: 8px;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--rm-accent);
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.15);
  color: var(--rm-white);
  outline: none;
}

.btn-accent {
  background: var(--rm-accent);
  color: var(--rm-navy);
  border: 2px solid var(--rm-accent);
  border-radius: 8px;
  transition: all var(--rm-transition);
}

.btn-accent:hover {
  background: transparent;
  color: var(--rm-accent);
  border-color: var(--rm-accent);
  transform: translateY(-1px);
}

/* ============================================
   BLOG POST PAGE STYLES
   ============================================ */
.blog-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rm-navy);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--rm-slate);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.blog-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.blog-content .step-box {
  background: var(--rm-light);
  border-left: 4px solid var(--rm-navy);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 0 8px 8px 0;
}

.blog-content .step-box strong {
  color: var(--rm-navy);
}

.blog-content .tip-box {
  background: rgba(100, 255, 218, 0.08);
  border: 1px solid rgba(100, 255, 218, 0.2);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.blog-sidebar .card {
  border-radius: 12px;
}

.blog-sidebar .related-link {
  color: var(--rm-navy);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  transition: color var(--rm-transition);
}

.blog-sidebar .related-link:hover {
  color: var(--rm-accent);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Small phones (<576px) */
@media (max-width: 575.98px) {
  body {
    padding-top: 52px;
  }

  .hero-banner {
    min-height: 420px;
  }

  .hero-banner .container {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .section-spacing {
    padding: 3rem 0;
  }

  .page-header {
    padding: 6rem 0 2rem;
  }

  .search-input {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }

  .guide-thumb {
    height: 160px;
  }

  .category-icon {
    width: 56px;
    height: 56px;
    font-size: 1.3rem;
  }

  .btn-back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Tablets (576px - 991px) */
@media (min-width: 576px) and (max-width: 991.98px) {
  .hero-banner {
    min-height: 460px;
  }

  .section-spacing {
    padding: 4rem 0;
  }
}

/* Print */
@media print {
  #mainNavbar,
  .btn-back-to-top,
  .hero-banner,
  .site-footer {
    display: none !important;
  }

  body {
    padding-top: 0;
  }
}
