/**
 * Insights Pages Shared Styles
 * Styles for Blog, Success Stories, Webinars, and Whitepapers pages
 * 
 * @package ApexTheme
 * @subpackage Components/InsightsPages
 */

/* ========================================
   Blog - Featured Section
   ======================================== */
.apex-blog-featured {
    padding: 6rem 1.5rem;
    background: #ffffff;
}

.apex-blog-featured__container {
    max-width: 1280px;
    margin: 0 auto;
}

.apex-blog-featured__header {
    margin-bottom: 2rem;
}

.apex-blog-featured__badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
    color: #f97316;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
}

.apex-blog-featured__card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    background: #f8fafc;
    border-radius: 24px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .apex-blog-featured__card {
        grid-template-columns: 1fr 1fr;
    }
}

.apex-blog-featured__image {
    position: relative;
    aspect-ratio: 16/10;
}

.apex-blog-featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apex-blog-featured__category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: #f97316;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50px;
}

.apex-blog-featured__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apex-blog-featured__meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.apex-blog-featured__date,
.apex-blog-featured__read-time {
    font-size: 0.875rem;
    color: #64748b;
}

.apex-blog-featured__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.apex-blog-featured__excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: #64748b;
    margin: 0 0 1.5rem 0;
}

.apex-blog-featured__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.apex-blog-featured__author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.apex-blog-featured__author strong {
    display: block;
    font-size: 0.9375rem;
    color: #0f172a;
}

.apex-blog-featured__author span {
    font-size: 0.8125rem;
    color: #64748b;
}

.apex-blog-featured__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #f97316;
    text-decoration: none;
}

.apex-blog-featured__link:hover {
    color: #ea580c;
}

.apex-blog-featured__link svg {
    width: 20px;
    height: 20px;
}

/* Blog Categories */
.apex-blog-categories {
    padding: 4rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.apex-blog-categories__container {
    max-width: 1280px;
    margin: 0 auto;
}

.apex-blog-categories__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2rem 0;
    text-align: center;
}

.apex-blog-categories__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .apex-blog-categories__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .apex-blog-categories__grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

.apex-blog-categories__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.apex-blog-categories__item:hover {
    border-color: #f97316;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.15);
}

.apex-blog-categories__item svg {
    width: 32px;
    height: 32px;
    color: #f97316;
    margin-bottom: 0.75rem;
}

.apex-blog-categories__item span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    margin-bottom: 0.25rem;
}

.apex-blog-categories__item small {
    font-size: 0.75rem;
    color: #64748b;
}

/* Blog Grid */
.apex-blog-grid {
    padding: 4rem 1.5rem 6rem;
    background: #ffffff;
}

.apex-blog-grid__container {
    max-width: 1280px;
    margin: 0 auto;
}

.apex-blog-grid__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.apex-blog-grid__heading {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.apex-blog-grid__search {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.apex-blog-grid__search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.9375rem;
    outline: none;
}

.apex-blog-grid__search input:focus {
    border-color: #f97316;
}

.apex-blog-grid__search svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
}

.apex-blog-grid__items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .apex-blog-grid__items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .apex-blog-grid__items {
        grid-template-columns: repeat(3, 1fr);
    }
}

.apex-blog-grid__item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.apex-blog-grid__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.apex-blog-grid__item-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.apex-blog-grid__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.apex-blog-grid__item:hover .apex-blog-grid__item-image img {
    transform: scale(1.05);
}

.apex-blog-grid__item-content {
    padding: 1.5rem;
}

.apex-blog-grid__item-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f97316;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.apex-blog-grid__item-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.apex-blog-grid__item-content p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 1rem 0;
}

.apex-blog-grid__item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.apex-blog-grid__item-meta span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.apex-blog-grid__item-content a {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f97316;
    text-decoration: none;
}

.apex-blog-grid__item-content a:hover {
    color: #ea580c;
}

.apex-blog-grid__pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.apex-blog-grid__page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apex-blog-grid__page-btn:hover,
.apex-blog-grid__page-btn.active {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
}

/* Blog Newsletter */
.apex-blog-newsletter {
    padding: 6rem 1.5rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.apex-blog-newsletter__container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.apex-blog-newsletter__heading {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.apex-blog-newsletter__description {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2rem 0;
}

.apex-blog-newsletter__form {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto 1rem;
}

@media (max-width: 640px) {
    .apex-blog-newsletter__form {
        flex-direction: column;
    }
}

.apex-blog-newsletter__form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.apex-blog-newsletter__form button {
    padding: 1rem 2rem;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apex-blog-newsletter__form button:hover {
    background: #1e293b;
}

.apex-blog-newsletter__note {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.apex-blog-newsletter__notification {
    max-width: 500px;
    margin: 0 auto 1.25rem;
    border-radius: 8px;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

.apex-blog-newsletter__notification.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.apex-blog-newsletter__notification.error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.apex-blog-newsletter__notification-content {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.625rem;
    color: #ffffff;
}

.apex-blog-newsletter__notification-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.apex-blog-newsletter__notification.success .apex-blog-newsletter__notification-icon::before {
    content: "✓";
    font-weight: bold;
}

.apex-blog-newsletter__notification.error .apex-blog-newsletter__notification-icon::before {
    content: "✕";
    font-weight: bold;
}

.apex-blog-newsletter__notification-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
}

.apex-blog-newsletter__notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}

.apex-blog-newsletter__notification-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.apex-blog-newsletter__form.loading button {
    opacity: 0.65;
    pointer-events: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Pagination ellipsis */
.apex-blog-grid__page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Ensure pagination links work properly */
.apex-blog-grid__pagination a.apex-blog-grid__page-btn {
    text-decoration: none;
    cursor: pointer;
}

.apex-blog-grid__pagination a.apex-blog-grid__page-btn:hover {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

/* No posts message */
.apex-blog-grid__no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

/* Webinars On-Demand Pagination */
.apex-webinars-ondemand__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.apex-webinars-ondemand__page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apex-webinars-ondemand__page-btn:hover,
.apex-webinars-ondemand__page-btn.active {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
}

.apex-webinars-ondemand__page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #94a3b8;
    font-size: 0.875rem;
}

.apex-webinars-ondemand__pagination a.apex-webinars-ondemand__page-btn {
    text-decoration: none;
    cursor: pointer;
}

.apex-webinars-ondemand__pagination a.apex-webinars-ondemand__page-btn:hover {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

/* Upcoming Events Image Layout - v2 */
.apex-webinars-upcoming__item-date:empty,
.apex-webinars-upcoming__item-date-overlay:empty {
    display: none !important;
}

.apex-webinars-upcoming__item-date-overlay:not(:has(.apex-webinars-upcoming__item-day:not(:empty))) {
    display: none !important;
}

.apex-webinars-upcoming__item-date {
    position: relative;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 16px;
}

.apex-webinars-upcoming__item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 16px;
}

.apex-webinars-upcoming__item:hover .apex-webinars-upcoming__item-image {
    transform: scale(1.05);
}

.apex-webinars-upcoming__item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: sans-serif;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.apex-webinars-upcoming__item-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.apex-webinars-upcoming__item-initial {
    font-size: 64px;
    font-weight: 700;
    opacity: 0.9;
    line-height: 1;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.apex-webinars-upcoming__item-type-name {
    display: none;
}

.apex-webinars-upcoming__item-date-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7) 60%, transparent);
    padding: 25px 15px 15px;
    text-align: center;
    color: #fff;
    backdrop-filter: blur(2px);
    border-radius: 0 0 16px 16px;
}

.apex-webinars-upcoming__item-day {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.apex-webinars-upcoming__item-month {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
    opacity: 0.9;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Upcoming Events Pagination */
.apex-webinars-upcoming__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    grid-column: 1 / -1;
}

.apex-webinars-upcoming__page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.apex-webinars-upcoming__page-btn:hover,
.apex-webinars-upcoming__page-btn.active {
    background: #f97316;
    border-color: #f97316;
    color: #ffffff;
}

.apex-webinars-upcoming__page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #94a3b8;
    font-size: 0.875rem;
}

.apex-webinars-upcoming__pagination a.apex-webinars-upcoming__page-btn:hover {
    background: #f97316;
    color: white;
    border-color: #f97316;
}

.apex-blog-grid__no-posts p {
    font-size: 1.125rem;
    margin: 0;
}
