@import "tailwindcss";

/* === Logo Scrolling Animation === */
@keyframes scroll-logos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-scroll-logos {
  animation: scroll-logos 30s linear infinite;
}

/* === Custom Animations === */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Animation Classes */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-rotate-slow {
  animation: rotate 40s linear infinite;
}

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

.animate-slide-up {
  animation: slideUp 1s ease-out;
}

/* === Responsive Page Loader Styles === */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0F172A;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out;
  padding: 20px;
  box-sizing: border-box; /* Ensure padding is included in width/height */
}

.page-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  width: 100%;
  max-width: 200px; /* Reduced max size */
  min-width: 80px; /* Smaller minimum */
  height: auto;
  display: block; /* Ensure proper display */
  margin: 0 auto; /* Center horizontally */
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile-specific loader adjustments */
@media (max-width: 768px) {
  .page-loader {
    padding: 15px;
  }
  .loader-logo {
    max-width: 160px;
  }
}

@media (max-width: 480px) {
  .page-loader {
    padding: 10px;
  }
  .loader-logo {
    max-width: 120px;
  }
}

/* === Floating Icons Positioning Fixes === */
/* Updated positioning to prevent overlapping and ensure proper distribution */

/* Ensure floating icons don't interfere with layout on very small screens */
@media (max-width: 320px) {
  /* ServiceNow and SailPoint (large rectangular icons) positioning fixes */
  .relative .absolute.top-4.-left-8,
  .relative .absolute.top-0.-left-12,
  .relative .absolute.-top-8.-left-24,
  .relative .absolute.-top-12.-left-28 {
    left: -0.5rem;
    top: 1rem;
  }
  
  .relative .absolute.top-8.-right-6,
  .relative .absolute.top-4.-right-10,
  .relative .absolute.top-0.-right-20,
  .relative .absolute.-top-4.-right-24 {
    right: -0.5rem;
    top: 2rem;
  }
  
  /* AWS positioning fix */
  .relative .absolute.top-20.-left-4,
  .relative .absolute.top-24.-left-6,
  .relative .absolute.top-28.-left-8,
  .relative .absolute.top-32.-left-10 {
    left: -0.25rem;
    top: 5rem;
  }
  
  /* Python positioning fix */
  .relative .absolute.top-24.-right-2,
  .relative .absolute.top-28.-right-4,
  .relative .absolute.top-32.-right-6,
  .relative .absolute.top-36.-right-8 {
    right: -0.25rem;
    top: 6rem;
  }
  
  /* Azure positioning fix */
  .relative .absolute.bottom-8.-left-3,
  .relative .absolute.bottom-12.-left-5,
  .relative .absolute.bottom-16.-left-7,
  .relative .absolute.bottom-20.-left-9 {
    left: -0.25rem;
    bottom: 2rem;
  }
  
  /* Java positioning fix */
  .relative .absolute.bottom-4.-right-1,
  .relative .absolute.bottom-8.-right-3,
  .relative .absolute.bottom-12.-right-5,
  .relative .absolute.bottom-16.-right-7 {
    right: -0.25rem;
    bottom: 1rem;
  }
  
  /* Angular positioning fix (bottom center) - mobile adjustments */
  .relative .absolute.-bottom-2.left-1\/2 {
    bottom: 0.5rem;
    left: 50%;
  }
  
  /* Angular positioning fix (bottom center) */
  .relative .absolute.-bottom-2.left-1\/2,
  .relative .absolute.-bottom-4,
  .relative .absolute.-bottom-6,
  .relative .absolute.-bottom-8 {
    bottom: 0.5rem;
    left: 50%;
  }
  
  /* Selenium positioning fix (middle center) */
  .relative .absolute.top-1\/2.left-1\/2 {
    top: 50%;
    left: 50%;
  }
  
  /* Reduce all floating icon sizes on very small screens */
  .relative .absolute img {
    max-width: 3.5rem !important;
    width: 3.5rem !important;
  }
}

/* Additional responsive adjustments for floating icons */
@media (max-width: 480px) {
  /* Adjust spacing for better mobile experience */
  .relative .absolute.top-4.-left-8 { left: -0.75rem; }
  .relative .absolute.top-8.-right-6 { right: -0.75rem; }
  .relative .absolute.top-20.-left-4 { left: -0.5rem; }
  .relative .absolute.top-24.-right-2 { right: -0.5rem; }
  .relative .absolute.bottom-8.-left-3 { left: -0.5rem; }
  .relative .absolute.bottom-4.-right-1 { right: -0.5rem; }
}

/* Legacy positioning classes (keeping for backward compatibility) */
@media (max-width: 375px) {
  .hero-icon-servicenow {
    top: 8px;
    left: 8px;
  }
  .hero-icon-sailpoint {
    top: 60px;
    right: 8px;
  }
  .hero-icon-selenium {
    bottom: 40px;
    left: 12px;
  }
  .hero-icon-python {
    bottom: 40px;
    right: 12px;
  }

  .page-loader {
    padding: 8px;
  }
  .loader-logo {
    max-width: 100px;
    min-width: 80px;
  }
}

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

/* === Navigation Styling === */
/* Custom hover effects */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #d4af37;
  transition: width 0.3s ease;
}

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

/* === Mobile Menu Styling === */
/* Enhanced mobile menu overlay */
.menu-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* === Footer Styling === */
/* Gradient background for footer */
.footer-gradient {
  background: linear-gradient(135deg, #0F172A 0%, #1e293b 100%);
}

/* === Interactive Elements === */
/* Social icon hover effects */
.social-icon {
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  filter: brightness(1.2);
}

/* Logo hover effect */
.logo-hover {
  transition: all 0.3s ease;
}

.logo-hover:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* === Utility Classes === */
/* Focus states for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* Smooth transitions for interactive elements */
button,
a,
input,
select,
textarea {
  transition: all 0.3s ease;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
  .nav-link::after {
    display: none; /* Remove underline animation on mobile */
  }
}

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

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.6); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-slide-up { animation: slideInUp 0.6s ease-out; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-gradient { animation: gradient-shift 3s ease infinite; }

.bg-gradient-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-field-focus {
    transition: all 0.3s ease;
}

.form-field-focus:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-card {
    transition: all 0.3s ease;
}

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

.success-checkmark {
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(45deg); }
    50% { transform: scale(1.2) rotate(45deg); }
    100% { transform: scale(1) rotate(45deg); }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
}

/* Progress bar for form completion */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* === Mobile Navigation Overflow Fixes === */

/* Fix mobile menu width to prevent horizontal overflow */
#mobile-menu {
  /* Ensure menu doesn't exceed screen width */
  width: min(320px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  right: 10px; /* Add some margin from screen edge */
  overflow-y: auto;
  overflow-x: hidden; /* Prevent horizontal scroll */
  /* Fix height calculation to account for header */
  height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
}

/* Improve flexbox layout for mobile menu */
#mobile-menu > div {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header section - fixed height */
#mobile-menu .flex-shrink-0:first-child {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Navigation section - scrollable */
#mobile-menu .flex-1 {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  /* Remove the large bottom padding since we're using flexbox */
  padding-bottom: 0;
}

#mobile-menu .flex-1 nav {
  padding: 1.5rem;
  padding-bottom: 2rem; /* Small bottom padding for scroll space */
}

/* Quick Contact section - fixed at bottom */
#mobile-menu .flex-shrink-0:last-child {
  flex-shrink: 0;
  background: linear-gradient(to right, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.2));
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  backdrop-filter: blur(4px);
  padding: 1rem;
  margin: 0; /* Remove any margins */
}

/* Mobile menu overlay adjustments */
#menu-overlay {
  /* Ensure overlay covers the entire screen properly */
  position: fixed;
  top: 80px; /* Account for header height */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Mobile-specific responsive adjustments */
@media (max-width: 480px) {
  #mobile-menu {
    width: min(280px, calc(100vw - 15px));
    right: 7px;
  }
  
  /* Reduce padding on very small screens */
  #mobile-menu .flex-1 nav {
    padding: 1rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child {
    padding: 0.75rem;
  }
  
  /* Adjust Quick Contact text size */
  #mobile-menu .flex-shrink-0:last-child p {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child a {
    font-size: 0.875rem;
  }
}

@media (max-width: 320px) {
  #mobile-menu {
    width: calc(100vw - 10px);
    right: 5px;
  }
  
  /* Further reduce spacing */
  #mobile-menu .flex-1 nav {
    padding: 0.75rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child {
    padding: 0.5rem;
  }
  
  /* Stack social icons vertically on very small screens */
  #mobile-menu .flex-shrink-0:last-child .flex.gap-3 {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child .w-8.h-8 {
    width: 100%;
    height: 2rem;
    justify-content: flex-start;
    padding-left: 0.75rem;
  }
}

/* Fix for very short screens (landscape mobile) */
@media (max-height: 500px) {
  #mobile-menu {
    height: calc(100vh - 70px);
    top: 70px;
  }
  
  #menu-overlay {
    top: 70px;
  }
  
  /* Make Quick Contact section more compact */
  #mobile-menu .flex-shrink-0:last-child {
    padding: 0.5rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child p {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child a {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child .flex.gap-3 {
    gap: 0.25rem;
  }
  
  #mobile-menu .flex-shrink-0:last-child .w-8.h-8 {
    width: 1.75rem;
    height: 1.75rem;
  }
}

/* Page content overflow fixes */
main {
  overflow-x: hidden; /* Prevent horizontal scroll on main content */
  width: 100%;
  box-sizing: border-box;
}

/* General container overflow prevention */
.max-w-7xl,
.max-w-6xl,
.max-w-4xl {
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .max-w-7xl,
  .max-w-6xl,
  .max-w-4xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Header responsiveness */
header .max-w-7xl {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (max-width: 480px) {
  header .max-w-7xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Footer overflow fixes */
footer .max-w-7xl {
  padding-left: 1rem;
  padding-right: 1rem;
  overflow-x: hidden;
}

/* === Newsletter Signup Mobile Fixes === */

/* Newsletter container responsive fixes */
footer .bg-white\/5 {
  margin-left: 1rem;
  margin-right: 1rem;
  padding: 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  footer .bg-white\/5 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  footer .bg-white\/5 {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    padding: 0.75rem;
  }
}

/* Newsletter form responsive layout */
footer .bg-white\/5 form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  footer .bg-white\/5 form {
    flex-direction: row;
    gap: 0.75rem;
  }
}

/* Newsletter input field fixes */
footer .bg-white\/5 input[type="email"] {
  width: 100%;
  min-width: 0; /* Prevent flex item from overflowing */
  padding: 0.75rem 1rem;
  font-size: 1rem;
  box-sizing: border-box;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 0.5rem;
  color: white;
  transition: all 0.3s ease;
}

footer .bg-white\/5 input[type="email"]:focus {
  outline: none;
  border-color: #d4af37;
  background: rgba(255, 255, 255, 0.15);
  transform: none; /* Remove any transform that might cause overflow */
}

footer .bg-white\/5 input[type="email"]::placeholder {
  color: rgba(156, 163, 175, 0.8);
  font-size: 0.9rem;
}

/* Mobile-specific input adjustments */
@media (max-width: 640px) {
  footer .bg-white\/5 input[type="email"] {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }
  
  footer .bg-white\/5 input[type="email"]::placeholder {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  footer .bg-white\/5 input[type="email"] {
    padding: 0.5rem 0.6rem;
    font-size: 0.875rem;
  }
  
  footer .bg-white\/5 input[type="email"]::placeholder {
    content: "Your email";
    font-size: 0.8rem;
  }
}

/* Newsletter button fixes */
footer .bg-white\/5 button[type="submit"] {
  background: #d4af37;
  color: #0F172A;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: max-content;
  box-sizing: border-box;
}

footer .bg-white\/5 button[type="submit"]:hover {
  background: #e4c757;
  transform: none; /* Remove scale transform that might cause overflow */
}

/* Mobile button adjustments */
@media (max-width: 640px) {
  footer .bg-white\/5 button[type="submit"] {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    width: 100%; /* Full width on mobile */
  }
}

@media (max-width: 480px) {
  footer .bg-white\/5 button[type="submit"] {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* Newsletter grid layout fixes */
footer .bg-white\/5 .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  footer .bg-white\/5 .grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  footer .bg-white\/5 .grid {
    gap: 1rem;
  }
}

/* Newsletter text content responsive */
footer .bg-white\/5 h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

footer .bg-white\/5 p {
  color: rgba(156, 163, 175, 1);
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  footer .bg-white\/5 h3 {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
  }
  
  footer .bg-white\/5 p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  footer .bg-white\/5 h3 {
    font-size: 1.125rem;
    margin-bottom: 0.3rem;
  }
  
  footer .bg-white\/5 p {
    font-size: 0.85rem;
  }
}

/* Ensure newsletter container doesn't overflow */
footer .bg-white\/5 * {
  box-sizing: border-box;
  max-width: 100%;
}

/* Fix for very small screens */
@media (max-width: 320px) {
  footer .bg-white\/5 {
    margin-left: 0.125rem;
    margin-right: 0.125rem;
    padding: 0.5rem;
  }
  
  footer .bg-white\/5 input[type="email"] {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
  
  footer .bg-white\/5 button[type="submit"] {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  footer .bg-white\/5 h3 {
    font-size: 1rem;
  }
  
  footer .bg-white\/5 p {
    font-size: 0.8rem;
  }
}

/* Additional safety to prevent horizontal scroll */
footer .bg-white\/5,
footer .bg-white\/5 form,
footer .bg-white\/5 input,
footer .bg-white\/5 button {
  overflow: hidden;
  word-wrap: break-word;
}

/* Fix any potential flex-shrink issues */
@media (min-width: 768px) {
  footer .bg-white\/5 input[type="email"] {
    flex: 1;
    min-width: 0;
  }
  
  footer .bg-white\/5 button[type="submit"] {
    flex-shrink: 0;
  }
}

/* Prevent horizontal scrolling on body */
body {
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

/* Additional mobile menu link adjustments */
.mobile-nav-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure decorative elements don't cause overflow */
#mobile-menu .absolute.inset-0 > div {
  position: absolute;
  overflow: hidden;
}

/* Hamburger animation styles */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: currentColor;
  margin-bottom: 6px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-line:last-child {
  margin-bottom: 0;
}

/* When menu is open, transform hamburger to X */
.menu-open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}