/* Additional Effects and UI Enhancements */

/* ====== Image Loading Effects ====== */
.img-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
  }
  
  .img-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    z-index: 1;
    transition: opacity 0.5s ease;
  }
  
  @keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  
  img:not(.loaded) {
    opacity: 0;
  }
  
  img.loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
  }
  
  /* ====== Progress Bar ====== */
  .scroll-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background-color: var(--primary-red);
    z-index: 1001;
    transition: width 0.1s ease-out;
  }
  
  /* ====== Loading Indicators ====== */
  .loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
  }
  
  .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(230, 57, 70, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-red);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
  }
  
  .no-more-content {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
  }
  
  /* ====== Form Enhancements ====== */
  .form-group {
    position: relative;
    margin-bottom: 1.5rem;
  }
  
  .form-label {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #888;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 16px;
  }
  
  .form-label.floating {
    top: -10px;
    left: 10px;
    font-size: 12px;
    background-color: white;
    padding: 0 5px;
    color: var(--primary-red);
  }
  
  .form-control:focus + .form-label,
  .form-control:not(:placeholder-shown) + .form-label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    background-color: white;
    padding: 0 5px;
    color: var(--primary-red);
  }
  
  .form-control::placeholder {
    color: transparent;
  }
  
  .form-control:focus::placeholder {
    color: #ccc;
  }
  
  /* ====== Video Background Controls ====== */
  .video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s ease, transform 0.3s ease;
  }
  
  .video-play-btn:hover {
    background-color: var(--primary-red);
    transform: translate(-50%, -50%) scale(1.1);
  }
  
  /* ====== CTA Button Enhancement ====== */
  .btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
  }
  
  .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-red), #ff5964);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
  }
  
  .btn-primary:hover::before {
    opacity: 1;
  }
  
  /* ====== Service Cards Enhancement ====== */
  .service-item, .service-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
  }
  
  .service-icon {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 1;
  }
  
  .service-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background-color: rgba(230, 57, 70, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
  }
  
  .service-item:hover .service-icon::before,
  .service-card:hover .service-icon::before {
    transform: translate(-50%, -50%) scale(1);
  }
  
  .service-item:hover,
  .service-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  
  /* ====== Toast Notifications ====== */
  .toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #10b981;
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  }
  
  .toast.show {
    transform: translateY(0);
    opacity: 1;
  }
  
  .toast.hide {
    transform: translateX(100%);
    opacity: 0;
  }
  
  /* ====== Responsive Styles ====== */
  @media (max-width: 768px) {
    /* Mobile-specific adjustments */
    .service-item:hover,
    .service-card:hover {
      transform: translateY(-5px);
    }
  }
  
  /* ====== High-contrast Mode Support ====== */
  @media (prefers-contrast: more) {
    :root {
      --primary-red: #d10000;
      --shadow-soft: 0 4px 4px rgba(0, 0, 0, 0.2);
      --shadow-strong: 0 8px 8px rgba(0, 0, 0, 0.3);
    }
    
    .project-overlay, .video-play-btn {
      background-color: rgba(0, 0, 0, 0.7);
    }
    
    .form-control {
      border: 2px solid #000;
    }
    
    .form-control:focus {
      border-color: var(--primary-red);
      box-shadow: 0 0 0 2px rgba(209, 0, 0, 0.3);
    }
  }
  
  /* ====== Dark Mode Support ====== */
  @media (prefers-color-scheme: dark) {
    :root {
      --text-dark: #f0f0f0;
      --text-light: #ffffff;
      --primary-dark: #0f0f0f;
    }
    
    .form-control {
      background-color: #2a2a2a;
      color: #f0f0f0;
      border-color: #444;
    }
    
    .form-label.floating {
      background-color: #1a1a1a;
      color: var(--primary-red);
    }
    
    .img-skeleton {
      background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    }
  }
  /* Contact Form Fixes */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 4px;
  background-color: #242424;
  color: white;
  font-family: 'Archivo', sans-serif;
  margin-bottom: 1rem;
  opacity: 1 !important;
  transform: none !important;
}

.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button[type="submit"] {
  width: 100%;
  padding: 15px;
  background-color: #e10600;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  opacity: 1 !important;
  transform: none !important;
}

.contact-form label, 
.contact-form .form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: white;
  opacity: 1 !important;
}

/* Override image loading effects for form elements */
.contact-form .img-wrapper {
  background-color: transparent;
}

.contact-form img:not(.loaded),
.contact-form input:not(.loaded),
.contact-form select:not(.loaded),
.contact-form textarea:not(.loaded) {
  opacity: 1;
}

/* Fix for contact info section */
.contact-section h2,
.contact-section h3,
.contact-section p,
.contact-text h3,
.contact-text p a {
  opacity: 1 !important;
  transform: none !important;
}