/**
 * Event Detail Page Styles (TicketHub Style)
 * Theme Override for Ecolife Theme
 *
 * @author    Custom Development
 * @copyright 2025
 */

/* CSS Variables */
:root {
    --ed-primary: #d32f2f;
    --ed-primary-dark: #b71c1c;
    --ed-primary-light: #ff6659;
    --ed-dark: #1a1a1a;
    --ed-text: #333;
    --ed-text-light: #666;
    --ed-text-muted: #999;
    --ed-border: #e0e0e0;
    --ed-bg-light: #f8f9fa;
    --ed-white: #fff;
    --ed-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --ed-shadow-lg: 0 5px 30px rgba(0, 0, 0, 0.15);
    --ed-radius: 12px;
    --ed-radius-sm: 8px;
}

/* Reset & Base */
.event-detail-page {
    background: var(--ed-bg-light);
    min-height: 100vh;
}

.event-detail-page * {
    box-sizing: border-box;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.event-hero {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-placeholder i {
    font-size: 120px;
    color: rgba(255,255,255,0.3);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 0;
    z-index: 2;
}

.hero-info {
    max-width: 800px;
}

/* Event Tags */
.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.event-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

.event-tag:hover {
    background: var(--ed-primary);
    color: #fff;
}

/* Event Title */
.event-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Event Meta */
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 15px;
}

.meta-item i {
    font-size: 20px;
    opacity: 0.8;
}

/* Event Social */
.event-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
}

.social-link:hover {
    background: #fff;
    transform: translateY(-3px);
}

.social-link.facebook:hover { color: #1877f2; }
.social-link.twitter:hover { color: #1da1f2; }
.social-link.instagram:hover { color: #e4405f; }

/* ==========================================================================
   Countdown Section
   ========================================================================== */
.event-countdown-section {
    background: var(--ed-dark);
    padding: 25px 0;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.countdown-item {
    text-align: center;
    min-width: 80px;
}

.countdown-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.countdown-separator {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ed-primary);
    line-height: 1;
}

.event-started {
    text-align: center;
    color: var(--ed-primary);
    font-size: 1.5rem;
    font-weight: 600;
    padding: 10px;
}

/* ==========================================================================
   Tickets Section (Full Width)
   ========================================================================== */
.event-tickets-section {
    background: var(--ed-white);
    padding: 40px 0;
    border-bottom: 1px solid var(--ed-border);
}

.tickets-card {
    background: var(--ed-white);
    border-radius: var(--ed-radius);
    box-shadow: var(--ed-shadow-lg);
    overflow: hidden;
    border: 2px solid var(--ed-primary);
}

.tickets-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: var(--ed-primary);
    color: #fff;
}

.tickets-header i {
    font-size: 28px;
}

.tickets-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.tickets-content {
    padding: 30px;
}

.default-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ticket-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 25px;
    background: var(--ed-bg-light);
    border-radius: var(--ed-radius-sm);
    border: 1px solid var(--ed-border);
    transition: all 0.3s;
}

.ticket-item-card:hover {
    border-color: var(--ed-primary);
    box-shadow: 0 3px 15px rgba(211, 47, 47, 0.1);
}

.ticket-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ticket-item-card .ticket-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ed-dark);
}

.ticket-item-card .ticket-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ed-primary);
}

.ticket-form-inline {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticket-item-card .ticket-sold-out {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--ed-border);
    color: var(--ed-text-muted);
    border-radius: var(--ed-radius-sm);
    font-weight: 600;
}

/* ==========================================================================
   Main Content Section
   ========================================================================== */
.event-main-content {
    padding: 40px 0;
}

/* Content Cards */
.content-card {
    background: var(--ed-white);
    border-radius: var(--ed-radius);
    box-shadow: var(--ed-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ed-dark);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ed-bg-light);
}

.section-title i {
    color: var(--ed-primary);
    font-size: 28px;
}

/* Event Description */
.event-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ed-text);
}

.event-description p {
    margin-bottom: 15px;
}

.event-description img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ed-radius-sm);
}

/* Gallery */
.event-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: var(--ed-radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-overlay i {
    color: #fff;
    font-size: 36px;
}

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Video */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--ed-radius-sm);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Sidebar Cards
   ========================================================================== */
.sidebar-card {
    background: var(--ed-white);
    border-radius: var(--ed-radius);
    box-shadow: var(--ed-shadow);
    margin-bottom: 25px;
    overflow: hidden;
}

.sidebar-card .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--ed-bg-light);
    border-bottom: 1px solid var(--ed-border);
}

.sidebar-card .card-header i {
    color: var(--ed-primary);
    font-size: 24px;
}

.sidebar-card .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ed-dark);
}

/* Ticket Card */
.ticket-card {
    border: 2px solid var(--ed-primary);
}

.ticket-card .card-header {
    background: var(--ed-primary);
}

.ticket-card .card-header i,
.ticket-card .card-header h3 {
    color: #fff;
}

.default-tickets {
    padding: 20px;
}

.ticket-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--ed-border);
}

.ticket-item:last-child {
    border-bottom: none;
}

.ticket-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ticket-name {
    font-weight: 600;
    color: var(--ed-dark);
}

.ticket-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ed-primary);
}

.ticket-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--ed-border);
    border-radius: var(--ed-radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--ed-bg-light);
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--ed-text);
    transition: background 0.3s;
}

.qty-btn:hover {
    background: var(--ed-border);
}

.qty-input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-buy-ticket {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ed-primary);
    color: #fff;
    border: none;
    border-radius: var(--ed-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-buy-ticket:hover {
    background: var(--ed-primary-dark);
}

.btn-buy-ticket i {
    font-size: 18px;
}

.ticket-sold-out {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--ed-bg-light);
    color: var(--ed-text-muted);
    border-radius: var(--ed-radius-sm);
    font-weight: 600;
}

/* Info Card */
.info-list {
    padding: 20px;
}

.info-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ed-border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item > i {
    color: var(--ed-primary);
    font-size: 22px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--ed-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.info-value {
    display: block;
    font-size: 14px;
    color: var(--ed-dark);
    font-weight: 500;
}

/* Map Preview */
.map-preview {
    padding: 0 20px 20px;
}

.map-container {
    height: 180px;
    border-radius: var(--ed-radius-sm);
    overflow: hidden;
    margin-bottom: 10px;
}

.map-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ed-primary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}

.map-link:hover {
    color: var(--ed-primary-dark);
}

/* Organizer Card */
.organizer-info {
    padding: 20px;
}

.organizer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ed-dark);
    margin-bottom: 15px;
}

.organizer-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ed-text);
    text-decoration: none;
    padding: 8px 0;
    font-size: 14px;
    transition: color 0.3s;
}

.organizer-contact i {
    color: var(--ed-primary);
    font-size: 18px;
}

a.organizer-contact:hover {
    color: var(--ed-primary);
}

/* Share Card */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.email { background: var(--ed-primary); }

/* ==========================================================================
   Streaming Banner
   ========================================================================== */
.streaming-banner {
    background: linear-gradient(135deg, var(--ed-primary) 0%, var(--ed-primary-dark) 100%);
    padding: 25px 0;
    margin-top: 40px;
}

.streaming-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.streaming-icon {
    position: relative;
}

.streaming-icon i {
    font-size: 48px;
    color: #fff;
}

.live-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #fff;
    color: var(--ed-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.streaming-info {
    text-align: center;
}

.streaming-info h3 {
    color: #fff;
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.streaming-info p {
    color: rgba(255,255,255,0.8);
    margin: 0;
    font-size: 14px;
}

.btn-stream {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: #fff;
    color: var(--ed-primary);
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-stream:hover {
    background: var(--ed-dark);
    color: #fff;
    transform: scale(1.05);
}

/* ==========================================================================
   Extension Hook Styles (Speakers, Sponsors, Reviews)
   ========================================================================== */
.eventsext-speakers,
.eventsext-sponsors,
.eventsext-reviews {
    background: var(--ed-white);
    border-radius: var(--ed-radius);
    box-shadow: var(--ed-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

/* ==========================================================================
   Sticky Sidebar
   ========================================================================== */
.sticky-top {
    position: sticky;
    top: 20px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 991px) {
    .event-hero {
        height: 380px;
    }

    .event-title {
        font-size: 2rem;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .countdown-separator {
        font-size: 2rem;
    }

    .countdown-item {
        min-width: 60px;
    }

    .sticky-top {
        position: static;
    }
}

@media (max-width: 767px) {
    .event-hero {
        height: 320px;
    }

    .hero-content {
        padding: 25px 0;
    }

    .event-title {
        font-size: 1.6rem;
    }

    .event-meta {
        gap: 15px;
    }

    .meta-item {
        font-size: 13px;
    }

    .countdown-wrapper {
        gap: 5px;
    }

    .countdown-value {
        font-size: 1.5rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }

    .countdown-item {
        min-width: 50px;
    }

    .countdown-label {
        font-size: 10px;
    }

    .content-card,
    .sidebar-card {
        padding: 20px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .event-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .ticket-form,
    .ticket-form-inline {
        flex-direction: column;
    }

    .btn-buy-ticket {
        width: 100%;
    }

    .streaming-content {
        flex-direction: column;
        text-align: center;
    }

    /* Tickets Section Mobile */
    .event-tickets-section {
        padding: 25px 0;
    }

    .tickets-header {
        padding: 15px 20px;
    }

    .tickets-content {
        padding: 20px;
    }

    .default-tickets-grid {
        grid-template-columns: 1fr;
    }

    .ticket-item-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .ticket-details {
        margin-bottom: 15px;
    }

    .ticket-form-inline {
        width: 100%;
    }

    .ticket-form-inline .qty-selector {
        justify-content: center;
        margin-bottom: 10px;
    }
}

@media (max-width: 575px) {
    .event-hero {
        height: 280px;
    }

    .event-title {
        font-size: 1.4rem;
    }

    .event-meta {
        flex-direction: column;
        gap: 10px;
    }

    .countdown-item {
        min-width: 45px;
    }

    .countdown-value {
        font-size: 1.3rem;
    }

    .countdown-separator {
        font-size: 1.3rem;
    }

    .event-main-content {
        padding: 20px 0;
    }

    .share-buttons {
        gap: 10px;
    }

    .share-btn {
        width: 40px;
        height: 40px;
    }
}
