/* Modern Quality Management Page CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Core variables */
:root {
  --light-bg: #f0f0f0;
  --dark-blue: #04173b;
  --accent-red: #eb0a29;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --white: #ffffff;
  --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 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
  --radius: 8px;
  --radius-lg: 12px;
  --container-width: 1200px;
}

/* Reset and base styles */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light-bg);
  color: var(--gray-800);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 15px;
  line-height: 1.2;
  color: var(--dark-blue);
}

h1 {
  font-size: 40px;
  font-weight: 700;
}

h2 {
  font-size: 32px;
  font-weight: 600;
}

h3 {
  font-size: 24px;
  font-weight: 600;
}

p {
  margin: 0 0 20px;
}

ul {
  list-style: none;
  padding: 0;
}

a {
  text-decoration: none;
  color: var(--dark-blue);
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background-color: var(--accent-red);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  border: 2px solid var(--accent-red);
  text-align: center;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background-color: transparent;
  color: var(--dark-blue);
  font-weight: 600;
  border: 2px solid var(--dark-blue);
  border-radius: var(--radius);
  transition: var(--transition);
}

.btn-outline i {
  margin-left: 8px;
  transition: var(--transition);
}

.btn-outline:hover {
  background-color: var(--dark-blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline:hover i {
  transform: translateX(5px);
}

/* Utility classes */
.accent-line {
  width: 60px;
  height: 3px;
  background-color: var(--accent-red);
  margin-bottom: 20px;
  border-radius: 1.5px;
}

/* Hero Section */
.quality-hero {
  background-color: var(--dark-blue);
  background-image: linear-gradient(135deg, rgba(4, 23, 59, 0.9), rgba(4, 23, 59, 0.7)), url('../assets/images/factory.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 120px 0 80px;
  text-align: center;
}

.quality-hero h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.quality-hero p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto;
}

.quality-hero .accent-line {
  margin: 0 auto 20px;
}

/* Content sections */
.content-section {
  padding: 80px 0;
}

.light-section {
  background-color: var(--white);
}

.accent-section {
  background-color: var(--light-bg);
}

.flex-row {
  display: flex;
  align-items: center;
  gap: 40px;
}

.flex-row.reverse {
  flex-direction: row-reverse;
}

.content-col {
  flex: 1;
}

.image-col {
  flex: 1;
}

.section-tag {
  display: inline-block;
  padding: 6px 12px;
  background-color: rgba(235, 10, 41, 0.1);
  color: var(--accent-red);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.content-section h2 {
  margin-bottom: 20px;
  font-size: 32px;
}

.content-section p {
  color: var(--gray-600);
  font-size: 16px;
  margin-bottom: 30px;
}

.content-features {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(4, 23, 59, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-blue);
  font-size: 18px;
}

.feature-text {
  font-weight: 500;
  color: var(--dark-blue);
}

.image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 400px;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.image-wrapper:hover img {
  transform: scale(1.05);
}

/* Policy Section */
.policy-section {
  padding: 80px 0;
  background-color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-header h2 {
  margin-bottom: 15px;
}

.section-header .accent-line {
  margin: 0 auto 20px;
}

.section-header p {
  color: var(--gray-600);
}

.policy-cards {
  display: flex;
  gap: 30px;
  margin-top: 40px;
}

.policy-card {
  flex: 1;
  background-color: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.policy-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent-red);
  z-index: -1;
}

.policy-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(235, 10, 41, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
  font-size: 30px;
  margin-bottom: 20px;
}

.policy-card h3 {
  margin-bottom: 15px;
  font-size: 22px;
}

.policy-card p {
  color: var(--gray-600);
  margin-bottom: 20px;
}

.policy-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  color: var(--gray-800);
}

.policy-list i {
  color: var(--accent-red);
  margin-right: 12px;
  font-size: 16px;
  margin-top: 4px;
}

/* CTA Section */
.cta-section {
  background-color: var(--dark-blue);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 15px;
}

.cta-section p {
  color: var(--gray-300);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Responsive styles */
@media (max-width: 992px) {
  .flex-row, .flex-row.reverse {
    flex-direction: column;
    gap: 30px;
  }
  
  .content-col, .image-col {
    width: 100%;
  }
  
  .image-wrapper {
    height: 350px;
  }
  
  .policy-cards {
    flex-direction: column;
  }
  
  .content-features {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }
  
  h2 {
    font-size: 26px;
  }
  
  h3 {
    font-size: 22px;
  }
  
  .quality-hero {
    padding: 100px 0 60px;
  }
  
  .content-section {
    padding: 60px 0;
  }
  
  .image-wrapper {
    height: 250px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }
  
  h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  .quality-hero {
    padding: 80px 0 40px;
  }
  
  .content-section {
    padding: 50px 0;
  }
  
  .btn-primary, .btn-outline {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .section-header {
    margin-bottom: 30px;
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.slide-up {
  animation: slideUp 0.7s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* For smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Add some spacing to account for fixed navbar if needed */
.quality-management-container {
  background-color: #04173b;
  padding-top: 40px; /* Adjust this based on your navbar height */
}


.factory-footer {
  background: #04173b;
  color: #fff;
  padding: 30px 0 20px 0;
  border-top: 6px solid #eb0a29;
  font-family: "Montserrat", Arial, sans-serif;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  gap: 20px;
}

/* Generic footer column styling */
.footer-col {
  display: flex;
  flex-direction: column;
  text-align: left; /* Consistent left alignment for all columns */
}

/* Section Headers */
.footer-col h4 {
  color: #eb0a29;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* Contact Section */
.contact-col {
  flex: 0 0 34%;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.address-item, .contact-item {
  display: flex;
  align-items: flex-start;
  font-size: 1rem;
}

.address-item i, .contact-item i {
  color: #eb0a29;
  min-width: 20px;
  margin-top: 3px;
  margin-right: 10px;
}

.address-item span {
  line-height: 1.4;
}

.contact-item a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #eb0a29;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: flex-start; /* Left-aligned social icons */
}

.social-icon {
  color: #fff;
  background: #eb0a29;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: #fff;
  color: #eb0a29;
  transform: translateY(-3px);
}

/* Links Section */
.links-col {
  flex: 0 0 28%;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links li a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.footer-links li a i {
  color: #eb0a29;
  margin-right: 8px;
  font-size: 0.85rem;
}

.footer-links li a:hover {
  color: #eb0a29;
  transform: translateX(5px);
}

/* Logo Section - Refactored for consistency */
.logo-col {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Changed from center to left alignment */
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Changed from center to left alignment */
  margin-bottom: 10px;
  width: 100%;
}

.footer-logo img {
  width: 320px;
  max-width: 100%;
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 15px;
  border: 2px solid #eb0a29;
}

.logo-mesa {
  padding-top: 10px;
  width: 100%;
  display: flex;
  justify-content: flex-start; /* Left-aligned logo */
}

.logo-mesa img {
  height: 100px;
  width: 200px;
  max-width: 100%;
  display: block;
  margin-bottom: 10px;
}

.footer-copyright {
  color: #c5ccdb;
  font-size: 0.85rem;
  text-align: left; /* Consistent left alignment */
  padding-top: 40px;
  width: 100%;
}

/* Media Queries - Improved for consistent alignment */
@media (max-width: 992px) {
  .footer-container {
    flex-wrap: wrap;
    justify-content: flex-start; /* Consistent left alignment when wrapping */
  }
  
  .contact-col {
    flex: 0 0 100%;
    margin-bottom: 30px;
  }
  
  .links-col, .logo-col {
    flex: 0 0 48%;
  }
  
  /* Remove extra padding on smaller screens */
  .links-col {
    padding-left: 0;
  }
  
  /* Maintain left alignment for all columns */
  .footer-col {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: stretch; /* Ensures all columns take full width */
  }
  
  .footer-col {
    width: 100%;
    margin-bottom: 30px;
    text-align: left; /* Consistent left alignment on mobile */
  }
  
  .logo-col {
    align-items: flex-start; /* Keep left alignment instead of center */
  }
  
  .logo-container {
    align-items: flex-start; /* Consistent with other elements */
  }
  
  .logo-mesa {
    justify-content: flex-start; /* Keep logo left-aligned on mobile */
  }
  
  .social-icons {
    justify-content: flex-start; /* Keep social icons left-aligned on mobile */
  }
  
  .footer-copyright {
    text-align: left; /* Keep copyright left-aligned for consistency */
  }
  
  /* Remove left padding on mobile */
  .links-col {
    padding-left: 0;
  }
}


.legal-links {
  margin-top: 78px;
  font-size: 0.8rem; /* Smaller than regular links */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.legal-links a {
  color: #c5ccdb; /* Lighter color than main links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-links a:hover {
  color: #eb0a29;
  text-decoration: underline;
}

.legal-divider {
  margin: 0 5px;
  color: #c5ccdb;
}

@media (max-width:991.98px){
  .factory-footer        { padding:20px 0 12px; }      /* tablet   */
}
@media (max-width:575.98px){
  .factory-footer        { padding:18px 0 10px; }      /* phones   */
}
@media (max-width:991.98px){           /* ≤ 992px  =  tablet + phone */
  .footer-container      { flex-direction:column; gap:24px; }
  .footer-col            { width:100%; margin:0; }
}
@media (max-width:991.98px){
  .footer-col h4         { font-size:1rem;  margin-bottom:14px; }
  .footer-links a,
  .address-item,
  .contact-item          { font-size:0.95rem; }
}
@media (max-width:575.98px){
  .footer-links a,
  .address-item,
  .contact-item          { font-size:0.9rem;  line-height:1.35; }
}

/* 4)  Copyright & legal links get tighter                                      */
.footer-copyright        { padding-top:28px; }
@media (max-width:575.98px){
  .footer-copyright      { padding-top:18px; font-size:0.75rem; }
  .legal-links           { margin-top:12px;  font-size:0.72rem; }
}

/* 5)  Social icons + chevrons scale down a bit                                 */
@media (max-width:575.98px){
  .social-icon           { width:32px; height:32px; font-size:0.9rem; }
  .footer-links li a i   { margin-right:6px; font-size:0.78rem; }
}

/* 6)  Make the map responsive (no horizontal scrolling, shorter height)        */
.footer-col iframe       { width:100%; max-width:100%; border:0; }
@media (max-width:991.98px){
  .footer-col iframe     { height:240px; }        /* tablet */
}
@media (max-width:575.98px){
  .footer-col iframe     { height:190px; }        /* phones */
}

/* 7)  Reduce the huge top margin that pushed legal links way down              */
.legal-links             { margin-top:26px; }
@media (max-width:991.98px){
  .legal-links           { margin-top:18px; }
}