/* Custom CSS for GRHET Journal */

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDelayed {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delayed {
    animation: fadeInDelayed 0.8s ease-out 0.2s both;
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #E86A33;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F9F6F2;
}

::-webkit-scrollbar-thumb {
    background: #4A6B88;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E86A33;
}

/* Paper card hover effect */
.paper-card {
    transition: all 0.3s ease;
}

.paper-card:hover {
    transform: translateY(-4px);
    border-color: #E86A33;
}

/* Loading spinner */
.spinner {
    border: 3px solid #F9F6F2;
    border-top: 3px solid #E86A33;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Toast notification styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #E86A33;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

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

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

/* Form validation styles */
.form-error {
    border-color: #ef4444 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Progress bar for multi-step forms */
.progress-bar {
    height: 4px;
    background: #F9F6F2;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #E86A33;
    transition: width 0.3s ease;
}

/* Keyword chips */
.keyword-chip {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #F9F6F2;
    color: #4A6B88;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.keyword-chip:hover {
    background: #E86A33;
    color: white;
    cursor: pointer;
}

/* Responsive typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    a {
        text-decoration: underline;
    }
}

/* Utility classes */
.bg-pattern {
    background-image:
        linear-gradient(30deg, #F9F6F2 12%, transparent 12.5%, transparent 87%, #F9F6F2 87.5%, #F9F6F2),
        linear-gradient(150deg, #F9F6F2 12%, transparent 12.5%, transparent 87%, #F9F6F2 87.5%, #F9F6F2),
        linear-gradient(30deg, #F9F6F2 12%, transparent 12.5%, transparent 87%, #F9F6F2 87.5%, #F9F6F2),
        linear-gradient(150deg, #F9F6F2 12%, transparent 12.5%, transparent 87%, #F9F6F2 87.5%, #F9F6F2);
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}

.text-gradient {
    background: linear-gradient(135deg, #E86A33 0%, #4A6B88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 27, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}


/* Transparent header that sits over hero */
.navbar-transparent {
    background: transparent;
    border-bottom: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 14px 28px;
}

/* make toggler and collapse transparent-friendly */
.navbar-transparent .navbar-toggler {
    border-color: rgba(13, 27, 42, 0.06);
}

.navbar-transparent .navbar-collapse {
    padding-left: 8px;
}

/* brand icon spacing */
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    padding: 4px;
}

/* active pill for Home */
.nav-pill {
    padding: 8px 12px;
    border-radius: 10px;
    color: #4A6B88;
    font-weight: 700;
}

.nav-pill.active-pill,
.nav-link.active-pill {
    background: rgba(232, 106, 51, 0.12);
    color: #E86A33 !important;
    box-shadow: 0 6px 18px rgba(232, 106, 51, 0.06);
}

/* on small screens, navbar should have semi-opaque background when expanded */
@media (max-width: 991px) {
    .navbar-transparent .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        margin-top: 8px;
        border-radius: 8px;
        padding: 12px;
        box-shadow: 0 10px 30px rgba(13, 27, 42, 0.05);
    }
}

/* push hero down so header doesn't overlap content */
.hero-wrap {
    padding-top: 110px;
}

/* adjust to header height + gap (110px works well) */

/* If you prefer header fixed (always visible) use this instead:
   .navbar-transparent { position: fixed; }
   and keep hero-wrap padding-top equal to header height.
*/