/* ============================================================
   main.css — Home page styles
   ============================================================ */

/* ── Page wrapper ──────────────────────────────────────────── */
.page-content {
  padding-top: var(--nav-height);
}

/* ================================================================
   HERO — Three animated panels
   ================================================================ */
/* ── Hero base ─────────────────────────────────────────────── */
.hero {
  width: 100%;
  height: 45vh;
  max-height: 680px;
  min-height: 150px;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ── Panels ───────────────────────────────────────────────── */
.hero-panel {
  flex: 1;
  position: relative;
  overflow: hidden;

  transform: skewX(-15deg) translateY(-100%);
  transform-origin: center;
  opacity: 0;

  animation: panelDrop 0.7s var(--ease-out-expo) forwards;
}

/* Мінімальне перекриття для уникнення 1px ліній згладжування */
.hero-panel + .hero-panel {
  margin-left: -1px;
}

/* Розширюємо крайні панелі, щоб закрити скошені кути по краях екрану */
.hero-panel:nth-child(1) { 
  animation-delay: 0.05s; 
  margin-left: -100px;
}
.hero-panel:nth-child(2) { 
  animation-delay: 0.18s; 
}
.hero-panel:nth-child(3) { 
  animation-delay: 0.31s; 
  margin-right: -100px;
}

@keyframes panelDrop {
  to {
    transform: skewX(-15deg) translateY(0);
    opacity: 1;
  }
}

/* ── Inner (вирівнює контент) ─────────────────────────────── */
.hero-inner {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    transform: skewX(15deg);
    overflow: hidden;
    display: flex;
    justify-content: center;
}

/* ── Image ───────────────────────────────────────────────── */
.hero-inner img {
    position: absolute;
    min-width: 66%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.hero-panel:hover img {
  transform: scale(1.05); /* translateX більше не потрібен */
}

/* ── Hero logo mark ────────────────────────────────────────── */
.hero-logo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: -56px;
    z-index: 5;
    opacity: 0;
    transform: scale(0.6) translateY(20px);
    animation: logoReveal 0.6s var(--ease-out-expo) 0.55s forwards;
} 

@keyframes logoReveal { 
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    } 
} 

.hero-logo-mark { 
    width: 112px;
    height: 112px;
    background: var(--color-light-blue-bg);
    border-radius: 50%;
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
} 

.hero-logo-mark img, .hero-logo-mark svg {
    width: 100%;
    height: auto;
}

/* Inline SVG fallback for the network logo */
.network-svg {
  width: 76px;
  height: 76px;
}

/* ================================================================
   PROJECTS SECTION
   ================================================================ */

.section-projects {
  margin-top: -20px;
  padding: 0;
}

.section-inner {
  max-width: 1200px;
  padding: 0 80px 64px;
  margin: 0 auto;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 36px;
}

.section-title,
.section-title-right {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-black);
}

/* ── GRID instead of flex ───────────────────────────────── */
.projects-grid {
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 24px;
}

/* ── Card ─────────────────────────────────────────────── */
.project-card {
    max-width: calc((100% - 5 * 24px) / 6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  text-decoration: none;
  color: inherit;

  transition: transform 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

/* ── Icon (real images) ───────────────────────────────── */
.project-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.02);
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Label ───────────────────────────────────────────── */
.project-label {
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.4;
  color: var(--color-black);
}

/* ── Other projects ─────────────────────────────────── */
.other-projects-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  min-height: 140px;
  transition: background 0.2s, opacity 0.2s;
}

.other-projects-link:hover {
  text-decoration: underline;
}


/* ================================================================
   CONTENT STRIP — Latest Publication + Support
   ================================================================ */
.content-strip {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto 0;
  padding: 0 80px 64px;
}

/* ── Publication column ─────────────────────────────────────── */
.col-publication {
    flex: 1;
    padding-right: 48px;
    padding-top: 32px;
}

.col-publication .section-title {
  margin-bottom: 24px;
}

.post-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.post-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.post-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-light-blue-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  padding: 16px;
}

.post-meta {
  font-size: 0.72rem;
  color: var(--color-grey);
  margin-bottom: 8px;
}

.post-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 14px;
  color: var(--color-black);
}

.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-tag {
  background: var(--color-tag);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--color-black);
}

.all-publications-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-black);
  text-decoration: none;
  transition: opacity 0.2s;
}
.all-publications-link:hover { opacity: 0.6; }

/* ── Support column ─────────────────────────────────────────── */
.col-support {
  flex: 1;
  background: var(--color-black);
  border-radius: 16px;
  padding: 32px;
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.col-support .section-title {
  color: var(--color-white);
  font-size: 1.4rem;
}

.iban-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iban-card-title {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.iban-number {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: 0.04em;
  word-break: break-all;
}

.iban-recipient {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

.copy-btn {
  align-self: flex-start;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--color-white);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.72rem;
  cursor: pointer;
  font-family: var(--font-main);
  transition: background 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.22); }
.copy-btn.copied { background: var(--color-oshad-blue); border-color: var(--color-oshad-blue); }

.support-description {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
}

.requisites-link {
  display: inline-block;
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  transition: opacity 0.2s;
  align-self: flex-end;
  margin-top: auto;
}
.requisites-link:hover { opacity: 0.7; }

.iban-copy-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.iban-copy-row--main {
  margin-bottom: 4px;
}

.copy-icon-btn {
    padding: 3px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .section-projects,
    .content-strip {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .section-inner {
        padding: 0;
    }
}

@media (max-width: 768px) {
    /* 1. Ховаємо "ГО «Аве Тім»" */
    .section-title-right {
        display: none;
    }
    
    .section-projects {
        margin-top: 20px;
    }

    /* 2. Два рівних стовпчики для іконок */
    .projects-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 14px;
    }

    .project-card {
        max-width: calc(33vw - 28px);
        width: 100%;
    }

    .project-icon {
        width: 100%;
        height: auto;
    }

    /* 3. "Наші інші проєкти" — на весь рядок, текст праворуч */
    .other-projects-link {
        min-height: unset;
        padding: 8px 0;
        font-size: 0.95rem;
    }

    .col-publication {
        padding-top: 0;
        padding-right: 0;
        margin-bottom: 24px;
        display: flex;
        flex-direction: column;
    }
    
    .all-publications-link {
        align-self: flex-end;
    }

    .hero {
        height: 35vw;
        max-height: 320px;
    }
    
    .hero-logo-mark {
        width: 88px;
        height: 88px;
        padding: 6px;
    }
    
    .hero-logo-wrap {
        margin-top: -44px;
    }
    
    .section-projects {
        padding: 0 20px 40px;
    }
    
    .section-header-row {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 24px;
    }
    
    .content-strip {
        flex-direction: column;
        padding: 0 20px 40px;
        gap: 40px;
        margin-top: 16px;
    }
    
    .col-support {
        border-radius: 12px;
    }
    
    .project-label {
        overflow-wrap: break-word;
        hyphens: manual;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    
    .project-card {
        max-width: calc(50vw - 27px);
        width: 100%;
    }
    
    .hero {
        height: 35vw;
        min-height: 200px;
    }
    
    .section-title,
    .section-title-right {
        font-size: 1.35rem;
    }
}


.partners-section {
  background: var(--color-light-blue-bg);
  padding-bottom: 64px;
}
.partners-section .section-inner {
  padding-bottom: 0;
}
.partners-section .section-title {
  color: var(--color-black);
}
.partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.partner-card {
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 20px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.partner-card:hover {
  transform: scale(1.02);
  transform: translateY(-4px);
}
.partner-card:focus-visible {
  outline: 3px solid var(--color-black);
  outline-offset: 3px;
}
.partner-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 1024px) {
    .partners-section {
        padding-left: 40px;
        padding-right: 40px;
    }
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
  .partners-section {
    padding: 40px 20px;
  }
  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .partner-card {
    border-radius: 14px;
    padding: 14px;
  }
}
@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── External badge ────────────────────────────────── */
.post-thumbnail {
  position: relative;
}

.post-external-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.65);
  color: var(--color-white);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ── Lang select ────────────────────────────────────── */
.post-lang-select {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.post-lang-label {
  font-size: 0.72rem;
  color: var(--color-grey);
  white-space: nowrap;
}

.post-lang-btn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--color-black);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.post-lang-btn:hover {
  background: var(--color-black);
  color: var(--color-white);
}

/* ================================================================
   SERVICES STRIP — Docs + Policies
   ================================================================ */
.services-strip {
  padding: 48px 0;
}

.services-strip .section-inner {
  display: flex;
  gap: 20px;
  padding-bottom: 0;
}

.service-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--footer-light, #f7f7f7);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
}

.service-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--color-black);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

.service-card-icon svg {
  width: 22px;
  height: 22px;
}

.service-card-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-light-blue-bg);
}

.service-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-body {
  flex: 1;
  min-width: 0;
}

.service-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-black);
  margin: 0 0 4px;
}

.service-card-desc {
  font-size: 0.78rem;
  color: var(--color-grey);
  line-height: 1.5;
  margin: 0;
}

.service-card-arrow {
  flex-shrink: 0;
  color: var(--color-grey);
  transition: color 0.2s, transform 0.2s;
}

.service-card:hover .service-card-arrow {
  color: var(--color-black);
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .services-strip {
    padding: 32px 0;
  }

  .services-strip .section-inner {
    flex-direction: column;
    padding: 0 20px;
  }
}