﻿/* =====================================================
   PROJECTS PAGE
   Dark aesthetic matching main site
===================================================== */

/* --- HERO --- */
.proj-hero {
  position: relative;
  height:   500px;
  overflow: hidden;
}

.proj-hero img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  filter:     grayscale(20%);
}

.proj-hero::before {
  content:    "";
  position:   absolute;
  inset:      0;
  background: linear-gradient(135deg, rgba(0,0,0,0.78) 0%, rgba(5,5,5,0.62) 100%);
  z-index:    1;
}

.proj-hero-content {
  position:        absolute;
  inset:           0;
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  align-items:     center;
  text-align:      center;
  z-index:         2;
  padding:         0 20px;
  color:           #fff;
  animation:       projHeroIn 0.9s ease 0.3s both;
}

@keyframes projHeroIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.proj-hero-content .eyebrow {
  color:         var(--color-gold);
  margin-bottom: 18px;
}

.proj-hero-content .eyebrow::before { background: var(--color-gold); }

.proj-hero-content h1 {
  font-size:      56px;
  font-weight:    700;
  letter-spacing: -1px;
  color:          #fff;
  margin:         0 0 18px;
  line-height:    1.1;
  max-width:      900px;
}

.proj-hero-content h1 strong {
  color:       var(--color-gold);
  font-weight: 700;
}

.proj-hero-content p {
  font-size:   18px;
  max-width:   640px;
  margin:      0;
  opacity:     0.82;
  line-height: 1.65;
  font-weight: 300;
}

/* --- TAB BAR --- */
.proj-tabs-wrap {
  background:    #fff;
  border-bottom: 1px solid var(--color-border);
  border-top:    2px solid var(--color-gold);
  position:      sticky;
  top:           102px;
  z-index:       50;
}

.proj-tabs {
  max-width:   1300px;
  margin:      0 auto;
  display:     flex;
  align-items: stretch;
  padding:     0 40px;
}

.proj-tab {
  position:        relative;
  background:      none;
  border:          none;
  outline:         none;
  padding:         18px 28px;
  font-size:       13px;
  font-weight:     600;
  text-transform:  uppercase;
  letter-spacing:  1.2px;
  color:           var(--color-mid);
  cursor:          pointer;
  display:         flex;
  align-items:     center;
  gap:             8px;
  transition:      color 0.25s ease;
  font-family:     inherit;
}

.proj-tab::after {
  content:          '';
  position:         absolute;
  bottom:           0;
  left:             0;
  width:            100%;
  height:           2px;
  background:       var(--color-gold);
  transform:        scaleX(0);
  transform-origin: left center;
  transition:       transform 0.25s ease;
}

.proj-tab:hover { color: var(--color-gold); }

.proj-tab.active { color: var(--color-primary); }

.proj-tab.active::after { transform: scaleX(1); }

.proj-tab-count {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           22px;
  height:          22px;
  background:      var(--color-light);
  border-radius:   50%;
  font-size:       11px;
  font-weight:     700;
  color:           var(--color-mid);
  transition:      background 0.25s ease, color 0.25s ease;
}

.proj-tab.active .proj-tab-count,
.proj-tab:hover  .proj-tab-count {
  background: var(--color-gold);
  color:      #fff;
}

/* --- PANELS --- */
.projects-page {
  background: var(--color-light);
  padding:    70px 40px 90px;
}

.projects-inner {
  max-width: 1300px;
  margin:    0 auto;
}

.proj-panel { display: none; }

.proj-panel.active {
  display:   block;
  animation: panelFadeIn 0.4s ease both;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- GRID --- */
.proj-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   24px;
}

/* --- CARD --- */
.proj-card {
  display:         block;
  text-decoration: none;
  position:        relative;
  overflow:        hidden;
  background:      var(--color-charcoal);
}

.proj-card-img {
  position:     relative;
  overflow:     hidden;
  aspect-ratio: 4 / 3;
}

.proj-card-img img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  filter:     grayscale(30%);
  transition: transform 0.55s ease, filter 0.55s ease;
}

.proj-card:hover .proj-card-img img {
  transform: scale(1.07);
  filter:    grayscale(0%);
}

.proj-card-overlay {
  position:    absolute;
  inset:       0;
  background:  linear-gradient(to top, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0) 100%);
  display:     flex;
  align-items: flex-end;
  transition:  background 0.4s ease;
}

.proj-card:hover .proj-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.72) 60%, rgba(0,0,0,0.18) 100%);
}

.proj-card-info {
  padding:    0 24px 22px;
  transform:  translateY(8px);
  opacity:    0.82;
  transition: transform 0.4s ease, opacity 0.4s ease;
  width:      100%;
}

.proj-card:hover .proj-card-info {
  transform: translateY(0);
  opacity:   1;
}

.proj-card-cat {
  display:        block;
  font-size:      10px;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color:          var(--color-gold);
  margin-bottom:  6px;
}

.proj-card-name {
  font-size:      17px;
  font-weight:    600;
  color:          #fff;
  margin:         0 0 8px;
  line-height:    1.3;
  letter-spacing: -0.2px;
}

.proj-card-loc {
  font-size:   13px;
  color:       rgba(255,255,255,0.62);
  font-weight: 400;
}

.proj-card-loc i {
  margin-right: 5px;
  color:        var(--color-gold);
  font-size:    11px;
}

/* Gold accent bar on hover */
.proj-card-img::after {
  content:    '';
  position:   absolute;
  bottom:     0;
  left:       0;
  width:      0;
  height:     3px;
  background: var(--color-gold);
  transition: width 0.4s ease;
  z-index:    3;
}

.proj-card:hover .proj-card-img::after { width: 60px; }

/* --- PHOTO COUNT BADGE --- */
.proj-photo-count {
  position:        absolute;
  top:             14px;
  right:           14px;
  background:      rgba(0,0,0,0.72);
  border:          1px solid rgba(196,154,60,0.55);
  color:           #fff;
  font-size:       11px;
  font-weight:     600;
  letter-spacing:  0.5px;
  padding:         5px 10px;
  display:         flex;
  align-items:     center;
  gap:             6px;
  z-index:         4;
  backdrop-filter: blur(4px);
  transition:      background 0.3s ease, border-color 0.3s ease;
  pointer-events:  none;
}

.proj-photo-count i {
  color:     var(--color-gold);
  font-size: 11px;
}

.proj-card:hover .proj-photo-count {
  background:   rgba(196,154,60,0.22);
  border-color: var(--color-gold);
}

/* --- GALLERY MODAL --- */
.proj-modal {
  position:        fixed;
  inset:           0;
  z-index:         9999;
  display:         flex;
  align-items:     center;
  justify-content: center;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity 0.3s ease;
}

.proj-modal.is-open {
  opacity:        1;
  pointer-events: all;
}

.proj-modal-backdrop {
  position:   absolute;
  inset:      0;
  background: rgba(0,0,0,0.96);
  cursor:     pointer;
}

/* Top bar */
.proj-modal-bar {
  position:        absolute;
  top:             0;
  left:            0;
  right:           0;
  height:          56px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  z-index:         2;
  border-bottom:   1px solid rgba(196,154,60,0.18);
}

.proj-modal-counter {
  font-size:      13px;
  font-weight:    600;
  letter-spacing: 2px;
  color:          rgba(255,255,255,0.65);
}

.proj-modal-counter span {
  color:       var(--color-gold);
  font-weight: 700;
}

.proj-modal-close {
  position:   absolute;
  right:      20px;
  top:        50%;
  transform:  translateY(-50%);
  background: none;
  border:     none;
  color:      rgba(255,255,255,0.55);
  font-size:  22px;
  cursor:     pointer;
  padding:    6px 10px;
  line-height: 1;
  transition: color 0.2s ease;
}

.proj-modal-close:hover { color: var(--color-gold); }

/* Image area */
.proj-modal-img-wrap {
  position:        relative;
  z-index:         1;
  margin-top:      56px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           100%;
  height:          calc(100vh - 56px);
  padding:         20px 80px;
  box-sizing:      border-box;
}

.proj-modal-img-wrap img {
  max-width:   100%;
  max-height:  100%;
  object-fit:  contain;
  display:     block;
  transition:  opacity 0.2s ease;
  user-select: none;
}

.proj-modal-img-wrap img.is-fading {
  opacity: 0;
}

/* Navigation arrows */
.proj-modal-nav {
  position:        absolute;
  top:             50%;
  transform:       translateY(-50%);
  z-index:         2;
  background:      rgba(0,0,0,0.45);
  border:          1px solid rgba(196,154,60,0.35);
  color:           rgba(255,255,255,0.7);
  width:           52px;
  height:          52px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  cursor:          pointer;
  transition:      background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  font-size:       16px;
}

.proj-modal-nav:hover {
  background:   rgba(196,154,60,0.25);
  border-color: var(--color-gold);
  color:        var(--color-gold);
}

.proj-modal-nav.is-hidden {
  opacity:        0;
  pointer-events: none;
}

.proj-modal-prev { left:  16px; }
.proj-modal-next { right: 16px; }

/* --- CTA --- */
.proj-cta {
  background:
    linear-gradient(135deg, rgba(15,15,15,0.97) 0%, rgba(5,5,5,0.97) 100%),
    url('../img/topbar2.jpg');
  background-size:     cover;
  background-position: center;
  padding:             90px 40px;
  position:            relative;
  overflow:            hidden;
}

.proj-cta::before {
  content:    '';
  position:   absolute;
  top:        0;
  left:       0;
  right:      0;
  height:     2px;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
}

.proj-cta-inner {
  max-width:       1300px;
  margin:          0 auto;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             40px;
}

.proj-cta .eyebrow {
  color:         var(--color-gold) !important;
  margin-bottom: 14px;
}

.proj-cta .eyebrow::before { background: var(--color-gold) !important; }

.proj-cta h2 {
  font-size:      38px;
  font-weight:    700;
  color:          #fff !important;
  margin:         0;
  letter-spacing: -0.5px;
}

.proj-cta h2::after { display: none !important; }
.proj-cta h2 strong { color: var(--color-gold); }

.proj-cta .btn-action {
  background:  var(--color-gold);
  color:       #fff !important;
  border:      2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.proj-cta .btn-action:hover {
  background: transparent;
  color:      var(--color-gold) !important;
  border:     2px solid var(--color-gold);
}

/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
  .proj-hero            { height: 360px; }
  .proj-hero-content h1 { font-size: 36px; }
  .proj-hero-content p  { font-size: 15px; }

  /* Suppress CSS-only hero animation on mobile */
  .proj-hero-content    { animation: none; }

  .proj-tabs-wrap {
    position:        static;
    top:             auto;
    overflow-x:      auto;
    scrollbar-width: none;
  }
  .proj-tabs-wrap::-webkit-scrollbar { display: none; }
  .proj-tabs      { padding: 0 8px; min-width: max-content; }
  .proj-tab       { padding: 14px 16px; font-size: 11px; }

  .projects-page  { padding: 50px 20px 70px; }

  .proj-cta       { padding: 60px 20px; }
  .proj-cta-inner { flex-direction: column; align-items: center; text-align: center; gap: 28px; }
  .proj-cta .btn-action  { align-self: center; }
  .proj-cta h2    { font-size: 28px; }
}

@media (max-width: 640px) {
  .proj-grid            { grid-template-columns: 1fr; }
  .proj-hero            { height: 280px; }
  .proj-hero-content h1 { font-size: 26px; }
  .proj-hero-content p  { font-size: 14px; }
  .proj-tab             { padding: 12px 10px; font-size: 10px; letter-spacing: 0.8px; }
  .proj-tab-count       { width: 18px; height: 18px; font-size: 10px; }
  .projects-page        { padding: 40px 15px 60px; }

  .proj-modal-img-wrap  { padding: 12px 52px; }
  .proj-modal-nav       { width: 40px; height: 40px; font-size: 13px; }
  .proj-modal-prev      { left: 6px; }
  .proj-modal-next      { right: 6px; }
}





