/* ===========================
   RESEARCH — MAGAZINE COVER STACK
=========================== */
.research-section {
    background: #F8FAFC;
    padding: 20px 0;
}

/* ===========================
   COVER GRID
=========================== */
.research-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===========================
   FLIP CARD BASE
=========================== */
.research-cover {
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
    /* Initial hidden state for scroll reveal */
    opacity: 0;
    transform: translateY(40px);
}

.research-cover__flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.research-cover:hover .research-cover__flipper {
    transform: rotateY(180deg);
}

/* ===========================
   FRONT FACE
=========================== */
.research-cover__front {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(28, 53, 87, 0.10);
    display: flex;
    flex-direction: column;
}

.research-cover__image {
    height: 61%;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

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

.research-cover:hover .research-cover__image img {
    transform: scale(1.05);
}

.research-cover__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color, #3C78B4) 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.research-cover__placeholder::after {
    content: 'SYCAC';
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.research-cover__stripe {
    height: 4px;
    background: var(--accent-color, #3C78B4);
    flex-shrink: 0;
}

.research-cover__info {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.research-cover__date {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.research-cover__title {
    font-size: 15px;
    font-weight: 700;
    color: #1D3557;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.research-cover__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color, #3C78B4);
    margin-top: auto;
}

/* ===========================
   BACK FACE
=========================== */
.research-cover__back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
    border-radius: 8px;
    overflow: hidden;
    background: var(--accent-color, #3C78B4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(28, 53, 87, 0.15);
}

.research-cover__back-content {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    justify-content: center;
}

.research-cover__back-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    align-self: flex-start;
    margin-top: 20px;
}

.research-cover__back-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.research-cover__excerpt {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.research-cover__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 18px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    align-self: flex-start;
    transition: all 0.2s ease;
    margin-top: auto;
    margin-bottom: 20px;
}

.research-cover__link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

.research-cover__link svg {
    stroke: #ffffff;
    fill: none;
    width: 14px;
    height: 14px;
}

/* ===========================
   RTL
=========================== */
[dir="rtl"] .research-cover:hover .research-cover__flipper {
    transform: rotateY(-180deg);
}

[dir="rtl"] .research-cover__back {
    transform: rotateY(-180deg);
}

[dir="rtl"] .research-cover__link svg {
    transform: scaleX(-1);
}

/* ===========================
   SCROLL REVEAL
=========================== */
@keyframes coverReveal {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.research-section.is-visible .research-cover:nth-child(1) {
    animation: coverReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}
.research-section.is-visible .research-cover:nth-child(2) {
    animation: coverReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
.research-section.is-visible .research-cover:nth-child(3) {
    animation: coverReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}
.research-section.is-visible .research-cover:nth-child(4) {
    animation: coverReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}
.research-section.is-visible .research-cover:nth-child(5) {
    animation: coverReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}
.research-section.is-visible .research-cover:nth-child(6) {
    animation: coverReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

/* ===========================
   RESPONSIVE — portrait (tablet/mobile)
=========================== */
@media (max-width: 1024px) and (orientation: portrait) {
    .research-covers {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 16px;
    }
    .research-cover {
        height: 320px;
    }
}

/* ===========================
   RESPONSIVE — landscape (tablet)
=========================== */
@media (max-width: 1024px) and (orientation: landscape) {
    .research-covers {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        padding: 0 20px;
    }
    .research-cover {
        height: 320px;
    }
}
