/* ===========================
   Index Page Styles
   Equus Energy
   =========================== */

/* ===========================
   Theme Variables
   =========================== */
: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
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* ===========================
   Section Header
   =========================== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 4px;
}

.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 Carousel
   =========================== */
.hero-carousel {
  position: relative;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b0f14 0%, #1a1f26 100%);
}

.carousel-track {
  position: relative;
  height: 100%;
  width: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.carousel-slide:nth-child(1) {
  background-image: url('../assets/Image-Equus/Equus-Pic-Mocks/img64r.jpg');
}

.carousel-slide:nth-child(2) {
  background-image: url('../assets/Image-Equus/Equus-Pic-Mocks/img8y.jpg');
}

.carousel-slide:nth-child(3) {
  background-image: url('../assets/Image-Equus/Equus-Pic-Mocks/img23.jpg');
}

.carousel-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  color: white;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.8s ease 0.3s, opacity 0.8s ease 0.3s;
}

.active .carousel-content {
  transform: translateY(0);
  opacity: 1;
}

.carousel-content h1 {
  font-size: clamp(2.5rem, 8vw, 4.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;
 
}

.carousel-content .subtitle {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.cta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-row .btn {
  padding: 16px 36px;
  font-size: 1.1rem;
  border-radius: 50px;
  min-width: 220px;
}

.cta-row .btn.ghost {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.cta-row .btn.ghost:hover {
  background: white;
  color: var(--brand);
}

/* Carousel Navigation */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.carousel-prev {
  left: 30px;
}

.carousel-next {
  right: 30px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 10;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 0;
}

.carousel-dot.active {
  background: var(--brand);
  transform: scale(1.3);
  box-shadow: 0 0 20px var(--brand);
}

/* ===========================
   Stats Section
   =========================== */
.stats-section {
  padding: 100px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  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;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.stat-card {
  background: var(--surface);
  padding: 40px 30px;
  border-radius: 30px;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(to bottom, var(--brand), var(--brand-2));
  transition: height 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-10px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.stat-card:hover::before {
  height: 100%;
}

.stat-icon {
  display: inline-block;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 20px;
  color: white;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===========================
   Operations Section
   =========================== */
.operations-section {
  padding: 100px 0;
  background: var(--surface);
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 50px auto 0;
  padding: 0 20px;
}

.operation-card {
  background: var(--bg);
  padding: 40px 30px;
  border-radius: 30px;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  transition: var(--transition-smooth);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.operation-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.operation-card:hover {
  transform: translateY(-10px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.operation-card:hover::after {
  transform: scaleX(1);
}

.operation-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  color: white;
  font-size: 2.2rem;
}

.operation-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text);
}

.operation-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* ===========================
   News Section
   =========================== */
.news-section {
  padding: 100px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.news-card {
  background: var(--surface);
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-10px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}

.news-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.news-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.1);
}

.news-content {
  padding: 30px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.news-date {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-date::before {
  content: '\f133';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  color: var(--brand);
}

.news-tag {
  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: 1px;
  text-transform: uppercase;
}

.news-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.4;
}

.news-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 20px;
}

.read-more {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
  font-size: 0.95rem;
}

.read-more:hover {
  gap: 12px;
}

/* ===========================
   News Modal
   =========================== */
.news-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  padding: 20px;
}

.news-modal.active {
  opacity: 1;
  visibility: visible;
}

.news-modal-content {
  background: var(--surface);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 40px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.5s ease;
  box-shadow: var(--shadow-hover);
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
}

.active .news-modal-content {
  transform: translateY(0);
}

.news-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.news-modal-close:hover {
  background: var(--brand);
  color: white;
  transform: rotate(90deg);
}

.news-modal-body {
  padding: 50px;
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
  padding: 120px 0;
  background:  linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%),
    url('../assets/Image-Equus/Equus-Pic-Mocks/img23.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.cta-content {
  color: white;
}

.cta-content h2 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  margin-bottom: 25px;
  line-height: 1.2;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.95;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.cta-buttons .btn {
  padding: 18px 36px;
  font-size: 1.1rem;
  border-radius: 50px;
  min-width: 220px;
}

.cta-buttons .btn.ghost {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.cta-buttons .btn.ghost:hover {
  background: white;
  color: var(--brand);
}

.cta-buttons .btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
}

.cta-buttons .btn.secondary:hover {
  background: white;
  color: var(--brand);
  border-color: white;
}

/* ===========================
   Contact Section
   =========================== */
.contact-section {
  padding: 100px 0;
  background: var(--surface);
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 50px;
  padding: 0 20px;
}

.contact-info {
  display: grid;
  gap: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 25px;
  background: var(--bg);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  transition: var(--transition-smooth);
}

.contact-item:hover {
  border-color: var(--brand);
  transform: translateX(10px);
  box-shadow: var(--shadow);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  flex-shrink: 0;
}

.contact-details h3 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 1.2rem;
}

.contact-details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.contact-form {
  background: var(--bg);
  padding: 45px;
  border-radius: 30px;
  border: 1px solid color-mix(in srgb, var(--muted) 15%, transparent);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 2px solid color-mix(in srgb, var(--muted) 20%, transparent);
  border-radius: 15px;
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition-smooth);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
  background: var(--surface-2);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 16px;
}

.contact-form .btn {
  width: 100%;
  padding: 18px;
  font-size: 1.1rem;
  border-radius: 50px;
}

/* ===========================
   Back to Top
   =========================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  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 Design
   =========================== */
@media (max-width: 1024px) {
  .carousel-prev,
  .carousel-next {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .carousel-prev {
    left: 20px;
  }
  
  .carousel-next {
    right: 20px;
  }
  
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero-carousel {
    min-height: 600px;
  }
  
  .carousel-content h1 {
    font-size: 2.5rem;
  }
  
  .carousel-content .subtitle {
    font-size: 1.1rem;
  }
  
  .cta-row .btn {
    min-width: 100%;
  }
  
  .carousel-prev,
  .carousel-next {
    top: auto;
    bottom: 100px;
    transform: none;
  }
  
  .carousel-prev {
    left: 20px;
  }
  
  .carousel-next {
    right: 20px;
  }
  
  .stats-section,
  .operations-section,
  .news-section,
  .cta-section,
  .contact-section {
    padding: 80px 0;
  }
  
  .stats-grid,
  .operations-grid,
  .news-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 30px 25px;
  }
  
  .news-modal-content {
    margin: 20px;
  }
  
  .news-modal-body {
    padding: 40px 30px;
  }
}

@media (max-width: 480px) {
  .hero-carousel {
    min-height: 550px;
  }
  
  .carousel-content h1 {
    font-size: 2rem;
  }
  
  .carousel-content .subtitle {
    font-size: 1rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .stat-number {
    font-size: 2.2rem;
  }
  
  .stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }
  
  .operation-card {
    padding: 30px 20px;
  }
  
  .operation-icon {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
  
  .operation-title {
    font-size: 1.3rem;
  }
  
  .news-card {
    max-width: 100%;
  }
  
  .news-content {
    padding: 25px;
  }
  
  .news-title {
    font-size: 1.2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
  
  .contact-item {
    padding: 20px;
  }
  
  .contact-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}

/* ===========================
   Dark Theme Adjustments
   =========================== */
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .operation-card,
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .contact-item,
html[data-theme="dark"] .contact-form {
  background: var(--surface);
}

html[data-theme="dark"] .news-modal-content {
  background: var(--surface);
}

html[data-theme="dark"] .carousel-slide::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 100%);
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .carousel-slide,
  .carousel-content,
  .stat-card,
  .operation-card,
  .news-card {
    transition: none !important;
  }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
  .hero-carousel,
  .cta-section,
  .back-to-top {
    display: none;
  }
  
  .stats-section,
  .operations-section,
  .news-section,
  .contact-section {
    page-break-inside: avoid;
  }
}