/**
 * Events Post Page Premium Design Styles
 * 
 * Following Gateway College architecture:
 * - Uses .cpt-scope namespace for isolation
 * - Works with cpt-isolation.css for Astra overrides
 * - Full-width sections with centered content containers
 * - Uses theme font-family (no custom imports)
 * 
 * Brand Colors:
 * - Navy: #262474
 * - Blue: #1b60aa
 * - Teal: #24906b
 * - Green: #6db460
 * 
 * @package Gateway_College
 * @since 1.0.0
 */

/* ==============================================
   CSS Variables
   ============================================== */

.cpt-scope[data-page="events"] {
    --gateway-navy: #262474;
    --gateway-blue: #1b60aa;
    --gateway-teal: #24906b;
    --gateway-green: #6db460;
    --gateway-gray-100: #f8f9fa;
    --gateway-gray-600: #718096;
    --gateway-gray-800: #4a5568;
    --gateway-white: #ffffff;
}

/* ==============================================
   Banner Section
   ============================================== */

.cpt-scope .gw-events-banner {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding: 60px 0;
    background-size: cover;
    background-position: center;
}

.cpt-scope .gw-events-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(38,36,116,0.92) 0%, rgba(38,36,116,0.65) 100%);
}

.cpt-scope .gw-events-banner-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.cpt-scope .gw-events-category-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.cpt-scope .gw-events-category {
    color: var(--gateway-green);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cpt-scope .gw-events-status-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gateway-green);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpt-scope .gw-events-status-badge.past {
    background: var(--gateway-gray-600);
}

.cpt-scope .gw-events-title {
    font-size: 32px;
    color: var(--gateway-white);
    margin: 0 0 24px 0;
    max-width: 900px;
    line-height: 1.2;
}

.cpt-scope .gw-events-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    color: rgba(255,255,255,0.9);
    font-size: 15px;
}

.cpt-scope .gw-events-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpt-scope .gw-events-meta-item svg {
    flex-shrink: 0;
}

/* ==============================================
   Main Content Layout
   ============================================== */

.cpt-scope .gw-events-main-layout {
    max-width: 1200px;
    margin: 64px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 64px;
    align-items: start;
}

.cpt-scope .gw-events-article {
    font-size: 18px;
    line-height: 1.75;
    color: #1a202c;
}

.cpt-scope .gw-events-article > *:first-child {
    margin-top: 0;
}

.cpt-scope .gw-events-article p {
    margin-bottom: 28px;
}

.cpt-scope .gw-events-article h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gateway-navy);
    margin: 48px 0 24px 0;
    line-height: 1.3;
}

.cpt-scope .gw-events-article h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gateway-blue);
    margin: 40px 0 20px 0;
}

.cpt-scope .gw-events-article strong {
    color: var(--gateway-navy);
    font-weight: 600;
}

.cpt-scope .gw-events-article ul,
.cpt-scope .gw-events-article ol {
    margin: 24px 0;
    padding-left: 24px;
}

.cpt-scope .gw-events-article li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.cpt-scope .gw-events-article blockquote {
    border-left: 4px solid var(--gateway-teal);
    padding: 24px 32px;
    margin: 32px 0;
    background: rgba(36, 144, 107, 0.05);
    border-radius: 0 60px 60px 60px;
}

.cpt-scope .gw-events-article img {
    max-width: 100%;
    height: auto;
    border-radius: 60px 60px 60px 0;
    margin: 32px 0;
}

/* ==============================================
   Sidebar
   ============================================== */

.cpt-scope .gw-events-sidebar {
    position: sticky;
    top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Register Card - Only for Upcoming Events */
.cpt-scope .gw-events-register-card {
    background: linear-gradient(135deg, var(--gateway-navy) 0%, var(--gateway-blue) 100%);
    padding: 40px 32px;
    border-radius: 0 60px 60px 60px;
    color: white;
}

.cpt-scope .gw-events-register-title {
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cpt-scope .gw-events-register-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.9;
}

.cpt-scope .gw-events-register-button {
    display: block;
    width: 100%;
    padding: 16px;
    background: white;
    color: var(--gateway-navy);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.cpt-scope .gw-events-register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,255,255,0.3);
    color: var(--gateway-navy);
}

/* Enroll Card */
.cpt-scope .gw-events-enroll-card {
    background: linear-gradient(135deg, var(--gateway-teal) 0%, var(--gateway-green) 100%);
    padding: 40px 32px;
    border-radius: 0 60px 60px 60px;
    color: white;
}

.cpt-scope .gw-events-enroll-title {
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cpt-scope .gw-events-enroll-text {
    font-size: 15px;
    color: white;
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.95;
}

.cpt-scope .gw-events-enroll-button {
    display: block;
    width: 100%;
    padding: 16px;
    background: white;
    color: var(--gateway-teal);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.cpt-scope .gw-events-enroll-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,255,255,0.3);
    color: var(--gateway-teal);
}

/* ==============================================
   Recent Events Section
   ============================================== */

.cpt-scope .gw-events-recent-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: var(--gateway-gray-100);
    padding: 80px 40px;
    margin-top: 80px;
}

.cpt-scope .gw-events-recent-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cpt-scope .gw-events-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.cpt-scope .gw-events-section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--gateway-navy);
    margin: 0;
}

.cpt-scope .gw-events-view-all {
    color: var(--gateway-blue);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    padding-bottom: 2px;
}

.cpt-scope .gw-events-view-all:hover {
    color: var(--gateway-navy);
}

.cpt-scope .gw-events-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.cpt-scope .gw-events-post-card {
    background: var(--gateway-white);
    border: 1px solid #e2e8f0;
    border-radius: 0 60px 60px 60px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
}

.cpt-scope .gw-events-post-card:hover {
    border-color: #cbd5e0;
    transform: translateY(-4px);
}

.cpt-scope .gw-events-post-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
}

.cpt-scope .gw-events-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cpt-scope .gw-events-card-status-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: var(--gateway-green);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpt-scope .gw-events-card-status-badge.past {
    background: var(--gateway-gray-600);
}

.cpt-scope .gw-events-post-body {
    padding: 24px;
}

.cpt-scope .gw-events-post-category {
    color: var(--gateway-teal);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.cpt-scope .gw-events-post-title {
    font-size: 19px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
    margin-bottom: 12px;
}

.cpt-scope .gw-events-post-meta {
    font-size: 13px;
    color: var(--gateway-gray-600);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cpt-scope .gw-events-post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpt-scope .gw-events-post-meta-item svg {
    flex-shrink: 0;
}

/* ==============================================
   Responsive Design
   ============================================== */

@media (max-width: 968px) {
    .cpt-scope .gw-events-main-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cpt-scope .gw-events-sidebar {
        position: static;
    }
    
    .cpt-scope .gw-events-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .cpt-scope .gw-events-title {
        font-size: 36px;
    }
    
    .cpt-scope .gw-events-recent-section {
        padding: 60px 20px;
    }
}

@media (max-width: 768px) {
    .cpt-scope .gw-events-banner {
        min-height: 400px;
    }
    
    .cpt-scope .gw-events-banner-content {
        padding: 0 20px;
    }
    
    .cpt-scope .gw-events-main-layout {
        padding: 0 20px;
        margin: 40px auto;
    }
    
    .cpt-scope .gw-events-article {
        font-size: 16px;
    }
    
    .cpt-scope .gw-events-title {
        font-size: 28px;
    }
}