@font-face {
    font-family: 'Clash Grotesk';
    src: url('../assets/fonts/ClashGrotesk-Extralight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Clash Grotesk';
    src: url('../assets/fonts/ClashGrotesk-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Clash Grotesk';
    src: url('../assets/fonts/ClashGrotesk-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Clash Grotesk';
    src: url('../assets/fonts/ClashGrotesk-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Clash Grotesk';
    src: url('../assets/fonts/ClashGrotesk-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Clash Grotesk';
    src: url('../assets/fonts/ClashGrotesk-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Clash Grotesk Variable';
    src: url('../assets/fonts/ClashGrotesk-Variable.ttf') format('truetype');
    font-weight: 200 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --btn-accent: #002147;
    --btn-accent-contrast: #ffffff;
    --btn-accent-inverse: #ffffff;
    --btn-accent-inverse-contrast: #002147;
}

/* Clash Grotesk utilities */
.font-clash {
    font-family: 'Clash Grotesk', 'Inter', sans-serif;
}

.font-clash-extralight {
    font-family: 'Clash Grotesk', 'Inter', sans-serif;
    font-weight: 200;
}

.font-clash-light {
    font-family: 'Clash Grotesk', 'Inter', sans-serif;
    font-weight: 300;
}

.font-clash-regular {
    font-family: 'Clash Grotesk', 'Inter', sans-serif;
    font-weight: 400;
}

.font-clash-medium {
    font-family: 'Clash Grotesk', 'Inter', sans-serif;
    font-weight: 500;
}

.font-clash-semibold,
.clashgrotesk-semibold {
    font-family: 'Clash Grotesk', 'Inter', sans-serif;
    font-weight: 600;
}

.font-clash-bold {
    font-family: 'Clash Grotesk', 'Inter', sans-serif;
    font-weight: 700;
}

.font-clash-variable {
    font-family: 'Clash Grotesk Variable', 'Clash Grotesk', 'Inter', sans-serif;
}

body {
    font-family: 'Inter', sans-serif;
}

.link-underline-scope a {
    position: relative;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.4s ease, color 0.28s ease;
}

.link-underline-scope a:hover,
.link-underline-scope a:focus-visible {
    text-decoration: none;
    background-size: 100% 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-text {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Division Card Styles */
.division-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #f3f4f6;
    padding: 2rem;
    transition: all 0.3s ease;
}

.division-card:hover {
    border-color: var(--reviz-blue);
    box-shadow: 0 8px 15px -3px rgba(59, 130, 246, 0.2), 0 4px 6px -2px rgba(59, 130, 246, 0.1);
    transform: translateY(-5px);
}

.division-card:first-child:hover {
    border-color: var(--reviz-green);
    box-shadow: 0 8px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

.subdivision-card {
    transition: all 0.3s ease;
}

.subdivision-card.green-theme,
.subdivision-card[class*="from-revizGreen"] {
    background: linear-gradient(to right, #10b9811a, #3b82f61a);
}

.subdivision-card.blue-theme,
.subdivision-card[class*="from-revizBlue"] {
    background: linear-gradient(to right, #0c55ca1a, #10b9811a);
}

.article-card {
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gradient-bg {
    background: linear-gradient(135deg, #F0F9FF 0%, #FFFFFF 100%);
}

.highlight-bg {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
}

@media (max-width: 767px) {
    .logo {
        max-width: 150px !important;
    }
}

/* Hero featured carousel */
.hero-carousel {
    position: relative;
}

.hero-carousel__viewport {
    overflow: hidden;
    border-radius: 0.75rem;
    outline: none;
    touch-action: pan-y;
    cursor: grab;
    position: relative;
}

.hero-carousel.is-dragging .hero-carousel__viewport {
    cursor: grabbing;
}

.hero-carousel__track {
    display: flex;
    transition: transform 0.6s ease;
    will-change: transform;
}

.hero-carousel__track.is-jumping {
    transition: none;
}

.hero-carousel.is-dragging .hero-carousel__track {
    transition: none;
}

.hero-carousel__slide {
    flex: 0 0 100%;
}

.hero-carousel__arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 3.25rem;
    border: none;
    background: transparent;
    color: rgba(15, 23, 42, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    opacity: 0.75;
    overflow: hidden;
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.hero-carousel__arrow::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.hero-carousel__arrow i {
    position: relative;
    z-index: 1;
}

.hero-carousel__arrow:hover {
    opacity: 1;
    color: rgba(15, 23, 42, 0.95);
}

.hero-carousel__arrow:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

.hero-carousel__arrow--prev {
    left: 0;
    border-radius: 0.75rem 0 0 0.75rem;
}

.hero-carousel__arrow--next {
    right: 0;
    border-radius: 0 0.75rem 0.75rem 0;
}

.hero-carousel__arrow--prev::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0));
}

.hero-carousel__arrow--next::before {
    background: linear-gradient(270deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0));
}

.hero-carousel__arrow:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-carousel__arrow {
        width: 2.75rem;
    }

    .hero-carousel__arrow--prev {
        left: 0;
    }

    .hero-carousel__arrow--next {
        right: 0;
    }

}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel__track {
        transition: none;
    }

    .page-home .underline-swipe {
        transition: none;
    }
}

/* Compact homepage layout */
.page-home {
    --home-card-radius: 4px;
    --home-hero-small-media-height: clamp(110px, 18vw, 150px);
}

.news-and-comment-section {
    --news-card-radius: 4px;
    --news-featured-min-height: clamp(320px, 36vw, 440px);
    --news-small-media-height: clamp(140px, 18vw, 180px);
}

.page-home .home-hero-section {
    padding-top: 0;
    padding-bottom: clamp(1.5rem, 2.4vw, 2.5rem);
}

.page-home .home-hero__layout {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-inline: clamp(1rem, 3vw, 2.25rem);
}

@media (min-width: 1024px) {
    .page-home .home-hero__layout {
        padding-inline: 0;
    }
}

.page-home .hero-carousel__viewport,
.page-home .hero-featured__card,
.page-home .hero-featured__image {
    border-radius: 0;
}

.page-home .hero-small__card {
    border-radius: var(--home-card-radius, 6px);
    overflow: hidden;
}

.page-home .underline-swipe {
    display: inline;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 0.12em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition: background-size 0.5s ease;
}

.page-home .group:hover .underline-swipe,
.page-home .underline-swipe:hover,
.page-home .underline-swipe:focus-visible {
    background-size: 100% 2px;
}

.page-home #hero-featured {
    margin-bottom: clamp(0.75rem, 1.6vw, 1.25rem);
}

@media (max-width: 767px) {
    .page-home #hero-featured {
        margin-inline: calc(-1 * clamp(1rem, 3vw, 2.25rem));
    }
}

.page-home .hero-featured__image {
    height: clamp(220px, 30vw, 340px);
}

@media (max-width: 767px) {
    .page-home .hero-carousel__viewport,
    .page-home .hero-featured__card,
    .page-home .hero-featured__card > .relative,
    .page-home .hero-featured__image {
        height: 400px;
    }
}

.page-home .hero-featured__overlay {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.page-home .hero-featured__meta {
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    margin-bottom: clamp(0.35rem, 0.8vw, 0.6rem);
}

.page-home .hero-featured__title {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    margin-bottom: clamp(0.35rem, 0.8vw, 0.6rem);
}

.page-home .hero-featured__description {
    font-size: clamp(0.85rem, 1.3vw, 1rem);
}

.page-home #hero-grid {
    gap: clamp(0.5rem, 1.4vw, 1.25rem);
}

.page-home .hero-small__image {
    height: var(--home-hero-small-media-height);
}

.page-home .hero-small__body {
    padding: clamp(0.65rem, 1.4vw, 0.9rem);
}

.page-home .hero-small__title {
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    margin-bottom: clamp(0.3rem, 0.7vw, 0.5rem);
}

.page-home .hero-small__description {
    font-size: clamp(0.75rem, 1.1vw, 0.9rem);
}

.page-home .hero-small__meta {
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    margin-top: clamp(0.45rem, 1vw, 0.6rem);
    padding-top: clamp(0.45rem, 1vw, 0.6rem);
}

.news-and-comment-section .news-card {
    border-radius: var(--news-card-radius, 12px);
    overflow: hidden;
}

.news-and-comment-section .news-card--featured {
    display: grid;
    grid-template-rows: 3fr 2fr;
    min-height: var(--news-featured-min-height, 320px);
}

.news-and-comment-section .news-card--featured .news-card__media,
.news-and-comment-section .news-card--featured .news-card__body {
    min-height: 0;
}

.news-and-comment-section .news-card--small {
    display: flex;
    flex-direction: column;
}

.news-and-comment-section .news-card__media {
    overflow: hidden;
}

.news-and-comment-section .news-card--small .news-card__media {
    height: var(--news-small-media-height, 140px);
}

.news-and-comment-section .news-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .page-home #hero-grid,
    .page-home #small-articles-grid {
        gap: 0;
    }

    .page-home .hero-small__card,
    .news-and-comment-section .news-card--small {
        flex-direction: row-reverse;
        align-items: flex-start;
        border-radius: 4px;
        border-bottom: 0px solid #e5e7eb;
        box-shadow: none;
        min-height: auto;
    }

    .page-home .hero-small__card {
        height: auto;
    }

    .page-home .hero-small__card > a,
    .news-and-comment-section .news-card--small .news-card__media {
        width: 110px !important;
        min-width: 110px;
        max-width: 110px;
        height: 110px !important;
        flex-shrink: 0;
        margin: 0.75rem 0 0.75rem 0.5rem;
        border-radius: 2px;
        overflow: hidden;
    }

    .page-home .hero-small__image,
    .news-and-comment-section .news-card--small .news-card__image {
        width: 100%;
        height: 100% !important;
        object-fit: cover;
        border-radius: 0px;
    }

    .page-home .hero-small__body,
    .news-and-comment-section .news-card--small .news-card__body {
        flex: 1;
        min-width: 0;
        padding: 0.75rem 0.75rem 0.75rem 1rem !important;
    }

    .page-home .hero-small__title,
    .news-and-comment-section .news-card--small .news-card__title {
        font-size: 0.95rem !important;
        line-height: 1.3;
        margin-bottom: 0.35rem !important;
        font-weight: 500;
        color: #1a1a1a;
    }


    .page-home .hero-small__meta,
    .news-and-comment-section .news-card--small .news-card__meta {
        font-size: 0.75rem;
        gap: 0.25rem;
        margin-top: 0.3rem;
        padding-top: 0.3rem;
        color: #666;
    }
}

.page-home .container.my-12 {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.page-home #next-issue-bar {
    padding-top: clamp(0.5rem, 1.2vw, 0.75rem);
    padding-bottom: clamp(0.5rem, 1.2vw, 0.75rem);
}

.page-home #next-issue-bar h2 {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.page-home #next-issue-bar p {
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    margin-top: clamp(0.3rem, 0.8vw, 0.5rem);
}

.current-issue-section.current-issue--dark {
    --current-issue-bg: #070707;
    --btn-accent: #ffffff;
    --btn-accent-contrast: var(--current-issue-bg);
    background-color: var(--current-issue-bg);
    color: #e2e8f0;
}

.current-issue-section.current-issue--dark h2,
.current-issue-section.current-issue--dark h3 {
    color: #f8fafc;
}

.current-issue-section.current-issue--dark a {
    color: inherit;
}

.current-issue-section.current-issue--dark .current-issue__contents-btn {
    --btn-accent: var(--current-issue-bg);
    --btn-accent-contrast: #ffffff;
    background-color: transparent;
    color: var(--current-issue-bg);
    border-color: #ffffff;
}

.current-issue-section.current-issue--dark .current-issue__contents-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    z-index: -2;
}

.current-issue-section.current-issue--dark .current-issue__contents-btn:hover,
.current-issue-section.current-issue--dark .current-issue__contents-btn:focus-visible {
    color: var(--btn-accent-contrast);
}

.page-home .current-issue-section,
.page-home .news-and-comment-section {
    padding-top: clamp(1.75rem, 3vw, 2.75rem);
    padding-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.page-home .current-issue-section .mb-8,
.page-home .news-and-comment-section .mb-8 {
    margin-bottom: clamp(0.75rem, 1.6vw, 1.5rem);
}

.page-home #current-issue-grid {
    gap: clamp(1rem, 2.2vw, 1.75rem);
}

.page-home #news-comment-grid {
    gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.page-home #small-articles-grid {
    gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

/* Mega menu navigation */
.nav-dropdown {
    position: static;
}

.nav-dropdown-trigger:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: translateY(0);
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 60;
}

.nav-dropdown:hover .mega-menu,
.nav-dropdown:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(200px, 0.9fr);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mega-menu-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: #6b7280;
    margin: 0;
}

.mega-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mega-menu-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    color: #111827;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mega-menu-link:hover,
.mega-menu-link:focus-visible {
    background-color: #f3f4f6;
    color: #0f172a;
    transform: translateX(2px);
    outline: none;
}

.mega-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e5e7eb;
    color: #0f172a;
}

.mega-menu-icon--journal {
    background: #e0f2fe;
    color: #0c4a6e;
}

.mega-menu-icon--content {
    background: #ede9fe;
    color: #4c1d95;
}

.mega-menu-icon--guidelines {
    background: #dcfce7;
    color: #166534;
}

.mega-menu-icon--reviewers {
    background: #fee2e2;
    color: #991b1b;
}

.mega-menu-icon--editors {
    background: #ffedd5;
    color: #9a3412;
}

.mega-menu-cta {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: flex-start;
}

.mega-menu-cta .mega-menu-heading {
    margin: 0;
    font-size: 0.8rem;
}

.mega-menu-cta .cta-button {
    margin: 0;
}

@media (max-width: 1024px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mega-menu-cta {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .mega-menu-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mega-menu,
    .mega-menu-link {
        transition: none;
    }
}
