/**
 * NCode Events Calendar - Frontend Styles
 * Template single-event.php
 */

/* =============================================
   Variables
   ============================================= */
:root {
    --ncode-primary: #2563eb;
    --ncode-primary-dark: #1d4ed8;
    --ncode-text: #1d2327;
    --ncode-text-light: #646970;
    --ncode-border: #dcdcde;
    --ncode-bg: #f6f7f7;
    --ncode-success: #00a32a;
    --ncode-error: #d63638;
    --ncode-warning: #dba617;
    --ncode-radius: 12px;
    --ncode-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* =============================================
   Single Event Container
   ============================================= */
.ncode-single-event {
    padding: 40px 0 60px;
    background: #f9fafb;
    min-height: 100vh;
}

.ncode-event-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   Hero Image
   ============================================= */
.ncode-event-hero {
    position: relative;
    margin-bottom: 30px;
    border-radius: var(--ncode-radius);
    overflow: hidden;
    box-shadow: var(--ncode-shadow);
}

.ncode-event-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.ncode-event-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--ncode-error);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================
   Layout
   ============================================= */
.ncode-event-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .ncode-event-layout {
        grid-template-columns: 1fr;
    }
    
    .ncode-event-sidebar {
        order: -1;
    }
}

/* =============================================
   Main Content
   ============================================= */
.ncode-event-main {
    background: #fff;
    border-radius: var(--ncode-radius);
    padding: 40px;
    box-shadow: var(--ncode-shadow);
}

.ncode-event-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ncode-border);
}

.ncode-event-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--ncode-text);
    margin: 0;
    line-height: 1.3;
}

.ncode-event-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--ncode-text);
}

.ncode-event-content p {
    margin-bottom: 16px;
}

.ncode-event-content h2,
.ncode-event-content h3,
.ncode-event-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--ncode-text);
}

.ncode-event-content ul,
.ncode-event-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.ncode-event-content li {
    margin-bottom: 8px;
}

.ncode-event-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* =============================================
   Sidebar
   ============================================= */
.ncode-event-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

/* Info Cards */
.ncode-info-card {
    background: #fff;
    border-radius: var(--ncode-radius);
    padding: 20px;
    box-shadow: var(--ncode-shadow);
}

.ncode-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ncode-border);
}

.ncode-info-icon {
    font-size: 24px;
}

.ncode-info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ncode-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ncode-info-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ncode-date-main,
.ncode-time-main {
    font-size: 20px;
    font-weight: 700;
    color: var(--ncode-primary);
}

.ncode-date-separator,
.ncode-time-separator {
    font-size: 14px;
    color: var(--ncode-text-light);
}

.ncode-date-end,
.ncode-time-end {
    font-size: 18px;
    font-weight: 600;
    color: var(--ncode-text);
}

.ncode-time-allday {
    font-size: 20px;
    font-weight: 700;
    color: var(--ncode-primary);
}

.ncode-status-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ncode-status-expired {
    background: #fef2f2;
    color: var(--ncode-error);
    border: 1px solid #fecaca;
}

.ncode-no-info {
    color: var(--ncode-text-light);
    font-style: italic;
}

.ncode-location {
    font-size: 16px;
    font-weight: 500;
    color: var(--ncode-text);
}

.ncode-map-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--ncode-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.ncode-map-link:hover {
    color: var(--ncode-primary-dark);
    text-decoration: underline;
}

/* =============================================
   Share Buttons
   ============================================= */
.ncode-share-card {
    background: linear-gradient(135deg, #f0f6fc 0%, #fff 100%);
}

.ncode-share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ncode-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    color: #fff;
}

.ncode-share-btn span {
    white-space: nowrap;
}

.ncode-share-btn svg {
    flex-shrink: 0;
}

.ncode-share-facebook {
    background: #1877f2;
}
.ncode-share-facebook:hover {
    background: #0d65d9;
}

.ncode-share-twitter {
    background: #000;
}
.ncode-share-twitter:hover {
    background: #333;
}

.ncode-share-whatsapp {
    background: #25d366;
}
.ncode-share-whatsapp:hover {
    background: #1da851;
}

.ncode-share-linkedin {
    background: #0a66c2;
}
.ncode-share-linkedin:hover {
    background: #084e96;
}

.ncode-share-copy {
    background: #6b7280;
    grid-column: span 2;
}
.ncode-share-copy:hover {
    background: #4b5563;
}

/* =============================================
   Nearby Events
   ============================================= */
.ncode-nearby-events {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--ncode-border);
}

.ncode-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--ncode-text);
    margin-bottom: 30px;
}

.ncode-title-icon {
    font-size: 28px;
}

.ncode-events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1100px) {
    .ncode-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ncode-events-grid {
        grid-template-columns: 1fr;
    }
}

/* Event Card */
.ncode-event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--ncode-radius);
    overflow: hidden;
    box-shadow: var(--ncode-shadow);
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.ncode-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.ncode-event-card.ncode-card-expired {
    opacity: 0.85;
}

.ncode-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.ncode-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ncode-event-card:hover .ncode-card-thumb {
    transform: scale(1.05);
}

.ncode-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--ncode-error);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ncode-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ncode-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ncode-text);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ncode-card-date,
.ncode-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ncode-text-light);
}

.ncode-card-icon {
    font-size: 14px;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .ncode-single-event {
        padding: 20px 0 40px;
    }
    
    .ncode-event-main {
        padding: 24px;
    }
    
    .ncode-event-title {
        font-size: 24px;
    }
    
    .ncode-event-sidebar {
        position: static;
    }
    
    .ncode-section-title {
        font-size: 20px;
    }
    
    .ncode-share-buttons {
        grid-template-columns: 1fr;
    }
    
    .ncode-share-copy {
        grid-column: span 1;
    }
}
