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

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --green-1: #2ecc71;
  --green-2: #27ae60;
  --text: #333333;
  --muted: #555555;
  --bg: #f9f9f9;
  --card: #ffffff;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 25px rgba(46, 204, 113, 0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  font-size: 17px;
  font-weight: 400;
}

img { max-width: 100%; }
a { color: inherit; }

/* ===== Header & Navigation ===== */
header {
  background: linear-gradient(135deg, var(--green-1) 0%, var(--green-2) 100%);
  color: #fff;
  padding: 30px 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

header p {
  font-size: 1.1em;
  opacity: 0.95;
  font-weight: 500;
}

nav {
  background: var(--green-2);
  padding: 15px 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 15px;
  font-weight: 500;
  transition: 0.3s;
  display: inline-block;
  letter-spacing: 0.5px;
}

nav a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

nav a.active {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 1;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}

/* ===== Home ===== */
.home-section { text-align: center; }

.home-section h2 {
  font-size: 2em;
  color: var(--green-1);
  margin-bottom: 20px;
  font-weight: 700;
}

.home-section p {
  font-size: 1.1em;
  color: var(--muted);
  margin-bottom: 30px;
  line-height: 1.8;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.tagline {
  color: #2E8B8B !important;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.2px;
  padding: 0;
  margin: 0.5rem 0;
}

.catalog-intro {
  color: var(--green-2);
  font-weight: 600;
  font-size: 22px;
  text-align: center;
  margin-top: 10px;
}

/* ===== Cards / Gallery ===== */
.gallery,
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 25px;
  margin-top: 40px;
}

.mint-card,
.photo-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.3s;
  cursor: pointer;
  text-decoration: none;
  display: block;
  border: 1px solid rgba(0,0,0,0.03);
}

.mint-card:hover,
.photo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.mint-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f0f0f0;
  display: block;
}

.mint-card h3 {
  padding: 18px 15px 5px;
  color: var(--green-2);
  font-size: 1.3em;
  font-weight: 600;
}

.mint-card p {
  padding: 0 15px 18px;
  font-size: 0.95em;
  color: var(--muted);
}

.photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.photo-card img {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
}

.photo-card span {
  display: block;
  padding: 14px 15px 16px;
  color: var(--green-2);
  font-size: 1.1em;
  font-weight: 600;
  width: 100%;
}

/* ===== Detail (Sort Page) ===== */
.breadcrumbs {
  font-size: 0.95em;
  color: var(--muted);
  margin-bottom: 16px;
  word-break: break-word;
}

.breadcrumbs a {
  color: var(--green-2);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover { text-decoration: underline; }

.detail-header {
  text-align: center;
  margin-bottom: 16px;
}

.detail-header h2 {
  color: var(--green-1);
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.15;
  margin: 0 auto;
  font-weight: 700;
  text-align: center;
  word-break: normal;
  overflow-wrap: normal;
  max-width: 100%;
}

.detail-image {
  max-width: 420px;
  margin: 0 auto 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  padding: 28px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.detail-content h3 {
  color: var(--green-2);
  font-size: 1.28em;
  margin-top: 18px;
  margin-bottom: 10px;
  border-bottom: 2px solid rgba(46, 204, 113, 0.3);
  padding-bottom: 8px;
}

.detail-content p {
  font-size: 1em;
  line-height: 1.75;
  margin-bottom: 14px;
}

.back-btn {
  display: inline-block;
  background: var(--green-1);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  margin: 0 0 18px 0;
  transition: 0.3s;
  font-weight: 500;
  border: none;
  max-width: 100%;
  font-size: 0.95em;
  cursor: pointer;
}

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

/* ===== Info Block ===== */
.info-block {
  background: #f0f8f4;
  padding: 40px 20px;
  text-align: center;
  border-top: 2px solid var(--green-1);
}

.info-block__inner {
  max-width: 900px;
  margin: 0 auto;
}

.info-block p {
  font-size: 1.1em;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

/* ===== Footer ===== */
footer {
  background: #2c3e50;
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}

.footer-contact {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.15em;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.footer-phone {
  color: var(--green-1);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 1.26em;
  line-height: 1;
  letter-spacing: 0.15px;
  flex-shrink: 1;
}

.footer-contact span {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 1em;
  line-height: 1;
  letter-spacing: normal;
  white-space: nowrap;
  flex-shrink: 1;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}

.footer-icons img {
  width: 48px;
  height: 48px;
}

.footer-meta {
  margin-top: 12px;
  color: rgba(255,255,255,0.7);
  font-size: 0.95em;
  font-weight: 400;
}

/* ===== Lightbox (Gallery) ===== */
.modal-open { overflow: hidden !important; }

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
}

.lightbox-content {
  position: relative;
  z-index: 10001;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightboxImage {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  cursor: grab;
}

#lightboxImage:active { cursor: grabbing; }

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(39, 174, 96, 0.9);
  color: #fff;
  font-size: 28px;
  line-height: 38px;
  text-align: center;
  border: none;
  cursor: pointer;
  z-index: 10002;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(39, 174, 96, 0.8);
  color: #fff;
  font-size: 32px;
  line-height: 46px;
  text-align: center;
  border: none;
  cursor: pointer;
  z-index: 10002;
}

/* Кнопки строго по краям */
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

#lightboxCaption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 10002;
}

/* ===== Mobile ===== */
@media (max-width: 768px), (any-pointer: coarse) {
  body { font-size: 16px; }

  header {
    padding: 22px 0 18px;
  }

  header h1 {
    font-size: 1.35em;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    margin-bottom: 6px;
  }

  header p {
    font-size: 0.94em;
    padding: 0 10px;
  }

  nav {
    padding: 10px 0;
    text-align: center;
    white-space: nowrap;
  }

  nav a {
    margin: 0 4px;
    font-size: 0.85em;
    display: inline-block;
  }

  .container { padding: 24px 14px; }
  .home-section h2 { font-size: 1.7em; }
  .home-section p { font-size: 1em; margin-bottom: 18px; }
  .catalog-intro { font-size: 18px; }

  .gallery, .photo-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mobile-hint, .gallery-hint { display: block !important; }

  .mint-card {
    padding-bottom: 20px;
    height: 100%;
    position: relative;
  }

  .mint-card:active { transform: scale(0.98); }

  .mint-card::after {
    content: "Подробнее";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(39,174,96,0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
  }

  .mint-card p::after {
    content: "Открыть описание →";
    display: block;
    margin-top: 12px;
    color: #27ae60;
    font-weight: 600;
    font-size: 14px;
  }

  .photo-card { position: relative; }
  .photo-card:active { transform: scale(0.97); }

  .photo-card::before {
    content: "🔍 Развернуть";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 14px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    z-index: 2;
  }

  .photo-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 1;
  }

  .photo-card span {
    position: relative;
    z-index: 3;
    background: #fff;
  }

  .breadcrumbs {
    font-size: 0.88em;
    margin-bottom: 12px;
  }

  .back-btn {
    padding: 9px 16px;
    margin-bottom: 14px;
    font-size: 0.92em;
  }

  .detail-header {
    margin-bottom: 12px;
  }

  .detail-header h2 {
    font-size: 1.1rem;
    line-height: 1.2;
    max-width: 100%;
  }

  .detail-image {
    max-width: 100%;
    margin: 0 auto 18px;
  }

  .detail-content {
    padding: 18px 15px;
    border-radius: 10px;
  }

  .detail-content h3 {
    font-size: 1.08em;
    margin-top: 16px;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .detail-content p {
    font-size: 0.96em;
    line-height: 1.65;
    margin-bottom: 12px;
  }

  /* Меньше кнопки, но по краям */
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 38px;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }

  #lightboxImage { max-width: 100vw; max-height: 85vh; }

  #lightboxCaption {
    bottom: 25px;
    white-space: normal;
    max-width: 90%;
    font-size: 12px;
  }

  .footer-contact {
    font-size: 0.96em;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
  }

  .footer-phone {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 500;
    font-size: 1.22em;
    line-height: 1;
    letter-spacing: 0.04px;
    transform: none;
    flex-shrink: 1;
  }

  .footer-contact span {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 0.82em;
    font-weight: 500;
    line-height: 1;
    transform: none;
    flex-shrink: 1;
  }

  .footer-icons {
    gap: 3px;
    margin-left: 3px;
    flex-shrink: 0;
  }

  .footer-icons img {
    width: 32px;
    height: 32px;
  }
}
