/* 
    Premium Enhancements — Blog & Events Pages
    7S IQ — Professional Theme v2.0
    Full responsive support for all screen sizes
*/

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    --pp-primary: #10b981;
    --pp-primary-dark: #059669;
    --pp-primary-light: #d1fae5;
    --pp-secondary: #0f172a;
    --pp-text: #334155;
    --pp-text-muted: #64748b;
    --pp-border: #e2e8f0;
    --pp-bg: #f8fafc;
    --pp-white: #ffffff;
    --pp-shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --pp-shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --pp-shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --pp-shadow-hover: 0 20px 50px rgba(16,185,129,0.15);
    --pp-radius-sm: 0.75rem;
    --pp-radius-md: 1.25rem;
    --pp-radius-lg: 2rem;
    --pp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   PAGE HERO — Events & Blog
   ======================================== */
.page-title.career-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a1628 0%, #0f2d1a 50%, #0a1f2e 100%);
    position: relative;
    overflow: hidden;
}

.page-title.career-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 60% 60% at 20% 50%, rgba(16,185,129,0.15) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 80% 30%, rgba(16,185,129,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.page-title.career-hero .container {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-title.career-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.page-title.career-hero .lead {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    max-width: 560px;
    margin: 0 auto;
}

/* Breadcrumb */
.page-title .breadcrumbs ol {
    gap: 0.5rem;
    font-size: 0.9rem;
}

.page-title .breadcrumbs a {
    color: var(--pp-primary) !important;
    transition: var(--pp-transition);
}

.page-title .breadcrumbs a:hover {
    color: #34d399 !important;
}

/* ========================================
   PREMIUM CARD COMPONENT
   ======================================== */
.premium-card {
    background: var(--pp-white);
    border-radius: var(--pp-radius-md);
    border: 1px solid var(--pp-border);
    transition: var(--pp-transition);
    overflow: hidden;
    height: 100%;
    position: relative;
}

.premium-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pp-primary), #34d399);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.premium-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--pp-shadow-hover);
    border-color: var(--pp-primary);
}

.premium-card:hover::after {
    transform: scaleX(1);
}

/* Image Container */
.premium-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #e2e8f0;
}

.premium-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.premium-card:hover .premium-img-container img {
    transform: scale(1.08);
}

/* Card Body */
.premium-card .card-body {
    display: flex;
    flex-direction: column;
}

/* ========================================
   BADGE STYLES
   ======================================== */
.badge-premium {
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ========================================
   HOVER UTILITIES
   ======================================== */
.hover-success {
    transition: color 0.3s ease;
}
.hover-success:hover {
    color: var(--pp-primary) !important;
}
.transition-colors {
    transition: color 0.3s ease;
}

/* ========================================
   BLOG PAGE — Featured Post Hero
   ======================================== */
.featured-post-hero {
    border-radius: var(--pp-radius-lg);
    overflow: hidden;
    background: var(--pp-secondary);
    color: var(--pp-white);
    box-shadow: var(--pp-shadow-lg);
    border: 1px solid rgba(255,255,255,0.06);
}

.featured-post-hero .row.g-0 {
    min-height: 480px;
}

.featured-post-hero .premium-img-container {
    aspect-ratio: auto;
    min-height: 100%;
    height: 100%;
}

@media (max-width: 991px) {
    .featured-post-hero .row.g-0 {
        min-height: auto;
    }
    .featured-post-hero .premium-img-container {
        aspect-ratio: 16 / 9;
        min-height: 260px;
        height: auto;
    }
}

.featured-content {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

@media (max-width: 991px) {
    .featured-content {
        padding: 2rem 1.75rem;
    }
}

@media (max-width: 576px) {
    .featured-content {
        padding: 1.5rem 1.25rem;
    }
    .featured-post-hero {
        border-radius: var(--pp-radius-md);
    }
}

.featured-content h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.3;
    color: var(--pp-white);
}

.featured-content .hover-primary:hover {
    color: var(--pp-primary) !important;
}

/* Author Meta */
.author-meta {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-top: 1.25rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pp-primary);
    flex-shrink: 0;
}

/* ========================================
   BLOG GRID SECTION
   ======================================== */
.blog-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pp-primary);
    margin-bottom: 0.35rem;
}

/* Blog Card Specific */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--pp-text-muted);
    margin-bottom: 0.75rem;
}

.blog-card-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pp-white);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
}

/* ========================================
   BLOG DETAIL PAGE
   ======================================== */
.blog-detail-header {
    background: linear-gradient(180deg, #f8fafc 0%, var(--pp-white) 100%);
    border-bottom: 1px solid var(--pp-border);
}

.blog-detail-header h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--pp-secondary);
}

/* Article Content Styling */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--pp-text);
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pp-secondary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pp-primary-light);
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pp-secondary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.blog-content ul, .blog-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid var(--pp-primary);
    padding: 1rem 1.5rem;
    background: var(--pp-primary-light);
    border-radius: 0 var(--pp-radius-sm) var(--pp-radius-sm) 0;
    margin: 2rem 0;
    font-style: italic;
    color: var(--pp-secondary);
}

.blog-content img {
    max-width: 100%;
    border-radius: var(--pp-radius-sm);
    margin: 1.5rem 0;
}

.blog-content a {
    color: var(--pp-primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s;
}

.blog-content a:hover {
    text-decoration-color: var(--pp-primary);
}

/* Author Bio */
.author-bio-card {
    background: var(--pp-white);
    border-radius: var(--pp-radius-md);
    border: 1px solid var(--pp-border);
    padding: 1.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

@media (max-width: 576px) {
    .author-bio-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* Related posts text truncation */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   EVENTS PAGE
   ======================================== */

/* Year Group Heading */
.events-year-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.events-year-badge {
    background: linear-gradient(135deg, var(--pp-primary), var(--pp-primary-dark));
    color: var(--pp-white);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
    white-space: nowrap;
}

.events-year-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--pp-border), transparent);
}

/* Event Date Ribbon */
.event-date-ribbon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.5rem 0.875rem;
    border-radius: var(--pp-radius-sm);
    text-align: center;
    box-shadow: var(--pp-shadow-md);
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.8);
    min-width: 52px;
}

.event-date-ribbon .day {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--pp-secondary);
    line-height: 1;
}

.event-date-ribbon .month {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pp-primary);
}

/* Event Info Row */
.event-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.event-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--pp-text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--pp-border);
    display: block;
    margin-bottom: 1.5rem;
}

/* ========================================
   EVENT DETAIL PAGE
   ======================================== */
.event-detail-hero {
    background: linear-gradient(180deg, #f8fafc 0%, var(--pp-white) 100%);
    border-bottom: 1px solid var(--pp-border);
    padding: 4rem 0;
}

.event-detail-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--pp-secondary);
}

/* Event Stats Cards */
.event-stat-card {
    background: var(--pp-bg);
    border-radius: var(--pp-radius-sm);
    padding: 1rem 1.25rem;
    border: 1px solid var(--pp-border);
    transition: var(--pp-transition);
}

.event-stat-card:hover {
    border-color: var(--pp-primary);
    box-shadow: var(--pp-shadow-sm);
}

.event-stat-label {
    font-size: 0.75rem;
    color: var(--pp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.event-stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pp-secondary);
}

/* Event Image Hero */
.event-detail-image {
    border-radius: var(--pp-radius-lg);
    overflow: hidden;
    box-shadow: var(--pp-shadow-lg);
    border: 4px solid var(--pp-white);
}

.event-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

/* Content Cards */
.content-card {
    background: var(--pp-white);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--pp-shadow-sm);
    border: 1px solid var(--pp-border);
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .content-card {
        padding: 1.5rem;
        border-radius: var(--pp-radius-md);
    }
}

.content-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pp-secondary);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--pp-primary);
}

/* Highlight Boxes */
.highlight-box {
    background: var(--pp-bg);
    border-radius: var(--pp-radius-sm);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--pp-border);
    height: 100%;
}

.highlight-box-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pp-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   TIMELINE COMPONENT
   ======================================== */
.premium-timeline {
    position: relative;
    padding-left: 3rem;
}

.premium-timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--pp-primary) 0%, var(--pp-border) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.6rem;
    top: 0.2rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--pp-white);
    border: 3px solid var(--pp-primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.12);
}

.timeline-time {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--pp-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pp-secondary);
    margin-bottom: 0.35rem;
}

.timeline-desc {
    font-size: 0.88rem;
    color: var(--pp-text-muted);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 576px) {
    .premium-timeline {
        padding-left: 2rem;
    }
    .timeline-dot {
        left: -1.6rem;
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* ========================================
   GALLERY GRID
   ======================================== */
.event-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.gallery-thumb {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--pp-bg);
    display: block;
    transition: var(--pp-transition);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-thumb:hover {
    box-shadow: var(--pp-shadow-md);
}

.gallery-thumb:hover img {
    transform: scale(1.1);
}

/* ========================================
   SIDEBAR WIDGETS
   ======================================== */
.sidebar-widget {
    background: var(--pp-white);
    border-radius: var(--pp-radius-md);
    padding: 1.5rem;
    box-shadow: var(--pp-shadow-sm);
    border: 1px solid var(--pp-border);
    margin-bottom: 1.5rem;
}

.sidebar-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pp-secondary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--pp-primary-light);
}

/* Related Events List */
.related-event-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--pp-border);
    transition: var(--pp-transition);
}

.related-event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-event-item:hover {
    transform: translateX(4px);
}

.related-event-item:hover .related-event-title {
    color: var(--pp-primary) !important;
}

.related-event-thumb {
    width: 60px;
    height: 60px;
    border-radius: 0.625rem;
    object-fit: cover;
    flex-shrink: 0;
}

.related-event-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pp-secondary);
    line-height: 1.3;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.related-event-date {
    font-size: 0.75rem;
    color: var(--pp-text-muted);
}

/* ========================================
   STICKY SIDEBAR — safe on mobile
   ======================================== */
@media (min-width: 992px) {
    .sticky-sidebar {
        position: sticky;
        top: 100px;
    }
}

/* ========================================
   MEDIA SECTION
   ======================================== */
.media-item {
    border-radius: var(--pp-radius-sm);
    overflow: hidden;
    box-shadow: var(--pp-shadow-sm);
    background: #0f172a;
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    display: block;
    min-height: 200px;
    object-fit: cover;
}

.media-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pp-secondary);
    margin-top: 0.5rem;
}

/* ========================================
   RESPONSIVE — MOBILE (< 768px)
   ======================================== */
@media (max-width: 767px) {

    /* Hero section adjustment */
    .page-title.career-hero .container {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    /* Cards full-width on small screens */
    .premium-card {
        border-radius: var(--pp-radius-sm);
    }
    
    /* Event detail hero */
    .event-detail-hero {
        padding: 2.5rem 0;
    }
    
    /* Content card */
    .content-card {
        padding: 1.25rem;
    }

    /* Featured blog post stacks */
    .featured-post-hero .col-lg-7,
    .featured-post-hero .col-lg-5 {
        width: 100%;
    }

    /* Make event stat cards stack properly */
    .event-stat-card {
        padding: 0.875rem 1rem;
    }

    /* Timeline tighter on mobile */
    .premium-timeline {
        padding-left: 2rem;
    }

    .timeline-dot {
        left: -1.6rem;
        width: 1.1rem;
        height: 1.1rem;
    }
}

/* ========================================
   RESPONSIVE — VERY SMALL (< 480px)
   ======================================== */
@media (max-width: 479px) {
    .page-title.career-hero h1 {
        font-size: 1.75rem;
    }

    .events-year-badge {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .event-date-ribbon .day {
        font-size: 1.1rem;
    }

    .author-meta {
        flex-wrap: wrap;
    }

    /* Blog detail: Remove horizontal padding on small screens */
    .blog-content {
        font-size: 1rem;
    }

    /* Force gallery to 2 columns on tiny screens */
    .event-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   UTILITY — Particles background
   ======================================== */
.particles-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ========================================
   UTILITY — Section spacing
   ======================================== */
.section-padded {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    .section-padded {
        padding: 3.5rem 0;
    }
}

/* ========================================
   PAGINATION (if used on blog)
   ======================================== */
.pp-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pp-pagination .page-link {
    border: 1px solid var(--pp-border);
    border-radius: 0.625rem;
    color: var(--pp-text);
    padding: 0.5rem 0.875rem;
    font-weight: 600;
    transition: var(--pp-transition);
}

.pp-pagination .page-link:hover,
.pp-pagination .page-item.active .page-link {
    background: var(--pp-primary);
    border-color: var(--pp-primary);
    color: var(--pp-white);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .page-title.career-hero,
    .author-meta,
    .sidebar-widget,
    .related-event-item {
        break-inside: avoid;
    }
}
