/* ===========================
   Refining Page Styles
   Equus Energy – follows who-we-are.css pattern
   =========================== */

:root {
  --brand-gradient: linear-gradient(135deg, var(--brand), var(--brand-2));
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-hover: 0 20px 40px color-mix(in srgb, var(--brand) 20%, transparent);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] {
  --glass-bg: rgba(0, 0, 0, 0.2);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ========== CONTAINER & SECTION HEADER ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header.center {
  text-align: center;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  display: inline-block;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

.section-tag {
  display: inline-block;
  padding: 8px 22px;
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand);
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  backdrop-filter: blur(10px);
}

.section-tag.light {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ========== HERO ========== */
.ref-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b0f14 0%, #1a1f26 100%);
  overflow: hidden;
  padding: 120px 20px;
}

.ref-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
   
    url('../assets/Image-Equus/Equus-Pic-Mocks/img76.jpg');
  background-size: cover, cover, cover;
  background-position: center;
  background-blend-mode: overlay;
  opacity: 0.7;
  animation: zoomBg 30s infinite alternate;
}

@keyframes zoomBg {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.ref-hero-content {
  position: relative;
  z-index: 3;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.hero-badge {
  display: inline-block;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(237, 46, 46, 0.4);
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.ref-hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 25px;

  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto 50px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.stat-brick {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-brick-number {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

}

.stat-brick-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.8;
  z-index: 4;
  animation: scrollBounce 2.5s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

.hero-scroll i {
  font-size: 1.4rem;
}

/* ========== OVERVIEW SECTION ========== */
.ref-overview {
  padding: 120px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.ref-overview::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 5%, transparent) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.overview-text {
  padding-right: 30px;
}

.overview-text h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 25px;
  color: var(--text);
}

.lead {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 25px;
  font-weight: 400;
}

.overview-visual {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.overview-visual img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.overview-visual:hover img {
  transform: scale(1.05);
}

.overview-badge {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 30px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  color: black;
  font-weight: 700;
}

.overview-badge i {
  font-size: 2rem;
  color: var(--brand);
}

/* ========== REFINERY ASSETS GRID ========== */
.ref-assets {
  padding: 100px 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
              url('../assets/Image-Equus/Equus-Pic-Mocks/img65r.jpg');
  background-size: cover;
  background-position: center;

  background-repeat: no-repeat;
  background-color: var(--brand-2);
  color: white;
  position: relative;
}

.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.asset-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 40px 30px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.asset-card:hover {
  transform: translateY(-15px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 30px 50px rgba(0,0,0,0.3);
}

.asset-icon i {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.2);
  padding: 20px;
  border-radius: 20px;
}

.asset-card h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 700;
  color: white;
}

.asset-capacity {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 15px;
  color: white;
  background: var(--brand-gradient);
  display: inline-block;
  padding: 8px 22px;
  border-radius: 40px;
}

.asset-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 25px;
  color: rgba(255,255,255,0.9);
}

.asset-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.asset-features span {
  background: rgba(255,255,255,0.15);
  padding: 6px 16px;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ========== MAP & DYNAMIC SITES ========== */
.ref-map-dynamic {
  padding: 120px 0;
  background: var(--surface);
}

.map-loading, .map-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: var(--surface-2);
  border-radius: 30px;
  margin-bottom: 30px;
}

.map-loading i { color: var(--brand); font-size: 3rem; margin-bottom: 20px; }
.map-error i { color: #dc3545; font-size: 3rem; margin-bottom: 20px; }

.map-canvas {
  background: var(--surface-2);
  border-radius: 30px;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
}

.business-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 40px 0;
  padding: 20px;
  background: var(--surface-2);
  border-radius: 60px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.dynamic-sites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.site-card {
  background: var(--surface-2);
  border-radius: 20px;
  padding: 25px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  transition: var(--transition-smooth);
}

.site-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.site-icon {
  width: 60px;
  height: 60px;
  background: var(--brand-gradient);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  flex-shrink: 0;
}

.site-info h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--text);
}

.site-location {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-type {
  display: inline-block;
  padding: 4px 14px;
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand);
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ========== INTEGRATION (asphalt, renewables) ========== */
.ref-integration {
  padding: 120px 0;
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--brand) 10%, var(--surface)),
    var(--surface));
}

.integration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.integration-content h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 25px;
  color: var(--text);
}

.integration-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0;
}

.integration-stat {
  display: flex;
  flex-direction: column;
}

.integration-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.integration-suffix {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand);
  margin-left: 5px;
}

.integration-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.integration-visual {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.integration-visual img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.integration-visual:hover img {
  transform: scale(1.1);
}

.integration-badge {
  position: absolute;
  top: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 18px 25px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-weight: 700;
  box-shadow: 0 15px 30px rgba(237,46,46,0.3);
}

.integration-badge i { font-size: 1.8rem; }

/* ========== CAREERS ========== */
.ref-careers {
  padding: 100px 0;
  background: var(--bg);
}

.careers-card {
  display: flex;
  align-items: center;
  gap: 50px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 60px 70px;
  border-radius: 60px;
  color: white;
  box-shadow: var(--shadow-hover);
}

.careers-icon {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.2);
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.careers-content h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: white;
}

.careers-content p {
  font-size: 1.1rem;
  margin-bottom: 15px;
  opacity: 0.95;
  line-height: 1.6;
}

.careers-content .btn {
  background: white;
  color: var(--brand);
  padding: 16px 36px;
  border-radius: 50px;
  font-weight: 700;
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2px solid white;
}

.careers-content .btn:hover {
  background: transparent;
  color: white;
}

/* ========== SOCIAL + NEWS ========== */
.ref-social-news {
  padding: 120px 0;
  background: var(--surface);
}

.social-news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.social-block, .news-block {
  background: var(--surface-2);
  padding: 45px;
  border-radius: 40px;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  transition: var(--transition-smooth);
}

.social-block:hover, .news-block:hover {
  transform: translateY(-10px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.social-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 30px;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 1.1rem;
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
}

.social-item i {
  width: 40px;
  height: 40px;
  background: var(--brand-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.news-item {
  padding: 20px;
  background: var(--surface);
  border-radius: 20px;
  border-left: 6px solid var(--brand);
  transition: var(--transition-smooth);
}

.news-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow);
}

.news-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
  font-weight: 600;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
}

.news-loading, .news-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 30px;
  color: var(--muted);
}

/* ========== CTA (NO CONTACT) ========== */
.ref-cta {
  padding: 120px 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
              url('../assets/Image-Equus/Equus-Pic-Mocks/imgh7.jpg');
  background-size: cover;
  background-position: center;

  background-repeat: no-repeat;
  text-align: center;
  position: relative;
}

.cta-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  color: white;
}

.cta-badge {
  display: inline-block;
  padding: 10px 28px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.cta-content h2 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  margin-bottom: 25px;
  line-height: 1.2;
}

.cta-content p {
  font-size: 1.3rem;
  margin-bottom: 40px;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  padding: 18px 36px;
  font-size: 1.1rem;
  border-radius: 50px;
  min-width: 240px;
}

.cta-buttons .btn-large {
  background: white;
  color: var(--brand);
  border: 2px solid white;
}

.cta-buttons .btn-large:hover {
  background: transparent;
  color: white;
}

.cta-buttons .btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.cta-buttons .btn-outline:hover {
  background: white;
  color: var(--brand);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 55px;
  height: 55px;
  background: var(--brand-gradient);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: var(--transition-smooth);
  box-shadow: 0 10px 30px rgba(237,46,46,0.4);
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 40px rgba(237,46,46,0.6);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  animation: backToTopBounce 2s infinite;
}

@keyframes backToTopBounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .overview-grid, .integration-grid, .social-news-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .overview-text { padding-right: 0; }
  .careers-card { flex-direction: column; text-align: center; padding: 50px; }
  .integration-stats { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .ref-hero { min-height: 90vh; }
  .hero-stats { gap: 30px; }
  .assets-grid { grid-template-columns: 1fr; max-width: 450px; margin: 0 auto; }
  .dynamic-sites { grid-template-columns: 1fr; }
  .business-legend { flex-direction: column; align-items: center; gap: 15px; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-buttons .btn { width: 100%; max-width: 350px; }
}

@media (max-width: 480px) {
  .ref-hero h1 { font-size: 2.4rem; }
  .hero-sub { font-size: 1rem; }
  .stat-brick-number { font-size: 2rem; }
  .overview-badge { left: 20px; right: 20px; bottom: 20px; flex-direction: column; text-align: center; }
  .asset-card { padding: 30px 20px; }
  .asset-capacity { font-size: 1.2rem; }
  .careers-card { padding: 40px 20px; }
  .careers-icon { width: 80px; height: 80px; font-size: 2.5rem; }
  .social-block, .news-block { padding: 30px 20px; }
  .back-to-top { width: 45px; height: 45px; }
}

/* ========== DARK THEME ========== */
html[data-theme="dark"] .ref-overview { background: var(--surface); }
html[data-theme="dark"] .ref-map-dynamic { background: var(--surface-2); }
html[data-theme="dark"] .map-canvas { background: var(--surface); }
html[data-theme="dark"] .ref-integration { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 15%, var(--surface)), var(--surface-2)); }

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ref-hero-bg { animation: none; }
  .hero-badge, .hero-scroll, .back-to-top svg { animation: none; }
}