/* ===== CUSTOM CSS FOR E-JOURNAL UNIRU ===== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #084D36;      /* Hijau */
    --secondary-color: #0a5d42;    /* Hijau lebih terang */
    --accent-color: #CC9933;       /* Coklat */
    --success-color: #084D36;      /* Hijau */
    --warning-color: #CC9933;      /* Coklat */
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #FFFF99;        /* Cream */
    --text-dark: #374151;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition-fast: all 0.3s ease;
    --transition-medium: all 0.5s ease;
    --border-radius: 0.75rem;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===== NAVIGATION FIXES FOR MOBILE ===== */
.navbar {
    background: rgba(8, 77, 54, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-light);
    padding: 0.5rem 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.navbar .container,
.navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    width: 100%;
}

.navbar-brand {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition-fast);
    padding: 0.5rem 1rem;
    color: white;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* ===== MOBILE NAVIGATION FIXES ===== */
@media (max-width: 991px) {
    .navbar {
        padding: 0.3rem 0;
    }
    
    .navbar .container,
    .navbar .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        width: 100%;
        max-width: 100%;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
        max-width: 70%;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
        background: transparent;
        color: white;
        width: auto;
        height: auto;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(204, 153, 51, 0.5);
        outline: none;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        width: 1.5em;
        height: 1.5em;
    }
    
    .navbar-collapse {
        background: rgba(8, 77, 54, 0.98);
        margin-top: 0.5rem;
        border-radius: var(--border-radius);
        padding: 1rem;
        box-shadow: var(--shadow-medium);
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .navbar-nav {
        text-align: center;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        border-radius: calc(var(--border-radius) * 0.5);
        transition: var(--transition-fast);
        display: block;
        width: 100%;
        color: white;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
}

/* ===== TABLET NAVIGATION ===== */
@media (max-width: 767px) {
    .navbar {
        padding: 0.25rem 0;
    }
    
    .navbar .container,
    .navbar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        max-width: 65%;
    }
    
    .navbar-toggler {
        padding: 0.2rem 0.4rem;
        font-size: 0.9rem;
    }
    
    .navbar-toggler-icon {
        width: 1.3em;
        height: 1.3em;
    }
    
    .navbar-collapse {
        margin-top: 0.3rem;
        padding: 0.75rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 0.8rem;
        margin: 0.2rem 0;
        font-size: 0.95rem;
    }
}

/* ===== MOBILE NAVIGATION ===== */
@media (max-width: 575px) {
    .navbar {
        padding: 0.2rem 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        width: 100vw;
        max-width: 100vw;
    }
    
    .navbar .container,
    .navbar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .navbar-brand {
        font-size: 1rem;
        max-width: 60%;
        padding: 0.3rem 0;
    }
    
    .navbar-toggler {
        padding: 0.15rem 0.3rem;
        font-size: 0.8rem;
        margin-left: auto;
    }
    
    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
    }
    
    .navbar-collapse {
        background: rgba(8, 77, 54, 0.98);
        margin-top: 0.25rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: 0.5rem;
        box-shadow: var(--shadow-medium);
        width: calc(100% + 1rem);
        max-width: calc(100% + 1rem);
    }
    
    .navbar-nav {
        text-align: left;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        margin: 0.1rem 0;
        border-radius: calc(var(--border-radius) * 0.4);
        font-size: 0.9rem;
        display: block;
        width: 100%;
        text-align: left;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }
    
    /* Adjust body padding for fixed navbar */
    body {
        padding-top: 60px;
    }
}

/* ===== EXTRA SMALL MOBILE ===== */
@media (max-width: 480px) {
    .navbar {
        padding: 0.15rem 0;
    }
    
    .navbar .container,
    .navbar .container-fluid {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }
    
    .navbar-brand {
        font-size: 0.95rem;
        max-width: 55%;
    }
    
    .navbar-toggler {
        padding: 0.1rem 0.25rem;
    }
    
    .navbar-toggler-icon {
        width: 1.1em;
        height: 1.1em;
    }
    
    .navbar-collapse {
        margin-left: -0.4rem;
        margin-right: -0.4rem;
        padding: 0.4rem;
        width: calc(100% + 0.8rem);
        max-width: calc(100% + 0.8rem);
    }
    
    .navbar-nav .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    body {
        padding-top: 55px;
    }
}

/* ===== VERY SMALL MOBILE ===== */
@media (max-width: 360px) {
    .navbar-brand {
        font-size: 0.9rem;
        max-width: 50%;
    }
    
    .navbar-toggler {
        padding: 0.1rem 0.2rem;
    }
    
    .navbar-toggler-icon {
        width: 1em;
        height: 1em;
    }
    
    .navbar-nav .nav-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }
    
    body {
        padding-top: 50px;
    }
}

/* ===== LANDSCAPE MOBILE FIXES ===== */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 767px) {
    .navbar {
        padding: 0.1rem 0;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
        padding: 0.2rem 0;
    }
    
    .navbar-toggler {
        padding: 0.1rem 0.2rem;
    }
    
    .navbar-collapse {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-nav .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
    
    body {
        padding-top: 45px;
    }
}

/* ===== NAVBAR ANIMATION FIXES ===== */
@media (max-width: 991px) {
    .navbar-collapse.collapsing {
        transition: height 0.35s ease;
        overflow: hidden;
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    .navbar-collapse.collapse:not(.show) {
        display: none;
    }
}

/* ===== PREVENT HORIZONTAL SCROLL ===== */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .navbar,
    .navbar *,
    .navbar .container,
    .navbar .container-fluid {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* ===== NAVBAR ACCESSIBILITY FIXES ===== */
@media (max-width: 767px) {
    .navbar-toggler:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }
    
    .navbar-nav .nav-link:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: -2px;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* ===== SAFE AREA SUPPORT FOR NAVBAR ===== */
@supports (padding: max(0px)) {
    @media (max-width: 767px) {
        .navbar .container,
        .navbar .container-fluid {
            padding-left: max(0.5rem, env(safe-area-inset-left));
            padding-right: max(0.5rem, env(safe-area-inset-right));
        }
        
        .navbar {
            padding-top: max(0.2rem, env(safe-area-inset-top));
        }
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-image: url('../img/image3.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    padding: clamp(80px, 12vh, 120px) 0 clamp(40px, 6vh, 80px);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 77, 54, 0.8);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
}

.hero-section h1 {
    font-size: clamp(1.8rem, 6vw, 4.5rem);
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
    margin-bottom: clamp(1rem, 3vh, 2rem);
    line-height: 1.2;
    color: white;
}

.hero-section .lead {
    font-size: clamp(1rem, 3vw, 1.4rem);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.3s both;
    margin-bottom: clamp(2rem, 5vh, 3rem);
    color: white;
    max-width: 600px;
    text-align: center !important; /* tambahkan baris ini */
    margin-left: auto;              /* untuk pastikan di tengah */
    margin-right: auto;             /* kalau pakai max-width */
    display: block;                 /* pastikan berlaku di blok teks */
}


/* Hero Buttons Container */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    justify-content: flex-start;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Hero Button Styles */
.hero-section .btn {
    font-weight: 600;
    border-radius: 50px;
    padding: clamp(0.75rem, 2.5vw, 1rem) clamp(2rem, 5vw, 3rem);
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    font-size: clamp(0.85rem, 2.2vw, 1.1rem);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    min-width: 160px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.hero-section .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid transparent;
}

.hero-section .btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: white;
}

.hero-section .btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.hero-section .btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.hero-section .btn-warning {
    background: linear-gradient(45deg, var(--accent-color), #b8851f);
    color: white;
    border: 2px solid transparent;
}

.hero-section .btn-warning:hover {
    background: linear-gradient(45deg, #b8851f, var(--accent-color));
    color: white;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: clamp(2rem, 5vh, 3rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator a {
    color: white;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-decoration: none;
    animation: bounce 2s infinite;
    display: inline-block;
    padding: 1rem;
    transition: var(--transition-fast);
}

.scroll-indicator a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===== HERO SECTION RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .hero-section {
        text-align: left;
        padding: 120px 0 80px;
    }
    
    .hero-buttons {
        justify-content: flex-start;
        gap: 2rem;
    }
    
    .hero-section .btn {
        flex: 0 0 auto;
        min-width: 180px;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-section {
        text-align: left;
        padding: 100px 0 60px;
    }
    
    .hero-buttons {
        justify-content: flex-start;
        gap: 1.5rem;
    }
    
    .hero-section .btn {
        flex: 0 0 auto;
        min-width: 160px;
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-section {
        text-align: center;
        background-attachment: scroll;
        padding: 100px 0 60px;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1.25rem;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-section .btn {
        flex: 0 1 auto;
        min-width: 140px;
        max-width: 220px;
    }
}

/* Small Tablet (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-section {
        text-align: center;
        background-attachment: scroll;
        padding: 90px 0 50px;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
        flex-direction: row;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .hero-section .btn {
        flex: 1 1 auto;
        min-width: 120px;
        max-width: 200px;
        font-size: 0.9rem;
        padding: 0.7rem 1.5rem;
        min-height: 48px;
    }
}

/* ===== HERO SECTION MOBILE TEXT SPACING FIX ===== */

/* Mobile (320px - 575px) */
@media (max-width: 575px) {
    .hero-section {
        text-align: center;
        background-attachment: scroll;
        padding: clamp(70px, 10vh, 90px) 0 clamp(40px, 6vh, 60px);
        min-height: 75vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 60vh;
    }
    
    .hero-section h1 {
        margin-top: 0;
        margin-bottom: clamp(0.8rem, 2vh, 1.2rem);
    }
    
    .hero-section .lead {
        margin-bottom: clamp(1.2rem, 3vh, 2rem);
        max-width: 90%;
    }
    
    .hero-buttons {
        margin-top: clamp(1rem, 2vh, 1.5rem);
    }
}

/* Extra Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    .hero-section {
        padding: clamp(60px, 8vh, 80px) 0 clamp(30px, 4vh, 50px);
        min-height: 70vh;
    }
    
    .hero-section .container {
        min-height: 55vh;
        justify-content: center;
    }
    
    .hero-section h1 {
        margin-bottom: clamp(0.6rem, 1.5vh, 1rem);
    }
    
    .hero-section .lead {
        margin-bottom: clamp(1rem, 2.5vh, 1.5rem);
        max-width: 95%;
    }
    
    .hero-buttons {
        margin-top: clamp(0.8rem, 1.5vh, 1.2rem);
    }
}

/* Very Small Mobile (320px - 360px) */
@media (max-width: 360px) {
    .hero-section {
        padding: clamp(55px, 7vh, 75px) 0 clamp(25px, 3vh, 45px);
        min-height: 65vh;
    }
    
    .hero-section .container {
        min-height: 50vh;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-section h1 {
        margin-bottom: clamp(0.5rem, 1vh, 0.8rem);
    }
    
    .hero-section .lead {
        margin-bottom: clamp(0.8rem, 2vh, 1.2rem);
    }
    
    .hero-buttons {
        margin-top: clamp(0.6rem, 1vh, 1rem);
    }
}

/* Landscape Mobile Fix */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 767px) {
    .hero-section {
        padding: clamp(50px, 6vh, 70px) 0 clamp(20px, 3vh, 40px);
        min-height: 95vh;
        align-items: center;
        justify-content: center;
    }
    
    .hero-section .container {
        min-height: auto;
        justify-content: center;
    }
    
    .hero-section h1 {
        margin-bottom: 0.5rem;
    }
    
    .hero-section .lead {
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        margin-top: 0.8rem;
    }
}

/* Fix untuk perangkat dengan navbar fixed */
@media (max-width: 575px) {
    body.has-fixed-navbar .hero-section {
        padding-top: clamp(80px, 12vh, 100px);
    }
    
    body.has-fixed-navbar .hero-section .container {
        padding-top: 0;
    }
}

/* Tambahan untuk iPhone SE dan perangkat kecil */
@media (max-width: 375px) and (max-height: 667px) {
    .hero-section {
        min-height: 60vh;
        padding: clamp(50px, 6vh, 70px) 0 clamp(20px, 3vh, 40px);
    }
    
    .hero-section .container {
        min-height: 45vh;
    }
}

/* Fix untuk perangkat sangat kecil */
@media (max-width: 320px) and (max-height: 568px) {
    .hero-section {
        min-height: 55vh;
        padding: clamp(45px, 5vh, 65px) 0 clamp(15px, 2vh, 35px);
    }
    
    .hero-section .container {
        min-height: 40vh;
    }
    
    .hero-section h1 {
        margin-bottom: 0.4rem;
    }
    
    .hero-section .lead {
        margin-bottom: 0.6rem;
    }
    
    .hero-buttons {
        margin-top: 0.5rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 767px) {
    .hero-section {
        min-height: 100vh;
        padding: clamp(60px, 10vh, 80px) 0 clamp(30px, 5vh, 50px);
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: clamp(0.9rem, 2.5vw, 1.2rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero-section .btn {
        flex: 0 1 auto;
        min-width: 120px;
        max-width: 180px;
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
        min-height: 44px;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ===== HERO SECTION ACCESSIBILITY ===== */
@media (max-width: 767px) {
    .hero-section .btn:focus {
        outline: 3px solid var(--accent-color);
        outline-offset: 3px;
    }
    
    .hero-section .btn:active {
        transform: scale(0.98);
    }
}

/* ===== HERO SECTION TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .hero-section .btn:hover {
        transform: none;
    }
    
    .hero-section .btn:active {
        transform: scale(0.96);
        transition: transform 0.1s ease;
    }
    
    .scroll-indicator a:hover {
        transform: none;
    }
    
    .scroll-indicator a:active {
        transform: scale(0.9);
    }
}

/* ===== HERO SECTION REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-section h1,
    .hero-section .lead,
    .hero-buttons {
        animation: none;
    }
    
    .scroll-indicator a {
        animation: none;
    }
    
    .hero-section .btn:hover {
        transform: none;
    }
}

/* ===== STATISTICS SECTION ===== */
.stat-item {
    padding: clamp(1rem, 3vw, 2rem) clamp(0.5rem, 2vw, 1rem);
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    background: white;
    box-shadow: var(--shadow-light);
    height: 100%;
    margin-bottom: 1rem;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.counter {
    font-size: clamp(1.3rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--primary-color);
}

/* ===== JOURNAL CARDS ===== */
.journal-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.journal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.journal-card-inner {
    position: relative;
    height: clamp(240px, 40vw, 350px);
    overflow: hidden;
}

.journal-cover {
    width: 100%;
    height: clamp(180px, 25vw, 250px);
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.journal-card:hover .journal-cover {
    transform: scale(1.1);
}

.journal-info {
    background-color: #084D36;
    color: #fff;
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Reset margin bawaan dari elemen di dalam info */
.journal-info * {
    margin: 0;
}

.journal-card:hover .journal-info {
    transform: translateY(0);
}

.journal-title {
    font-size: clamp(0.75rem, 2vw, 1rem);
    font-weight: 700;
    margin: 0;
    color: #fff !important;
    line-height: 1.3;
}

.journal-meta {
    font-size: clamp(0.65rem, 1.5vw, 0.8rem);
    color: #ddd;
    margin-top: 0.3rem;
}

.sinta-badge {
    position: absolute;
    top: clamp(8px, 2vw, 15px);
    right: clamp(8px, 2vw, 15px);
    background: var(--success-color);
    color: white;
    padding: clamp(0.15rem, 0.5vw, 0.3rem) clamp(0.5rem, 1.5vw, 0.8rem);
    border-radius: 50px;
    font-size: clamp(0.65rem, 1.5vw, 0.8rem);
    font-weight: 600;
    transform: scale(0);
    transition: var(--transition-fast);
    z-index: 10;
}

.journal-card:hover .sinta-badge {
    transform: scale(1);
}

.progress-badge {
    background: var(--warning-color);
}

.journal-flip {
    position: relative;
    perspective: 1000px;
    height: clamp(240px, 40vw, 350px);
}

.journal-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.journal-card:hover .journal-flip-inner {
    transform: rotateY(180deg);
}

.journal-flip-front,
.journal-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.journal-flip-back {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: clamp(1rem, 4vw, 2rem);
}

/* ===== DETAIL SECTION ===== */
#journalDetail {
    animation: slideDown 0.5s ease-out;
    padding: clamp(20px, 8vh, 60px) 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    font-size: clamp(0.75rem, 2vw, 1rem);
}

.detail-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: clamp(0.5rem, 2vw, 1rem);
    border: none;
}

.detail-table td {
    padding: clamp(0.5rem, 2vw, 1rem);
    border-color: var(--border-color);
    vertical-align: middle;
}

.detail-table tr:hover {
    background: var(--light-color);
}

.status-badge {
    padding: clamp(0.2rem, 1vw, 0.3rem) clamp(0.5rem, 2vw, 0.8rem);
    border-radius: 50px;
    font-size: clamp(0.65rem, 1.5vw, 0.8rem);
    font-weight: 600;
}

.status-installed {
    background: rgba(8, 77, 54, 0.1);
    color: var(--success-color);
}

.status-moved {
    background: rgba(204, 153, 51, 0.1);
    color: var(--warning-color);
}

/* ===== ABOUT SECTION ===== */
#about {
    background: linear-gradient(45deg, #FFFF99 0%, #ffffcc 100%);
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 600;
    border-radius: 50px;
    padding: clamp(0.4rem, 2vw, 0.75rem) clamp(1rem, 4vw, 2rem);
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    font-size: clamp(0.75rem, 2vw, 1rem);
    margin-bottom: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-warning {
    background: linear-gradient(45deg, var(--accent-color), #b8851f);
    color: white;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* ===== BACK TO TOP BUTTON ===== */
.btn-floating {
    position: fixed;
    bottom: clamp(1rem, 3vw, 2rem);
    right: clamp(1rem, 3vw, 2rem);
    width: clamp(35px, 8vw, 50px);
    height: clamp(35px, 8vw, 50px);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-fast);
    background: var(--primary-color);
    color: white;
}

.btn-floating:hover {
    transform: translateY(-3px) scale(1.1);
    background: var(--secondary-color);
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Extra Small Devices (320px - 575px) */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .journal-card {
        margin-bottom: 1rem;
    }
    
    .journal-card-inner {
        height: clamp(220px, 35vw, 260px);
    }
    
    .journal-flip {
        height: clamp(220px, 35vw, 260px);
    }
    
    .journal-cover {
        height: clamp(120px, 20vw, 160px);
    }
    
    .journal-info {
        transform: translateY(0);
        position: relative;
        background-color: #084D36;
    }
    
    .journal-card:hover .journal-info {
        transform: translateY(0);
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
}

/* Small Devices (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    html {
        font-size: 15px;
    }
    
    .journal-card-inner {
        height: clamp(260px, 38vw, 300px);
    }
    
    .journal-flip {
        height: clamp(260px, 38vw, 300px);
    }
    
    .journal-cover {
        height: clamp(160px, 23vw, 200px);
    }
    
    .btn {
        width: auto;
        min-width: 120px;
    }
}

/* Medium Devices (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    html {
        font-size: 15px;
    }
    
    .journal-card {
        max-width: 280px;
    }
    
    .journal-card-inner {
        height: clamp(280px, 35vw, 320px);
    }
    
    .journal-flip {
        height: clamp(280px, 35vw, 320px);
    }
    
    .journal-cover {
        height: clamp(180px, 22vw, 220px);
    }
}

/* Large Devices (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .journal-card {
        max-width: 300px;
    }
    
    .journal-card-inner {
        height: clamp(300px, 32vw, 340px);
    }
    
    .journal-flip {
        height: clamp(300px, 32vw, 340px);
    }
    
    .journal-cover {
        height: clamp(200px, 20vw, 240px);
    }
}

/* Extra Large Devices (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .journal-card {
        max-width: 320px;
    }
    
    .journal-card-inner {
        height: 350px;
    }
    
    .journal-flip {
        height: 350px;
    }
    
    .journal-cover {
        height: 250px;
    }
}

/* XXL Devices (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .journal-card {
        max-width: 350px;
    }
    
    .journal-card-inner {
        height: 380px;
    }
    
    .journal-flip {
        height: 380px;
    }
    
    .journal-cover {
        height: 280px;
    }
}

/* ===== LANDSCAPE ORIENTATION FIXES ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .journal-card-inner {
        height: clamp(200px, 30vw, 250px);
    }
    
    .journal-flip {
        height: clamp(200px, 30vw, 250px);
    }
    
    .journal-cover {
        height: clamp(120px, 18vw, 150px);
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .journal-card:hover {
        transform: none;
    }
    
    .journal-card:active {
        transform: scale(0.98);
    }
    
    .journal-card:hover .journal-flip-inner {
        transform: none;
    }
    
    .journal-card:active .journal-flip-inner {
        transform: rotateY(180deg);
    }
    
    .journal-card:hover .sinta-badge {
        transform: scale(1);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    .stat-item:hover {
        transform: none;
    }
    
    .stat-item:active {
        transform: scale(0.98);
    }
    
    /* Always show badges on touch devices */
    .sinta-badge {
        transform: scale(1);
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section {
        background-image: url('https://placeholder-image-service.onrender.com/image/3840x2160?prompt=Modern university campus with students studying and digital technology elements representing e-journal academic platform&id=1fbd6408-f947-4df3-abf6-e259b7b3c05c&customer_id=cus_T76GZF0FPG3k27');
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .hero-section,
    .btn-floating,
    .scroll-indicator {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        padding-top: 0;
    }
    
    .journal-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        max-width: none;
        height: auto;
        margin-bottom: 1rem;
    }
    
    .journal-card-inner {
        height: auto;
    }
    
    .journal-flip {
        height: auto;
    }
    
    .journal-flip-inner {
        transform: none !important;
    }
    
    .journal-flip-back {
        display: none;
    }
    
    .journal-cover {
        height: auto;
        max-height: 200px;
    }
    
    .journal-info {
        position: relative;
        background-color: #f8f9fa !important;
        color: #000 !important;
    }
    
    .journal-title {
        color: #000 !important;
    }
    
    .detail-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .sinta-badge {
        transform: scale(1);
        background: #000 !important;
        color: #fff !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
        border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    transition: top 0.3s;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus styles */
.btn:focus,
.nav-link:focus,
.journal-card:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.journal-card:focus {
    transform: translateY(-5px);
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== UTILITY CLASSES ===== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--accent-color), #b8851f);
}

.border-radius {
    border-radius: var(--border-radius);
}

.shadow-custom {
    box-shadow: var(--shadow-medium);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.journal-card,
.btn,
.nav-link {
    will-change: transform;
}

.journal-flip-inner {
    will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .journal-card:hover .journal-flip-inner {
        transform: none;
    }
    
    .journal-card:hover {
        transform: none;
    }
    
    .scroll-indicator a {
        animation: none;
    }
}

/* ===== CONTAINER RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 575px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ===== GRID SYSTEM ENHANCEMENTS ===== */
@media (max-width: 575px) {
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ===== FLEXIBLE SPACING ===== */
.section-padding {
    padding: clamp(2rem, 8vh, 5rem) 0;
}

.mb-responsive {
    margin-bottom: clamp(1rem, 3vh, 2rem);
}

.mt-responsive {
    margin-top: clamp(1rem, 3vh, 2rem);
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
.h1-responsive {
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    line-height: 1.2;
}

.h2-responsive {
    font-size: clamp(1.3rem, 4vw, 2.5rem);
    line-height: 1.3;
}

.h3-responsive {
    font-size: clamp(1.1rem, 3vw, 2rem);
    line-height: 1.4;
}

.text-responsive {
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    line-height: 1.6;
}

/* ===== RESPONSIVE IMAGES ===== */
img {
    max-width: 100%;
    height: auto;
}

.img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ===== RESPONSIVE TABLES ===== */
@media (max-width: 767px) {
    .table-responsive-stack {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive-stack table,
    .table-responsive-stack thead,
    .table-responsive-stack tbody,
    .table-responsive-stack th,
    .table-responsive-stack td,
    .table-responsive-stack tr {
        display: block;
    }
    
    .table-responsive-stack thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table-responsive-stack tr {
        border: 1px solid var(--border-color);
        margin-bottom: 0.5rem;
        border-radius: var(--border-radius);
        padding: 0.5rem;
    }
    
    .table-responsive-stack td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .table-responsive-stack td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--primary-color);
    }
}

/* ===== RESPONSIVE FLEXBOX UTILITIES ===== */
@media (max-width: 767px) {
    .flex-column-mobile {
        flex-direction: column !important;
    }
    
    .flex-wrap-mobile {
        flex-wrap: wrap !important;
    }
    
    .justify-content-center-mobile {
        justify-content: center !important;
    }
    
    .align-items-center-mobile {
        align-items: center !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .w-100-mobile {
        width: 100% !important;
    }
}

/* ===== RESPONSIVE DISPLAY UTILITIES ===== */
@media (max-width: 575px) {
    .d-none-xs {
        display: none !important;
    }
    
    .d-block-xs {
        display: block !important;
    }
    
    .d-flex-xs {
        display: flex !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .d-none-sm {
        display: none !important;
    }
    
    .d-block-sm {
        display: block !important;
    }
    
    .d-flex-sm {
        display: flex !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .d-none-md {
        display: none !important;
    }
    
    .d-block-md {
        display: block !important;
    }
    
    .d-flex-md {
        display: flex !important;
    }
}

/* ===== RESPONSIVE CARD ADJUSTMENTS ===== */
@media (max-width: 575px) {
    .card {
        margin-bottom: 1rem;
        border-radius: calc(var(--border-radius) * 0.75);
    }
    
    .card-body {
        padding: clamp(0.75rem, 3vw, 1.25rem);
    }
    
    .card-title {
        font-size: clamp(0.9rem, 3vw, 1.25rem);
        margin-bottom: 0.5rem;
    }
    
    .card-text {
        font-size: clamp(0.8rem, 2.5vw, 1rem);
        line-height: 1.5;
    }
}

/* ===== RESPONSIVE MODAL ADJUSTMENTS ===== */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: calc(var(--border-radius) * 0.75);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: clamp(0.75rem, 3vw, 1rem);
    }
    
    .modal-title {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}

/* ===== RESPONSIVE FORM CONTROLS ===== */
@media (max-width: 767px) {
    .form-control,
    .form-select {
        font-size: clamp(0.85rem, 3vw, 1rem);
        padding: clamp(0.4rem, 2vw, 0.75rem) clamp(0.6rem, 3vw, 1rem);
        border-radius: calc(var(--border-radius) * 0.5);
    }
    
    .form-label {
        font-size: clamp(0.8rem, 2.5vw, 0.95rem);
        font-weight: 600;
        margin-bottom: 0.3rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: calc(var(--border-radius) * 0.5) !important;
        margin-bottom: 0.25rem;
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
}

/* ===== RESPONSIVE STATISTICS SECTION ===== */
@media (max-width: 767px) {
    .stat-item {
        text-align: center;
        min-height: auto;
    }
    
    .counter {
        display: block;
        margin-bottom: 0.5rem;
    }
}

/* ===== RESPONSIVE JOURNAL GRID ===== */
@media (max-width: 575px) {
    .journal-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .journal-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .journal-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .journal-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .journal-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== RESPONSIVE SPACING UTILITIES ===== */
@media (max-width: 575px) {
    .py-xs-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
    .py-xs-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
    .py-xs-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .py-xs-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .py-xs-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    
    .px-xs-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
    .px-xs-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .px-xs-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
    
    .my-xs-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
    .my-xs-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
    .my-xs-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
    .my-xs-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
    
    .mx-xs-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
    .mx-xs-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
    .mx-xs-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
}

/* ===== RESPONSIVE SAFE AREAS (for devices with notches) ===== */
@supports (padding: max(0px)) {
    .safe-area-inset-top {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
    
    .safe-area-inset-bottom {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .safe-area-inset-left {
        padding-left: max(1rem, env(safe-area-inset-left));
    }
    
    .safe-area-inset-right {
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* ===== RESPONSIVE INTERACTION IMPROVEMENTS ===== */
@media (max-width: 767px) {
    .journal-card {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .btn {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-height: 44px;
    }
}

/* ===== RESPONSIVE SCROLL BEHAVIOR ===== */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 70px;
    }
    
    .smooth-scroll-mobile {
        scroll-behavior: smooth;
    }
}

/* ===== FINAL RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 320px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .hero-section h1 {
        font-size: 1.3rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .hero-section .lead {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .journal-card-inner {
        height: 200px;
    }
    
    .journal-flip {
        height: 200px;
    }
    
    .journal-cover {
        height: 110px;
    }
    
    .journal-title {
        font-size: 0.7rem;
        line-height: 1.1;
    }
    
    .journal-info {
        padding: 0.4rem;
    }
    
    .journal-meta {
        font-size: 0.6rem;
    }
    
    .counter {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.7rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .detail-table {
        font-size: 0.7rem;
    }
    
    .detail-table th,
    .detail-table td {
        padding: 0.4rem;
    }
}

/* ===== RESPONSIVE BREAKPOINT VARIABLES ===== */
:root {
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

/* ===== CONTAINER QUERIES (Modern Browser Support) ===== */
@supports (container-type: inline-size) {
    .journal-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .journal-card {
            font-size: 0.8rem;
        }
        
        .journal-title {
            font-size: 0.75rem;
        }
    }
    
    @container (min-width: 400px) {
        .journal-card {
            font-size: 1rem;
        }
        
        .journal-title {
            font-size: 0.9rem;
        }
    }
}

/* ===== RESPONSIVE GRID FALLBACKS ===== */
@supports not (display: grid) {
    .journal-grid {
        display: flex;
        flex-wrap: wrap;
        margin: -0.5rem;
    }
    
    .journal-grid .journal-card {
        flex: 1 1 300px;
        margin: 0.5rem;
        max-width: calc(50% - 1rem);
    }
    
    @media (max-width: 767px) {
        .journal-grid .journal-card {
            max-width: calc(100% - 1rem);
        }
    }
}

/* ===== RESPONSIVE FLEXBOX FALLBACKS ===== */
@supports not (display: flex) {
    .hero-section {
        display: table;
        width: 100%;
        height: 100vh;
    }
    
    .hero-section .container {
        display: table-cell;
        vertical-align: middle;
    }
    
    .navbar-nav {
        list-style: none;
    }
    
    .navbar-nav .nav-link {
        display: inline-block;
    }
}

/* ===== RESPONSIVE IMAGE OPTIMIZATION ===== */
@media (max-width: 575px) {
    .journal-cover {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

@media (min-width: 1200px) {
    .journal-cover {
        image-rendering: auto;
    }
}

/* ===== RESPONSIVE ANIMATION ADJUSTMENTS ===== */
@media (max-width: 767px) {
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-5px);
        }
        60% {
            transform: translateY(-2px);
        }
    }
}

/* ===== RESPONSIVE LOADING STATES ===== */
@media (max-width: 575px) {
    .loading {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }
    
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }
}

/* ===== RESPONSIVE ERROR STATES ===== */
@media (max-width: 575px) {
    .error-message {
        font-size: 0.8rem;
        padding: 0.5rem;
        border-radius: calc(var(--border-radius) * 0.5);
        margin: 0.5rem 0;
    }
    
    .alert {
        font-size: 0.85rem;
        padding: 0.6rem;
        border-radius: calc(var(--border-radius) * 0.5);
    }
}

/* ===== RESPONSIVE ACCESSIBILITY ENHANCEMENTS ===== */
@media (max-width: 767px) {
    .sr-only-mobile {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    
    .focus-visible-mobile:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }
}

/* ===== RESPONSIVE DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) and (max-width: 767px) {
    .hero-overlay {
        background: rgba(8, 77, 54, 0.9);
    }
    
    .journal-info {
        background-color: rgba(8, 77, 54, 0.95);
    }
    
    .detail-table {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .detail-table th {
        background: var(--primary-color);
    }
    
    .detail-table tr:hover {
        background: rgba(255, 255, 153, 0.1);
    }
}

/* ===== RESPONSIVE PRINT OPTIMIZATIONS ===== */
@media print and (max-width: 8.5in) {
    body {
        font-size: 10pt;
        padding-top: 0;
    }
    
    .journal-card {
        width: 100%;
        max-width: none;
        margin-bottom: 0.5in;
        break-inside: avoid;
    }
    
    .journal-title {
        font-size: 11pt;
        font-weight: bold;
    }
    
    .journal-meta {
        font-size: 9pt;
    }
    
    .detail-table {
        font-size: 9pt;
    }
    
    .detail-table th,
    .detail-table td {
        padding: 0.1in;
    }
}

/* ===== RESPONSIVE PERFORMANCE CRITICAL STYLES ===== */
@media (max-width: 767px) {
    .will-change-transform {
        will-change: transform;
    }
    
    .will-change-auto {
        will-change: auto;
    }
    
    .gpu-accelerated {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

/* ===== RESPONSIVE CRITICAL RENDERING PATH ===== */
@media (max-width: 575px) {
    .above-fold {
        contain: layout style paint;
    }
    
    .below-fold {
        content-visibility: auto;
        contain-intrinsic-size: 300px;
    }
}

/* ===== RESPONSIVE FINAL OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .container,
    .container-fluid {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .row {
        margin-left: -0.375rem;
        margin-right: -0.375rem;
    }
    
    .row > * {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }
}

/* ===== RESPONSIVE VIEWPORT SPECIFIC ADJUSTMENTS ===== */
@media screen and (max-width: 375px) {
    .hero-section {
        min-height: 60vh;
    }
    
    .journal-card-inner {
        height: 180px;
    }
    
    .journal-flip {
        height: 180px;
    }
    
    .journal-cover {
        height: 100px;
    }
}

@media screen and (max-width: 360px) {
    .hero-section h1 {
        font-size: 1.2rem;
    }
    
    .hero-section .lead {
        font-size: 0.75rem;
    }
    
    .counter {
        font-size: 1.1rem;
    }
}

/* ===== RESPONSIVE FINAL TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) and (max-width: 767px) {
    .journal-card {
        transition: transform 0.1s ease;
    }
    
    .journal-card:active {
        transform: scale(0.98);
    }
    
    .btn {
        transition: all 0.1s ease;
    }
    
    .btn:active {
        transform: scale(0.96);
    }
}

/* ===== RESPONSIVE BORDER RADIUS ===== */
@media (max-width: 575px) {
    .rounded-xs {
        border-radius: calc(var(--border-radius) * 0.5) !important;
    }
    
    .rounded-xs-top {
        border-top-left-radius: calc(var(--border-radius) * 0.5) !important;
        border-top-right-radius: calc(var(--border-radius) * 0.5) !important;
    }
    
    .rounded-xs-bottom {
        border-bottom-left-radius: calc(var(--border-radius) * 0.5) !important;
        border-bottom-right-radius: calc(var(--border-radius) * 0.5) !important;
    }
}

/* ===== RESPONSIVE SHADOWS ===== */
@media (max-width: 575px) {
    .shadow-xs {
        box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
    }
    
    .shadow-sm-xs {
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    }
}

/* ===== RESPONSIVE OVERFLOW HANDLING ===== */
@media (max-width: 767px) {
    .overflow-x-auto-mobile {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .overflow-hidden-mobile {
        overflow: hidden;
    }
    
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===== RESPONSIVE POSITION UTILITIES ===== */
@media (max-width: 575px) {
    .position-relative-xs {
        position: relative !important;
    }
    
    .position-absolute-xs {
        position: absolute !important;
    }
    
    .position-fixed-xs {
        position: fixed !important;
    }
    
    .position-sticky-xs {
        position: sticky !important;
        top: 0;
    }
}

/* ===== RESPONSIVE Z-INDEX ===== */
@media (max-width: 767px) {
    .z-index-mobile-1 { z-index: 1 !important; }
    .z-index-mobile-2 { z-index: 2 !important; }
    .z-index-mobile-3 { z-index: 3 !important; }
    .z-index-mobile-1000 { z-index: 1000 !important; }
    .z-index-mobile-1050 { z-index: 1050 !important; }
}

/* ===== RESPONSIVE ASPECT RATIOS ===== */
.aspect-ratio-responsive {
    position: relative;
    width: 100%;
}

.aspect-ratio-responsive::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

@media (max-width: 575px) {
    .aspect-ratio-responsive::before {
        padding-top: 75%; /* 4:3 aspect ratio for mobile */
    }
}

.aspect-ratio-responsive > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== RESPONSIVE PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 767px) {
    .journal-card:hover .journal-flip-inner {
        transform: none;
    }
    
    .journal-card.active .journal-flip-inner {
        transform: rotateY(180deg);
    }
    
    .reduce-motion-mobile * {
        animation-duration: 0.1s !important;
        transition-duration: 0.1s !important;
    }
}

/* ===== RESPONSIVE FONT LOADING ===== */
@media (max-width: 575px) {
    body {
        font-display: swap;
    }
}

/* ===== END OF RESPONSIVE STYLES ===== */
