/* ---------- Variables ---------- */
:root {
  --primary-color: #e10600;
  --accent-color: #ffffff;
  --gray-dark: #1a1a1a;
  --gray-light: #2a2a2a;
  --transition: all 0.3s ease;
  --box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ---------- Global Styles ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: #ddd;
  background: #000;
  overflow-x: hidden;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
              url('https://images.unsplash.com/photo-1535732820275-9ffd998cac22?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 160px 20px;
  position: relative;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  animation: fadeIn 1s ease-out;
}

.hero h2 {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 40px;
  color: #ddd;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 16px 36px;
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--accent-color);
  box-shadow: 0 0 15px rgba(225,6,0,0.6);
}

.btn-primary:hover {
  background: #ff1a1a;
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(225,6,0,0.8);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* ---------- Features ---------- */
.features {
  background: linear-gradient(180deg, #111 0%, #1a1a1a 100%);
  padding: 100px 20px;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h3 {
  font-size: 2.4rem;
  color: var(--primary-color);
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
  max-width: 1200px;
  margin: auto;
}

.feature-card {
  background: var(--gray-light);
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  border-bottom: 3px solid transparent;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  border-bottom: 3px solid var(--primary-color);
}

.feature-image {
  height: 180px;
  overflow: hidden;
}

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

.feature-card:hover .feature-image img {
  transform: scale(1.1);
}

.feature-content {
  padding: 25px;
}

.feature-icon {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 20px;
  height: 80px;
  width: 80px;
  line-height: 80px;
  text-align: center;
  margin: -40px auto 25px;
  background: rgba(225,6,0,0.1);
  border-radius: 50%;
  position: relative;
  z-index: 2;
  border: 4px solid var(--gray-light);
}

.feature-card h4 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--accent-color);
}

.feature-card p {
  color: #ccc;
  font-size: 1rem;
}

/* ---------- Stats ---------- */
.stats {
  background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)),
              url('https://images.unsplash.com/photo-1544829099-b9a0c07fad1a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1770&q=80');
  background-size: cover;
  background-attachment: fixed;
  padding: 80px 20px;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-item {
  padding: 30px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
}

.stat-label {
  font-size: 1.1rem;
  color: #ddd;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Content Sections ---------- */
.content-section {
  padding: 100px 20px;
}

.dark-section {
  background: var(--gray-dark);
}

.light-section {
  background: var(--gray-light);
}

/* Fix for responsive content sections */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.content-text {
  padding-right: 20px;
}

/* Make sure images are properly constrained */
.content-image {
  overflow: hidden;
  box-shadow: var(--box-shadow);
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 300px; /* Add minimum height for consistency */
}

.content-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.content-image:hover img {
  transform: scale(1.05);
}

.content-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(225,6,0,0.2), rgba(0,0,0,0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.content-image:hover::after {
  opacity: 1;
}

.content-section h3 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.content-section p {
  color: #ccc;
  margin-bottom: 30px;
  font-size: 1.1rem;
  line-height: 1.8;
}

.content-btn {
  margin-top: 10px;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .content-text {
    order: 2;
    padding: 0 20px;
  }
  
  .content-image {
    order: 1;
    min-height: 250px;
    max-width: 500px;
    margin: 0 auto;
  }
  
  /* Specific fix for news section */
  #news .content-grid {
    display: flex;
    flex-direction: column;
  }
  
  #news .content-image {
    order: 1;
  }
  
  #news .content-text {
    order: 2;
  }
}

@media (max-width: 768px) {
  .hero h2 { font-size: 2.5rem; }
  .hero p { font-size: 1.1rem; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero { padding: 100px 20px; }
  .hero h2 { font-size: 2rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .content-image {
    min-height: 200px;
  }
  
  .content-section {
    padding: 60px 20px;
  }
}