/* Global styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.5;
}

a {
  color: #D18D62; /* copper tone */
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: #e1a97a;
}

/* Header & Navigation */
header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 32px;
  font-weight: 700;
  color: #D18D62;
}

/* Small descriptor under the logo to highlight the brand origin */
.logo .origin {
  font-size: 12px;
  color: #D18D62;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

/* Style navigation links as pill-shaped buttons */
nav li a {
  display: block;
  padding: 8px 16px;
  border: 1px solid #D18D62;
  border-radius: 20px;
  color: #D18D62;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav li a:hover {
  background-color: #D18D62;
  color: #000;
}

/* Main container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Gallery grid on home */
.stone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.stone-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
}

.stone-item img {
  width: 100%;
  display: block;
  height: auto;
  transition: transform 0.3s ease;
}

.stone-item:hover img {
  transform: scale(1.05);
}

/* Centered overlay for desktop hover */
.stone-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 10px 15px;
  text-align: center;
  font-weight: 600;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.stone-item:hover .stone-overlay {
  opacity: 1;
}

/* Darken image on hover to highlight overlay */
.stone-item:hover img {
  filter: brightness(0.7);
}

/* Stone detail page */
.hero {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 20px;
}

/*
 * Ensure that each anchor inside a stone item has relative positioning and is
 * displayed as a block-level element. This allows the absolutely positioned
 * watermark overlay to be anchored to the correct parent (the clickable link
 * around the image) without affecting document flow. Without this rule the
 * watermark may appear underneath the image instead of on top.
 */
.stone-item a {
  position: relative;
  display: block;
}

.details {
  margin-bottom: 40px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.gallery img {
  width: calc(33.333% - 10px);
  height: auto;
  border-radius: 4px;
}

.next-work {
  text-align: center;
  margin: 40px 0;
}

.next-work img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
}

.footer {
  background-color: #111;
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  color: #777;
}

.footer a {
  color: #D18D62;
  margin: 0 10px;
}

/* Tagline styling */
/* Tagline styling - emphasize the brand motto on the home page */
.tagline {
  font-size: 48px;
  font-weight: 700;
  color: #D18D62;
  text-align: center;
  margin: 60px 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Badge indicating a stone has a Rosino uniqueness certificate */
/*
 * Badge displayed under each product title to indicate the item has an
 * individual Rosino uniqueness certificate.  To keep the page feeling
 * refined and luxurious the badge uses a much smaller type size than
 * the surrounding titles.  Additional letter‑spacing improves
 * readability at this reduced scale.
 */
/*
 * Badge displayed under each product title to indicate the item has an
 * individual Rosino uniqueness certificate.  In previous iterations the
 * badge text still appeared too large relative to the surrounding
 * typography.  To achieve a subtler look the font size has been further
 * reduced and spacing tightened.  These tweaks help the label sit
 * quietly beneath the product title without competing for attention.
 */
.cert-badge {
  font-size: 6px;
  color: #d4a574;          /* maintain the soft copper tone for harmony */
  margin-top: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.75;
}

/* Watermark placed on images to show certified unique stones */
/*
 * Watermark placed on certified item images.  The overlay sits in the
 * lower‑right corner of the image and should never detract from the
 * photograph itself.  A translucent dark backdrop and modest text
 * size ensure the label remains legible yet understated.  The text
 * remains in the brand's copper colour for cohesion.
 */
/*
 * Watermark placed on certified item images.  The previous design used a
 * very light copper colour and modest backdrop which, while subtle,
 * proved difficult to read on some backgrounds.  This version increases
 * text weight slightly and darkens the backdrop for improved contrast
 * across light and dark imagery.  Padding is adjusted for more breathing
 * space and the opacity lowered slightly to blend with the photo.  A
 * stronger shadow further separates the text from the underlying picture.
 */
.watermark {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 9px;
  font-weight: 600;
  color: #d2a66b;
  background: rgba(0, 0, 0, 0.65);
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0.9;
  pointer-events: none;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 1px;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
}

/* Button styling for authenticity certificate download */
.cert-btn {
  display: inline-block;
  background: linear-gradient(135deg, #e4b47a, #c8935b);
  color: #000;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  margin-top: 15px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.cert-btn:hover {
  opacity: 0.9;
}

/* Subtitle under tagline */
.subtitle {
  font-size: 15px;
  text-align: center;
  color: #ccc;
  margin-bottom: 40px;
}

/* Logo image in header */
.logo img {
  max-height: 60px;
  width: auto;
}

/* Hamburger menu styling */
button.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

button.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #D18D62;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile navigation styles */
@media (max-width: 768px) {
  header {
    position: relative;
  }

  nav ul {
    flex-direction: column;
    position: absolute;
    top: 85px;
    right: 20px;
    background-color: #000;
    width: 200px;
    border: 1px solid #333;
    padding: 10px 0;
    display: none;
    z-index: 1000;
  }

  nav.open ul {
    display: flex;
  }

  button.hamburger {
    display: flex;
  }

  nav ul li {
    margin: 0;
    padding: 10px 20px;
    text-align: center;
  }
}

/* Hamburger active state */
button.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

button.hamburger.active span:nth-child(2) {
  opacity: 0;
}

button.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Product titles below each image */
.stone-title {
  text-align: center;
  color: #D18D62;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Pagination bar styling */
.pagination {
  text-align: center;
  margin: 30px 0;
  color: #777;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* Pagination controls */
.pagination .page-link {
  color: #D18D62;
  margin: 0 5px;
  padding: 4px 8px;
  border: 1px solid #D18D62;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

.pagination .page-link:hover {
  background-color: #D18D62;
  color: #000;
}

.pagination .page-indicator {
  color: #D18D62;
  margin: 0 8px;
  font-size: 14px;
}

/* Adjust gallery grid for mobile to two columns */
@media (max-width: 768px) {
  .stone-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Lightbox overlay styles for stone detail pages */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
}

.lightbox-overlay .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

@media (max-width: 768px) {

    header {
        padding-top: 15px !important;
        padding-bottom: 10px !important;
    }
    h2.tagline {
        font-size: 29px !important;
        line-height: 1.2 !important;
        margin-top: 5px !important;
        margin-bottom: 10px !important;
    }
    p.subtitle {
        margin-top: 0 !important;
    }
}
