/* Base Variables */
:root {
  --primary: #0d6fc9;       /* Main blue from topinfosys.com */
  --primary-dark: #0554a0;  /* Darker blue for hover states */
  --secondary: #6c757d;
  --light: #f8f9fa;         /* Light background color */
  --dark: #212529;          /* Dark text color */
  --accent: #58c5c6;        /* Teal accent from topinfosys */
  --success: #28a745;
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  color: var(--dark);
  padding-top: 76px;
  background-color: #fafafa;
}

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

/* Common styling */
section {
  padding: 80px 0;
  position: relative;
}

.section-heading {
  margin-bottom: 60px;
  position: relative;
}

.section-heading h2 {
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.section-heading h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 50%;
  height: 3px;
  background-color: var(--primary);
}

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

/* Navigation */
.navbar {
  padding: 15px 0;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  display: flex !important;
  background-color: white;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary) !important;
  transition: var(--transition);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand .tagline {
  font-size: 12px;
  display: block;
  margin-top: 4px;
  color: #333;
}

.tagline.emoji {
  font-size: 2em;
}

.tagline.emoji:hover {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}

.tagline.emoji:active {
  transform: scale(1.5);
  transition: transform 0.3s ease;
}

.navbar-nav .nav-link {
  color: var(--dark);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  transition: var(--transition);
  margin: 0 3px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #fff;
  background-color: var(--primary);
}

/* Hero Section */
.hero-container {
  position: relative;
  width: 100%;
  /* Changed from fixed height to min-height for better responsiveness */
  min-height: 600px;
  height: auto;
  overflow: hidden;
  background-color: var(--primary);
}

.maple-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  opacity: 0.07;
}

.maple-leaf {
  fill: var(--light);
  width: 50px;
  height: 50px;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  /* Adjusted padding to be more responsive with % and viewport units */
  padding: 8vh 5% 8vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  /* Changed from fixed height to min-height */
  min-height: 600px;
  height: auto;
  color: var(--light);
}

.tagline {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--accent);
  display: flex;
  align-items: center;
}

.tagline span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--light);
  margin-right: 10px;
  transform: rotate(45deg);
}

h1 {
  /* Changed from fixed size to responsive units */
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 650px;
}

h1 .highlight {
  color: var(--accent);
  position: relative;
}

.hero-text {
  /* Changed from fixed size to responsive units */
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 550px;
  margin-bottom: 30px;
  line-height: 1.6;
  color: rgba(248, 249, 250, 0.85);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  color: var(--light);
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(248, 249, 250, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary:hover {
  background-color: rgba(248, 249, 250, 0.1);
}

/* Tech Illustrations */
.tech-illustrations {
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tech-circle {
  position: relative;
  /* Changed from fixed size to responsive units */
  width: min(450px, 90%);
  height: min(450px, 90%);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(88, 197, 198, 0.1), rgba(248, 249, 250, 0.05));
  display: flex;
  justify-content: center;
  align-items: center;
  animation: pulse 8s infinite ease-in-out;
}

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

.tech-icon {
  position: absolute;
  /* Changed from fixed size to responsive units */
  width: min(50px, 10vw);
  height: min(50px, 10vw);
  background-color: rgba(248, 249, 250, 0.1);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  animation: float 5s infinite ease-in-out;
}

.tech-icon svg {
  width: 30px;
  height: 30px;
  fill: var(--light);
}

.tech-icon:nth-child(1) {
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 0s;
}

.tech-icon:nth-child(2) {
  top: 25%;
  right: 40px;
  animation-delay: 1s;
}

.tech-icon:nth-child(3) {
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: 2s;
}

.tech-icon:nth-child(4) {
  top: 25%;
  left: 40px;
  animation-delay: 3s;
}

.tech-icon:nth-child(5) {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Changed from fixed size to responsive units */
  width: min(70px, 14vw);
  height: min(70px, 14vw);
  background-color: var(--primary);
  animation: none;
}

.tech-icon:nth-child(5) svg {
  width: 40px;
  height: 40px;
}

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

/* Lines & Shapes */
.line {
  position: absolute;
  background-color: rgba(248, 249, 250, 0.05);
  z-index: 1;
}

.horizontal-line {
  width: 100%;
  height: 1px;
}

.vertical-line {
  width: 1px;
  height: 100%;
}

.lines-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.animated-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  background-color: var(--accent);
  opacity: 0.05;
  border-radius: 50%;
}

/* Canada Badge */
.canada-badge {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  padding: 8px 15px;
  background-color: rgba(248, 249, 250, 0.1);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--light);
  gap: 8px;
  z-index: 20;
}

.canada-badge svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

/* Hockey Icon */
.hockey-icon {
  width: 1.8em;
  height: 1.8em;
  vertical-align: middle;
  transform: translateY(-0.15em);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.hockey-icon:hover {
  transform: translateY(-0.15em) translateX(4px) rotate(-15deg) scale(1.2);
}

.hockey-icon:active {
  animation: goalBounce 0.5s ease;
}

@keyframes goalBounce {
  0% {
    transform: scale(1) translateY(-0.15em);
  }
  30% {
    transform: scale(1.4) translateY(-10px) rotate(10deg);
  }
  60% {
    transform: scale(0.9) translateY(-2px) rotate(-5deg);
  }
  100% {
    transform: scale(1.2) translateY(-0.15em);
  }
}

/* About Section */
.about-content {
  padding: 30px;
}

.about-img {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-img img {
  width: 100%;
  height: auto;
  transition: var(--transition);
}

.about-img:hover img {
  transform: scale(1.05);
}

.about-stats {
  background-color: var(--light);
  border-radius: 10px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-item {
  text-align: center;
  padding: 20px 10px;
}

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

.stat-label {
  font-size: 1rem;
  font-weight: 500;
}

/* Services Section */
.services-section {
  background-color: var(--light);
}

.service-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 30px;
  height: 100%;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--primary);
  transition: var(--transition);
  z-index: -1;
  opacity: 0.1;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
  height: 100%;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
  transition: var(--transition);
  display: inline-block;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.service-card h5 {
  font-weight: 600;
  margin-bottom: 15px;
}

/* Portfolio Section */
.filter-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 20px;
  margin: 5px;
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  border: 2px solid var(--primary);
}

.filter-btn.active {
  background-color: var(--primary);
  color: white;
}

.filter-btn:not(.active):hover {
  background-color: rgba(13, 111, 201, 0.1);
}

.portfolio-item {
  margin-bottom: 30px;
  transition: var(--transition);
}

.portfolio-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  height: 100%;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.portfolio-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 111, 201, 0.8); /* Using --primary color with transparency */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.portfolio-overlay-content {
  text-align: center;
  color: white;
  padding: 20px;
}

.portfolio-overlay-content i {
  font-size: 2rem;
  margin-bottom: 10px;
}

.portfolio-card-body {
  padding: 20px;
}

.portfolio-card-body h5 {
  font-weight: 600;
  margin-bottom: 10px;
}

.portfolio-card-body .badge {
  background-color: var(--primary);
  margin-right: 5px;
  font-weight: 500;
  padding: 5px 10px;
}

/* Text-Only Portfolio Card */
.portfolio-card-text-only {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  padding: 25px;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 20px;
}

.portfolio-card-text-only h4 {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 12px;
}

.portfolio-category {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 18px;
  font-style: italic;
}

.portfolio-challenge h6,
.portfolio-solution h6,
.portfolio-results h6,
.portfolio-tech-stack h6,
.portfolio-testimonial h6 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 600;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 5px;
}

.portfolio-challenge p,
.portfolio-solution p,
.portfolio-results ul,
.portfolio-tech-stack p,
.portfolio-testimonial .blockquote {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #495057;
}

.portfolio-results ul {
  list-style: disc;
  list-style-position: inside;
  padding-left: 5px;
}

.portfolio-results ul li {
  margin-bottom: 6px;
}

.portfolio-tech-stack .tech-badge {
  margin-right: 5px;
  margin-bottom: 5px;
  display: inline-block;
  background-color: var(--accent);
  color: var(--dark);
  padding: .25em .6em;
  border-radius: .25rem;
  font-size: 0.85em;
}

.portfolio-card-text-only .btn-outline-primary {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.5rem 1rem;
  border-color: var(--primary);
  color: var(--primary);
}

.portfolio-card-text-only .btn-outline-primary:hover {
  background-color: var(--primary);
  color: white;
}

/* Contact Section */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-right: 20px;
  flex-shrink: 0;
  font-size: 1.25rem;
  transition: var(--transition);
}

.contact-info-item:hover .contact-icon {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(13, 111, 201, 0.3);
}

.contact-info-content h5 {
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-info-content p {
  margin-bottom: 0;
  color: var(--secondary);
}

.contact-form {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-control {
  border: 1px solid #e9ecef;
  padding: 12px 15px;
  height: auto;
  border-radius: 5px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(13, 111, 201, 0.25);
}

.form-label {
  font-weight: 500;
  margin-bottom: 8px;
}

.submit-btn {
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  width: 100%;
  background-color: var(--primary);
  color: white;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(13, 111, 201, 0.3);
  background-color: var(--primary-dark);
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: white;
  padding: 50px 0 0;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  display: inline-block;
}

.footer-text {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-heading {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary);
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links li a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.footer-links li a:hover {
  color: white;
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
  font-size: 1rem;
}

.social-link:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
}

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

/* Responsive Styles */
@media (max-width: 1199.98px) {
  .tech-circle {
    width: min(400px, 90%);
    height: min(400px, 90%);
  }
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    padding: 10px 15px;
    margin: 5px 0;
  }

  /* Improved hero section responsiveness */
  .hero-container {
    min-height: 500px;
  }

  .hero-content {
    padding: 6vh 5%;
    min-height: 500px;
  }

  .tech-illustrations {
    opacity: 0.15;
    width: 100%;
    z-index: 1;
  }

  .hero-content {
    text-align: center;
    align-items: center;
  }

  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }

  .tagline {
    justify-content: center;
  }

  .tech-circle {
    width: min(350px, 80%);
    height: min(350px, 80%);
  }
}

@media (max-width: 767.98px) {
  section {
    padding: 60px 0;
  }

  /* Further improved hero section for smaller screens */
  .hero-container {
    min-height: 450px;
    padding: 0;
  }

  .hero-content {
    padding: 5vh 5%;
    min-height: 450px;
  }

  .hero-text {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
  }

  .tech-circle {
    width: min(300px, 70%);
    height: min(300px, 70%);
  }

  .tech-icon {
    width: min(40px, 8vw);
    height: min(40px, 8vw);
  }

  .tech-icon:nth-child(5) {
    width: min(60px, 12vw);
    height: min(60px, 12vw);
  }

  .canada-badge {
    margin-right: 50px;
    bottom: 10px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 575.98px) {
  /* Additional improvements for very small screens */
  .hero-container {
    min-height: 400px;
  }

  .hero-content {
    padding: 4vh 5%;
    min-height: 400px;
  }

  .tagline {
    font-size: 1rem;
  }

  h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 15px;
  }

  .hero-text {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .tech-circle {
    width: min(250px, 70%);
    height: min(250px, 70%);
  }

  .tech-icon {
    width: min(35px, 7vw);
    height: min(35px, 7vw);
  }

  .tech-icon:nth-child(5) {
    width: min(50px, 10vw);
    height: min(50px, 10vw);
  }

  .tech-icon svg {
    width: 20px;
    height: 20px;
  }

  .tech-icon:nth-child(5) svg {
    width: 30px;
    height: 30px;
  }
}
@media (max-width: 768px) {
  .hero-content {
    display: none;
  }
  .animated-shapes{
    display: none;
  }
  .lines-container {
    display: none;
  }
  .tech-illustrations{
    display: none;
  }
}
@media (max-width: 768px) {
  .mobile-typed-container {
    text-align: center;
    color: white !important;
    font-size: 3vw !important;
    margin-top: 30px;
    font-weight: 700;
    padding: 20px 20px;
    animation: fadeBounce 1s ease-in-out;
  }
  .mobile-typed-container img.mobile-typed-icon {
  max-width: 100%;    /* never exceed container width */
  height: auto;       /* keep aspect ratio */
  max-height: 200px;  /* limit max height for mobile */
  display: block;
  margin: 10px auto 0; /* center horizontally with some top margin */
}


@media (min-width: 768px) {
  .mobile-typed-container img.mobile-typed-icon {
    display: none; /* hide on tablets and up (desktop) */
  }
}


  @keyframes fadeBounce {
    0% {
      opacity: 0;
      transform: translateY(20px) scale(0.95);
    }
    60% {
      opacity: 1;
      transform: translateY(-10px) scale(1.05);
    }
    100% {
      transform: translateY(0) scale(1);
    }
  }
}
/* Mobile Navigation Fix - Right-aligned hamburger menu */
@media (max-width: 991.98px) {
  .navbar > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .navbar-brand {
    order: 1;
    margin-right: auto;
    display: flex;
    align-items: center;
  }

  .navbar-toggler {
    order: 2;
    margin-left: auto;
    margin-right: 0;
    z-index: 1051; /* ensure it appears on top if overlapping */
  }

  .navbar-collapse {
    order: 3;
    flex-basis: 100%;
    width: 100%;
  }
}
@media (max-width: 768px) {
  .tagline {
    font-size: 0.75rem;
    text-align: left;
  }
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tagline {
  font-size: 0.85rem;
  line-height: 1.2;
  margin-top: 4px;
  color: #333;
}

