/* Mile High Concrete Pros - Custom Styles */

:root {
  --primary-color: #2c5aa0;
  --secondary-color: #f8b500;
  --accent-color: #1a4480;
  --text-dark: #2d3748;
  --text-light: #718096;
  --bg-light: #f7fafc;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Global Styles */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  /* Offset for fixed-top navbar so page content isn't hidden under it */
  padding-top: 72px;
}

/* Adjust offset for smaller screens (collapsed navbar is slightly shorter) */
@media (max-width: 991.98px) {
  body {
    padding-top: 62px;
  }
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-warning {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--text-dark);
  font-weight: 600;
}

.btn-warning:hover {
  background-color: #e6a300;
  border-color: #e6a300;
  color: var(--text-dark);
}

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: all 0.3s ease;
  background-color: #ffffff !important; /* Force white navbar background across all pages */
  box-shadow: var(--shadow);
}

/* Ensure nav links are readable on light backgrounds */
.navbar .nav-link {
  color: var(--text-dark) !important;
}

/* Active state uses brand color */
.navbar .nav-link.active,
.navbar .nav-link:focus {
  color: var(--primary-color) !important;
  font-weight: 600;
}

/* Brand color for contrast on light navbar */
.navbar .navbar-brand {
  color: var(--primary-color) !important;
}

/* Homepage-specific navbar appearance: light bar over blue hero */
body.home .navbar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

/* Ensure link colors are correct on homepage too */
body.home .navbar .nav-link {
  color: var(--text-dark) !important;
}
body.home .navbar .nav-link.active,
body.home .navbar .nav-link:focus {
  color: var(--primary-color) !important;
  font-weight: 600;
}
body.home .navbar .navbar-brand {
  color: var(--primary-color) !important;
}

/* When scrolled, keep strong contrast on light bg */
.navbar.navbar-scrolled .nav-link {
  color: var(--text-dark) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  /* Subtract navbar offset already applied to body so the hero truly fills viewport */
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Match the mobile navbar offset for accurate full-height hero on small screens */
@media (max-width: 991.98px) {
  .hero-section {
    min-height: calc(100vh - 62px);
  }
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../images/hero.jpg") center / cover;
  opacity: 0.5;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-stats {
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

/* Service Cards */
.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: none;
  height: 100%;
}

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

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
}

.service-icon-large {
  width: 100%;
  height: auto;
  background: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.service-icon-large img {
  width: 100% !important;
  height: 250px !important;
  border-radius: 12px;
  background: none;
  object-fit: cover;
}

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

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

/* Feature Icons */
.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.feature-icon i {
  font-size: 1.5rem;
}

/* Location Cards */
.location-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  height: 100%;
}

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

.location-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Testimonial Cards */
.testimonial-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  height: 100%;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--primary-color);
  opacity: 0.3;
  font-family: Georgia, serif;
}

.stars i {
  color: #ffc107;
  margin-right: 2px;
}

.customer-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

/* Contact Section */
.contact-form {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.contact-form .form-control,
.contact-form .form-select {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1rem;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(248, 181, 0, 0.25);
}

.contact-form .form-label {
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-info {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-item i {
  width: 40px;
  height: 40px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.contact-item h5 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 600;
}

.contact-item p {
  margin: 0;
  color: var(--text-light);
}

.contact-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: var(--text-dark) !important;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

/* Loading States */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Notification Styles */
.alert-success-custom {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-error-custom {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 80vh;
    text-align: center;
  }

  .display-4 {
    font-size: 2rem;
  }

  .service-card,
  .location-card,
  .testimonial-card {
    margin-bottom: 2rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .hero-stats {
    margin-top: 2rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .display-4 {
    font-size: 1.75rem;
  }

  .lead {
    font-size: 1rem;
  }
}

/* Utility Classes */
.shadow-custom {
  box-shadow: var(--shadow);
}

.shadow-lg-custom {
  box-shadow: var(--shadow-lg);
}

.border-radius-custom {
  border-radius: 12px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .social-links {
    display: none !important;
  }

  .hero-section {
    background: none !important;
    color: black !important;
    min-height: auto;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --secondary-color: #ff6600;
    --text-dark: #000000;
    --text-light: #333333;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}
