/* --- Global Button Standardization --- */
/* Ensure consistent blue color for all blue buttons */
.bg-blue-600,
.bg-blue-600:hover {
  background-color: #2563eb !important;
}

/* --- Category Section Styles --- */
.category-heading,
.category-spacer {
  opacity: 1;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
}

.category-heading.hidden,
.category-spacer.hidden {
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.category-projects {
  display: contents; /* This makes the children participate in the parent grid */
}

/* --- Portfolio Filter Button Styles --- */
.filter-btn:focus {
  outline: 1px solid rgb(59, 130, 246);
  outline-offset: 0;
}
.filter-btn {
  min-width: 130px;
  width: 145px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  margin: 0 0.25rem 0.5rem 0.25rem;
}
.filter-btn[data-filter="all"] {
  background: #ff6600;
  color: #fff;
}
.filter-btn[data-filter="New"] {
  background: #7c3aed;
  color: #fff;
}
.filter-btn[data-filter="Reno"] {
  background: #22c55e;
  color: #fff;
}
.filter-btn[data-filter="TI"] {
  background: #1190f1;
  color: #fff;
}
/* Video category filters */
.filter-btn[data-filter="home-renovation"] {
  background: #22c55e;
  color: #fff;
}
.filter-btn[data-filter="new-custom-home"] {
  background: #7c3aed;
  color: #fff;
}
.filter-btn[data-filter="commercial-ti"] {
  background: #1190f1;
  color: #fff;
}
.filter-btn.active {
  /* This combines outline from :focus and specific active styles */
  outline: 1px solid rgb(59, 130, 246);
  outline-offset: 0;
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}
.filter-btn:not(.active):hover {
  filter: brightness(1.1);
}
.filter-btn strong {
  font-weight: inherit;
}

/* --- Project Category Tags --- */
.tag {
  font-size: 1rem; /* Match 'View Details' (text-base) */
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
}
.tag-New {
  background-color: #e0e7ff;
  color: #3730a3;
}
.tag-Reno {
  background-color: #dcfce7;
  color: #166534;
}
.tag-TI {
  background-color: #dbeafe;
  color: #1e40af;
}
.tag-General {
  background-color: #fef3c7;
  color: #d97706;
}

/* --- Unified Project Card Styles --- */
.project-card {
  background: white;
  border-radius: 1rem; /* Consistent with general .project-card, override for -home was 1.2rem */
  overflow: hidden;
  width: 100%; /* For grid layout, takes width of cell */
  max-width: 500px; /* Increased from 380px to 500px */
  margin: 0 auto; /* For centering in grid cell if wider */
  height: auto; /* Changed from 100% to auto to fix dropdown behavior */
  display: flex;
  flex-direction: column;
  align-self: start; /* Prevent grid stretching that can affect dropdown behavior */
}
.project-card:hover {
  -webkit-transform: scale(1.03);
  transform: scale(1.03); /* General hover scale */
}
.project-card .p-6 {
  /* Content padding and flex properties */
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Ensure content area grows */
  /* padding: 1.5rem; Tailwind p-6 */
}
.project-card .p-6 p[itemprop="description"] {
  /* Description truncation for grid cards */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  min-height: 3.2em; /* Increased from 2.8em to prevent descender clipping */
  max-height: 3.2em;
  line-clamp: 2 !important;
  height: 3.2em !important;
}
/* Remove truncation for descriptions inside expanded details */
.project-card .project-details-content p[itemprop="description"] {
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
  text-overflow: unset !important;
  max-height: none !important;
  height: auto !important;
  min-height: auto !important;
  line-clamp: unset !important;
}
.project-card .card-footer,
.project-card .card-footer,
.project-card .flex.items-center.justify-between {
  /* Standardized footer */
  margin-top: auto; /* Pushes to the bottom */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #f3f4f6;
}
.project-card .tag {
  /* Positioning for tag within card, not its appearance */
  flex: 0 0 auto;
}

/* --- Unified Project Image Container --- */
.project-image-container {
  position: relative;
  /* padding-top: 75%; Removed in favor of aspect-ratio */
  overflow: hidden;
  background-color: #f3f4f6; /* Placeholder bg */
  flex: 0 0 auto; /* Prevent image container from resizing */
  cursor: pointer; /* For gallery interaction */
  aspect-ratio: 4/3; /* Explicit aspect ratio for CLS reduction */
  /* width: 100%; height: auto; or specific height if needed, handled by aspect-ratio */
}
.project-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Remove extra space below image */
  -webkit-transition: transform 0.5s ease;
  transition: transform 0.5s ease;
}
.project-card:hover .project-image-container img {
  /* Image zoom on hover */
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
}

/* --- (TAP) Mobile Overlay & (HOVER) Desktop Overlay --- */

/* Shared overlay style */
.project-image-container::after {
  content: "Tap for details"; /* Default for mobile */
  position: absolute;
  inset: 0;
  background: rgba(55, 65, 81, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
  z-index: 2;
  text-align: center;
}

/* Mobile (TAP) - activated by a class */
.project-card.mobile-tapped .project-image-container::after {
  opacity: 1;
}

/* Text change for tap on mobile */
@media (max-width: 1030px) {
  /* Text change for tap on mobile - action-specific */
  .project-card[data-details-open="true"].mobile-tapped
    .project-image-container::after {
    content: "Tap to open";
    opacity: 1;
  }

  /* Gallery action type on mobile */
  .project-card[data-action-type="gallery"][data-details-open="true"].mobile-tapped
    .project-image-container::after {
    content: "Tap to open gallery" !important;
    opacity: 1 !important;
  }

  /* External link action type on mobile */
  .project-card[data-action-type="external"][data-details-open="true"].mobile-tapped
    .project-image-container::after {
    content: "Tap to open" !important;
    opacity: 1 !important;
  }

  /* Video action type on mobile */
  .project-card[data-action-type="video"][data-details-open="true"].mobile-tapped
    .project-image-container::after {
    content: "Tap to view video" !important;
    opacity: 1 !important;
  }

  .project-card[data-details-open="true"].mobile-tapped
    .project-image-container[data-action="gallery"]::after {
    content: "Tap to open gallery";
    opacity: 1;
  }
}

/* Desktop - only for devices that support hover and are wide enough */
@media (hover: hover) and (min-width: 1029px) {
  /* Default desktop text */
  .project-image-container::after {
    content: "Click for details";
  }

  /* Show overlay on hover (before click) */
  .project-image-container:hover::after,
  .project-image-container:focus-within::after {
    opacity: 1;
  }

  /* After click (details are open), show action-specific text */
  .project-card[data-details-open="true"] .project-image-container::after {
    opacity: 1 !important; /* Always visible when details are open */
    content: "Click to open"; /* Default fallback text */
  }

  /* Gallery action type */
  .project-card[data-action-type="gallery"][data-details-open="true"]
    .project-image-container::after {
    content: "Click to open gallery" !important;
  }

  /* External link action type */
  .project-card[data-action-type="external"][data-details-open="true"]
    .project-image-container::after {
    content: "Click to open" !important;
  }

  /* Video action type */
  .project-card[data-action-type="video"][data-details-open="true"]
    .project-image-container::after {
    content: "Click to view video" !important;
  }
}

/* Ensure overlay is always visible when details are open */
.project-card[data-details-open="true"] .project-image-container::after {
  opacity: 1 !important;
  display: flex !important;
}

/* --- Carousel Specific Styles --- */
#portfolio-carousel {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory; /* Enable scroll snapping for carousel */
  -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
  scrollbar-width: none; /* Hide scrollbar in Firefox */
  padding: 1rem 10px; /* Add side padding for the nav buttons */
  gap: 1rem;
  width: 100%;
  content-visibility: auto;
  contain-intrinsic-size: 0 384px; /* height of a card */
}

#portfolio-carousel::-webkit-scrollbar,
#carousel::-webkit-scrollbar,
#reviews-carousel::-webkit-scrollbar,
.project-card.hide-thumbnail .project-image-container,
.project-card.hidden,
.filtered-state .project-grid h2,
.filtered-state .project-grid .w-full.mb-12 {
  display: none; /* Hide scrollbar in Chrome/Safari/Opera */
}
#portfolio-carousel > .project-card {
  /* Styling for cards directly inside this carousel */
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: 0 0 auto; /* Crucial for carousel layout */
  width: 480px; /* Default width for cards in this carousel */
  max-width: 480px !important; /* Override general max-width for carousel item */
  margin: 0; /* Override general margin: 0 auto; for carousel layout */
  /* height property will be inherited from .project-card or can be set here if different */
}

/* Blog Articles Carousel - Same styling as portfolio carousel */
#blog-articles-carousel > .project-card {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: 0 0 auto;
  width: 480px;
  max-width: 480px !important;
  margin: 0;
}
@media (max-width: 700px) {
  #portfolio-carousel > .project-card {
    width: 340px;
    max-width: 340px !important; /* Fixed width for mobile carousel */
  }

  #blog-articles-carousel > .project-card {
    width: 340px;
    max-width: 340px !important; /* Fixed width for mobile carousel */
  }
  #portfolio-carousel {
    /* Adjust scroll padding for smaller screens */
    scroll-padding-left: 8px;
    scroll-padding-right: 8px;
    padding-left: 2.5px; /* Horizontal padding for the carousel track itself */
    padding-right: 2.5px;
  }
  .project-grid {
    grid-template-columns: 1fr; /* 1 column for mobile */
    gap: 2rem; /* Increased gap for better vertical spacing on mobile */
    justify-content: center;
  }
  .project-card {
    max-width: 98vw; /* Let card fill most of the viewport width on mobile */
  }
}

/* Generic carousel (if used elsewhere) */
#carousel {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 1rem;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2.5rem;
  scroll-padding-right: 2.5rem;
  -webkit-overflow-scrolling: touch; /* For smoother scrolling on iOS */
  scroll-behavior: auto; /* Let JS handle smooth scrolling */
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#carousel > .project-card {
  /* Target unified project cards */
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: 0 0 auto;
  /* Add specific width/height for cards in #carousel if different from #portfolio-carousel */
  width: 320px; /* Example for a generic carousel */
  max-width: 320px !important; /* Prevent expansion */
}

.carousel-nav-button {
  position: absolute !important;
  top: 100px !important;
  z-index: 20 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.7rem !important;
  height: 2.7rem !important;
  padding: 0 !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
  color: white !important;
  border-radius: 2rem !important;
  -webkit-transition: background-color 0.3s ease-in-out !important;
  transition: background-color 0.3s ease-in-out !important;
  cursor: pointer !important;
  border: none !important;
  outline: none !important;
}
.carousel-nav-button:hover {
  background-color: rgba(0, 0, 0, 0.75) !important;
}
.carousel-nav-button:focus-visible {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4) !important;
}
.carousel-nav-button svg {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: middle;
}
.left-2 {
  left: -2px !important; /* Move outside the carousel a bit */
}

.right-2 {
  right: -2px !important; /* Move outside the carousel a bit */
}

/* @media (min-width: 768px) {
  .carousel-nav-button {
    width: 50px !important;
    height: 50px !important;
  }
  .left-2 {
    left: -10px !important;
  }
  .right-2 {
    right: -10px !important;
  }
} */

/* --- Project Grid (Shared across all pages) --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(340px, 500px)
  ); /* Fixed max width per card, fixed gap */
  gap: 1.5rem; /* Fixed gap between grid items */
  padding: 1rem;
  margin: 0 auto;
  min-height: auto !important; /* Changed from 900px to auto for flexibility */
  justify-content: center; /* Center grid when there's extra space */
  align-items: start; /* Prevent stretching */
}

@media (max-width: 1199px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(340px, 500px));
    gap: 1.5rem; /* Keep gap fixed */
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr; /* Single column for tablets and mobile */
    gap: 2rem; /* Increased gap for better vertical spacing */
    justify-content: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .project-card {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 500px) {
  .project-grid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    justify-items: center;
    gap: 2rem; /* Keep increased gap for very small screens */
    min-height: 1200px;
    margin-bottom: 4rem;
  }
  .project-card {
    max-width: 100vw;
  }
  .simple-grid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* --- Other Styles (Details, Animation, Layout Helpers) --- */
.project-details-content {
  max-height: 0;
  overflow: hidden;
  -webkit-transition: max-height 0.3s ease-out;
  transition: max-height 0.3s ease-out;
}
.project-details-content.expanded {
  max-height: 500px; /* Adjust as needed for content */
  -webkit-transition: max-height 0.5s ease-in;
  transition: max-height 0.5s ease-in;
}
.animate-on-scroll {
  opacity: 0;
  -webkit-transform: translateY(30px);
  transform: translateY(30px);
  -webkit-transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}
main,
.max-w-7xl {
  position: relative; /* Or other specific main styling */
}
.text-center.py-8 {
  /* Container for "Back to Homepage" link */
  background-color: transparent;
  padding: 2rem 0;
  /* text-align: center; From Tailwind */
}
.text-center.py-8 a {
  /* "Back to Homepage" link specific styling */
  min-height: 56px;
  line-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Other Tailwind classes like px-8 py-3 etc. are in HTML */
}
.sr-only {
  /* Accessibility helper */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
/* reviews.min.css - Styles for reviews carousel and cards */

:root {
  --review-gradient-start: #ffffff;
  --review-gradient-end: #f5f5f5;
  --testimonial-gradient-start: #ffffff;
  --testimonial-gradient-end: #f5f5f5;
}

#reviews-carousel {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.review-card {
  min-width: 340px !important;
  max-width: 340px !important; /* Prevent expansion */
  flex: 0 0 auto;
  background: linear-gradient(
    145deg,
    var(--review-gradient-start),
    var(--review-gradient-end)
  );
  scroll-snap-align: center;
  padding: 1.5rem;
  border-radius: 1.2rem;
  align-self: start; /* Add this line to prevent stretching */
}
.review-card .flex-grow {
  min-height: 400px; /* Adjust this value as needed */
}
.review-card .flex-shrink-0 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-right: 1rem;
}

.review-card .flex-shrink-0 img,
.review-card .defer-image {
  border-radius: 50%;
  border: 3px solid #e5e7eb; /* Tailwind gray-200 */
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
  -webkit-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Add smooth zoom */
}

.review-card:hover .flex-shrink-0 img,
.review-card:hover .defer-image {
  -webkit-transform: scale(1.13);
  transform: scale(1.13);
}

.review-toggle-container {
  text-align: right;
  width: 100%;
}

.star-inline {
  display: inline-block;
  vertical-align: middle;
}

/* Review text transition styles */
.review-text {
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.review-chevron-btn,
.project-grid .project-card {
  -webkit-transition: transform 0.2s ease-in-out;
  transition: transform 0.2s ease-in-out;
}

.review-chevron-btn:hover,
#google-review-link:hover {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

@media (max-width: 810px) {
  .review-card {
    min-width: 260px;
  }
}

/* Custom hover effect for Google Review Link */
#google-review-link {
  -webkit-transition: transform 0.2s ease-in-out;
  transition: transform 0.2s ease-in-out;
  display: inline-block;
}

/* --- Search Bar Styles (Shared by service-area and virtual-tours) --- */
.search-bar {
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
.search-bar:focus-within {
  -webkit-transform: scale(1.02);
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.search-input-container {
  position: relative;
  display: block;
}
.search-icon-container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* --- Tour Card Styles (Shared by service-area and virtual-tours) --- */
.tour-card {
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  opacity: 1;
}
.tour-card.hidden {
  opacity: 0;
  -webkit-transform: scale(0.9);
  transform: scale(0.9);
  pointer-events: none;
}
.protected-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* --- No Results Styles (Shared by service-area and virtual-tours) --- */
.no-results {
  display: none;
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.no-results.show {
  display: block;
}

/* --- Enhanced Project Card Styles (Shared overrides) --- */

/* --- Click feedback for touch devices --- */
.project-image-container.clicked::after {
  content: "Opening details...";
  opacity: 1 !important;
  background: rgba(34, 197, 94, 0.8); /* Green feedback */
  z-index: 10;
  -webkit-transition: opacity 0.2s ease-in-out;
  transition: opacity 0.2s ease-in-out;
}

/* --- Hide Thumbnail Feature (for list view) --- */

/* --- Hide Card (No search results) --- */
/* --- Portfolio Category Sections --- */
.project-grid h2 {
  scroll-margin-top: 100px; /* Account for fixed header when linking directly to headings */
}

/* Filter state: hide category headings when filtering */

/* Filter state: hide category spacers when filtering */

/* Ensure grid spacing is consistent */

.project-grid .project-card:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}
/* --- Simple Grid System (for service-area type pages) --- */
.simple-grid {
  /* Uses the standard .project-grid styles but with simple grid specific overrides */
}

/* Mobile margins for simple grids */

/* Shadow card for simple grid UI elements */
.shadow-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.skeleton {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
}
.project-card,
.skeleton {
  @apply flex-shrink-0 w-80 h-96;
}

/* --- Video Card Specific Styles --- */
.video-card .project-image-container {
  position: relative;
}

.video-card .project-image-container:hover .bg-black {
  background-color: rgba(0, 0, 0, 0.4) !important;
}

.video-card .project-image-container:hover .bg-white {
  background-color: rgba(255, 255, 255, 1) !important;
}

/* Video play button overlay animation */
.video-card .project-image-container .w-16.h-16 {
  transition: all 0.2s ease;
}

.video-card .project-image-container:hover .w-16.h-16 {
  transform: scale(1.1);
}

/* Video duration badge styling */
.video-card .absolute.bottom-2.right-2 {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Video metadata styling in details */
.video-card .project-details-content .space-y-2 {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.video-card .project-details-content .space-y-2 > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.video-card .project-details-content .space-y-2 svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

/* Video keywords styling */
.video-card .project-details-content .flex-wrap.gap-1 span {
  background-color: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Video carousel specific styling - single video display */
[data-module="video-carousel"] > .video-card {
  width: 677px; /* 3/4 of original 903px */
  max-width: 677px !important;
  flex-shrink: 0;
  margin: 0;
}

@media (max-width: 1024px) {
  [data-module="video-carousel"] > .video-card {
    width: 75vw; /* Reduced from 90vw to maintain proportions */
    max-width: 525px !important; /* 3/4 of 700px */
    min-width: 300px; /* Reduced min-width */
  }
}

@media (max-width: 768px) {
  [data-module="video-carousel"] > .video-card {
    width: 75vw; /* Reduced from 90vw */
    max-width: 338px !important; /* 3/4 of 450px */
    min-width: 240px; /* Reduced min-width */
  }
}

@media (max-width: 480px) {
  [data-module="video-carousel"] > .video-card {
    width: 85vw; /* Reduced from 95vw */
    max-width: 285px !important; /* 3/4 of 380px */
    min-width: 225px; /* Reduced min-width */
  }
}

/* Video card thumbnail aspect ratio - 16:9 for video content */
.video-card .project-image-container {
  aspect-ratio: 16/9; /* Override the default 4:3 ratio for video thumbnails */
}

/* Override mobile overlay text for video cards */
@media (max-width: 1024px) {
  .video-card.mobile-tapped .project-image-container::after {
    content: "Tap to watch video";
  }

  .video-card[data-details-open="true"].mobile-tapped
    .project-image-container::after {
    content: "Tap to watch video";
  }
}

/* Desktop hover text for video cards */
@media (min-width: 1025px) and (hover: hover) {
  .video-card .project-image-container::after {
    content: "Click for details";
  }

  .video-card[data-details-open="true"] .project-image-container::after {
    content: "Click to watch video";
  }
} /* 
--- Video Carousel Selection Styles --- */
.video-card.selected {
  transform: scale(1.02);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 2px solid #3b82f6;
  transition: all 0.3s ease;
}

.video-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  border: 2px solid transparent;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.1);
}

/* Video play button hover effect */
.project-image-container:hover .bg-black {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.project-image-container:hover .bg-white {
  background-color: rgba(255, 255, 255, 0.95) !important;
} /* 
--- Inline Video Player Styles --- */
.video-playing-inline {
  position: relative;
  overflow: hidden;
}

.video-playing-inline iframe {
  border-radius: 8px 8px 0 0; /* Match card border radius */
}

/* Ensure video container maintains aspect ratio */
.project-image-container.video-playing-inline {
  aspect-ratio: 16/9;
  min-height: 200px;
}

/* Close button hover effects */
.video-playing-inline button:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.9) !important;
}

/* Smooth transitions for video loading */
.video-playing-inline iframe {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.video-playing-inline iframe[src] {
  opacity: 1;
}

/* Loading state for video */
.video-playing-inline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
  pointer-events: none;
}

/* Hide loading spinner when video is loaded */
.video-playing-inline.loaded::before {
  display: none;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
