/* --- WebsiteCard.css --- */

/* 3D Perspective Container */
.website-card-container {
  aspect-ratio: 4 / 3; 
  width: 100%;
  perspective: 1000px;
  position: relative;
}

/* The Card Itself */
.browser-window {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  
  /* Slower transition for a more 'premium' weighted movement */
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  will-change: transform;
  
  border-radius: 0.75rem;
  background-color: #0f172a;
  border: 1px solid #1e293b;
  
  /* Tighter, softer shadow to match the limited tilt */
  box-shadow: 
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    0 20px 40px -20px rgba(0, 0, 0, 0.3);
    
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Browser Header/Toolbar */
.browser-header {
  height: 2rem;
  flex-shrink: 0;
  background-color: #1e293b; 
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
  border-bottom: 1px solid #334155; 
  position: relative;
  z-index: 50; 
}

/* Traffic Light Dots */
.dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.dot.red { background-color: rgba(239, 68, 68, 0.9); }
.dot.amber { background-color: rgba(245, 158, 11, 0.9); }
.dot.green { background-color: rgba(34, 197, 94, 0.9); }

/* Fake Address Bar */
.address-bar {
  margin-left: 1rem;
  height: 0.75rem;
  background-color: rgba(15, 23, 42, 0.5);
  border-radius: 9999px;
  width: 100%;
  max-width: 120px;
}

/* Main Content Area */
.content-area {
  position: relative;
  flex-grow: 1;
  background-color: #020617; 
  overflow: hidden;
  width: 100%;
}

/* --- LAYERING --- */

/* Layer 1: Background Image */
.bg-image-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1; 
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 700ms;
  display: block;
}

.website-card-container:hover .bg-image {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  inset: 0;
  /*background-color: rgba(1, 16, 25, 0.05);*/
  transition: background-color 500ms;
}

/* Layer 2: Text Content & Legibility Scrim */
.text-overlay {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  
  /** * THE SCRIM FIX: 
   * Darker at the bottom (0.9 opacity) 
   * Clears towards the top
   */
  background: linear-gradient(
    to top, 
    rgba(2, 6, 23, 0.9) 0%, 
    rgba(2, 6, 23, 0.6) 25%, 
    rgba(2, 6, 23, 0.2) 50%, 
    transparent 100%
  );
  
  z-index: 20; 
  pointer-events: none; 
}

.text-content-wrapper {
  transform: translateY(0.5rem);
  transition: transform 500ms;
  text-align: left;
  position: relative;
  z-index: 21;
}

.website-card-container:hover .text-content-wrapper {
  transform: translateY(0);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  display: block;
}

.card-paragraph {
  color: #e2e8f0; 
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0; 
  transition: opacity 500ms ease;
  transition-delay: 50ms;
}

.website-card-container:hover .card-paragraph {
  opacity: 1;
}

/* Layer 3: Glare Effect */
.glare-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--glare-x) var(--glare-y), rgba(12, 147, 226, 0.2) 0%, rgba(12, 147, 226, 0) 25%);
  mix-blend-mode: screen; 
  z-index: 30; 
  transition: opacity 0.3s ease;
  opacity: 0.02; 
}

/* --- Responsive Media Queries --- */

@media (max-width: 768px) {
  .card-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }

  .text-overlay {
    padding: 1rem;
    /* Adjust gradient height for smaller mobile aspect ratios */
    background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.4) 60%, transparent 100%);
  }

  .card-paragraph {
    font-size: 0.8rem;
  }
}
