/* =====================================================
   IMPROVED SIR JOURNAL STYLING
   Enhanced version with modern CSS practices
   ===================================================== */

/* CSS CUSTOM PROPERTIES */
:root {
    /* Primary Colors */
    --primary-color: #188602;
    --primary-dark: #087D08;
    --primary-light: #0BAB0B;
    --secondary-color: #EB652E;
    --secondary-hover: #F39800;
    
    /* Neutral Colors */
    --white: #ffffff;
    --black: #1d1d1d;
    --gray-light: #f5f5f5;
    --gray-medium: #cccccc;
    --text-primary: #333333;
    --text-secondary: #666666;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Typography */
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-xxl: 1.5rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Border Radius */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* =====================================================
   GLOBAL STYLES
   ===================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    scroll-behavior: smooth;
}

/* =====================================================
   LINKS AND TYPOGRAPHY
   ===================================================== */

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.pkp_form_error_list a{
    color: var(--white) !important;
    text-decoration: underline;
}

a:hover,
a:focus {
    color: var(--secondary-hover);
    text-decoration: underline;
    text-decoration-skip-ink: auto;
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.page-header {
    color: var(--secondary-color) !important;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* =====================================================
   LAYOUT COMPONENTS
   ===================================================== */

.breadcrumb {
    background: linear-gradient(135deg, rgba(24, 134, 2, 0.1), rgba(24, 134, 2, 0.2));
    border: 1px solid rgba(24, 134, 2, 0.2);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    backdrop-filter: blur(10px);
}

.breadcrumb a {
    font-weight: var(--font-weight-medium);
}

/* =====================================================
   ALERTS AND NOTIFICATIONS
   ===================================================== */

.alert-info {
    background: linear-gradient(135deg, rgba(235, 100, 46, 0.1), rgba(235, 100, 46, 0.15));
    border: 1px solid rgba(235, 100, 46, 0.3);
    border-left: 4px solid var(--secondary-color);
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

/* =====================================================
   HOMEPAGE STYLING
   ===================================================== */

.homepage-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, rgba(24, 134, 2, 0.03), rgba(235, 100, 46, 0.03));
}

.homepage-image .img-responsive {
    width: min(50%, 400px);
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.homepage-image .img-responsive:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* =====================================================
   NAVIGATION STYLES
   ===================================================== */

.user_navigation {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    box-shadow: var(--shadow-md);
    position: relative;
}

.user_navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    pointer-events: none;
}

.navbar-default .dropdown-menu {
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: var(--spacing-xs);
}

.navbar-default .dropdown-menu > li > a,
.user_navigation .dropdown-menu li a {
    color: var(--white) !important;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: all var(--transition-fast);
    font-weight: var(--font-weight-medium);
}

.navbar-default .dropdown-menu > li > a:hover,
.user_navigation .dropdown-menu li a:hover,
#main-navigation > li a:hover {
    color: var(--secondary-hover) !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.site-name .navbar-brand {
    display: none;
}

/* =====================================================
   LOGO STYLING
   ===================================================== */

.journal_index {
    background: var(--white) !important;
}

.journal_index .site_logo {
    border: none;
    padding: var(--spacing-lg);
}

.journal_index .site_logo img {
    width: 60% !important;
    max-width: 300px;
    height: auto;
    transition: transform var(--transition-normal);
}

.journal_index .site_logo img:hover {
    transform: scale(1.05);
}

.about_journal {
    background: transparent;
    display: none;
}

/* =====================================================
   BUTTON STYLES
   ===================================================== */

.btn-primary,
.btn-info,
.btn-default {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: 2px solid var(--primary-color);
    color: var(--white) !important;
    font-weight: var(--font-weight-semibold);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    outline: none !important;
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-info::before,
.btn-default::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.btn-primary:hover,
.btn-info:hover,
.btn-default:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover::before,
.btn-info:hover::before,
.btn-default:hover::before {
    left: 100%;
}

.btn-primary:active,
.btn-info:active,
.btn-default:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Button Group Dropdowns */
.btn-group .dropdown-toggle.btn-default ~ .dropdown-menu {
    background: var(--primary-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
}

.btn-group .dropdown-toggle.btn-default ~ .dropdown-menu > li > a {
    color: var(--white);
    transition: all var(--transition-fast);
}

.btn-group .dropdown-toggle.btn-default ~ .dropdown-menu > li > a:hover {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Custom Submit Button */
.cus-submit-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 2px solid var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white) !important;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.cus-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.cus-submit-button:hover {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.cus-submit-button:hover::before {
    left: 100%;
}

/* =====================================================
   BADGES
   ===================================================== */

.badge {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xs) var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

/* =====================================================
   PANELS AND CONTENT BLOCKS
   ===================================================== */

.panel-default > .panel-heading,
.pkp_block .title {
    background: linear-gradient(135deg, rgba(254, 255, 255, 1) 0%, rgba(24, 134, 2, 0.15) 100%);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 2px solid rgba(24, 134, 2, 0.2);
}

.pkp_page_article .article-details .panel-default > .panel-heading {
    background: linear-gradient(135deg, rgba(254, 255, 255, 1) 0%, rgba(24, 134, 2, 0.1) 100%);
    border-bottom: 2px solid var(--gray-light);
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
}

/* Article Abstract */
div.article-abstract p {
    text-align: justify;
    line-height: 1.7;
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

/* Simple Style Container */
.simple-style {
    width: min(80%, 800px);
    padding: var(--spacing-lg) var(--spacing-xl);
    background: linear-gradient(135deg, rgba(8, 125, 8, 0.08), rgba(8, 125, 8, 0.12));
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(8, 125, 8, 0.2);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

/* =====================================================
   GALLERY LINKS
   ===================================================== */

a.galley-link {
    color: var(--white) !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    display: inline-block;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

a.galley-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

a.galley-link:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-hover) 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

a.galley-link:hover::before {
    left: 100%;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer[role="contentinfo"] {
    background: linear-gradient(135deg, rgba(24, 134, 2, 0.4), rgba(24, 134, 2, 0.6)) !important;
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(24, 134, 2, 0.3);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xxl);
}

small.pull-right {
    display: none;
}

.footer-content-michyking {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--spacing-md);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

/* Mobile Navigation */
@media (max-width: 640px) {
    .navbar-toggle .icon-bar {
        background-color: var(--secondary-color) !important;
        height: 3px;
        border-radius: var(--border-radius-sm);
        transition: all var(--transition-fast);
    }
    
    .navbar-toggle:hover .icon-bar {
        background-color: var(--secondary-hover) !important;
    }

    #main-content .col-md-4 {
        display: none;
    }
    
    .homepage-image .img-responsive {
        width: 80%;
    }
    
    .simple-style {
        width: 95%;
        padding: var(--spacing-md);
    }
    
    a.galley-link {
        font-size: var(--font-size-xl);
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .homepage-image .img-responsive {
        width: 60%;
    }
    
    .simple-style {
        width: 90%;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .container,
    .container-fluid {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* =====================================================
   ACCESSIBILITY ENHANCEMENTS
   ===================================================== */

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
select:focus,
textarea:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0a5a00;
        --secondary-color: #b8450a;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .navbar,
    .dropdown-menu,
    .btn,
    footer[role="contentinfo"] {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .page-header {
        color: black !important;
        font-size: 18pt;
    }
}