/* ==========================================================================
   HE Petroleum - Global Corporate Stylesheet
   ========================================================================== */

/* --- CSS Variables & Design System --- */
:root {
  /* Core Colors */
  --color-navy: #0B192C;
  --color-charcoal: #1A1A1D;
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-petroleum: #1E3E62;
  --color-accent: #D4AF37; /* Subtle Gold */
  
  /* Backgrounds */
  --bg-light: #F8F9FA;
  --bg-dark: var(--color-charcoal);
  
  /* Text */
  --text-main: #333333;
  --text-muted: #666666;
  --text-light: #F8F9FA;
  
  /* Fonts */
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Open Sans', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

/* --- Base Typography & Resets --- */
body {
  font-family: var(--font-secondary);
  color: var(--text-main);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 1rem;
}

a {
  color: var(--color-petroleum);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* --- Global Components --- */
.btn-primary-custom {
  background-color: var(--color-petroleum);
  color: var(--color-white);
  border: 2px solid var(--color-petroleum);
  padding: 10px 24px;
  font-family: var(--font-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  border-radius: 0; /* Corporate sharp edges */
}

.btn-primary-custom:hover {
  background-color: transparent;
  color: var(--color-petroleum);
}

.btn-accent-custom {
  background-color: var(--color-accent);
  color: var(--color-navy);
  border: 2px solid var(--color-accent);
  padding: 10px 24px;
  font-family: var(--font-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  border-radius: 0;
}

.btn-accent-custom:hover {
  background-color: transparent;
  color: var(--color-accent);
}

.btn-outline-light-custom {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  padding: 10px 24px;
  font-family: var(--font-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  border-radius: 0;
}

.btn-outline-light-custom:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
}

.section-title {
  position: relative;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  text-transform: uppercase;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
}

.text-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.bg-navy { background-color: var(--color-navy); }
.bg-light-grey { background-color: var(--bg-light); }

/* --- Navigation --- */
.navbar {
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  padding: 15px 0;
  transition: padding var(--transition-normal);
}

.navbar-brand {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-navy) !important;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.navbar-brand span {
  color: var(--color-accent);
}

.nav-link {
  font-family: var(--font-primary);
  font-weight: 600;
  color: var(--color-charcoal) !important;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin: 0 10px;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.navbar-toggler {
  border: none;
  border-radius: 0;
}

/* --- Hero Slider --- */
#heroCarousel {
  height: 80vh;
  min-height: 500px;
  background-color: var(--color-charcoal);
}

.carousel-inner, .carousel-item {
  height: 100%;
}

.hero-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(11, 25, 44, 0.7), rgba(26, 26, 29, 0.7));
  z-index: 2;
}

.carousel-caption {
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  text-align: left;
}

.carousel-caption h1 {
  font-size: 3.5rem;
  color: var(--color-white);
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-caption p {
  font-size: 1.25rem;
  color: var(--color-white);
  max-width: 600px;
  margin-bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
  width: 30px;
  height: 3px;
  background-color: var(--color-white);
  border: none;
}

.carousel-indicators .active {
  background-color: var(--color-accent);
}

/* --- Blurb Cards (Home & Products) --- */
.blurb-card {
  background-color: var(--color-white);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
  border-top: 4px solid transparent;
}

.blurb-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--color-accent);
}

.blurb-icon {
  font-size: 3rem;
  color: var(--color-petroleum);
  margin-bottom: 1.5rem;
  transition: color var(--transition-normal);
}

.blurb-card:hover .blurb-icon {
  color: var(--color-accent);
}

.blurb-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.blurb-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* --- Image Gallery (Horizontal Scroll) --- */
.gallery-section {
  overflow: hidden;
  padding: 4rem 0;
  background-color: var(--color-navy);
  color: var(--color-white);
}

.gallery-section .section-title h2 {
  color: var(--color-white);
}

.gallery-container {
  display: flex;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.gallery-track {
  display: flex;
  animation: scrollGallery 30s linear infinite;
}

.gallery-container:hover .gallery-track {
  animation-play-state: paused;
}

.gallery-item {
  width: 400px;
  height: 250px;
  margin: 0 10px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  background: rgba(11, 25, 44, 0.85);
  color: var(--color-white);
  padding: 10px;
  text-align: center;
  transition: bottom var(--transition-normal);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.gallery-item:hover .gallery-overlay {
  bottom: 0;
}

@keyframes scrollGallery {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Scrolls half width, duplicates handle the rest */
}

/* --- Testimonials --- */
.testimonial-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.testimonial-card {
  background-color: var(--color-white);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  margin: 1rem;
  position: relative;
}

.testimonial-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  opacity: 0.3;
  position: absolute;
  top: 20px;
  left: 30px;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.testimonial-author h5 {
  margin-bottom: 0.2rem;
  font-size: 1.1rem;
}

.testimonial-author p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.testimonial-stars {
  color: var(--color-accent);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* --- CTA Section --- */
.cta-section {
  padding: 6rem 0;
  background-image: linear-gradient(rgba(11, 25, 44, 0.85), rgba(11, 25, 44, 0.85)), url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-white);
  text-align: center;
}

.cta-section h2 {
  color: var(--color-white);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* --- Page Headers --- */
.page-header {
  padding: 8rem 0 4rem;
  background-color: var(--color-navy);
  color: var(--color-white);
  text-align: center;
  position: relative;
}

.page-header h1 {
  color: var(--color-white);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* --- Products Page --- */
.product-card {
  border: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-card img {
  height: 200px;
  object-fit: cover;
}

.product-card .card-body {
  padding: 2rem;
}

.product-icon-wrap {
  position: absolute;
  top: 170px;
  right: 20px;
  background: var(--color-accent);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* --- Founder / About Pages --- */
.bio-image {
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 10px solid var(--color-white);
}

.stats-box {
  background-color: var(--color-petroleum);
  color: var(--color-white);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.stats-box h3 {
  color: var(--color-accent);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* --- Contact Page --- */
.contact-info-card {
  background-color: var(--bg-light);
  padding: 2rem;
  height: 100%;
}

.contact-icon {
  font-size: 2rem;
  color: var(--color-petroleum);
  margin-bottom: 1rem;
}

.contact-form .form-control, .contact-form .form-select {
  border-radius: 0;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
}

.contact-form .form-control:focus, .contact-form .form-select:focus {
  border-color: var(--color-petroleum);
  box-shadow: none;
}

/* --- Footer --- */
.footer {
  background-color: var(--color-charcoal);
  color: #ccc;
  padding: 4rem 0 0;
  font-size: 0.9rem;
}

.footer h5 {
  color: var(--color-white);
  font-family: var(--font-primary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a {
  color: #aaa;
}

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

.footer-contact i {
  color: var(--color-accent);
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255,255,255,0.1);
  color: var(--color-white);
  border-radius: 50%;
  margin-right: 10px;
  transition: background-color var(--transition-fast);
}

.footer-social a:hover {
  background-color: var(--color-accent);
  color: var(--color-navy);
}

.footer-bottom {
  background-color: #111;
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: #888;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
  .carousel-caption h1 { font-size: 2.5rem; }
  .carousel-caption p { font-size: 1.1rem; }
  .navbar-collapse {
    background-color: var(--color-white);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
  }
}

@media (max-width: 768px) {
  .section-title h2 { font-size: 2rem; }
  .carousel-caption h1 { font-size: 2rem; }
  .gallery-item { width: 280px; height: 200px; }
  .page-header { padding: 6rem 0 3rem; }
  #heroCarousel { height: 60vh; min-height: 400px; }
}

@media (max-width: 576px) {
  .carousel-caption { text-align: center; }
  .carousel-caption h1 { font-size: 1.75rem; }
  .blurb-card { padding: 1.5rem; }
  .btn-primary-custom, .btn-accent-custom { width: 100%; margin-bottom: 0.5rem; }
}

/* --- Go to Top Button --- */
.go-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: var(--color-accent);
  color: var(--color-navy);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

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

.go-top-btn:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}
