/* =============================================
   BURO512 Project Landing Page Styles
   ============================================= */

#buro512-landing {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
}

/* ---- Section Base ---- */
.b512-section {
  width: 100%;
  padding: 80px 0;
}

.b512-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---- Backgrounds ---- */
.bg-white  { background-color: #ffffff; }
.bg-gray   { background-color: #f4f4f4; }
.bg-black  { background-color: #111111; color: #ffffff; }

/* ---- HERO Section ---- */
.b512-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
      padding: 35px 0 100px;
}

.b512-hero-img {
  width: 100%;
  max-height: 560px;
  overflow: hidden;
  margin-bottom: 50px;
}

.b512-hero-img img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  display: block;
}

.b512-hero-text {
  max-width: 900px;
  padding: 0 40px;
}

.b512-hero-text h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.b512-hero-text p {
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 32px;
}

/* ---- SPLIT Section ---- */
.b512-split { padding: 0; }

.b512-split-inner {
  display: flex;
  align-items: stretch;
  min-height: 520px;
}

#buro512-landing .b512-split-inner {
  flex-direction: row !important;
}

.b512-col-media {
  flex: 0 0 55%;
  max-width: 50%;
  overflow: hidden;
  padding: 30px 150px 30px 30px;
  display: flex;
  align-items: stretch;
}

.b512-col-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.b512-col-text {
  flex: 0 0 45%;
  max-width: 45%;
  padding: 50px 55px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.b512-col-text h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.3;
}

.b512-desc {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 24px;
}

.bg-black .b512-desc {
  color: #ccc;
}

/* ---- Video ---- */
.b512-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: #000;
}

.b512-video-wrap iframe,
.b512-video-wrap video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- Gallery Section ---- */
.b512-gallery-section {
  padding: 80px 0;
}

.b512-section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
}

.b512-section-sub {
  text-align: center;
  color: #666;
  margin-bottom: 50px;
  font-size: 15px;
}

.b512-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.b512-gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: #eee;
}

.b512-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.b512-gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 14px 16px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.b512-gallery-item:hover .b512-gallery-overlay {
  transform: translateY(0);
}

/* ---- CTA Section ---- */
.b512-cta-section {
  padding: 80px 40px;
}

.b512-cta-inner {
  text-align: center;
}

.b512-cta-inner h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.b512-cta-inner p {
  color: #555;
  margin-bottom: 32px;
  font-size: 15px;
}

/* ---- CTA Button ---- */
.b512-cta-btn {
  display: inline-block;
  padding: 14px 36px;
  border: 2px solid #1a1a1a;
  background: transparent;
  color: #1a1a1a;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 24px;
}

.b512-cta-btn:hover {
  background: #1a1a1a;
  color: #ffffff;
}

.bg-black .b512-cta-btn {
  border-color: #fff;
  color: #fff;
}

.bg-black .b512-cta-btn:hover {
  background: #fff;
  color: #111;
}

.b512-cta-btn-large {
  padding: 18px 52px;
  font-size: 14px;
}

/* ---- MODAL ---- */
.b512-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.b512-modal {
  background: #fff;
  width: 100%;
  max-width: 520px;
  padding: 48px 44px;
  position: relative;
}

.b512-modal h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.b512-modal-sub {
  color: #666;
  font-size: 14px;
  margin-bottom: 30px;
}

.b512-modal-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  line-height: 1;
}

.b512-modal-close:hover { color: #000; }

.b512-form-group {
  margin-bottom: 16px;
}

.b512-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}

.b512-input:focus {
  border-color: #1a1a1a;
}

.b512-error {
  color: #c0392b;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

.b512-submit-btn {
  width: 100%;
  padding: 15px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.b512-submit-btn:hover { background: #333; }
.b512-submit-btn:disabled { background: #999; cursor: not-allowed; }

.b512-success {
  background: #f0fff4;
  border: 1px solid #48bb78;
  color: #276749;
  padding: 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- LIGHTBOX ---- */
#b512-lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.b512-lightbox-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}

.b512-lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 38px;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
}

.b512-lightbox-content {
  text-align: center;
  max-width: 90vw;
  max-height: 85vh;
}

#b512-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

#b512-lightbox-title {
  color: #fff;
  margin-top: 16px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .b512-split-inner,
  .b512-split-reverse .b512-split-inner {
    flex-direction: column;
  }

  .b512-col-media,
  .b512-col-text {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .b512-col-media {
    height: 280px;
    padding: 20px !important;
  }

  .b512-col-text {
    padding: 40px 30px;
  }

  .b512-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 20px;
  }

  .b512-hero-text h1 {
    font-size: 26px;
  }

  .b512-modal {
    padding: 36px 24px;
  }
}

@media (max-width: 580px) {
  .b512-gallery-grid {
    grid-template-columns: 1fr;
  }

  .b512-section {
    padding: 50px 0;
  }

  .b512-hero-img {
    height: 240px;
  }

  .b512-hero-img img {
    height: 240px;
  }
}

/* ---- Works Gallery ---- */
#b512-works {
  padding: 80px 0;
}

.b512-work-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: #eee;
}

.b512-work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.b512-work-item .b512-gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 14px 16px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.b512-work-item:hover .b512-gallery-overlay {
  transform: translateY(0);
}

#b512-lightbox-desc {
  color: #ccc;
  margin-top: 8px;
  font-size: 13px;
  max-width: 600px;
  text-align: center;
}

/* ---- Two Columns (text + text) ---- */
.b512-two-cols {
  padding: 80px 0;
}

.b512-two-cols-inner {
  display: flex;
  align-items: flex-start;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.b512-two-cols-left,
.b512-two-cols-right {
  flex: 1;
}

.b512-two-cols-left h2,
.b512-two-cols-right h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .b512-two-cols-inner {
    flex-direction: column;
    gap: 40px;
  }
}

.b512-hero-sub {
  font-size: 15px;
  letter-spacing: 1px;
  color: #555;
  margin-bottom: 32px;
}

.b512-cta-desc {
  color: #555;
  margin-bottom: 32px;
  font-size: 15px;
}

.bg-black .b512-hero-sub,
.bg-black .b512-cta-desc {
  color: #ccc;
}

/* ---- Summernote HTML content styles ---- */
.b512-desc p,
.b512-hero-sub p,
.b512-cta-desc p,
.b512-two-cols-left p,
.b512-two-cols-right p {
  margin-bottom: 10px;
    line-height: initial;
}

.b512-desc p:last-child,
.b512-hero-sub p:last-child,
.b512-cta-desc p:last-child,
.b512-two-cols-left p:last-child,
.b512-two-cols-right p:last-child {
  margin-bottom: 0;
}

.b512-desc ul,
.b512-desc ol,
.b512-two-cols-left ul,
.b512-two-cols-left ol,
.b512-two-cols-right ul,
.b512-two-cols-right ol {
  padding-left: 18px;
  margin-bottom: 10px;
}

.b512-desc li,
.b512-two-cols-left li,
.b512-two-cols-right li {
  margin-bottom: 5px;
  line-height: 1.7;
}

.b512-desc strong, .b512-desc b,
.b512-two-cols-left strong, .b512-two-cols-left b,
.b512-two-cols-right strong, .b512-two-cols-right b {
  font-weight: 700;
}

.b512-desc em, .b512-desc i {
  font-style: italic;
}

.b512-desc p:first-child,
.b512-two-cols-left p:first-child,
.b512-two-cols-right p:first-child {
  margin-top: 0;
}


@media (max-width: 900px) {

  .b512-col-media {
    padding: 20px !important;
  }

  .b512-col-text {
    padding: 25px 15px;
  }

}

@media (max-width: 900px) {
  #buro512-landing .b512-split-inner {
    flex-direction: column !important;
  }
}

@media (max-width: 600px) {


.b512-two-cols-left, .b512-two-cols-right {
    flex: 1;
}

  .b512-modal-overlay {
         /* padding: 12px 12px 600px; */
        width: 100%;
        /* align-items: stretch; */
        justify-content: center;
        overflow-y: auto;
    }

  .b512-modal {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
    padding: 24px 16px 20px;
    border-radius: 12px;

    /* ключевое */
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }

  .b512-modal h3 {
    font-size: 16px;
    letter-spacing: 0.5px;
    line-height: 1.3;
  }

  .b512-modal-sub {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .b512-form-group {
    margin-bottom: 12px;
  }

  .b512-input {
    width: 100%;
    font-size: 16px; /* фикс iOS zoom */
    padding: 12px;
  }

  .b512-submit-btn {
    width: 100%;
    font-size: 13px;
    padding: 14px;
  }

  .b512-modal-close {
    top: 10px;
    right: 12px;
    font-size: 24px;
  }
}

.b512-modal {
  box-sizing: border-box;
}

.b512-input,
.b512-submit-btn {
  box-sizing: border-box;
}