/* Custom styles to enhance Tailwind CSS */

.bg-pattern {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(30, 64, 175, 0.05) 0%, transparent 50%);
}

.gradient-bg {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.nav-blur {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.btn-primary {
  background-color: var(--color-linux-orange);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s;
  transform: scale(1);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  border: 1px solid white;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s;
  background: transparent;
}

.btn-secondary:hover {
  background: white;
  color: var(--color-linux-blue);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.service-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-0.5rem) !important;
}

/* Utility třídy pro card layout */
.h-full {
  height: 100%;
}

.flex-grow {
  flex-grow: 1;
}

:root {
  --color-linux-orange: #ff6b35;
  --color-linux-blue: #1e40af;
  --color-linux-dark: #1f2937;
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* Loading animation for icons */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

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

/* Form focus states */
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--color-linux-orange), 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
  background: #ff6b35;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e55a2b;
}

/* Technology icons container - unified definition */
.tech-icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 0.75rem;
  text-align: center;
  position: relative;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  /*box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.08);*/
  border: 1px solid var(--color-zinc-300);
  transition: all 0.3s ease;
}

.tech-icon-container:hover {
  background: linear-gradient(145deg, #f8f9fa, #ffffff);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.12);
}

/* Pulse animation for technology icons */
@keyframes tech-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.tech-icon-container:hover i {
  animation: tech-pulse 0.6s ease-in-out;
}

/* Counter animation */
.counter {
  transition: all 0.3s ease;
}

.tech-stat:hover .counter {
  transform: scale(1.1);
}

/* Navigation transitions */
nav {
  transition: transform 0.3s ease-in-out, backdrop-filter 0.3s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Navigation scroll effects */
nav.nav-scrolled {
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

nav.nav-hidden {
  transform: translateY(-100%);
}

nav.nav-visible {
  transform: translateY(0);
}

/* Mobile menu animations */
.mobile-menu {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  /* Default hidden state */
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-15px);
  pointer-events: none;
}

.mobile-menu.show {
  opacity: 1;
  max-height: 350px;
  transform: translateY(0);
  overflow: visible;
  pointer-events: auto;
}

/* Ensure smooth transition for menu items */
.mobile-menu a {
  transition: all 0.2s ease-in-out;
  display: block;
}

.mobile-menu.show a {
  opacity: 1;
  pointer-events: auto;
}

/* Additional mobile menu positioning */
@media (max-width: 768px) {
  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensure it's above other elements */
  }

  /* Ensure nav element has relative positioning for mobile menu */
  nav {
    position: relative;
  }
}

/* Hero section background pattern */
.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
}

/* Stats counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-counter {
  animation: countUp 0.6s ease-out forwards;
}

/* Technology icons hover effect */
.tech-icon {
  @apply transition-all duration-300 hover:scale-110 hover:text-linux-orange;
}

/* Wave animation */
@keyframes wave {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.wave {
  animation: wave 2s ease-in-out infinite;
  transform-origin: 70% 70%;
  display: inline-block;
}

/* Typewriter effect for hero text */
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

.typewriter {
  overflow: hidden;
  border-right: 3px solid #ff6b35;
  white-space: nowrap;
  margin: 0 auto;
  animation: typewriter 4s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #ff6b35; }
}

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

/* Loading spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ff6b35;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

  .service-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .auto-dark {
    @apply bg-gray-900 text-white;
  }
}

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

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

/* Hero buttons responsive improvements */
@media (max-width: 640px) {
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons a {
    width: 100%;
    text-align: center;
    display: block;
  }

  /* Better mobile text sizing */
  .hero-text {
    font-size: 2rem;
    line-height: 1.2;
  }

  /* Mobile menu button improvements */
  .mobile-menu-button {
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
  }

  .mobile-menu-button:hover {
    background-color: rgba(255, 107, 53, 0.1);
  }
}

/* Gradient fixes for TailwindCSS v4.1 */
.bg-gradient-to-br.from-linux-blue {
  background-image: linear-gradient(to bottom right, var(--color-linux-blue), #1e3a8a) !important;
}
.bg-gradient-to-r.from-linux-blue {
  background-image: linear-gradient(to right, var(--color-linux-blue), #1e3a8a) !important;
}
.bg-gradient-to-br.from-linux-blue.to-blue-800 {
  background-image: linear-gradient(to bottom right, var(--color-linux-blue), #1e3a8a) !important;
}
.bg-gradient-to-r.from-linux-blue.to-blue-800 {
  background-image: linear-gradient(to right, var(--color-linux-blue), #1e3a8a) !important;
}
/* Backup for any gradient with linux-blue */
[class*="from-linux-blue"] {
  --tw-gradient-from: var(--color-linux-blue);
  --tw-gradient-to: #1e3a8a;
  background-image: linear-gradient(var(--tw-gradient-direction, to bottom right), var(--tw-gradient-from), var(--tw-gradient-to)) !important;
}

.bg-white.bg-opacity-10 {
  background-color: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px);
}

.space-y-8 > * + * { margin-top: 2rem; }
