/**
 * Custom CSS for ConstructPro - Advanced Construction Website
 *
 * @format
 */

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

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Color Variables */
:root {
  --construction-grey: #2d3748;
  --construction-purple: #805ad5;
  --light-grey: #4a5568;
  --dark-purple: #553c9a;
  --accent-grey: #718096;
  --light-purple: #b794f4;
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #171923;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Navigation Styles */
.nav-link {
  @apply text-construction-grey hover:text-construction-purple px-3 py-2 rounded-md text-sm font-medium transition-all duration-300 relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--construction-purple);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  @apply text-construction-purple font-semibold;
}

.mobile-nav-link {
  @apply block px-3 py-2 rounded-md text-base font-medium text-construction-grey hover:text-construction-purple hover:bg-gray-100 transition-all duration-300;
}

.mobile-menu-button {
  @apply transition-all duration-300;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--construction-grey) 0%,
    var(--construction-purple) 50%,
    var(--dark-purple) 100%
  );
  position: relative;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

/* Button Styles */
.btn-primary {
  @apply bg-construction-purple hover:bg-dark-purple text-white font-semibold py-3 px-8 rounded-lg transition-all duration-300 transform hover:scale-105 hover:shadow-lg inline-flex items-center;
}

.btn-secondary {
  @apply bg-transparent border-2 border-white text-white font-semibold py-3 px-8 rounded-lg transition-all duration-300 transform hover:scale-105 hover:bg-white hover:text-construction-purple inline-flex items-center;
}

.btn-view-project {
  @apply bg-white text-construction-purple font-semibold py-2 px-6 rounded-lg transition-all duration-300 transform hover:scale-105 hover:bg-construction-purple hover:text-white;
}

/* Service Cards */
.service-card {
  @apply bg-white p-8 rounded-xl shadow-lg hover:shadow-2xl transition-all duration-500 transform hover:-translate-y-2 border border-gray-100;
}

.service-card:hover {
  border-color: var(--construction-purple);
}

.service-icon {
  @apply w-16 h-16 bg-gradient-to-br from-construction-purple to-dark-purple rounded-lg flex items-center justify-center text-white mb-6 transform transition-all duration-300;
}

.service-card:hover .service-icon {
  @apply scale-110 rotate-3;
}

/* Project Cards */
.project-card {
  @apply bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-500 transform hover:-translate-y-2 hover:shadow-2xl;
}

.project-image {
  width: 100%;
  height: 220px; /* fixed height for all images */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card:hover .project-image img {
  @apply scale-110;
}

.project-overlay {
  @apply absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center opacity-0 transition-all duration-300;
}

.project-card:hover .project-overlay {
  @apply opacity-100;
}

/* Stat Cards */
.stat-card {
  @apply text-center p-6 bg-gray-50 rounded-lg border border-gray-200 transition-all duration-300 hover:border-construction-purple hover:bg-white hover:shadow-lg;
}

/* Contact Form */
.contact-form {
  @apply space-y-6;
}

.form-label {
  @apply block text-sm font-medium text-construction-grey mb-2;
}

.form-input,
.form-textarea {
  @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-construction-purple focus:border-transparent transition-all duration-300;
}

.form-input:focus,
.form-textarea:focus {
  @apply outline-none;
}

/* Contact Icons */
.contact-icon {
  @apply w-12 h-12 bg-gradient-to-br from-construction-purple to-dark-purple rounded-lg flex items-center justify-center text-white mr-4 flex-shrink-0;
}

/* Footer */
.footer-link {
  @apply text-gray-300 hover:text-construction-purple transition-all duration-300;
}

.social-link {
  @apply w-10 h-10 bg-gray-600 hover:bg-construction-purple rounded-full flex items-center justify-center text-white transition-all duration-300 transform hover:scale-110;
}

.newsletter-form {
  @apply flex items-center justify-center bg-gradient-to-r from-construction-purple/10 to-dark-purple/10 rounded-lg p-2 shadow-lg;
  margin-top: 1rem;
}

.newsletter-input {
  @apply flex-1 px-4 py-2 border border-construction-purple rounded-l-lg bg-white text-construction-grey placeholder-construction-purple focus:outline-none focus:ring-2 focus:ring-construction-purple shadow-md transition-all duration-300;
  font-size: 1rem;
}

.newsletter-input:focus {
  background: #f3e8ff;
  color: #2d3748;
  box-shadow: 0 0 0 3px #805ad5aa;
}

.newsletter-btn {
  @apply bg-construction-purple hover:bg-dark-purple text-white font-bold px-6 py-2 rounded-r-lg transition-all duration-300 transform hover:scale-105 shadow-md;
  font-size: 1.1rem;
  outline: none;
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
  animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
  animation: fadeIn 1s ease-out 0.6s both;
}

.animate-slide-left {
  animation: slideInLeft 1s ease-out;
}

.animate-slide-right {
  animation: slideInRight 1s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-slide-in-left {
  animation: slideInLeft 1s ease-out both;
}
.animate-slide-in-right {
  animation: slideInRight 1s ease-out both;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-slide-in-up {
  animation: slideInUp 1s cubic-bezier(0.23, 1, 0.32, 1) both;
}

/* Scroll Animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

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

/* Navbar Scroll Effect */
.navbar-scrolled {
  @apply bg-white bg-opacity-95 backdrop-blur-md shadow-lg;
}

/* Loading Animation */
.loading-spinner {
  @apply w-8 h-8 border-4 border-gray-300 border-t-construction-purple rounded-full animate-spin;
}

/* Progress Bar */
.progress-bar {
  @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
  @apply bg-gradient-to-r from-construction-purple to-dark-purple h-2 rounded-full transition-all duration-1000;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--construction-purple);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }

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

  .contact-form {
    margin-top: 2rem;
  }
}

@media (max-width: 640px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .btn-primary,
  .btn-secondary {
    @apply w-full justify-center mb-4;
  }
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--construction-purple),
    var(--dark-purple)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pulse Animation */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse 2s infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Counter Animation */
.counter {
  transition: all 0.5s ease;
}

/* Parallax Effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--construction-grey);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tooltip:hover::before {
  opacity: 1;
}

/* Modal Styles */
.modal {
  @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 opacity-0 pointer-events-none transition-all duration-300;
}

.modal.active {
  @apply opacity-100 pointer-events-auto;
}

.modal-content {
  @apply bg-white rounded-lg p-8 max-w-md w-full mx-4 transform scale-95 transition-all duration-300;
}

.modal.active .modal-content {
  @apply scale-100;
}

/* Notification */
.notification {
  @apply fixed top-4 right-4 bg-white border-l-4 border-construction-purple shadow-lg rounded-lg p-4 transform translate-x-full transition-all duration-300 z-50;
}

.notification.show {
  @apply translate-x-0;
}

/* Loading States */
.loading {
  @apply opacity-50 pointer-events-none;
}

.loading::after {
  content: "";
  @apply absolute inset-0 bg-gray-200 animate-pulse;
}

/* Focus States */
.focus-ring:focus {
  @apply outline-none ring-2 ring-construction-purple ring-offset-2;
}

/* Service Category Cards */
.service-category-card {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.service-category-card:hover,
.service-category-card:focus,
.service-category-card:active {
  transform: scale(1.05);
  box-shadow: 0 10px 32px rgba(128, 90, 213, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.service-category-icon {
  @apply w-20 h-20 bg-gradient-to-br from-construction-purple to-dark-purple rounded-xl flex items-center justify-center text-white mb-6 transform transition-all duration-300;
}

.service-category-card:hover .service-category-icon {
  @apply scale-110 rotate-3;
}

/* Service Tabs */
.service-tab {
  @apply px-6 py-3 rounded-lg font-semibold transition-all duration-300 border-2 border-transparent;
}

.service-tab.active {
  @apply bg-construction-purple text-white border-construction-purple;
}

.service-tab:not(.active) {
  @apply bg-white text-construction-grey border-gray-200 hover:border-construction-purple hover:text-construction-purple;
}

/* Service Content */
.service-content {
  @apply hidden opacity-0 transition-all duration-500;
}

.service-content.active {
  @apply block opacity-100;
}

/* Pricing Cards */
.pricing-card {
  @apply bg-white p-8 rounded-xl shadow-lg border border-gray-200 relative transition-all duration-300 hover:shadow-2xl hover:-translate-y-2;
}

.pricing-card.premium {
  @apply border-construction-purple shadow-xl;
}

.pricing-card:hover {
  border-color: var(--construction-purple);
}

/* Project Filter */
.filter-btn {
  @apply px-6 py-3 rounded-lg font-semibold transition-all duration-300 border-2 border-transparent;
}

.filter-btn.active {
  @apply bg-construction-purple text-white border-construction-purple;
}

.filter-btn:not(.active) {
  @apply bg-white text-construction-grey border-gray-200 hover:border-construction-purple hover:text-construction-purple;
}

/* Project Items */
.project-item {
  @apply transition-all duration-500;
}

/* Process Steps */
.process-step {
  @apply text-center p-6 bg-white rounded-xl shadow-lg hover:shadow-xl transition-all duration-300;
}

.process-icon {
  @apply w-16 h-16 bg-gradient-to-br from-construction-purple to-dark-purple rounded-full flex items-center justify-center text-white mx-auto mb-4 transform transition-all duration-300;
}

.process-step:hover .process-icon {
  @apply scale-110 rotate-3;
}

/* Value Cards */
.value-card {
  @apply bg-white p-8 rounded-xl shadow-lg hover:shadow-2xl transition-all duration-500 transform hover:-translate-y-2 text-center;
}

.value-icon {
  @apply w-16 h-16 bg-gradient-to-br from-construction-purple to-dark-purple rounded-full flex items-center justify-center text-white mx-auto mb-6 transform transition-all duration-300;
}

.value-card:hover .value-icon {
  @apply scale-110 rotate-3;
}

/* Team Cards */
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.team-image {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 0;
}
.team-photo {
  width: 220px;
  height: 260px;
  object-fit: cover;
  border-radius: 2rem;
  display: block;
  margin: 0 auto;
}
.p-6 {
  margin-top: 0.5rem;
}

/* Award Cards */
.award-card {
  @apply bg-white p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 text-center;
}

.award-icon {
  @apply w-16 h-16 bg-gradient-to-br from-construction-purple to-dark-purple rounded-full flex items-center justify-center text-white mx-auto mb-4 transform transition-all duration-300;
}

.award-card:hover .award-icon {
  @apply scale-110;
}

/* FAQ Items */
.faq-item {
  @apply bg-white p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-300;
}

.faq-item h3 {
  @apply text-lg font-semibold text-construction-grey mb-3;
}

.faq-item p {
  @apply text-accent-grey;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

.project-photo {
  width: 370px;
  height: 240px;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
  margin: 0 auto;
}
