/* ============================================================
   RAPIN UNITED GROUP — Modern Website Stylesheet
   Colour scheme preserved from original site:
   Primary blue: #3498db | Deep blue: #0049a0 | Dark: #212121
   Grey bg: #f6f7f8 | Text: #666 / #303030
   ============================================================ */

/* ----------  CSS Variables  ---------- */
:root {
  --blue:        #3498db;
  --blue-dark:   #0049a0;
  --blue-darker: #003366;
  --blue-light:  #5dade2;
  --blue-glow:   rgba(52, 152, 219, 0.15);
  --dark:        #212121;
  --dark-soft:   #303030;
  --grey-bg:     #f6f7f8;
  --grey-border: #e0e0e0;
  --text:        #666666;
  --heading:     #303030;
  --white:       #ffffff;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 8px 30px rgba(0,0,0,0.10);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.15);
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width:   1200px;
  --font-heading: 'Lato', sans-serif;
  --font-body:    'PT Sans', 'Open Sans', sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading);
  font-weight: 700;
  line-height: 1.25;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }

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

ul { list-style: none; }

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

.section { padding: 80px 0; }
.section-grey { background: var(--grey-bg); }
.section-blue { background: var(--blue-dark); color: var(--white); }
.section-dark { background: var(--dark); color: #999; }

.section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: 2rem;
}
.section-title.left { text-align: left; }

.section-subtitle {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text);
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-blue .section-title,
.section-dark .section-title { color: var(--white); }
.section-blue .section-subtitle,
.section-dark .section-subtitle { color: rgba(255,255,255,0.8); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-blue .eyebrow,
.section-dark .eyebrow { color: var(--blue-light); }

/* ----------  Buttons  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(52,152,219,0.4);
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(52,152,219,0.5);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--blue-dark);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--dark-soft);
  color: var(--white);
}
.btn-dark:hover { background: var(--dark); color: var(--white); transform: translateY(-2px); }

/* ----------  Header / Navigation  ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Nav on the left, logo on the right (per client request) */
.main-nav { display: flex; align-items: center; gap: 32px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark-soft);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue);
  background: var(--blue-glow);
}

/* Logo — top right */
.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-link img {
  height: 52px;
  width: auto;
  transition: transform var(--transition);
}
.logo-link:hover img { transform: scale(1.03); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark-soft);
  cursor: pointer;
  padding: 8px;
}

/* ----------  Hero  ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(0,73,160,0.92) 0%, rgba(0,51,102,0.88) 100%),
              url('../images/hero-bg.jpg') center / cover no-repeat;
  color: var(--white);
  padding-top: 80px;
}

.hero-content {
  max-width: 640px;
  padding: 60px 0;
}

.hero h1 {
  font-size: 3.2rem;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.15;
}
.hero h1 span { color: var(--blue-light); }

.hero .lead {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.hero-stat .label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* ----------  Services Grid  ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 64px; height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--blue-glow);
  color: var(--blue);
  font-size: 1.75rem;
  margin-bottom: 24px;
  transition: all var(--transition);
}
.service-card:hover .service-icon {
  background: var(--blue);
  color: var(--white);
  transform: rotate(-5deg) scale(1.05);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.service-card p { font-size: 0.95rem; margin-bottom: 16px; }
.service-card .learn-more {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}
.service-card .learn-more:hover { gap: 12px; }

/* ----------  About Section  ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text h2 { font-size: 2rem; margin-bottom: 20px; }
.about-text p { margin-bottom: 16px; }

.about-list {
  margin: 24px 0;
}
.about-list li {
  padding: 8px 0 8px 32px;
  position: relative;
}
.about-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--blue);
}

.about-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }

.about-image .badge {
  position: absolute;
  bottom: 24px; left: 24px;
  background: var(--white);
  padding: 20px 28px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.about-image .badge .num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-dark);
}
.about-image .badge .label { font-size: 0.85rem; color: var(--text); }

/* ----------  Feature / PrimeFacility Section  ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-visual {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-darker));
  border-radius: var(--radius);
  padding: 48px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.feature-visual::after {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.feature-visual .mock-window {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 24px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.15);
}
.feature-visual .mock-window h4 { color: var(--white); margin-bottom: 16px; }
.feature-visual .mock-bar {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  margin-bottom: 12px;
}
.feature-visual .mock-bar.fill { background: var(--blue-light); width: 70%; }
.feature-visual .mock-bar.fill-2 { background: var(--blue-light); width: 45%; }

.feature-text h2 { font-size: 2rem; margin-bottom: 20px; }
.feature-text p { margin-bottom: 16px; }
.feature-text .btn { margin-top: 12px; }

/* ----------  Partners / Clients  ---------- */
.partners-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}
.partners-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity var(--transition);
  filter: grayscale(100%);
}
.partners-bar a:hover { opacity: 1; filter: grayscale(0); }
.partners-bar img { max-height: 60px; width: auto; }
.partners-bar a.partner-text {
  filter: none;
  opacity: 0.85;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  color: var(--white);
  padding: 6px 4px;
  gap: 10px;
}
.partners-bar a.partner-text img {
  height: 40px;
  width: auto;
}
.partners-bar a.partner-text:hover { opacity: 1; color: var(--white); }

/* ----------  CTA Section  ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}
.cta-section h2 { color: var(--white); font-size: 2.2rem; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.9); font-size: 1.1rem; margin-bottom: 32px; }

/* ----------  Footer  ---------- */
.site-footer {
  background: var(--dark);
  color: #999;
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.footer-col p { font-size: 0.9rem; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #999; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--blue); }

.footer-logo img { height: 48px; margin-bottom: 16px; }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.footer-contact li i { color: var(--blue); margin-top: 4px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--blue); }

/* ----------  Page Header (sub-pages)  ---------- */
.page-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-darker));
  color: var(--white);
  padding: 140px 0 60px;
  text-align: center;
}
.page-header h1 { color: var(--white); font-size: 2.6rem; margin-bottom: 12px; }
.page-header .breadcrumb { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.page-header .breadcrumb a { color: var(--blue-light); }

/* ----------  Services Detail Page  ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}
.service-detail:nth-child(even) .service-detail-image { order: 2; }
.service-detail-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.service-detail-image img { width: 100%; height: 320px; object-fit: cover; }

.service-detail-content .service-icon { margin-bottom: 20px; }
.service-detail-content h3 { font-size: 1.6rem; margin-bottom: 16px; }
.service-detail-content p { margin-bottom: 16px; }

.service-features li {
  padding: 8px 0 8px 32px;
  position: relative;
  font-size: 0.95rem;
}
.service-features li::before {
  content: '\f138';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--blue);
}

/* ----------  Contact Page  ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
}

.info-cards { display: flex; flex-direction: column; gap: 24px; }
.info-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow var(--transition);
}
.info-card:hover { box-shadow: var(--shadow-sm); }
.info-card .icon-circle {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--blue-glow);
  color: var(--blue);
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.info-card h4 { font-size: 1.1rem; margin-bottom: 10px; }
.info-card p { font-size: 0.9rem; margin-bottom: 4px; }
.info-card a { font-size: 0.9rem; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark-soft);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--dark-soft);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: 20px;
}
.form-success {
  background: #e7f7ee;
  border: 1px solid #b7e4c7;
  color: #1e7e34;
}
.form-error {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #b71c1c;
}

/* ----------  Emergency / PGP Section  ---------- */
.emergency-banner {
  background: linear-gradient(135deg, #f6d365, #fda085);
  color: #7a3b00;
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}
.emergency-banner .icon-lg { font-size: 2.5rem; color: #b35c00; }
.emergency-banner h3 { color: #7a3b00; margin-bottom: 6px; }
.emergency-banner p { color: #6b3400; font-size: 0.95rem; }

.pgp-section {
  background: var(--grey-bg);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 40px;
}
.pgp-section h4 { margin-bottom: 12px; }
.pgp-section pre {
  background: var(--dark);
  color: #0f0;
  padding: 20px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-x: auto;
  margin: 12px 0;
}

/* ----------  Animations  ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ----------  Responsive  ---------- */
@media (max-width: 992px) {
  .about-grid,
  .feature-grid,
  .service-detail,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .service-detail:nth-child(even) .service-detail-image { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.4rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav ul {
    position: fixed;
    top: 80px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform var(--transition);
  }
  .main-nav ul.open { transform: translateY(0); }
  .main-nav a { width: 100%; padding: 14px 18px; }

  .section { padding: 56px 0; }
  .hero { min-height: auto; padding: 120px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .hero .lead { font-size: 1.05rem; }
  .hero-stats { gap: 32px; }
  .hero-stat .num { font-size: 1.8rem; }

  .section-title { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .partners-bar { gap: 32px; }
  .partners-bar img { max-height: 45px; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .emergency-banner { flex-direction: column; text-align: center; }
}

