/* Fixed Styles for Di-Factory Website */

/* Import fonts */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@400;600&display=swap");

/* Base variables */
:root {
  /* Colors */
  --color-primary: #2a4b8c;
  --color-primary-rgb: 42, 75, 140;
  --color-accent: #2a9d8f;
  --color-accent-rgb: 42, 157, 143;
  --color-white: #fff;
  --color-light-gray: #f8f9fa;
  --color-text-dark: #1a1a1a;
  --color-text-medium: #333;
  
  /* Spacing */
  --spacing-xs: .25rem;
  --spacing-sm: .5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 3rem;
  --section-spacing: 5rem;
  
  /* Border radius */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-base: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 2rem;
  --border-radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-base: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 24px rgba(0,0,0,0.1);
  
  /* Other variables */
  --navbar-height: 72px;
  --color-light: #f8f9fa;
  --color-dark: #333333;
  --color-medium: #555555;
  --color-muted: #6c757d;
  --color-border: #dee2e6;
  
  /* Gradients - FIXED */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, #26d0bc 100%);
  --gradient-light: linear-gradient(135deg, var(--color-light) 0%, #ffffff 100%);
}

/* Base styles */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-dark);
  background-color: #ffffff;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  padding-top: var(--navbar-height);
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-text-dark);
  letter-spacing: -0.02em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* FIXED: List styles */
ul.list-unstyled, 
ol.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

ul:not(.list-unstyled):not(.navbar-nav):not(.nav),
ol:not(.list-unstyled):not(.navbar-nav):not(.nav) {
  padding-left: 1.5rem;
}

/* Circled bullet styles - FIXED */
.list-style-circle {
  list-style: none;
  padding-left: 0;
}

.list-style-circle li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.list-style-circle li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--color-primary);
  background-color: transparent;
}

/* Navigation styles - FIXED */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--color-primary) !important;
  box-shadow: var(--shadow-md);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  height: var(--navbar-height);
  z-index: 1030;
}

/* Service Menu Side Navigation - Removed */

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-primary-dark);
  color: white;
  transform: translateY(-3px);
}

.navbar.navbar-scrolled {
  background: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
}

.navbar .navbar-brand:hover {
  color: rgba(255, 255, 255, 0.9);
}

.navbar .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s ease;
  position: relative;
}

.navbar .nav-link:hover, 
.navbar .nav-link:focus {
  color: #ffffff !important;
}

.navbar .nav-link.active {
  color: #ffffff !important;
  font-weight: 600;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: #ffffff;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar .nav-link:hover::after, 
.navbar .nav-link:focus::after, 
.navbar .nav-link.active::after {
  transform: scaleX(1);
}

/* Hero Section - FIXED */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0c2f66 0%, #2a4b8c 100%) !important;
  overflow: hidden;
  margin-top: calc(-1 * var(--navbar-height));
  padding-top: var(--navbar-height);
}

.hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0;
}

.hero-title {
  color: #ffffff;
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 3rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  color: rgba(255, 255, 255, 1);
  margin-bottom: 2rem;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 600px;
}

/* Button Styles - FIXED */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2a4b8c 0%, #2a9d8f 100%);
  border: none;
  box-shadow: 0 4px 6px rgba(42, 75, 140, 0.25);
}

.btn-primary:hover, 
.btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(42, 75, 140, 0.3);
  color: #ffffff;
  background: linear-gradient(135deg, #2a4b8c 10%, #2a9d8f 90%);
}

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

.btn-outline-primary:hover {
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: 0 4px 6px rgba(42, 75, 140, 0.2);
}

/* Card Styles - FIXED */
.card {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

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

.card-title {
  color: var(--color-text-dark);
  font-weight: 600;
}

/* Service Cards - FIXED */
.service-card {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  height: 100%;
  transition: all 0.3s ease;
  background-color: #ffffff;
}

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

.service-card .card-body {
  padding: 2rem;
}

.service-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text-dark);
}

.service-card .card-text {
  color: var(--color-text-medium);
  font-size: 1rem;
  line-height: 1.6;
}

.service-card .service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #2a4b8c 0%, #2a9d8f 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(42, 75, 140, 0.3);
}

/* Industry Cards - FIXED */
.industry-card {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  height: 100%;
  transition: all 0.3s ease;
}

.industry-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 10px 30px rgba(42, 157, 143, 0.1);
}

.industry-card .industry-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.industry-card:hover .industry-icon {
  transform: scale(1.1);
  background: var(--gradient-accent);
}

/* Section Styles - FIXED */
.section {
  padding: var(--section-spacing) 0;
  position: relative;
}

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

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--color-text-dark);
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-medium);
  max-width: 700px;
  margin: 1rem auto 0;
  font-weight: 400;
  line-height: 1.6;
}

/* CTA Section - FIXED */
.cta-section {
  background: var(--gradient-primary);
  color: #ffffff;
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2,
.cta-section p {
  color: #ffffff;
}

.cta-section .btn-light {
  background: #ffffff;
  color: var(--color-primary);
  border: 2px solid #ffffff;
}

.cta-section .btn-outline-light {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.cta-section .btn-light:hover {
  background: transparent;
  color: #ffffff;
}

.cta-section .btn-outline-light:hover {
  background: #ffffff;
  color: var(--color-primary);
}

/* Footer - FIXED */
.footer {
  background-color: #f8f9fa;
  padding: 4rem 0 2rem;
}

.footer-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

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

.footer-links a {
  color: var(--color-text-medium);
  transition: all 0.3s ease;
}

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

.footer-bottom {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
}

/* Responsive Fixes */
@media (max-width: 991.98px) {
  .navbar-nav {
    padding: 1rem 0;
  }
  
  .nav-item {
    margin: 0.5rem 0;
  }
  
  .nav-link {
    padding: 0.75rem 0;
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero {
    min-height: 60vh;
  }
}

@media (max-width: 767.98px) {
  :root {
    --section-spacing: 3rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .hero {
    min-height: 50vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}

/* Utility classes - FIXED */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations and transitions */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Focus states for accessibility */
a:focus, 
button:focus, 
input:focus, 
textarea:focus, 
select:focus {
  outline: 3px solid rgba(42, 157, 143, 0.3);
  outline-offset: 2px;
}
