/* ==========================================================================
   DAROWIZNY PAGE STYLES
   Affects ONLY /darowizny/
   ========================================================================== */

/* --- Custom Variables --- */
:root {
  --color-dark: #131A2C;
  --color-blue-bg: #D2DFE5;
  --color-gray-bg: #F5F7F8;
  --color-border: #D2DFE5;
  --color-separator: #B2C4CF;
  --color-text-secondary: #525966;
  --color-text-muted: #6B6B6B;
  --color-text-label: #525E69;
  --color-white: #FFFFFF;
}

/* --- Prevent horizontal scroll on body --- */
body.page-darowizny {
  overflow-x: hidden;
}

/* Allow desktop elements (like .card--transfer) to bleed to the right edge without clipping */
body.page-darowizny .page,
body.page-darowizny .content,
body.page-darowizny .cards-grid,
body.page-darowizny .cards-row {
  overflow: visible;
}

/* --- Disable generic home background overlay on Darowizny page --- */
body.page-darowizny:after {
  display: none !important;
}

/* --- Ensure mobile menu is strictly above all page content (z-index: 9999) --- */
body.page-darowizny .menu__mobile {
  z-index: 10000;
}

body.page-darowizny .menu__mobile-items {
  z-index: 9999;
}

body.page-darowizny .menu__mobile-items.expanded {
  z-index: 9999;
}

/* --- Right Desktop Background Panel (100% of the blue section) --- */
body.page-darowizny .desktop-bg-panel {
  position: absolute;
  top: 0;
  left: calc(50% + 79px);
  right: 0;
  height: 100%;
  min-height: 100vh;
  /* background-color: #D2DFE5; */
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

body.page-darowizny .desktop-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  opacity: 1;
  pointer-events: none;
}


/* --- Navigation adjustments on Darowizny page --- */
body.page-darowizny .top__menu-item {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  margin-right: 48px;
  width: fit-content;
}

body.page-darowizny .top__menu-item .top__menu-link {
  margin-right: 0 !important;
  display: block;
}

body.page-darowizny .active-indicator {
  width: 100%;
  height: 1px;
  background-color: #131A2C;
  margin-top: 4px;
}

/* Prevent iOS Safari phone link styling */
body.page-darowizny a[href^="tel"] {
  color: inherit !important;
  text-decoration: none !important;
}

/* --- Content Layout --- */
.content {
  padding-top: 48px;
  padding-bottom: 54px;
  flex: 1;
  position: relative;
  z-index: 20;
}

/* --- Hero Section --- */
.hero {
  margin-bottom: 48px;
  max-width: 1240px;
}

.hero__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #131A2C;
  margin-bottom: 12px;
}

.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -0.64px;
  line-height: 1;
  color: #131A2C;
  margin-bottom: 12px;
}

.hero__desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #525966;
  max-width: 620px;
}

/* --- Cards Grid Layout --- */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* --- Card 1: Dane rejestrowe --- */
.card--registry {
  background-color: #F5F7F8;
  border-radius: 28px;
  padding: 24px 28px;
  width: 558px;
  max-width: 100%;
  box-sizing: border-box;
}

.card__section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.04px;
  text-transform: uppercase;
  color: #131A2C;
  margin-bottom: 16px;
}

.registry-grid {
  display: flex;
  align-items: flex-start;
  gap: 44px;
}

.registry-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.item-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
  color: #6B6B6B;
}

.item-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #131A2C;
  white-space: nowrap;
}

/* --- Cards Row: Dane fundacji + Dane do przelewu --- */
.cards-row {
  display: flex;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}

/* --- Card 2: Dane fundacji --- */
.card--foundation {
  background-color: #FFFFFF;
  border: 1px solid #D2DFE5;
  border-radius: 72px;
  padding: 34px;
  width: 558px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 10;
  box-sizing: border-box;
}

.card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.28px;
  line-height: 1.2;
  color: #131A2C;
  margin-bottom: 2px;
}

.foundation-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.foundation-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'DM Sans', sans-serif;
  line-height: 20px;
}

.field-label {
  width: 116px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #6B6B6B;
}

.field-value {
  font-size: 14px;
  font-weight: 500;
  color: #131A2C;
}

.foundation-row--multiline {
  align-items: flex-start;
}

/* --- Card 3: Dane do przelewu --- */
.card--transfer {
  background-color: #D2DFE5;
  border-radius: 72px 0 0 72px;
  padding: 34px;
  /* Bleed seamlessly to the right edge of the screen on desktop */
  margin-right: calc(50% - 50vw);
  padding-right: calc(50vw - 50% + 34px);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
  z-index: 10;
  box-sizing: border-box;
}

.card--transfer::before {
  display: none;
}

.transfer-row--two-col {
  display: flex;
  align-items: flex-start;
  gap: 44px;
}

.transfer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.transfer-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #525E69;
  line-height: 16px;
}

.transfer-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #131A2C;
  line-height: 21px;
}

.account-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

/* --- Account Copy Wrapper --- */
.account-copy-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
  padding: 2px 0;
  border-radius: 6px;
  transition: opacity 0.2s ease;
  box-sizing: border-box;
}

.account-copy-wrapper:hover .account-number {
  opacity: 0.85;
}

.account-number {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
  line-height: 1.3;
  color: #131A2C;
  letter-spacing: 0;
  word-break: break-word;
  white-space: normal;
}

.copy-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.15s ease;
}

.copy-btn:hover {
  transform: scale(1.15);
}

.copy-icon {
  width: 22px;
  height: 22px;
}

.copy-icon.success-icon {
  display: none;
}

.copy-toast {
  position: absolute;
  left: 50%;
  top: -38px;
  transform: translateX(-50%) translateY(4px);
  background-color: #131A2C;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  box-shadow: 0 4px 14px rgba(19, 26, 44, 0.25);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
  white-space: nowrap;
}

.copy-toast::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #131A2C transparent transparent transparent;
}

.account-copy-wrapper.copied .copy-toast {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.account-copy-wrapper.copied .copy-icon.default-icon {
  display: none;
}

.account-copy-wrapper.copied .copy-icon.success-icon {
  display: block;
}

.transfer-separator {
  height: 1px;
  background-color: #B2C4CF;
  width: 100%;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* --- Tablet / Medium Screen Breakpoint (769px - 1080px) --- */
@media (max-width: 1080px) and (min-width: 769px) {
  .page {
    margin: 0 30px;
  }

  body.page-darowizny .desktop-bg-panel {
    left: calc(50% + 20px);
  }

  .cards-row {
    flex-direction: column;
    gap: 20px;
  }

  .card--foundation {
    width: 100%;
    border-radius: 48px;
    padding: 30px;
  }

  .card--transfer {
    width: 100%;
    margin-right: 0;
    padding: 30px;
    padding-right: 30px;
    border-radius: 48px;
  }

  .card--registry {
    width: 100%;
    border-radius: 28px;
  }

  .account-number {
    font-size: 22px;
  }
}

/* --- Large Tablet / Small Desktop (1081px - 1280px) --- */
@media (max-width: 1280px) and (min-width: 1081px) {
  .card--foundation {
    width: 48%;
    padding: 28px;
  }

  .account-number {
    font-size: 19px;
  }

  .transfer-row--two-col {
    gap: 20px;
  }
}

/* --- Mobile Breakpoint (max-width: 768px) --- */
@media (max-width: 768px) {
  body.page-darowizny .desktop-bg-panel {
    display: none;
  }


  .content {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .hero {
    margin-bottom: 24px;
  }

  .hero__sub {
    font-size: 11px;
    letter-spacing: 0.88px;
    margin-bottom: 10px;
  }

  .hero__title {
    font-size: 46px;
    letter-spacing: -0.46px;
    line-height: 1;
    margin-bottom: 10px;
  }

  .hero__desc {
    font-size: 14px;
    line-height: 21px;
    max-width: 335px;
  }

  .cards-grid {
    gap: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .cards-row {
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Transfer Card - Mobile */
  .card--transfer {
    order: 1;
    position: relative;
    z-index: 1;
    background-color: #D2DFE5;
    border-radius: 44px;
    padding: 28px 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    gap: 17px;
    height: auto;
    overflow: visible !important;
  }

  /* Full-width blue background that starts seamlessly at the transfer card and extends below it */
  .card--transfer::before {
    content: '';
    display: block;
    position: absolute;
    top: -12px;
    left: calc(50% - 50vw);
    width: 100vw;
    bottom: -64px;
    background-color: #D2DFE5;
    z-index: -1;
    pointer-events: none;
  }

  .card--transfer .card__title {
    font-size: 26px;
    letter-spacing: -0.26px;
    line-height: 32px;
    margin-bottom: 0;
  }

  .card--transfer .transfer-row--two-col {
    gap: 14px;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
  }

  .card--transfer .transfer-col {
    min-width: 0;
    width: auto;
    flex: 1 1 120px;
    gap: 3px;
    box-sizing: border-box;
  }

  .card--transfer .transfer-label {
    font-size: 10px;
    letter-spacing: 0.4px;
    line-height: 14px;
  }

  .card--transfer .transfer-value {
    font-size: 13px;
    line-height: 19px;
  }

  .account-section {
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
  }

  .account-copy-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .account-number {
    font-size: clamp(15px, 4.8vw, 21px);
    line-height: 27px;
    white-space: normal;
    word-break: break-word;
    max-width: calc(100% - 30px);
  }

  /* Foundation Card - Mobile */
  .card--foundation {
    order: 2;
    position: relative;
    z-index: 2;
    background-color: #FFFFFF;
    border: 1px solid #D2DFE5;
    border-radius: 44px;
    padding: 28px 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 16px;
  }

  .card--foundation .card__title {
    font-size: 26px;
    letter-spacing: -0.26px;
    line-height: 32px;
    margin-bottom: 0;
  }

  .foundation-fields {
    gap: 16px;
  }

  .foundation-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    line-height: normal;
  }

  .field-label {
    width: auto;
    font-size: 11px;
    line-height: 15px;
    font-weight: 400;
    color: #6B6B6B;
  }

  .field-value {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: #131A2C;
  }

  /* Registry Card - Mobile */
  .card--registry {
    order: 3;
    position: relative;
    z-index: 2;
    background-color: #F5F7F8;
    border-radius: 32px;
    padding: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 15px;
  }

  .card--registry .card__section-label {
    font-size: 12px;
    letter-spacing: 0.84px;
    margin-bottom: 15px;
  }

  .registry-grid {
    flex-direction: column;
    gap: 15px;
  }

  .registry-item {
    gap: 2px;
  }

  .registry-item .item-label {
    font-size: 10px;
    line-height: 14px;
    font-weight: 400;
  }

  .registry-item .item-value {
    font-size: 13px;
    line-height: 19px;
    font-weight: 500;
  }
}
