/* Reusable Components */

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Section */
.section {
  padding: var(--space-xl) 0;
  position: relative;
}

.section-sm {
  padding: var(--space-lg) 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  transition: all var(--duration-fast) var(--ease-out);
  text-align: center;
  gap: 0.5rem;
}

.text-gradient {
  background: var(--color-primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.btn-primary {
  background: var(--color-primary-gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 77, 46, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-gradient);
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 77, 46, 0.5);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  background-color: var(--color-overlay-hover);
  border-color: var(--color-text-primary);
}

/* Cards */
.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: transform var(--duration-medium) var(--ease-out),
              box-shadow var(--duration-medium) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-lg);
}

/* Badges / Pills */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--color-overlay-hover);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

/* Form Controls */
.form-group {
  margin-bottom: var(--space-sm);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--color-overlay-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
  background-color: var(--color-overlay-hover);
}

.form-control::placeholder {
  color: var(--color-text-muted);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Header & Nav */
.header {
  position: fixed;
  top: 15px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: calc(100% - 30px);
  max-width: 1200px;
  z-index: 1000;
  padding: 0.75rem 0;
  transition: all var(--duration-medium) var(--ease-out);
  border-radius: 30px;
  background-color: transparent;
}

.header.scrolled {
  top: 15px;
  background-color: var(--color-header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

@media (max-width: 991px) {
  .header, .header.scrolled {
    padding: 0.35rem 0;
    top: 10px !important;
    width: calc(100% - 20px);
  }
  
  .header.menu-active {
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header-center-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--color-text-primary);
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--duration-fast) var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0 var(--space-md);
  background: linear-gradient(135deg, rgba(255, 77, 46, 0.05) 0%, rgba(108, 99, 255, 0.08) 100%);
}

.footer a {
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   TEAM SHOWCASE (Meet the Team specific design)
   ========================================================================== */

.team-header-wrapper {
  text-align: center;
  margin-bottom: 6rem;
}

.team-eyebrow {
  color: #3b82f6;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.team-eyebrow::before,
.team-eyebrow::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background-color: #cbd5e1;
}

.team-heading {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.team-heading .gradient-text {
  background: linear-gradient(90deg, #3b82f6, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.team-heading-underline {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #a855f7);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.team-subtitle {
  color: #64748b;
  font-size: 1.1rem;
}

.team-showcase-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 3.5rem;
}

.team-showcase-card {
  font-size: 0.875rem;
  width: 20rem;
  border: 1px solid #e5e7eb;
  padding-bottom: 1.5rem;
  border-radius: 0.5rem;
  background-color: #ffffff;
  box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1rem;
}

.team-showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.1);
}

.team-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.25rem;
  position: relative;
}

.team-showcase-photo {
  height: 6rem;
  width: 6rem;
  position: absolute;
  top: -3.5rem;
  border-radius: 50%;
}

.team-showcase-photo img,
.team-showcase-photo .placeholder-icon {
  height: 100%;
  width: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #f3f4f6;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.team-showcase-photo .placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #9ca3af;
}

.team-card-title {
  padding-top: 2rem;
  text-align: center;
}

.team-showcase-name {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2937;
  margin: 0;
}

.team-showcase-role {
  color: rgba(31, 41, 55, 0.8);
  margin: 0;
  font-size: 0.875rem;
}

.team-showcase-bio {
  color: #6b7280;
  padding: 0 1.5rem;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.team-card-footer {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.team-card-stars {
  display: flex;
  gap: 0.125rem;
}

.team-card-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 1rem;
}

.team-card-social a {
  color: #9ca3af;
  font-size: 1.125rem;
  transition: color 0.2s;
}

.team-card-social a:hover {
  color: #4f46e5;
}

/* Dark Mode Overrides */
[data-theme='dark'] .team-showcase-card {
  background-color: var(--color-bg-elevated);
  border-color: var(--color-border);
  box-shadow: 0px 4px 15px 0px rgba(0, 0, 0, 0.2);
}
[data-theme='dark'] .team-showcase-name {
  color: #f3f4f6;
}
[data-theme='dark'] .team-showcase-role {
  color: #9ca3af;
}
[data-theme='dark'] .team-showcase-bio {
  color: #9ca3af;
}
[data-theme='dark'] .team-showcase-photo img {
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
/* New React-like Team Section Styles */
.team-react-section {
  background-color: var(--color-bg-base, #f8f9fa);
  transition: background-color 0.3s ease;
}
[data-theme='dark'] .team-react-section {
  background-color: var(--color-bg-base, #111827);
}

/* Swiper Slider Styles */
.team-swiper {
  width: 100%;
  max-width: 1050px; /* Exactly fits 3 slides (350px * 3), hiding duplicates */
  margin: 0 auto;
  overflow: hidden; /* Hide overflowing blurred slides slightly */
}
.team-swiper .swiper-slide {
  background-position: center;
  background-size: cover;
  transition: filter 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
  filter: blur(6px);
  opacity: 0.4;
  pointer-events: none; /* Disable hovering on inactive slides */
}
.team-swiper .swiper-slide-active {
  filter: blur(0);
  opacity: 1;
  pointer-events: auto; /* Enable hovering on the active centered slide */
}
.team-swiper .swiper-pagination-bullet {
  background: var(--color-primary, #3b82f6);
  opacity: 0.5;
}
.team-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

/* --- New Profile Cards UI --- */

/* Swiper blur effect for side cards */
.team-swiper .swiper-slide {
  transition: all 0.5s ease;
}
.team-swiper .swiper-slide:not(.swiper-slide-active) {
  filter: blur(5px);
  opacity: 0.6;
}
.team-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

/* Card Container */
.profile-card {
  position: relative;
  background: var(--color-bg-elevated);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-top: 50px; /* Space for image pop out */
  margin-bottom: 20px;
  overflow: visible;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
[data-theme='dark'] .profile-card {
  background: var(--color-bg-elevated, #1f2937);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Top Visual Section */
.profile-card-top {
  position: relative;
  height: 200px;
  width: 100%;
}

/* Slanted Background */
.profile-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px 20px 0 0;
}

/* Alternate Slant Directions */
.profile-card:nth-child(odd) .profile-card-bg,
.theme-purple .profile-card-bg,
.theme-orange .profile-card-bg {
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0% 100%);
}

.profile-card:nth-child(even) .profile-card-bg,
.theme-blue .profile-card-bg {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 70%);
}

/* Themes */
.theme-purple .profile-card-bg {
  background: linear-gradient(135deg, #a855f7 0%, #f3e8ff 100%);
}
[data-theme='dark'] .theme-purple .profile-card-bg {
  background: linear-gradient(135deg, #a855f7 0%, #3b0764 100%);
}
.theme-purple .profile-card-index { color: #a855f7; border-color: #a855f7; }
.theme-purple .profile-role { color: #a855f7; }

.theme-blue .profile-card-bg {
  background: linear-gradient(135deg, #3b82f6 0%, #eff6ff 100%);
}
[data-theme='dark'] .theme-blue .profile-card-bg {
  background: linear-gradient(135deg, #3b82f6 0%, #172554 100%);
}
.theme-blue .profile-card-index { color: #3b82f6; border-color: #3b82f6; }
.theme-blue .profile-role { color: #3b82f6; }

.theme-orange .profile-card-bg {
  background: linear-gradient(135deg, #f97316 0%, #fff7ed 100%);
}
[data-theme='dark'] .theme-orange .profile-card-bg {
  background: linear-gradient(135deg, #f97316 0%, #431407 100%);
}
.theme-orange .profile-card-index { color: #f97316; border-color: #f97316; }
.theme-orange .profile-role { color: #f97316; }

/* Index Badge */
.profile-card-index {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 35px;
  height: 35px;
  background: var(--color-bg-base, #ffffff);
  border: 2px solid;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
[data-theme='dark'] .profile-card-index {
  background: var(--color-bg-elevated, #1f2937);
}

/* Image Pop-out */
.profile-card-img {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  max-height: 200px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
  border-radius: 12px;
}
@media (min-width: 768px) {
  .profile-card-img {
    max-height: 250px;
  }
}
.profile-card:hover .profile-card-img {
  transform: translateX(-50%) scale(1.05);
}

/* Content Area */
.profile-card-content {
  padding: 0 30px 30px 30px;
  text-align: left;
  position: relative;
  z-index: 4;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.2rem;
}

.profile-role {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 1rem;
}

.profile-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  min-height: 60px;
}

/* Stars */
.profile-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

/* Social Icons */
.profile-social {
  display: flex;
  gap: 0.8rem;
}

.profile-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all 0.3s ease;
}

.profile-social a:hover {
  background: var(--color-text-primary);
  color: var(--color-bg-base);
  border-color: var(--color-text-primary);
  transform: translateY(-3px);
}

/* --- New Profile Cards UI --- */

/* Swiper blur effect for side cards */
.team-swiper .swiper-slide {
  transition: all 0.5s ease;
}
.team-swiper .swiper-slide:not(.swiper-slide-active) {
  filter: blur(5px);
  opacity: 0.6;
}
.team-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

/* Card Container */
.profile-card {
  position: relative;
  background: var(--color-bg-elevated);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-top: 50px; /* Space for image pop out */
  margin-bottom: 20px;
  overflow: visible;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
[data-theme='dark'] .profile-card {
  background: var(--color-bg-elevated, #1f2937);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Top Visual Section */
.profile-card-top {
  position: relative;
  height: 200px;
  width: 100%;
}

/* Slanted Background */
.profile-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px 20px 0 0;
}

/* Alternate Slant Directions */
.profile-card:nth-child(odd) .profile-card-bg,
.theme-purple .profile-card-bg,
.theme-orange .profile-card-bg {
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0% 100%);
}

.profile-card:nth-child(even) .profile-card-bg,
.theme-blue .profile-card-bg {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 70%);
}

/* Themes */
.theme-purple .profile-card-bg {
  background: linear-gradient(135deg, #a855f7 0%, #f3e8ff 100%);
}
[data-theme='dark'] .theme-purple .profile-card-bg {
  background: linear-gradient(135deg, #a855f7 0%, #3b0764 100%);
}
.theme-purple .profile-card-index { color: #a855f7; border-color: #a855f7; }
.theme-purple .profile-role { color: #a855f7; }

.theme-blue .profile-card-bg {
  background: linear-gradient(135deg, #3b82f6 0%, #eff6ff 100%);
}
[data-theme='dark'] .theme-blue .profile-card-bg {
  background: linear-gradient(135deg, #3b82f6 0%, #172554 100%);
}
.theme-blue .profile-card-index { color: #3b82f6; border-color: #3b82f6; }
.theme-blue .profile-role { color: #3b82f6; }

.theme-orange .profile-card-bg {
  background: linear-gradient(135deg, #f97316 0%, #fff7ed 100%);
}
[data-theme='dark'] .theme-orange .profile-card-bg {
  background: linear-gradient(135deg, #f97316 0%, #431407 100%);
}
.theme-orange .profile-card-index { color: #f97316; border-color: #f97316; }
.theme-orange .profile-role { color: #f97316; }

/* Index Badge */
.profile-card-index {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 35px;
  height: 35px;
  background: var(--color-bg-base, #ffffff);
  border: 2px solid;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
[data-theme='dark'] .profile-card-index {
  background: var(--color-bg-elevated, #1f2937);
}

/* Image Pop-out */
.profile-card-img {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  max-height: 250px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}
.profile-card:hover .profile-card-img {
  transform: translateX(-50%) scale(1.05);
}

/* Content Area */
.profile-card-content {
  padding: 0 30px 30px 30px;
  text-align: left;
  position: relative;
  z-index: 4;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.2rem;
}

.profile-role {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 1rem;
}

.profile-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  min-height: 60px;
}

/* Stars */
.profile-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

/* Social Icons */
.profile-social {
  display: flex;
  gap: 0.8rem;
}

.profile-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all 0.3s ease;
}

.profile-social a:hover {
  background: var(--color-text-primary);
  color: var(--color-bg-base);
  border-color: var(--color-text-primary);
  transform: translateY(-3px);
}

.theme-purple .profile-social a:hover { background: #a855f7; border-color: #a855f7; color: #fff; }
.theme-blue .profile-social a:hover { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.theme-orange .profile-social a:hover { background: #f97316; border-color: #f97316; color: #fff; }

/* ==========================================================================
   FEATURED PORTFOLIO SECTION (Home Page)
   ========================================================================== */

.featured-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .featured-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .featured-portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.featured-portfolio-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-height: 380px;
}

/* Mobile Tap Tooltip */
@media (max-width: 768px) {
  .featured-portfolio-card::after {
    content: "Tap to see details";
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #6f42c1;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: opacity 0.3s ease;
    animation: bounceTooltip 2s infinite ease-in-out;
  }
  
  .featured-portfolio-card::before {
    content: "";
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #6f42c1 transparent transparent transparent;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
    animation: bounceTooltipArrow 2s infinite ease-in-out;
  }

  .featured-portfolio-card.flipped::after,
  .featured-portfolio-card.flipped::before {
    opacity: 0;
    animation: none;
  }
}

@keyframes bounceTooltip {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -5px); }
}

@keyframes bounceTooltipArrow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -5px); }
}

.featured-portfolio-card:hover, .featured-portfolio-card.flipped {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-color: var(--color-primary);
}

@media (prefers-color-scheme: dark) {
  .featured-portfolio-card:hover, .featured-portfolio-card.flipped {
    box-shadow: 0 8px 16px #000000;
  }
}

.card-image-wrapper {
  padding: 1rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.card-image-wrapper .placeholder-img {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-elevated);
  border-radius: 12px;
}

.featured-portfolio-card:hover .card-image-wrapper, .featured-portfolio-card.flipped .card-image-wrapper {
  transform: scale(0);
}

.card-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  box-sizing: border-box;
  background-color: var(--color-bg-card);
  transform: rotateX(-90deg);
  transform-origin: bottom;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.featured-portfolio-card:hover .card-content, .featured-portfolio-card.flipped .card-content {
  transform: rotateX(0deg);
}

.card-category {
  display: inline-block;
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  align-self: flex-start;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-pill {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-secondary);
  background: transparent;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: auto;
}

.card-btn-primary, .card-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.card-btn-primary {
  border: 1px solid #8b5cf6;
  color: #8b5cf6;
  background: transparent;
}

.card-btn-primary:hover {
  background: rgba(139, 92, 246, 0.1);
}

.card-btn-secondary {
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  background: transparent;
}

.card-btn-secondary:hover {
  background: var(--color-bg-elevated);
}

/* CTA Banner */
.portfolio-cta-banner {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

@media (min-width: 768px) {
  .portfolio-cta-banner {
    flex-direction: row;
    padding: 2rem 3rem;
  }
}

.cta-banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cta-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b5cf6;
  font-size: 1.5rem;
}

.cta-text h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--color-text-primary);
}

.cta-text p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.cta-banner-btn {
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.cta-banner-btn:hover {
  background: #4f46e5;
  color: white;
  transform: translateY(-2px);
}

/* --- Infinite Scroll Carousel --- */
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.infinite-scroll {
  animation: scroll-left 30s linear infinite;
  display: flex;
  gap: 2rem;
  width: max-content;
}

.infinite-scroll:hover {
  animation-play-state: paused;
}

.scroll-container {
  width: 100%;
  overflow: hidden;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  box-sizing: border-box;
  background-color: var(--color-bg-card);
  transform: rotateX(-90deg);
  transform-origin: bottom;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.featured-portfolio-card:hover .card-content, .featured-portfolio-card.flipped .card-content {
  transform: rotateX(0deg);
}

.card-category {
  display: inline-block;
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  align-self: flex-start;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-pill {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-secondary);
  background: transparent;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: auto;
}

.card-btn-primary, .card-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.card-btn-primary {
  border: 1px solid #8b5cf6;
  color: #8b5cf6;
  background: transparent;
}

.card-btn-primary:hover {
  background: rgba(139, 92, 246, 0.1);
}

.card-btn-secondary {
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  background: transparent;
}

.card-btn-secondary:hover {
  background: var(--color-bg-elevated);
}

/* CTA Banner */
.portfolio-cta-banner {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

@media (min-width: 768px) {
  .portfolio-cta-banner {
    flex-direction: row;
    padding: 2rem 3rem;
  }
}

.cta-banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cta-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b5cf6;
  font-size: 1.5rem;
}

.cta-text h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--color-text-primary);
}

.cta-text p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.cta-banner-btn {
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.cta-banner-btn:hover {
  background: #4f46e5;
  color: white;
  transform: translateY(-2px);
}

/* --- Infinite Scroll Carousel --- */
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.infinite-scroll {
  animation: scroll-left 30s linear infinite;
  display: flex;
  gap: 2rem;
  width: max-content;
}

.infinite-scroll:hover {
  animation-play-state: paused;
}

.scroll-container {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  mask: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
}

.scroll-container .featured-portfolio-card {
  width: 320px;
  flex-shrink: 0;
  margin: 0;
}

/* --- Uiverse Service Card --- */
.uiverse-service-card {
  position: relative;
  width: 100%;
  height: 250px;
  background: linear-gradient(-45deg, #f89b29 0%, #ff0f7b 100% );
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  text-decoration: none;
  cursor: pointer;
}

.uiverse-service-card svg,
.uiverse-service-card i {
  width: 48px;
  height: 48px;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  fill: #333;
  color: #333;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.uiverse-service-card:hover {
  transform: rotate(-5deg) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.uiverse-service-card__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  background-color: #fff;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.uiverse-service-card:hover .uiverse-service-card__content {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 1;
}

.uiverse-service-card__title {
  margin: 0;
  font-size: 24px;
  color: #333;
  font-weight: 700;
}

.uiverse-service-card__description {
  margin: 10px 0 0;
  font-size: 14px;
  color: #777;
  line-height: 1.4;
}

.uiverse-service-card:hover svg,
.uiverse-service-card:hover i {
  scale: 0;
  transform: rotate(-45deg);
}
