/**
 * President's Circle Widget
 *
 * @package TAMUK_Foundation
 */

/* -------------------------------------------------------
 * Layout wrapper
 * ----------------------------------------------------- */
.tamuk-pc {
    font-family: inherit;
    color: #1a1a2e;
    line-height: 1.6;
}

/* Seal image fade-in */
@media (prefers-reduced-motion: no-preference) {
    .tamuk-pc-seal img {
        opacity: 0;
        transition: opacity 0.5s ease-in;
    }

    .tamuk-pc-seal img.tamuk-pc-loaded {
        opacity: 1;
    }
}

/* -------------------------------------------------------
 * Section headers (reused)
 * ----------------------------------------------------- */
.tamuk-pc-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tamuk-pc-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #003399;
    margin: 0;
    position: relative;
    display: inline-block;
}

.tamuk-pc-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #FCC10F;
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* -------------------------------------------------------
 * Hero
 * ----------------------------------------------------- */
.tamuk-pc-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #003399;
}

.tamuk-pc-hero-carousel {
    position: absolute;
    inset: 0;
}

.tamuk-pc-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.tamuk-pc-hero-slide--active {
    opacity: 1;
}

.tamuk-pc-hero-slide-img,
.tamuk-pc-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.tamuk-pc-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 153, 0.7);
}

/* Hero content entrance animations */
@keyframes tamuk-pc-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tamuk-pc-seal-in {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tamuk-pc-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 700px;
}

.tamuk-pc-seal {
    margin: 0 auto 1.5rem;
    max-width: 200px;
    animation: tamuk-pc-seal-in 0.8s ease-out 0.2s both;
}

.tamuk-pc-seal img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.tamuk-pc-hero-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: tamuk-pc-fade-up 0.6s ease-out 0.5s both;
}

.tamuk-pc-hero-intro {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2rem;
    line-height: 1.7;
    animation: tamuk-pc-fade-up 0.6s ease-out 0.7s both;
}

.tamuk-pc-hero-cta {
    display: inline-flex;
    align-items: center;
    animation: tamuk-pc-fade-up 0.6s ease-out 0.9s both;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #FCC10F;
    color: #003399;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, transform 0.2s;
}

.tamuk-pc-hero-cta:hover,
.tamuk-pc-hero-cta:focus {
    background: #e5ad00;
    transform: translateY(-1px);
    color: #003399;
    text-decoration: none;
}

/* -------------------------------------------------------
 * Mission Copy
 * ----------------------------------------------------- */
.tamuk-pc-copy {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.tamuk-pc-copy p {
    margin-bottom: 1.25rem;
}

/* -------------------------------------------------------
 * Courtesies
 * ----------------------------------------------------- */
.tamuk-pc-courtesies {
    max-width: 900px;
    margin: 2rem auto 3rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #fafbfd 0%, #f5f3ee 100%);
    border-radius: 12px;
    border: 1px solid #e8e5de;
}

.tamuk-pc-courtesies-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.tamuk-pc-courtesies-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eeece6;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tamuk-pc-courtesies-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.tamuk-pc-courtesies-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FCC10F 0%, #D4A843 100%);
    color: #fff;
    border-radius: 50%;
    margin-top: 0;
}

.tamuk-pc-courtesies-icon svg {
    width: 16px;
    height: 16px;
}

.tamuk-pc-courtesies-icon i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .tamuk-pc-courtesies {
        padding: 1.5rem 1.25rem;
    }

    .tamuk-pc-courtesies-list {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------
 * Giving Tiers
 * ----------------------------------------------------- */
.tamuk-pc-tiers {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.tamuk-pc-tiers-intro {
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.tamuk-pc-tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: end;
}

.tamuk-pc-tier-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tamuk-pc-tier-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.tamuk-pc-tier-card--top {
    padding: 2.5rem 1.5rem;
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tamuk-pc-tier-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--tier-color);
    background: linear-gradient(135deg, var(--tier-color), color-mix(in srgb, var(--tier-color) 60%, white));
}

.tamuk-pc-tier-card--top .tamuk-pc-tier-accent {
    height: 6px;
}

.tamuk-pc-tier-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #003399;
    margin: 0.5rem 0 0.25rem;
}

.tamuk-pc-tier-card--top .tamuk-pc-tier-name {
    font-size: 1.5rem;
}

.tamuk-pc-tier-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.tamuk-pc-tier-card--top .tamuk-pc-tier-amount {
    font-size: 1.75rem;
}

/* -------------------------------------------------------
 * Image Gallery
 * ----------------------------------------------------- */
.tamuk-pc-gallery {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Gallery grid — clean 3-column, uniform cells, no gaps */
.tamuk-pc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.tamuk-pc-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    background: #f0f0f0;
    aspect-ratio: 4 / 3;
}

/* Pulsing seal placeholder behind each image while loading */
@keyframes tamuk-pc-pulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.3; }
}

.tamuk-pc-gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('https://dev.javelinagiving.org/wp-content/uploads/2026/04/TAMUK-Seal-Gold-Only.png') center center / 40% no-repeat;
    opacity: 0.15;
    filter: saturate(0) brightness(0.4);
    animation: tamuk-pc-pulse 2s ease-in-out infinite;
}

/* Hide placeholder once image loads */
.tamuk-pc-gallery-item.tamuk-pc-img-ready::before {
    display: none;
}

.tamuk-pc-gallery-img,
.tamuk-pc-gallery-item img {
    position: relative;
    z-index: 1;
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.3s ease;
}

.tamuk-pc-gallery-item.tamuk-pc-img-ready img {
    opacity: 1;
}

.tamuk-pc-gallery-item:hover img {
    transform: scale(1.03);
}

.tamuk-pc-gallery-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* -------------------------------------------------------
 * Donation Form
 * ----------------------------------------------------- */
.tamuk-pc-form {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
    scroll-margin-top: 2rem;
}

.tamuk-pc-form-seal {
    max-width: 100px;
    margin: 0 auto 1rem;
}

.tamuk-pc-form-seal img {
    width: 100%;
    height: auto;
}

.tamuk-pc-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    margin: 1rem auto;
    padding: 1rem 2.5rem;
    background: #FCC10F;
    color: #003399;
    font-weight: 700;
    font-size: 1.125rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.tamuk-pc-donate-btn:hover,
.tamuk-pc-donate-btn:focus {
    background: #e5ad00;
    transform: translateY(-1px);
}

.tamuk-pc-form {
    text-align: center;
}

.tamuk-pc-form-placeholder {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
}

.tamuk-pc-contact {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 1.5rem;
}

/* -------------------------------------------------------
 * Elementor Lightbox — suppress the built-in zoomIn
 * flicker and replace with a clean fade.
 * ----------------------------------------------------- */

/* Kill Elementor's built-in zoomIn animation that causes the flicker */
.elementor-lightbox .dialog-lightbox-message.zoomIn {
    animation: none !important;
}

/* Replace with a smooth fade on the content wrapper */
.elementor-lightbox .dialog-lightbox-widget-content {
    animation: tamuk-pc-lb-fade 0.25s ease-out both;
}

@keyframes tamuk-pc-lb-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Don't let the Blackbaud observer mess with the lightbox */
.elementor-lightbox.tamuk-bb-animate-backdrop {
    animation: none !important;
}

/* -------------------------------------------------------
 * Responsive
 * ----------------------------------------------------- */
@media (max-width: 768px) {
    .tamuk-pc-hero {
        min-height: 400px;
    }

    .tamuk-pc-hero-heading {
        font-size: 1.75rem;
    }

    .tamuk-pc-seal {
        max-width: 150px;
    }

    .tamuk-pc-tiers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tamuk-pc-tier-card--top {
        order: -1;
    }

    .tamuk-pc-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tamuk-pc-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------
 * Scroll-reveal animations
 * Only applies when JS adds .tamuk-pc-js to the wrapper,
 * so content stays visible if JS fails to load.
 * ----------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .tamuk-pc-js .tamuk-pc-copy,
    .tamuk-pc-js .tamuk-pc-courtesies,
    .tamuk-pc-js .tamuk-pc-tiers,
    .tamuk-pc-js .tamuk-pc-gallery,
    .tamuk-pc-js .tamuk-pc-form {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .tamuk-pc-js .tamuk-pc-visible {
        opacity: 1;
        transform: translateY(0);
    }
}
