/**
 * NND Hero Cover - Astroid Element
 * @package     Astroid Framework
 * @author      Net 'n' Design
 * @copyright   Copyright (C) 2024 Net 'n' Design
 */

/* ========================================
   Hero Cover Section
   ======================================== */

.nnd-herocover {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Layer */
.nnd-herocover-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Overlay Layer */
.nnd-herocover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Content Layer */
.nnd-herocover-content {
    position: relative;
    z-index: 2;
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header Section
   ======================================== */

.nnd-herocover .hero-header {
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.nnd-herocover .hero-title {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nnd-herocover .hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* ========================================
   Button Styles
   ======================================== */

.nnd-herocover .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    transform: none !important;
}

.nnd-herocover .btn-primary {
    background-color: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
}

.nnd-herocover .btn-primary:hover {
    background-color: #fff !important;
    color: #1d1f23;
    border: 1px solid #fff;
}

/* ========================================
   Featured Articles Section
   ======================================== */

.nnd-herocover .hero-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Featured Column with Vertical Divider */
.nnd-herocover .featured-col {
    position: relative;
    padding: 1rem;
}

.nnd-herocover .featured-col.has-divider::after {
    content: "";
    position: absolute;
    right: 25%;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
}

/* Featured Item */
.nnd-herocover .featured-item {
    padding: 0;
}

.nnd-herocover .featured-item .icon-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.nnd-herocover .featured-item .icon-wrapper i {
    font-size: 1.125rem;
    opacity: 0.8;
}

.nnd-herocover .featured-item .category-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
    font-weight: 500;
}

.nnd-herocover .featured-item .article-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0;
}

.nnd-herocover .featured-item .article-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nnd-herocover .featured-item .article-title a:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Horizontal Row Divider (for mobile 2-column layout) */
.nnd-herocover .hero-footer .row-divider {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    margin: 0.5rem 0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 991.98px) {
    .nnd-herocover .hero-title {
        font-size: 2.5rem;
    }

    .nnd-herocover .hero-subtitle {
        font-size: 1.125rem;
    }

    .nnd-herocover .featured-col.has-divider::after {
        right: 0;
    }

    .nnd-herocover .featured-item {
      margin: auto;
      width: fit-content;
    }

    .nnd-herocover .featured-item .article-title {
        font-size: 0.9375rem;
    }

    /* Hide vertical divider on last item of mobile row (every 2nd item) */
    .nnd-herocover .featured-col.last-in-mobile-row::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .nnd-herocover .hero-header {
        padding-top: 2rem;
        padding-bottom: 1.5rem;
    }

    .nnd-herocover .hero-title {
        font-size: 2rem;
    }

    .nnd-herocover .hero-subtitle {
        font-size: 1rem;
    }

    .nnd-herocover .featured-col {
        padding: 0.75rem;
    }

    .nnd-herocover .featured-item .article-title {
        font-size: 0.875rem;
    }
}

/* ========================================
   Text Alignment Utilities
   ======================================== */

.nnd-herocover .text-left {
    text-align: left;
}

.nnd-herocover .text-center {
    text-align: center;
}

.nnd-herocover .text-right {
    text-align: right;
}

/* ========================================
   Animation (Optional)
   ======================================== */

.nnd-herocover .hero-title,
.nnd-herocover .hero-subtitle,
.nnd-herocover .featured-col {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.nnd-herocover .hero-subtitle {
    animation-delay: 0.1s;
}

.nnd-herocover .featured-col:nth-child(1) {
    animation-delay: 0.3s;
}

.nnd-herocover .featured-col:nth-child(2) {
    animation-delay: 0.4s;
}

.nnd-herocover .featured-col:nth-child(3) {
    animation-delay: 0.5s;
}

.nnd-herocover .featured-col:nth-child(4) {
    animation-delay: 0.6s;
}

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

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .nnd-herocover .hero-title,
    .nnd-herocover .hero-subtitle,
    .nnd-herocover .btn,
    .nnd-herocover .featured-col {
        animation: none;
    }
}
