/* ===========================
   DONORS.CSS — Donor Recognition Page
   Page-specific styles for donors.html.
   communities.css is also included (comm-cta-section, btn-cta-primary).
   =========================== */

/* ===========================
   PAGE HERO — Art Deco Frame
   .page-header holds the structural layout shared with other pages.
   .donors-hero overrides the visual treatment: pure black background
   with inline SVG architectural ornaments replacing the photo.
   =========================== */
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
    overflow: hidden;
}

.donors-hero {
    background: var(--dark-bg);
    height: 460px;
    min-height: 420px;
    padding-top: 40px;
}

/* Art Deco column ornaments — inset from hero edges, not flush */
.donors-hero-ornament {
    position: absolute;
    top: 0;
    width: 85px;
    height: 100%;
    pointer-events: none;
}

.donors-hero-ornament--left {
    left: 12px;
}

.donors-hero-ornament--right {
    right: 12px;
    transform: scaleX(-1);
}

/* non-scaling-stroke renders all SVG strokes at a fixed CSS-pixel width
   regardless of how the SVG element scales, so the CSS bridge divs below
   can be set to an identical pixel value and always match. */
.donors-hero-ornament g {
    vector-effect: non-scaling-stroke;
}

/*
 * Horizontal gold lines bridging the two ornament columns.
 * SVG strokes use vector-effect: non-scaling-stroke at stroke-width="2",
 * so they always render at exactly 2px. height: 2px here matches exactly.
 * Position math for top: values (scale factor varies by breakpoint):
 *   Desktop scale = min(85÷170, 460÷940) = min(0.500, 0.489) = 0.489
 *   Content width = 170 × 0.489 = 83 px; inset 12 px → lines start at 95 px
 *   y=40  → (40−35) × 0.489 = 2.45 px center → top: 1px
 *   y=120 → (120−35) × 0.489 = 41.6 px center → top: 40px
 */
.donors-hero-line {
    position: absolute;
    left: 95px;
    right: 95px;
    height: 2px;
    background: #d4af37;
    pointer-events: none;
}

.donors-hero-line--top {
    top: 1px;
}

.donors-hero-line--mid {
    top: 40px;
}

.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 90px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 4.5rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-family: 'Aboreto', serif;
    letter-spacing: 3px;
    font-weight: 700;
    line-height: 1.15;
}

.page-header p {
    font-size: 1.3rem;
    color: var(--text-gray);
    font-family: 'Lato', serif;
    line-height: 1.8;
}

/* Decorative gold rule below the h1 */
.page-header-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.ph-line {
    width: 80px;
    height: 1px;
    background: var(--accent-gold);
    opacity: 0.7;
}

.ph-diamond {
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ===========================
   DONOR WALL SECTION
   =========================== */
.donor-section {
    background: var(--dark-bg);
    padding: 1.5rem 5% 3rem;
}

/* Raised plaque frame — creates the beveled 3D edge via four-sided directional border */
.donor-plaque-frame {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-top: 8px solid #3a3a3a;
    border-left: 8px solid #2e2e2e;
    border-bottom: 8px solid #141414;
    border-right: 8px solid #1a1a1a;
    border-radius: 0;
    overflow: visible;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.9);
}

.donor-section-inner {
    background: #181818;
    padding: 2.5rem 3rem;
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    text-align: center;
}

/* ===========================
   PLAQUE CORNER ORNAMENTS
   Four inline SVGs at each corner of the plaque box. All use the same
   top-left design; CSS transforms orient the others:
     TR → scaleX(-1)  BL → scaleY(-1)  BR → scale(-1,-1)
   Flush at the corner: outer edge of the L-bracket meets the box corner.
   =========================== */
.plaque-corner {
    position: absolute;
    width: 55px;
    height: 55px;
    pointer-events: none;
    display: block;
}

.plaque-corner--tl { top: 0;    left: 0;  }
.plaque-corner--tr { top: 0;    right: 0; transform: scaleX(-1); }
.plaque-corner--bl { bottom: 0; left: 0;  transform: scaleY(-1); }
.plaque-corner--br { bottom: 0; right: 0; transform: scale(-1, -1); }

.donor-section-title {
    font-family: 'Aboreto', serif;
    font-size: 2rem;
    color: var(--accent-gold);
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 1rem;
}

.donor-section-intro {
    font-family: 'Lato', sans-serif;
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.8;
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   YEAR TABS
   =========================== */
.donor-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.donor-tab {
    padding: 0.5rem 1.25rem;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-gray);
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.25);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    min-width: 44px;
    min-height: 44px;
}

.donor-tab:hover {
    color: var(--accent-gold);
    border-color: rgba(212, 175, 55, 0.6);
}

.donor-tab--active {
    color: var(--dark-bg);
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.donor-tab--active:hover {
    background: var(--accent-gold-hover);
    border-color: var(--accent-gold-hover);
    color: var(--dark-bg);
}

/* ===========================
   DONOR LIST
   Clean recognition display — not a data table.
   =========================== */
.donor-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.donor-entry {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.donor-entry:first-child {
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.donor-name {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    color: #e8e0d0;
    line-height: 1.5;
}

.donor-campaign {
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    color: var(--text-gray);
    font-style: italic;
}

.donor-empty-text {
    display: block;
}

/* Loading spinner row */
.donor-loading {
    list-style: none;
    text-align: center;
    padding: 3rem 0;
    color: var(--accent-gold);
    font-size: 1.5rem;
}

/* Empty state row */
.donor-empty {
    list-style: none;
    text-align: center;
    padding: 3rem 0;
    font-family: 'Lato', sans-serif;
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.7;
}

.donor-empty a:not(.btn-cta-primary) {
    color: var(--accent-gold);
    text-decoration: none;
}

.donor-empty a:not(.btn-cta-primary):hover {
    text-decoration: underline;
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Tablet: narrower ornaments, recalculate line positions.
   scale = min(65÷170, 460÷940) = min(0.382, 0.489) = 0.382 (width dominates)
   Content width = 170 × 0.382 = 65 px; inset 10 px → lines start at 75 px
   y=40  → (40−35) × 0.382 = 1.91 px center → top: 1px
   y=120 → (120−35) × 0.382 = 32.5 px center → top: 31px */
@media (max-width: 1024px) and (min-width: 769px) {
    .donors-hero {
        padding-top: 31px;
    }

    .donors-hero-ornament {
        width: 65px;
    }

    .donors-hero-ornament--left {
        left: 10px;
    }

    .donors-hero-ornament--right {
        right: 10px;
    }

    .donors-hero-line {
        left: 75px;
        right: 75px;
    }

    .donors-hero-line--mid {
        top: 31px;
    }

    .plaque-corner {
        width: 40px;
        height: 40px;
    }
}

/* Mobile: scale = min(48÷170, 360÷940) = min(0.282, 0.383) = 0.282 (width dominates)
   Content width = 170 × 0.282 = 48 px; inset 8 px → lines start at 56 px
   y=40  → (40−35) × 0.282 = 1.4 px center → top: 1px
   y=120 → (120−35) × 0.282 = 24.0 px center → top: 23px */
@media (max-width: 768px) {
    .donors-hero {
        height: 360px;
        padding-top: 23px;
    }

    .donors-hero-ornament {
        width: 48px;
    }

    .donors-hero-ornament--left {
        left: 8px;
    }

    .donors-hero-ornament--right {
        right: 8px;
    }

    .donors-hero-line {
        left: 56px;
        right: 56px;
    }

    .donors-hero-line--mid {
        top: 23px;
    }

    .page-header-content {
        padding: 0 60px;
    }

    .page-header h1 {
        font-size: 3rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    .donor-section {
        padding: 1.25rem 5% 2.5rem;
    }

    .donor-section-inner {
        padding: 2rem 1.5rem;
    }

    .donor-section-title {
        font-size: 1.6rem;
    }

    .plaque-corner {
        width: 30px;
        height: 30px;
    }
}

/* ===========================
   CTA SECTION OVERRIDES
   Center the closing paragraph to match the centered donor-wall layout above.
   =========================== */
.comm-cta-section .comm-cta-text {
    text-align: center;
}

/* Small mobile: scale = min(32÷170, 300÷940) = min(0.188, 0.319) = 0.188 (width dominates)
   Content width = 170 × 0.188 = 32 px; inset 5 px → lines start at 37 px
   y=40  → (40−35) × 0.188 = 0.9 px center → top: 1px
   y=120 → (120−35) × 0.188 = 16.0 px center → top: 15px */
@media (max-width: 480px) {
    .donors-hero {
        height: 300px;
        padding-top: 15px;
    }

    .donors-hero-ornament {
        width: 32px;
    }

    .donors-hero-ornament--left {
        left: 5px;
    }

    .donors-hero-ornament--right {
        right: 5px;
    }

    .donors-hero-line {
        left: 37px;
        right: 37px;
    }

    .donors-hero-line--mid {
        top: 15px;
    }

    .page-header-content {
        padding: 0 45px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .donor-section-inner {
        padding: 1.5rem 1.25rem;
        border-radius: 4px;
    }

    .plaque-corner {
        width: 22px;
        height: 22px;
    }

    .donor-name {
        font-size: 1rem;
    }
}
