.projects-page {
  /* min-height: 100vh;
  background:
    radial-gradient(circle at 74% 10%, rgba(40, 74, 210, 0.34), transparent 42%),
    linear-gradient(180deg, #101f7f 0%, #16276d 55%, #172868 100%); */
  color: #fff;
}

.projects-header {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #132170;
  box-shadow: 0 3px 12px rgba(5, 10, 36, 0.22);
}

.projects-header-inner {
  width: 1326px;
  max-width: calc(100% - 36px);
  margin: 0 auto;
  padding: 14px 0;
}

.projects-main {
  width: 100%;
  padding: 72px 0 88px;
}

.projects-hero,
.projects-grid-wrap {
  width: 1326px;
  max-width: calc(100% - 36px);
  margin: 0 auto;
}

.projects-hero {
  margin-bottom: 70px;
}

.projects-hero .section-titles {
  margin-bottom: 0;
}

.projects-hero .section-titles h2 {
  align-self: auto;
}

.projects-hero .section-titles p {
  margin: 0;
  color: #dce6ff;
}

.projects-search-wrap {
  margin: 24px auto 0;
  width: 700px;
  max-width: 100%;
}

.projects-search {
  width: 100%;
  height: 40px;
  border-radius: 4px;
  border: 1px solid rgba(214, 225, 255, 0.55);
  background: rgba(187, 203, 246, 0.26);
  color: #fff;
  padding: 0 14px;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 13px;
}

.projects-search::placeholder {
  color: #dce7ff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 410px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.project-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-radius: 999px;
  background: #4d97ff;
  color: #fff;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  width: fit-content;
}

.project-chip-yellow {
  background: #ffcc00;
  color: #111125;
}


/* --- Container and Card --- */
.card-system-container {
    perspective: 1000px; /* Required for a modern 3D flip effect, if desired, but here just for depth */
}

.interactive-card {
    width: 100%; /* Fixed width to match visual proportions */
    height: 480px; /* Fixed height to match visual proportions */
    background-color: transparent;
    position: relative;
    border-radius: 12px;
    background-repeat: no-repeat;
    overflow: hidden; /* Ensures content does not spill out */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Deep shadow for pop */
    cursor: pointer;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

/* --- State-Specific Content and Overlay --- */
.card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease-in-out;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* --- Hover State (Powell Card - Default Hidden) --- */
.face-hover {
    background-color: #0d3b66; /* Dark navy blue from left card */
    opacity: 0; /* Initially hidden */
        border-radius: 16px;
    border: 1px solid #FC0;
    background: linear-gradient(0deg, rgba(25, 71, 148, 0.86) 0%, rgba(25, 71, 148, 0.86) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.20) 100%);
}

/* --- Default State (Bridge Card - Default Visible) --- */
.face-default {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.50);
    background: linear-gradient(178deg, rgba(12, 59, 230, 0.00) 55.74%, rgba(7, 33, 128, 0.00) 97.94%), linear-gradient(180deg, rgba(12, 59, 230, 0.00) 53.39%, rgba(12, 59, 230, 0.51) 66.74%);
    background-size: cover;
    opacity: 1; /* Initially visible */
}
.face-default .pin-icon {
  content:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 1.5C5.51562 1.5 3.5 3.41844 3.5 5.78125C3.5 8.5 6.5 12.8084 7.60156 14.2966C7.64729 14.3594 7.70722 14.4105 7.77646 14.4457C7.84571 14.481 7.9223 14.4994 8 14.4994C8.0777 14.4994 8.15429 14.481 8.22354 14.4457C8.29278 14.4105 8.35271 14.3594 8.39844 14.2966C9.5 12.8091 12.5 8.50219 12.5 5.78125C12.5 3.41844 10.4844 1.5 8 1.5Z' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 7.5C8.82843 7.5 9.5 6.82843 9.5 6C9.5 5.17157 8.82843 4.5 8 4.5C7.17157 4.5 6.5 5.17157 6.5 6C6.5 6.82843 7.17157 7.5 8 7.5Z' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); ;
}
.face-hover .pin-icon {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M6.00005 1C3.79505 1 2.00005 2.795 2.00005 5C1.98505 8.22 5.56005 10.8 5.71005 10.91C5.79505 10.97 5.90005 11.005 6.00005 11.005C6.10005 11.005 6.20505 10.975 6.29005 10.91C6.44005 10.8 10.015 8.225 10 5C10 2.795 8.20505 1 6.00005 1ZM6.00005 7C4.89505 7 4.00005 6.105 4.00005 5C4.00005 3.895 4.89505 3 6.00005 3C7.10505 3 8.00005 3.895 8.00005 5C8.00005 6.105 7.10505 7 6.00005 7Z' fill='white'/%3E%3C/svg%3E");
}
/* Overlay content on Default State */
.default-content {
    margin-top: auto; /* Position content at the bottom */
}

/* --- Transition --- */
.interactive-card:hover {
    transform: translateY(-5px); /* Gentle lift on hover */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.interactive-card:hover .face-default {
    opacity: 0; /* Fade out default state */
}

.interactive-card:hover .face-hover {
    opacity: 1; /* Fade in hover state */
}

/* --- Content Styling --- */
.card-heading {
    margin: 10px 0 20px 0;
    font-size: 32px;
    font-weight: 700;
}

/* Specific styling for Default (Amman Bridge) and Hover (Stephanie Powell) badge colors */
.badge {
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    align-self: flex-start;
}

.badge-hover {
    background-color: #f6d141; /* Distinct Yellow */
    color: #0b0f19;
}

.badge-default {
    background-color: #3b82f6; /* A distinct light blue-purple */
    color: white;
}

/* Card Metadata (Icon + Text) */
.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 25px;
}

.meta-text {
    opacity: 0.8;
}

.pin-icon {
    font-size: 18px;
}

/* Card Description (Stephanie Powell Details) */
.card-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: auto; /* Push metadata/footer down */
    opacity: 0.9;
}

/* Footer Link (Learn More) */
.learn-more {
    color: white;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    margin-top: auto; /* Ensure it stays at bottom */
    transition: opacity 0.2s;
}

.learn-more:hover {
    opacity: 0.7;
}
.project-card-overlay-rich h3 {
  margin: 14px 0 12px;
  font-size: 31px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-feature-copy {
  margin: 0 0 16px;
  color: #e9efff;
  font-size: 15px;
  line-height: 1.45;
  padding-left: 0;
  position: static;
}

.project-meta {
  margin: 0;
  color: #f0f5ff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-left: 22px;
  position: relative;
}

.project-meta::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 14px;
  height: 14px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M7 12.25C7 12.25 11 8.832 11 5.75C11 3.679 9.209 2 7 2C4.791 2 3 3.679 3 5.75C3 8.832 7 12.25 7 12.25Z' stroke='%23EAF1FF' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='7' cy='5.75' r='1.3' stroke='%23EAF1FF' stroke-width='1.2'/%3E%3C/svg%3E");
}

.project-card-overlay-rich a {
  margin-top: auto;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}

.project-card-image {
  border: 1px solid rgba(111, 152, 255, 0.7);
  background: #163aab;
}

.project-card-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition:
    transform 260ms ease,
    filter 260ms ease;
  object-fit: cover;
  aspect-ratio: 369 / 442;
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 18, 58, 0) 0%, rgba(19, 49, 138, 0.88) 62%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 1;
  transition: opacity 180ms ease;
}

.project-card-overlay h3 {
  margin: 10px 0 4px;
  font-size: 30px;
  font-weight: 600;
  font-style: normal;
  font-weight: 600;
  line-height: 36px;
}

.project-card-overlay p {
  margin: 0;
  color: #eef3ff;
  font-size: 16px;
  line-height: 120%;
  padding-inline-start: 24px;
  position: relative;
}

.project-card-overlay p::before {
    content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 1.5C5.51562 1.5 3.5 3.41844 3.5 5.78125C3.5 8.5 6.5 12.8084 7.60156 14.2966C7.64729 14.3594 7.70722 14.4105 7.77646 14.4457C7.84571 14.481 7.9223 14.4994 8 14.4994C8.0777 14.4994 8.15429 14.481 8.22354 14.4457C8.29278 14.4105 8.35271 14.3594 8.39844 14.2966C9.5 12.8091 12.5 8.50219 12.5 5.78125C12.5 3.41844 10.4844 1.5 8 1.5Z' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 7.5C8.82843 7.5 9.5 6.82843 9.5 6C9.5 5.17157 8.82843 4.5 8 4.5C7.17157 4.5 6.5 5.17157 6.5 6C6.5 6.82843 7.17157 7.5 8 7.5Z' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;    
}

.project-card-overlay-rich {
  background:
    linear-gradient(180deg, rgba(55, 99, 191, 0.92) 0%, rgba(35, 77, 169, 0.94) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
  justify-content: flex-start;
  padding: 24px 24px 22px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  border: 1px solid #ffcc00;
  backdrop-filter: blur(1.5px);
}

.project-card-overlay-rich .project-chip {
  align-self: flex-start;
  height: 30px;
  padding: 0 14px;
  font-size: 13px;
}

.project-card-special .project-card-overlay-rich {
  opacity: 0;
}

.project-card-special:hover .project-card-overlay,
.project-card-special:focus-within .project-card-overlay {
  opacity: 0;
}

.project-card-special:hover .project-card-overlay-rich,
.project-card-special:focus-within .project-card-overlay-rich {
  opacity: 1;
  transform: translateY(0);
}

.project-card-special:hover img,
.project-card-special:focus-within img {
  transform: scale(1.04);
  filter: saturate(0.88) brightness(0.8);
}

.project-card-overlay-rich .project-feature-copy::before {
  display: none;
}

.project-card-overlay-rich a span {
  font-size: 20px;
  line-height: 1;
}

.projects-page .site-footer {
  margin-top: 60px;
}

@media (max-width: 1200px) {
  .projects-main {
    padding-top: 62px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card-overlay-rich h3,
  .project-card-overlay h3 {
    font-size: 36px;
  }

  .project-card-overlay-rich h3 {
    font-size: 28px;
  }

  .project-card-overlay p {
    font-size: 24px;
  }
}

@media (max-width: 992px) {
  .projects-header-inner,
  .projects-hero,
  .projects-grid-wrap {
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 768px) {
  .projects-main {
    padding: 42px 0 70px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .projects-hero .section-titles h2 {
    font-size: 40px;
  }

  .project-card {
    min-height: 360px;
  }

  .project-card-overlay-rich h3,
  .project-card-overlay h3 {
    font-size: 30px;
  }

  .project-card-overlay-rich h3 {
    font-size: 26px;
  }

  .project-feature-copy {
    font-size: 14px;
  }

  .project-meta {
    font-size: 13px;
  }

  .project-card-overlay p {
    font-size: 20px;
  }
}


