/* portfolio.css
   Final applied changes requested:
   - page background: tiled beige/pattern (matches provided image) and forced for this page
   - hero image sits directly under the navbar (no gap)
   - card images fit, respect rounded corners, and overlay text is visible
   - card bottom panel color set to #976316 and text beige
   - primary buttons (tabs, work-btn) brown (#976316) with beige text and hover -> green
   - "Get In Touch" button base = beige / text black, hover -> green (restored)
   - navbar beige background, logo text black, nav links black, hover text green, underline shown as black
   - no structural/HTML changes
*/

/* =========================
   Variables / reset
   ========================= */
:root {
  --beige: #e8dcc6;
  --black: #111111;
  --green: #77a24f;
  --brown: #976316;
  --light-brown: #d8c3a5;
  --light-yellow: #fff4c2;
  --amber: #ff9f1c;
}

/* Force page background to the tiled beige pattern (data-URI SVG). */
/* Keep this rule near the top so it overrides other styles. */
html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--beige) !important;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Crect width='200' height='200' fill='%23e8dcc6'/%3E%3Crect x='-20' y='30' width='120' height='120' fill='%23efe6d3' transform='rotate(45 40 90)' opacity='0.55'/%3E%3Crect x='40' y='40' width='120' height='120' fill='%23e1d2b6' transform='rotate(45 100 100)' opacity='0.30'/%3E%3Crect x='80' y='-10' width='90' height='90' fill='%23f2ead6' transform='rotate(45 125 125)' opacity='0.22'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  color: var(--black);
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.foot-logo img {
 color: var(--black);
}
/* ================= NAVBAR ================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--beige);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 30px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--black);
  font-size: 1.3rem;
  font-weight: bold;
}

.logo img {
  width: 60px;
  margin-right: 10px;
  filter: grayscale(1) brightness(0);
}


/* Nav links black, hover green; underline black when shown */
.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--black);
  transition: color 0.3s ease;
  white-space: nowrap;
}

/* black underline that appears on hover */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--black);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s ease;
}

.nav-links a:hover {
  color: var(--green);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ================= HERO / IMAGE DIRECTLY UNDER NAV ================= */
/* Remove any top margin so the image touches the bottom of the fixed navbar */
.portfolio-main {
  margin: 0;
  /* ensures no gap above the hero */
 padding: 48px 0 0 0;
  height: 65vh;
  margin-top: 0;
  box-sizing: border-box;
}

/* Make hero image fill container and respect rounded corners of cards elsewhere */
.portfolio-main-bg {
  display: block;
  width: 100%;
  height: 65vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.portfolio-main-bg img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: top;
}


/* ================= PORTFOLIO CARDS ================= */
.portfolio_container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 5% 0;
  gap: 4rem;
  box-sizing: border-box;
}

/* card wrapper: rounded + overflow hidden so images fit & respect rounding */
.portfolio_cards {
  width: 25%;
  height: 350px;
  position: relative;
  cursor: pointer;
  border-radius: 20px;
  overflow: hidden;
  /* ensures image respects rounding */
  box-sizing: border-box;
}

/* Make anchor behave like block so wrapping the card with <a> doesn't break layout */
a.portfolio_cards {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* image fills card (cover), centered */
.card_img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.card_img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  /* parent handles rounding */
}

/* overlay container sits above the image */
.portfolio_div {
  position: absolute;
  width: 100%;
  /* allow height to size to panel */
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  box-sizing: border-box;
}

/* ================= CHANGED: bottom name panel (matches provided design)
   Replaced slanted brown panel with a straight, dark translucent bar with centered project name.
   The subhead is hidden so only the project name appears. */
.portfolio_heading {
  /* straight rectangle at the bottom */
  background: linear-gradient(180deg, rgba(12, 14, 18, 0.16), rgba(7, 9, 11, 0.6));
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 1.25rem;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  text-align: center;
  transition: background-color 0.22s ease, transform 0.22s ease;
  box-sizing: border-box;
}

/* Keep small hover visual but keep it dark (so text remains readable) */
.portfolio_cards:hover .portfolio_heading {
  background: linear-gradient(180deg, rgba(10, 12, 14, 0.18), rgba(7, 9, 11, 0.72));
  transform: translateY(-4px);
}

/* text styling: project name only (hide subhead) */
.portfolio_heading .heading,
.portfolio_heading .subhead {
  display: block;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.portfolio_heading .heading {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

/* hide the subhead so only the project name shows (matches your request) */
.portfolio_heading .subhead {
  display: none !important;
}

/* compatibility for strong tags */
.portfolio_heading strong.heading {
  color: #ffffff;
}

.portfolio_heading strong.subhead {
  color: #ffffff;
}

/* ================= TABS / BUTTONS ================= */
/* primary buttons: brown background + beige text, hover -> green */
.tabs {
  margin-top: 10%;
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 0 10px;
}

.tab-btn {
  background-color: var(--brown);
  color: var(--beige);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  transition: background 0.18s ease, transform 0.12s ease;
}

.tab-btn:hover,
.tab-btn.active {
  background-color: var(--green);
  color: var(--beige);
  transform: translateY(-2px);
}

/* GET IN TOUCH: base beige + black text (restored), hover -> green */
.bancont-btn a {
  background-color: var(--beige);
  text-decoration: none;
  color: var(--black);
  padding: 0.95rem 1.9rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.bancont-btn a:hover {
  background-color: var(--green);
  color: #ffffff;
  transform: translateY(-2px);
}

/* WORK button: brown -> hover green (consistent) */
.work-btn {
  background-color: var(--brown);
  color: var(--beige);
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.work-btn:hover {
  background-color: var(--green);
  color: var(--beige);
  transform: translateY(-2px);
}


.footer-column1 {
  text-align: center;
  align-self: start;
}

.footer-column1 img {
  width: 60%;
  margin-top: -2rem;
}

.footer-column1 h4 {
  margin-top: -4rem;
}

#foot-email a {
  color: var(--beige);
}

/* ================= RESPONSIVE (UNCHANGED LOGIC) ================= */
@media (max-width: 1200px) {
  .portfolio_cards {
    width: 30%;
  }
}

@media (max-width: 992px) {
  .portfolio_cards {
    width: 40%;
  }
}

@media (max-width: 768px) {
  .portfolio_cards {
    width: 50%;
  }
}

/* reduce bottom panel height on small screens */
@media (max-width: 576px) {
  .portfolio_cards {
    width: 80%;
  }
  .portfolio_heading {
    height: 96px;
  }
}

@media (max-width: 480px) {
  .portfolio_cards {
    width: 90%;
  }
  .portfolio_heading {
    height: 88px;
  }
}

/* mobile nav behaviour preserved */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    right: 0;
    background: var(--beige);
    width: 220px;
    padding: 20px;
    gap: 12px;
  }
}
/* ===== PORTFOLIO FOOTER FIX ===== */
.footer-column1 {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}
.footer-column1 h4 {
  margin: 4 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}
.foot-column1 img {
  width: 300px !important;
  height: auto !important;
  margin-top: 0 !important;
}
.footer-column1 p {
  margin: 4px 0 0 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  max-width: 260px !important;
}

/* Quick Links column alignment */
.foot-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: left !important; /* left-align links inside the column */
}
.foot-columns ul li {
  list-style: none;
  padding: 0.5rem 0 !important;
  font-size: 0.9rem !important;
}

.foot-columns ul li a {
  text-decoration: none !important;
  color: #ddd;
}

.foot-columns ul li a:hover {
  color: hsl(131, 70%, 31%);
}

/* ========== FINAL MOBILE LAYOUT FIX (OVERRIDE ONLY) ========== */
@media (max-width: 768px) {

  /* ensure page never shrinks */
  html, body {
    overflow-x: hidden !important;
  }

  /* force nav menu to overlay, not push layout */
  nav .nav-links {
    display: flex !important;

    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    background-color: #2f2f2fb1 !important;

    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 24px !important;

    /* hidden by default */
    transform: translateX(100%) !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;

    transition: transform 0.35s ease, opacity 0.3s ease !important;
    z-index: 1200 !important;
  }

  /* visible only when active */
  nav .nav-links.active {
    transform: translateX(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* ensure buttons & content stay correct */
  .tabs {
    flex-wrap: wrap !important;
  }

  .tab-btn {
    min-width: auto !important;
    width: auto !important;
  }
}
/* ================= PORTFOLIO TABS MOBILE FIX ================= */
@media (max-width: 768px) {

  .tabs {
    flex-wrap: nowrap !important;     /* KEEP IN ONE LINE */
    overflow-x: auto;                 /* allow small scroll if needed */
    justify-content: center !important;
    gap: 10px !important;
    padding: 0 12px !important;
  }

  .tabs::-webkit-scrollbar {
    display: none; /* clean look */
  }

  .tab-btn {
    flex-shrink: 0 !important;        /* prevent shrinking */
    white-space: nowrap !important;   /* text stays in one line */
    min-width: auto !important;
  }
}
/* ================= NAVBAR BOLD OVERRIDE (FINAL) ================= */

/* Desktop navbar links */
nav .nav-links a {
  font-weight: 600 !important;   
  font-family: "Poppins", sans-serif !important;
}

/* ===== FIX TEXT CUTTING WITHOUT CHANGING DESIGN ===== */

/* allow text to wrap naturally */
.portfolio_heading .heading {
  white-space: normal !important;
  line-height: 1.25 !important;
}

/* allow container to grow */
.portfolio_div {
  height: auto !important;
}

/* ================= NEW: card overlay + improved hover visuals ================= */

/* overlay shown on hover with subtle icon + text */
.card-overlay {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 4;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
  pointer-events: none; /* purely visual */
}

/* icon sizing */
.card-overlay i {
  font-size: 0.95rem;
}

/* Show the overlay when hovering or focusing a card */
.portfolio_cards:hover .card-overlay,
.portfolio_cards:focus .card-overlay,
.portfolio_cards:focus-within .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* slightly dim image on hover to improve contrast */
.portfolio_cards:hover .card_img img {
  transform: scale(1.01);
  filter: saturate(0.98) brightness(0.92);
  transition: transform 0.28s ease, filter 0.28s ease;
}

/* ensure the anchor cards keep the same pointer */
a.portfolio_cards {
  cursor: pointer;
}

/* make sure focus on anchor shows the overlay for keyboard users */
a.portfolio_cards:focus {
  outline: 3px solid rgba(119,162,79,0.14);
  outline-offset: 3px;
}

/* small responsive tweak to ensure overlay stays visible on small cards */
@media (max-width: 480px) {
  .card-overlay {
    right: 12px;
    top: 12px;
    padding: 6px 8px;
    font-size: 0.9rem;
  }
}