/* Custom styles beyond Tailwind */

/* Animations */
@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Loading spinner */
.loader {
  border-top-color: #3498db;
  -webkit-animation: spinner 1.5s linear infinite;
  animation: spinner 1.5s linear infinite;
}

@-webkit-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #3b82f6, #6366f1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #2563eb, #4f46e5);
}

/* Image hover effects */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.1);
}

/* Card hover effects */
.hover-card {
  transition: all 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pulse animation */
.pulse-slow {
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Shimmer effect */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Mobile Responsive Styles */

/* Mobile menu improvements */
#mobile-menu {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#mobile-menu-overlay {
  backdrop-filter: blur(2px);
}

/* Mobile typography adjustments */
@media (max-width: 640px) {
  h1 {
    font-size: 1.875rem !important; /* text-3xl */
    line-height: 2.25rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important; /* text-2xl */
    line-height: 2rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important; /* text-xl */
    line-height: 1.75rem !important;
  }
  
  p {
    font-size: 0.875rem;
  }
}

/* Mobile padding adjustments */
@media (max-width: 640px) {
  .mobile-padding {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Mobile grid adjustments */
@media (max-width: 640px) {
  .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* Mobile hero section */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
}

/* Mobile search form */
@media (max-width: 768px) {
  .search-form-grid {
    grid-template-columns: 1fr !important;
  }
  
  .search-form-grid > div {
    margin-bottom: 0.75rem;
  }
}

/* Mobile card adjustments */
@media (max-width: 640px) {
  .card-mobile {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0.75rem;
  }
  
  .card-image-mobile {
    height: 12rem !important;
  }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
  .nav-logo-text {
    font-size: 1.25rem !important;
  }
  
  .nav-logo-icon {
    padding: 0.5rem !important;
  }
  
  .nav-logo-icon i {
    font-size: 1rem !important;
  }
}

/* Mobile button adjustments */
@media (max-width: 640px) {
  .btn-mobile {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
  }
  
  .btn-mobile-full {
    width: 100% !important;
  }
}

/* Mobile table adjustments */
@media (max-width: 768px) {
  .table-mobile {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-mobile table {
    min-width: 600px;
  }
}

/* Mobile form improvements */
@media (max-width: 640px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
}

/* Mobile sidebar stacking */
@media (max-width: 1024px) {
  .sidebar-mobile {
    position: static !important;
    margin-top: 2rem;
  }
}

/* Mobile image gallery */
@media (max-width: 768px) {
  .gallery-main {
    height: 16rem !important;
  }
}

/* Mobile footer adjustments */
@media (max-width: 640px) {
  footer .grid {
    gap: 2rem !important;
  }
  
  footer h3 {
    font-size: 1.125rem !important;
  }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .safe-area-inset {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  .safe-area-bottom {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Touch-friendly tap targets */
@media (max-width: 768px) {
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .mobile-menu-link {
    padding-top: 0.875rem !important;
    padding-bottom: 0.875rem !important;
  }
}

/* Prevent horizontal scroll */
body {
  overflow-x: hidden;
}

/* Mobile animation adjustments */
@media (max-width: 768px) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
  }

  .print-break-inside {
    break-inside: avoid;
  }
}
