/* Font Face Declarations */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Apply stylish fonts to all elements */
body, p, a, span, div, li, button, input, textarea, select {
    font-family: 'Montserrat', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

:root {
  --primary-color: #ed1c25;
  --primary-dark: #c41017;
  --primary-light: #ff4d54;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --text-gray: #888888;
  --background-light: #f8f9fa;
  --white: #ffffff;
  --max-width: 1200px;
  --header-height: 80px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after, h3::after, h4::after, h5::after, h6::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

h2:hover::after, h3:hover::after, h4:hover::after, h5:hover::after, h6:hover::after {
  width: 100px;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 2rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

/* Header & Navigation */
.main-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
}

.nav-wrapper {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.logo {
  height: 50px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 100%;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: rgba(237, 28, 37, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 1.5rem;
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  color: var(--primary-color);
}

.mobile-menu-toggle .fa-times {
  display: none;
}

.mobile-menu-toggle.active .fa-bars {
  display: none;
}

.mobile-menu-toggle.active .fa-times {
  display: block;
  color: var(--primary-color);
}

@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 1rem;
    width: 100%;
    text-align: center;
    border-radius: 0;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: rgba(237, 28, 37, 0.1);
  }

  .nav-link.active::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .logo img {
    max-width: 140px;
  }

  .nav-wrapper {
    padding: 0 0.5rem;
  }
}

/* Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 3rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/logo2.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin: 2rem 0;
  color: var(--white);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

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

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

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--text-gray);
  border-radius: 4px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(237, 28, 37, 0.1);
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 4rem 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.75rem;
  }
  
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .nav-menu {
    display: none; /* Mobile menu handling should be added */
  }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: 3rem 0;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.text-primary { color: var(--primary-color); }
.bg-light { background-color: var(--background-light); }

/* Partners Section */
.partners {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.partners h2 {
    margin-bottom: 3rem;
    text-align: center;
    color: #333;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.partner-logo {
    width: 100%;
    max-width: 200px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.partner-logo:hover {
    transform: translateY(-5px);
}

.partner-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer Styles */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  padding-top: 2rem;
  text-align: center;
}

/* Solutions Preview */
.solution-card {
  text-align: center;
  padding: 2rem;
}

.solution-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--primary-dark);
}

/* News Styles */
.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-content h3 {
    margin-bottom: 1rem;
}

.page-header {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem 0;
    margin-top: var(--header-height);
    text-align: center;
}

.page-header h1::after {
    background: var(--white);
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
}

.page-header h1:hover::after {
    width: 150px;
}

/* New Sections Styling */
.introduction-section,
.director-message,
.partnerships-section,
.sustainability-section,
.references-section,
.why-mpc {
    padding: 5rem 0;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.section-header h2:hover::after {
    width: 120px;
}

.section-header p {
    max-width: 600px;
    margin: 1rem auto;
}

.industry-sectors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.sector-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.cta-section {
    text-align: center;
    padding: 5rem 0;
    background: var(--primary-color);
    color: var(--white);
}

@media (max-width: 992px) {
    .industry-sectors {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .icon {
        font-size: 1.2rem;
    }
    
    .news-image img {
        height: 150px;
    }
}

/* General image styling */
img {
    max-width: 100%;
    height: auto;
}

/* Specific icon styling */
.icon {
    font-size: 1.5rem; /* Adjust this value to change icon size */
}

/* Example for a specific section */
.news-image img {
    width: 100%;
    height: 200px; /* Set a specific height if needed */
    object-fit: cover; /* Ensures the image covers the area without distortion */
}

/* Services Cards Section */
.services-cards {
    padding: 5rem 0;
    background-color: var(--background-light);
}

.container-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 2rem;
}

.service-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

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

.svg_card {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--background-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.svg_card svg {
    width: 100%;
    height: 100%;
    color: var(--primary-color);
}

/* Partners and Clients Section */
.partners,
.clients {
    padding: 4rem 0;
}

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

.partners-grid,
.clients-grid {
    display: grid;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.partners-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.clients-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.partner-logo,
.client-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    aspect-ratio: 16/9;
}

.partner-logo:hover,
.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.partner-logo img,
.client-logo img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    padding: 1rem;
}

/* Latest News Section */
.latest-news {
    padding: 4rem 0;
    background-color: var(--background-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

/* CTA Section */
.cta-section.dark-theme {
    background: var(--text-dark);
    color: var(--white);
    padding: 4rem;
    text-align: center;
    border-radius: 16px;
    margin: 4rem auto;
    max-width: var(--max-width);
    box-shadow: var(--shadow-md);
}

.cta-section.dark-theme h2 {
    margin-bottom: 1rem;
    font-size: 2.2rem;
    color: var(--white);
}

.cta-section.dark-theme p {
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    color: var(--white);
}

/* About Section */
.about-section {
    padding: 5rem 0;
}

.about-section .list-style-one {
    list-style: none;
    margin-bottom: 2rem;
    padding-left: 0;
}

.about-section .list-style-one li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.about-section .list-style-one li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .container-card,
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .container-card {
        grid-template-columns: 1fr;
    }
    
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-section.dark-theme {
        margin: 2rem 1rem;
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .partners-grid,
    .clients-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .client-logo,
    .partner-logo {
        aspect-ratio: auto;
        padding: 0.75rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Error and Empty States */
.error-message,
.no-news {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    color: var(--text-light);
}

.error-message {
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* Card Headers */
.card h3::after {
  width: 40px;
}

.card h3:hover::after {
  width: 80px;
}

/* Solution Category Headers */
.solution-category h3::after {
  width: 50px;
  height: 2px;
}

.solution-category h3:hover::after {
  width: 90px;
}

/* News Headers */
.news-content h3::after {
  width: 40px;
}

.news-content h3:hover::after {
  width: 80px;
}

/* Contact Form Headers */
.contact-form h3::after {
  width: 50px;
}

.contact-form h3:hover::after {
  width: 90px;
}

/* Footer Headers */
.footer h4::after {
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}

.footer h4:hover::after {
  width: 80px;
}

/* Left-aligned headers */
.text-left h1::after, .text-left h2::after, .text-left h3::after, .text-left h4::after, .text-left h5::after, .text-left h6::after {
  left: 0;
  transform: none;
}

/* Right-aligned headers */
.text-right h1::after, .text-right h2::after, .text-right h3::after, .text-right h4::after, .text-right h5::after, .text-right h6::after {
  left: auto;
  right: 0;
  transform: none;
}

/* Centered headers */
.text-center h1::after, .text-center h2::after, .text-center h3::after, .text-center h4::after, .text-center h5::after, .text-center h6::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Default alignment for section headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.section-header h2:hover::after {
  width: 120px;
}

.about-card {
    margin-top: 2rem;
    max-width: 100%;
    width: 100%;
}

.about-card .svg_card {
    margin-bottom: 1.5rem;
}

.about-card .svg_card i {
    font-size: 3rem;
    color: var(--primary-color);
}

.about-card .card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-card .card-description {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-card .btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.about-card .btn i {
    transition: transform 0.3s ease;
}

.about-card .btn:hover i {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .about-card {
        margin-top: 1.5rem;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.75rem;
  }
  
  .section-header h2::after {
    width: 60px;
  }
  
  .section-header h2:hover::after {
    width: 90px;
  }
  
  .page-header h1::after {
    width: 80px;
  }
  
  .page-header h1:hover::after {
    width: 120px;
  }
}

/* Center decorative lines for specific sections */
.partners h2::after,
.clients h2::after,
.latest-news h2::after,
.cta-section h2::after,
.certifications-section h2::after,
.news-section h2::after,
.sectors-section h2::after,
.services-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.partners h2:hover::after,
.clients h2:hover::after,
.latest-news h2:hover::after,
.cta-section h2:hover::after,
.certifications-section h2:hover::after,
.news-section h2:hover::after,
.sectors-section h2:hover::after,
.services-section h2:hover::after {
  width: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-header h2::after,
  .partners h2::after,
  .clients h2::after,
  .latest-news h2::after,
  .cta-section h2::after,
  .certifications-section h2::after,
  .news-section h2::after,
  .sectors-section h2::after,
  .services-section h2::after {
    width: 60px;
  }
  
  .section-header h2:hover::after,
  .partners h2:hover::after,
  .clients h2:hover::after,
  .latest-news h2:hover::after,
  .cta-section h2:hover::after,
  .certifications-section h2:hover::after,
  .news-section h2:hover::after,
  .sectors-section h2:hover::after,
  .services-section h2:hover::after {
    width: 90px;
  }
}
