/* ========================================
   HMSR HOMEPAGE STYLES
   ======================================== */

/* Hide default homepage image/logo */
.homepage_image {
    display: none;
}

/* Base container styling */
.page_index_journal {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-journal-home {
    background: linear-gradient(135deg, #A51C30 0%, #8B1826 100%);
    color: white;
    padding: 60px 40px;
    text-align: center;
    margin: 0 0 50px 0;
    box-shadow: 0 4px 20px rgba(165, 28, 48, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

/* Decorative background pattern */
.about-journal-home::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.about-journal-home::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.about-journal-home h2 {
    font-size: 2.5em;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.about-journal-home p {
    font-size: 1.2em;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto 30px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.btn-learn-more {
    display: inline-block;
    background: white;
    color: #A51C30 !important;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    border: 2px solid white;
}

.btn-learn-more:hover {
    background: transparent;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ========================================
   CTA SECTION - For Authors/Readers
   ======================================== */

.cta-section {
    display: flex;
    gap: 40px;
    margin: 0 0 80px 0;
    padding: 0 20px;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.cta-box {
    flex: 1;
    background: white;
    padding: 45px 35px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    text-align: center;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #A51C30 0%, #8B1826 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cta-box:hover::before {
    transform: scaleX(1);
}

.cta-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(165, 28, 48, 0.2);
    border-color: #A51C30;
}

.cta-box h3 {
    color: #A51C30;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
}

.cta-box p {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 25px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background: #A51C30;
    color: white !important;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(165, 28, 48, 0.3);
    border: 2px solid #A51C30;
}

.cta-button:hover {
    background: white;
    color: #A51C30 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(165, 28, 48, 0.4);
}

/* ========================================
   CURRENT ISSUE SECTION
   ======================================== */

.homepage_about {
    background: white;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    margin: 100px 0 40px 0;
    border-top: 5px solid #A51C30;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

/* Decorative separator before Current Issue */
.homepage_about::before {
    content: "";
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #A51C30, transparent);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.homepage_about h2 {
    color: #A51C30;
    font-size: 2.3em;
    margin-bottom: 25px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 3px solid #A51C30;
}

/* Issue subtitle/volume info */
.homepage_about > h3:first-of-type {
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
    margin: 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px dashed #e9ecef;
}

/* Issue cover image with border */
.homepage_about img {
    max-width: 220px;
    float: left;
    margin: 0 30px 20px 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 3px solid #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.homepage_about img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 30px rgba(165, 28, 48, 0.4);
    border-color: #A51C30;
}

/* Issue description text */
.homepage_about p {
    line-height: 1.8;
    color: #444;
    font-size: 1.05em;
    margin-bottom: 15px;
}

/* DOI and metadata */
.homepage_about strong {
    color: #A51C30;
    font-weight: 600;
}

/* Links in Current Issue */
.homepage_about a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.homepage_about a:hover {
    color: #A51C30;
    text-decoration: underline;
}

/* ========================================
   ARTICLE LIST STYLING
   ======================================== */

.homepage_about .obj_article_summary {
    padding: 15px 10px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 5px;
}

.homepage_about .obj_article_summary:hover {
    background: #f8f9fa;
    padding-left: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.homepage_about .obj_article_summary h3 {
    font-size: 1.2em;
    margin: 0 0 8px 0;
    color: #333;
}

.homepage_about .obj_article_summary h3 a {
    color: #0066cc;
    font-weight: 600;
}

.homepage_about .obj_article_summary h3 a:hover {
    color: #A51C30;
}

/* Authors list */
.homepage_about .authors {
    color: #666;
    font-size: 0.95em;
    font-style: italic;
    margin-bottom: 8px;
}

/* ========================================
   BUTTONS & LINKS
   ======================================== */

/* Style Full Issue and PDF buttons */
.homepage_about .btn,
a[href*=".pdf"] {
    display: inline-block;
    padding: 8px 20px;
    background: #A51C30;
    color: white !important;
    border-radius: 20px;
    text-decoration: none !important;
    font-size: 0.9em;
    font-weight: 600;
    margin: 5px 5px 5px 0;
    transition: all 0.2s ease;
    border: 2px solid #A51C30;
}

.homepage_about .btn:hover,
a[href*=".pdf"]:hover {
    background: white;
    color: #A51C30 !important;
    border-color: #A51C30;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(165, 28, 48, 0.3);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    /* About section */
    .about-journal-home {
        padding: 40px 25px;
    }
    
    .about-journal-home h2 {
        font-size: 2em;
    }
    
    .about-journal-home p {
        font-size: 1.1em;
    }
    
    /* CTA section */
    .cta-section {
        flex-direction: column;
        gap: 25px;
        margin-bottom: 50px;
        padding: 0 10px;
    }
    
    .cta-box {
        padding: 35px 25px;
    }
    
    .cta-box h3 {
        font-size: 1.7em;
    }
    
    /* Current Issue */
    .homepage_about {
        padding: 30px 20px;
        margin-top: 50px;
    }
    
    .homepage_about h2 {
        font-size: 1.9em;
    }
    
    .homepage_about img {
        float: none;
        display: block;
        margin: 0 auto 20px;
        max-width: 180px;
    }
    
    /* Article summaries */
    .homepage_about .obj_article_summary {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .about-journal-home h2 {
        font-size: 1.7em;
    }
    
    .about-journal-home p {
        font-size: 1em;
    }
    
    .cta-box h3 {
        font-size: 1.5em;
    }
    
    .btn-learn-more,
    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus states for keyboard navigation */
.btn-learn-more:focus,
.cta-button:focus {
    outline: 3px solid #A51C30;
    outline-offset: 3px;
}

/* Reduced 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;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .cta-section {
        display: none;
    }
    
    .about-journal-home {
        background: white;
        color: black;
        border: 2px solid #A51C30;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

/* Clear floats */
.homepage_about::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure proper spacing */
section {
    clear: both;
}

/* ========================================
   FORCE BORDER ON COVER IMAGE
   ======================================== */

/* Target cover image specifically */
.homepage_about img,
.homepage_about .cover img,
.homepage_about .obj_issue_toc img,
.homepage_about a img,
.current_issue_cover,
img[src*="cover"] {
    border: 2px solid #333 !important;
    box-sizing: border-box !important;
}

/* Enhanced hover state */
.homepage_about img:hover,
.homepage_about .cover img:hover,
.homepage_about .obj_issue_toc img:hover {
    border: 2px solid #A51C30 !important;
}

/* ========================================
   FIX REFERENCES SECTION LINKS
   ======================================== */

/* Target references section specifically */
.article-details .references a,
.article-content .references a,
.references a,
section.references a,
.item.references a,
[class*="reference"] a {
    /* Reset to normal link styling */
    background: transparent !important;
    color: #0066cc !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline !important;
    font-size: inherit !important;
    font-weight: normal !important;
    text-decoration: underline !important;
    margin: 0 !important;
    transform: none !important;
}

/* Hover state for reference links */
.references a:hover,
[class*="reference"] a:hover {
    background: transparent !important;
    color: #003d99 !important;
    text-decoration: underline !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Ensure DOI links also appear normal */
.references a[href*="doi.org"],
.references a[href*="dx.doi.org"] {
    background: transparent !important;
    color: #0066cc !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove any button classes if applied */
.references .btn,
.references .cta-button,
.references .btn-learn-more {
    background: transparent !important;
    color: #0066cc !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-decoration: underline !important;
}
