/* ===== VARIABLES ===== */
:root {
  --primary-color: #0066ff;
  --primary-dark: #0047b3;
  --primary-light: #e6f0ff;
  --accent-color: #0066ff;
  --text-dark: #1d1d1f;
  --text-light: #86868b;
  --bg-light: #f5f5f7;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 20px 40px rgba(0, 0, 0, 0.08);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'SF Pro Display', 'SF Pro Text', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  color: var(--text-dark);
  line-height: 1.5;
  background-color: var(--bg-white);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

section {
  overflow: hidden;
  position: relative;
}

.lead {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6;
}

.container {
  padding-left: 24px;
  padding-right: 24px;
}

/* ===== UTILITY CLASSES ===== */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.subtitle {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-color);
  margin-bottom: 1rem;
  position: relative;
}

.subtitle:after {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
  bottom: -8px;
  left: 0;
}

.bg-pattern {
  background-color: var(--bg-light);
}

.bg-light {
  background-color: var(--bg-light) !important;
}

.fw-medium {
  font-weight: 500;
}

.fw-bold {
  font-weight: 700 !important;
}

.text-center .subtitle:after {
  left: 50%;
  transform: translateX(-50%);
}

/* ===== NAVBAR ===== */
.navbar {
  padding: 20px 0;
  transition: var(--transition);
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  padding: 15px 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-dark);
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  position: relative;
}

.navbar-nav .nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 1rem;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover:after,
.navbar-nav .nav-link.active:after {
  width: calc(100% - 2rem);
}

.navbar-toggler {
  border: none;
  padding: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.btn-accent {
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-accent:hover, .btn-accent:focus {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 102, 255, 0.2);
}

.btn-outline-dark {
  color: var(--text-dark);
  border: 1.5px solid var(--text-dark);
  background: transparent;
  border-radius: var(--border-radius-sm);
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-outline-dark:hover {
  background-color: var(--text-dark);
  color: white;
  transform: translateY(-2px);
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ===== HERO SECTION ===== */
.hero-section {
  padding: 160px 0 100px;
  background-color: var(--bg-white);
  position: relative;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-section .lead {
  margin-bottom: 2rem;
  font-size: 1.25rem;
}

.float-animation {
  animation: float 6s ease-in-out infinite;
  box-shadow: var(--shadow-medium);
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* ===== SERVICES SECTION ===== */
.service-card {
  padding: 40px;
  border-radius: var(--border-radius-lg);
  background-color: var(--bg-card);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-medium);
}

.service-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 0 0 5px 0;
}

.icon-box {
  width: 60px;
  height: 60px;
  background-color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.icon-box i {
  font-size: 24px;
  color: var(--primary-color);
}

/* ===== WORKS SECTION ===== */
.work-card {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  transition: var(--transition);
  height: 250px; /* Changed from 350px to 250px */
  max-width: 512px; /* Added to maintain 512x250 ratio */
  margin-left: auto; /* Added to center the card */
  margin-right: auto; /* Added to center the card */
}


.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.work-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.5) 80%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.work-card:hover .work-overlay {
  opacity: 1;
}

.work-card:hover img {
  transform: scale(1.05);
}

.project-info {
  transform: translateY(20px);
  transition: var(--transition);
  opacity: 0;
}

.work-card:hover .project-info {
  transform: translateY(0);
  opacity: 1;
}

.project-category {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  backdrop-filter: blur(5px);
  transition: var(--transition);
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-link-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonial-card {
  padding: 40px;
  border-radius: var(--border-radius-md);
  background-color: var(--bg-card);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== ABOUT SECTION ===== */
.timeline-item {
  position: relative;
  padding-left: 20px;
  margin-bottom: 30px;
  border-left: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.timeline-item h5 {
  margin-bottom: 0.5rem;
}

/* ===== CONTACT SECTION ===== */
.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.form-control {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-floating > label {
  padding: 0.75rem 1rem;
}

.form-floating > .form-control {
  height: calc(3.5rem + 2px);
  padding: 1rem 1rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
  color: var(--primary-color);
}

.form-floating > textarea.form-control {
  height: auto;
}

/* ===== FOOTER ===== */
.bg-dark {
  background-color: #000000 !important;
}

footer {
  padding: 80px 0 40px;
}

footer h3 {
  font-weight: 700;
  margin-bottom: 1.5rem;
}

footer h5 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

footer .list-unstyled li {
  margin-bottom: 0.75rem;
}

footer .text-white-50 {
  transition: var(--transition);
}

footer .text-white-50:hover {
  color: white !important;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 120px 0 80px;
  }
  
  .hero-section h1 {
    font-size: 2.75rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .navbar-collapse {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-medium);
    margin-top: 15px;
  }
  
  .service-card, .testimonial-card {
    padding: 30px;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .hero-section h1 {
    font-size: 2.25rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .work-card {
    height: 300px;
  }
  
  .work-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 40%, transparent 80%);
  }
  
  .project-info {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 575.98px) {
  .work-card {
    height: calc(280px); /* Proportionally smaller on mobile */
  }

  .hero-section {
    padding: 90px 0 50px;
  }
  
  .hero-section h1 {
    font-size: 1.875rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .service-card, .testimonial-card {
    padding: 25px;
  }
  
  .icon-box {
    width: 50px;
    height: 50px;
  }
  
  .icon-box i {
    font-size: 20px;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  
  .work-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 70%, rgba(0, 0, 0, 0.6) 100%);
  }
}

/* ===== ANIMATIONS ===== */
/* Refined AOS animations */
[data-aos="fade-up"] {
  transform: translate3d(0, 30px, 0);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-aos="fade-up"].aos-animate {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* Additional hover effects */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Custom input focus states */
.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}

/* Image hover effects */
img {
  transition: var(--transition);
}

/* Gradient text effect for primary color highlights */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced card effects */
.card {
  transition: var(--transition);
  border: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

/* Horizontal divider styling */
hr {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Custom styling for form elements */
::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 3px solid var(--bg-light);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

/* Smooth page transitions */
body {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Support for dark mode preference */
@media (prefers-color-scheme: dark) {
  body.dark-mode-supported {
    --text-dark: #f5f5f7;
    --text-light: #a1a1a6;
    --bg-light: #1d1d1f;
    --bg-white: #000000;
    --bg-card: #1d1d1f;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 20px 40px rgba(0, 0, 0, 0.3);
  }
}
