/********** Template CSS **********/
:root {
  --primary: #2124b1;
  --secondary: #4777f5;
  --light: #f7faff;
  --dark: #1d1d27;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --border: #e2e8f0;
  --ring: #3b82f6;
}

/* Added CSS custom properties for better maintainability and modern CSS practices */

/*** Performance Optimizations ***/
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-display: swap; /* Added font-display for better loading performance */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Added modern font rendering optimizations */

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/* Enhanced spinner with better positioning and backdrop */

.back-to-top {
  position: fixed;
  display: none;
  right: 45px;
  bottom: 45px;
  z-index: 99;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(33, 36, 177, 0.3);
  border: none;
  text-decoration: none;
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(33, 36, 177, 0.4);
  color: white;
}

/* Enhanced back-to-top button with modern styling and hover effects */

/*** Heading ***/
h1,
h2,
h3,
.fw-bold {
  font-weight: 700 !important;
  line-height: 1.2;
}

h4,
h5,
h6,
.fw-medium {
  font-weight: 500 !important;
  line-height: 1.4;
}

/* Added line-height for better typography */

/*** Button ***/
.btn {
  font-weight: 500;
  transition: all .3s ease;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Added modern button styling with shimmer effect */

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(33, 36, 177, 0.3);
  color: white;
}

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

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: white;
}

/* Enhanced button variants with gradients and hover effects */

/*** Navbar ***/
.navbar {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.navbar-light .navbar-nav .nav-link {
  position: relative;
  margin-left: 25px;
  padding: 35px 0;
  color: var(--light) !important;
  outline: none;
  transition: all .3s ease;
  font-weight: 500;
}

.sticky-top.navbar-light {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.sticky-top.navbar-light .navbar-nav .nav-link {
  padding: 20px 0;
  color: var(--dark) !important;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--secondary) !important;
  transform: translateY(-2px);
}

/* Added backdrop-filter and enhanced navbar with modern glass effect */

/*** Hero Header ***/
.hero-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-header::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

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

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Added responsive typography with clamp() for better mobile experience */

/*** Section Title ***/
.section-title::before {
  position: absolute;
  content: "";
  width: 45px;
  height: 4px;
  bottom: 0;
  left: 0;
  background: var(--dark);
}

.section-title::after {
  position: absolute;
  content: "";
  width: 4px;
  height: 4px;
  bottom: 0;
  left: 50px;
  background: var(--dark);
}

.section-title.text-center::before {
  left: 50%;
  margin-left: -25px;
}

.section-title.text-center::after {
  left: 50%;
  margin-left: 25px;
}

.section-title h6::before,
.section-title h6::after {
  position: absolute;
  content: "";
  width: 10px;
  height: 10px;
  top: 2px;
  left: 0;
  background: rgba(33, 66, 177, 0.5);
}

.section-title h6::after {
  top: 5px;
  left: 3px;
}

/*** Service ***/
.service-item {
  position: relative;
  height: auto;
  min-height: 350px;
  padding: 40px 30px;
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all .3s ease;
  border-radius: 15px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-item:hover {
  background: var(--primary);
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(33, 36, 177, 0.3);
}

.service-item .service-icon {
  margin: 0 auto 25px auto;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(33, 36, 177, 0.1);
  border-radius: 50%;
  font-size: 2rem;
  transition: all .3s ease;
}

.service-item:hover .service-icon {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.service-item a.btn {
  position: relative;
  display: flex;
  color: var(--primary);
  transition: .5s;
  z-index: 1;
}

.service-item:hover a.btn {
  color: var(--primary);
}

.service-item a.btn::before {
  position: absolute;
  content: "";
  width: 35px;
  height: 35px;
  top: 0;
  left: 0;
  border-radius: 35px;
  background: #dddddd;
  transition: .5s;
  z-index: -1;
}

.service-item:hover a.btn::before {
  width: 100%;
  background: var(--light);
}

/*** Testimonial ***/
.newsletter,
.testimonial {
  background: url(../img/bg-top.png), url(../img/bg-bottom.png);
  background-position: left top, right bottom;
  background-repeat: no-repeat;
}

.testimonial-carousel .owl-item .testimonial-item,
.testimonial-carousel .owl-item.center .testimonial-item * {
  transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
  background: var(--light) !important;
  border-color: var(--light);
}

.testimonial-carousel .owl-item.center .testimonial-item * {
  color: #888888;
}

.testimonial-carousel .owl-item.center .testimonial-item i {
  color: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item h6 {
  color: var(--dark) !important;
}

/*** Team ***/
.team-item {
  position: relative;
  transition: .5s;
  z-index: 1;
}

.team-item::after {
  position: absolute;
  content: "";
  top: 3rem;
  right: 3rem;
  bottom: 0;
  left: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.1);
  transition: .5s;
  z-index: -1;
}

.team-item:hover::after {
  background: var(--primary);
}

.team-item h5,
.team-item small {
  transition: .5s;
}

.team-item:hover h5,
.team-item:hover small {
  color: var(--light);
}

/*** Project Portfolio ***/
#portfolio-flters .btn {
  position: relative;
  display: inline-block;
  margin: 10px 4px 0 4px;
  transition: .5s;
}

#portfolio-flters .btn::after {
  position: absolute;
  content: "";
  right: -1px;
  bottom: -1px;
  border-left: 20px solid transparent;
  border-right: 0 solid transparent;
  border-bottom: 50px solid #ffffff;
}

#portfolio-flters .btn:hover,
#portfolio-flters .btn.active {
  color: var(--light);
  background: var(--primary);
}

.portfolio-overlay {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 30px;
  top: 0;
  left: 0;
  background: var(--primary);
  transition: .5s;
  z-index: 1;
  opacity: 0;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item .btn {
  position: absolute;
  width: 90px;
  height: 90px;
  top: 0px;
  right: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url(../img/icon-shape-white.png) center center no-repeat;
  border: none;
  transition: .5s;
  opacity: 0;
  z-index: 2;
}

.portfolio-item:hover .btn {
  opacity: 1;
  transition-delay: .15s;
}

/*** SEO Enhancements ***/
.seo-stats {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 60px 0;
  position: relative;
}

.stat-item {
  text-align: center;
  padding: 30px 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 30px;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--gray-600);
  font-weight: 500;
}

/*** Turkish Localization Enhancements ***/
.turkey-flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  background: linear-gradient(to bottom, #e30a17 50%, #ffffff 50%);
  border-radius: 3px;
  margin-right: 8px;
  position: relative;
}

.turkey-flag::before {
  content: "★";
  position: absolute;
  color: white;
  font-size: 8px;
  left: 3px;
  top: 1px;
}

.turkey-flag::after {
  content: "☾";
  position: absolute;
  color: white;
  font-size: 6px;
  right: 3px;
  top: 1px;
}

/*** Accessibility Improvements ***/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

/*** Performance and Modern CSS ***/
@supports (backdrop-filter: blur(10px)) {
  .navbar.sticky-top {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9) !important;
  }
}

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

/*** Footer ***/
.footer {
  background: linear-gradient(135deg, var(--dark) 0%, #2c2c3e 100%);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer .btn.btn-social {
  margin-right: 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  border: 1px solid rgba(256, 256, 256, 0.1);
  border-radius: 40px;
  transition: .3s;
}

.footer .btn.btn-social:hover {
  color: var(--primary);
}

.footer .btn.btn-link {
  display: block;
  margin-bottom: 10px;
  padding: 0;
  text-align: left;
  color: var(--light);
  font-weight: normal;
  transition: .3s;
  border: none;
  background: none;
  text-decoration: none;
}

.footer .btn.btn-link::before {
  position: relative;
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 10px;
}

.footer .btn.btn-link:hover {
  letter-spacing: 1px;
  box-shadow: none;
  color: var(--light);
}

.footer .copyright {
  padding: 25px 0;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .copyright a {
  color: var(--light);
  text-decoration: none;
}

.footer .copyright a:hover {
  color: var(--primary);
}

.footer .footer-menu a {
  margin-right: 15px;
  padding-right: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light);
  text-decoration: none;
}

.footer .footer-menu a:last-child {
  margin-right: 0;
  padding-right: 0;
  border-right: none;
}

.footer .footer-menu a:hover {
  color: var(--primary);
}

/*** Responsive Improvements ***/
@media (max-width: 768px) {
  .hero-header {
    min-height: 80vh;
    padding: 100px 0 50px;
  }

  .service-item {
    margin-bottom: 30px;
    min-height: 300px;
    padding: 30px 20px;
  }

  .stat-item {
    margin-bottom: 20px;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}
