/* ===================================
   Bohis.net - Component Styles
   =================================== */

/* ===================================
   Service Card
   =================================== */

.service-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  border: 2px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 25px -5px rgba(8, 145, 178, 0.18), 0 10px 10px -5px rgba(8, 145, 178, 0.06);
  border-color: var(--primary-blue);
}

.service-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light) 0%, #a5f3fc 100%);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
  box-shadow: 0 4px 6px -1px rgba(8, 145, 178, 0.12);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
}

.service-icon svg {
  width: 36px;
  height: 36px;
  color: var(--primary-blue);
  transition: all 0.4s ease;
}

.service-card:hover .service-icon svg {
  color: var(--white);
}

.service-title {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.service-description {
  color: var(--gray-700);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card .btn {
  width: 100%;
}

/* Featured Service Cards */
.service-card-featured {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
  border: 2px solid var(--primary-blue);
  box-shadow: 0 10px 25px -5px rgba(8, 145, 178, 0.24), 0 8px 10px -6px rgba(8, 145, 178, 0.12);
  position: relative;
}

.service-card-featured::before {
  height: 5px;
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-green) 50%, var(--primary-blue) 100%);
  transform: scaleX(1);
}

.service-card-featured::after {
  content: '⭐';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  opacity: 0.3;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.service-card-featured:hover {
  transform: translateY(-16px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(8, 145, 178, 0.3), 0 12px 24px -8px rgba(8, 145, 178, 0.18);
}

.service-card-featured .service-icon {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  box-shadow: 0 8px 16px rgba(8, 145, 178, 0.35);
}

.service-card-featured .service-icon svg {
  color: var(--white);
}

.service-card-featured:hover .service-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 12px 24px rgba(8, 145, 178, 0.45);
}

.service-card-featured .service-title {
  color: var(--primary-dark);
  font-size: 1.25rem;
}

/* ===================================
   Reference Card
   =================================== */

.reference-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
}

.reference-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.2), 0 10px 10px -5px rgba(37, 99, 235, 0.08);
  border-color: var(--primary-light);
}

.reference-image {
  position: relative;
  overflow: hidden;
  height: 240px;
  background: linear-gradient(135deg, var(--gray-100) 0%, #e5e7eb 100%);
}

.reference-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reference-card:hover .reference-image img {
  transform: scale(1.1);
}

.reference-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(30, 64, 175, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(4px);
}

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

.reference-overlay .btn {
  transform: translateY(20px);
  transition: transform 0.4s ease 0.1s;
}

.reference-card:hover .reference-overlay .btn {
  transform: translateY(0);
}

.reference-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.reference-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.reference-description {
  color: var(--gray-700);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  flex-grow: 1;
}

.reference-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.reference-link {
  color: var(--primary-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.reference-link:hover {
  color: var(--primary-dark);
}

/* ===================================
   Technology Badge
   =================================== */

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--white);
  color: var(--gray-900);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--gray-200);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tech-badge:hover {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  color: var(--white);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
  border-color: var(--primary-blue);
}

.tech-badge-icon {
  width: 16px;
  height: 16px;
}

/* Small badge variant */
.tech-badge-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
}

/* Category specific colors */
.tech-badge.tech-language {
  background: #dbeafe;
  color: #1e40af;
}

.tech-badge.tech-database {
  background: #d1fae5;
  color: #065f46;
}

.tech-badge.tech-framework {
  background: #fef3c7;
  color: #92400e;
}

.tech-badge.tech-tool {
  background: #e0e7ff;
  color: #3730a3;
}

/* ===================================
   Contact Form
   =================================== */

.contact-form {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.form-label {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.form-control.is-invalid {
  border-color: #dc2626;
}

.form-control.is-valid {
  border-color: var(--accent-green);
}

.invalid-feedback {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.valid-feedback {
  color: var(--accent-green);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ===================================
   Product Page
   =================================== */

.product-hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
  padding: 3rem 0;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.product-screenshot {
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  margin-bottom: 2rem;
}

.product-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.product-features {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 2rem;
}

.product-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--gray-700);
}

.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 1.25rem;
}

.product-cta {
  background: var(--primary-blue);
  color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}

.product-cta h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

/* ===================================
   Technology Page
   =================================== */

.tech-category {
  margin-bottom: 3rem;
}

.tech-category-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-blue);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.tech-item {
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.tech-item:hover {
  border-color: var(--primary-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tech-item-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary-blue);
}

.tech-item-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.95rem;
}

/* ===================================
   Modal Styles
   =================================== */

.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  border-bottom: 1px solid var(--gray-300);
  padding: 1.5rem;
}

.modal-title {
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid var(--gray-300);
  padding: 1rem 1.5rem;
}

.btn-close {
  transition: all 0.3s ease;
}

.btn-close:hover {
  transform: rotate(90deg);
}

/* ===================================
   Alert Styles
   =================================== */

.alert {
  border-radius: 8px;
  padding: 1rem 1.5rem;
  border: none;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

.alert-info {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ===================================
   Loading States
   =================================== */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===================================
   CTA Section Enhancement
   =================================== */

.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(16, 185, 129, 0.03) 100%);
  z-index: 0;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

/* ===================================
   Animations
   =================================== */

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

.service-card,
.reference-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.service-card:nth-child(1),
.reference-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2),
.reference-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3),
.reference-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4),
.reference-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5),
.reference-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6),
.reference-card:nth-child(6) { animation-delay: 0.6s; }
.service-card:nth-child(7),
.reference-card:nth-child(7) { animation-delay: 0.7s; }
.service-card:nth-child(8),
.reference-card:nth-child(8) { animation-delay: 0.8s; }

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
  .service-card,
  .reference-card,
  .contact-form {
    margin-bottom: 1.5rem;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .product-hero {
    padding: 2rem 0;
  }

  .service-card,
  .reference-card {
    animation: none;
  }
}
