/* ==========================================================================
   THE HORIZON TIMES (THT) - MASTER STYLESHEET
   Brand Guidelines: Ultra-Premium Corporate Hub & Event Platform
   ========================================================================== */

:root {
    --bg-void: #050507;
    --bg-surface: rgba(15, 15, 20, 0.6); 
    --bg-elevated: #111115;
    
    --gold: #FFC000;
    --gold-light: #FFD700;
    --gold-dark: #cc9900;
    --gold-glow: rgba(255, 192, 0, 0.2);
    
    --text-primary: #FFFFFF;
    --text-muted: #A1A1AA;
    
    --border-faint: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --pad-global: clamp(20px, 5vw, 40px);
    --max-width-content: 1200px;
}

*, *::before, *::after { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body { margin: 0; padding: 0; background-color: var(--bg-void); color: var(--text-primary); font-family: var(--font-body); overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }
a:hover { color: var(--gold-light); }

/* --- BACKGROUND --- */
.geometric-canvas { position: fixed; inset: 0; z-index: -2; background: radial-gradient(circle at 80% 30%, #15151a 0%, var(--bg-void) 70%); pointer-events: none; }
.geo-shape { position: absolute; top: 5vh; right: -15vw; width: 900px; height: 900px; opacity: 0.06; animation: rotateGeometry 120s linear infinite; }
.geo-shape svg { width: 100%; height: 100%; stroke: var(--gold); stroke-width: 0.5px; fill: none; }
@keyframes rotateGeometry { 0% { transform: rotateZ(0deg) rotateY(0deg) rotateX(0deg); } 100% { transform: rotateZ(360deg) rotateY(360deg) rotateX(180deg); } }
.noise-overlay { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"); opacity: 0.04; }

/* --- PRELOADER --- */
#premium-loader { position: fixed; inset: 0; z-index: 9999; background: var(--bg-void); display: flex; justify-content: center; align-items: center; flex-direction: column; }
.loader-brand { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.5rem); letter-spacing: -0.5px; margin: 0 0 15px 0; }
.loader-line-container { width: 200px; height: 1px; background: var(--border-faint); overflow: hidden; }
.loader-line { width: 0%; height: 100%; background: var(--gold); }
.gsap-reveal { opacity: 0; visibility: hidden; }

/* --- HEADER --- */
.master-header { position: fixed; top: 0; width: 100%; z-index: 100; background: linear-gradient(to bottom, rgba(5,5,7,0.98) 0%, rgba(5,5,7,0.2) 100%); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-faint); }
.utility-bar { width: 100%; padding: 8px var(--pad-global); display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); border-bottom: 1px solid rgba(255, 255, 255, 0.03); }
.masthead { padding: 25px 0 15px; text-align: center; width: 100%; }
.brand-logo { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.8rem); letter-spacing: -0.5px; margin: 0; }
.main-nav { display: flex; justify-content: center; gap: 40px; padding-bottom: 15px; width: 100%; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); }
.main-nav a.active { color: var(--gold); }

/* --- MAIN CONTENT --- */
.container { max-width: var(--max-width-content); margin: 0 auto; padding: clamp(180px, 20vh, 220px) var(--pad-global) 80px; position: relative; z-index: 10; }
.centered-intro { text-align: center; max-width: 600px; margin: 0 auto 50px; }
.section-label { font-family: var(--font-mono); font-size: 10px; color: var(--gold); letter-spacing: 3px; display: block; margin-bottom: 15px; }
.intro-title { font-family: var(--font-heading); font-weight: 700; font-size: clamp(2rem, 5vw, 3.5rem); margin: 0 0 15px 0; line-height: 1.1; letter-spacing: -0.5px; }
.intro-desc { font-size: clamp(0.95rem, 2vw, 1.1rem); line-height: 1.6; color: var(--text-muted); margin: 0; font-weight: 300; }

/* --- CAROUSEL --- */
.event-carousel { 
    display: flex; gap: 24px; overflow-x: auto; padding-bottom: 40px; 
    scroll-snap-type: x mandatory; scroll-behavior: smooth; 
    margin-left: calc(-1 * var(--pad-global)); margin-right: calc(-1 * var(--pad-global)); 
    padding-left: var(--pad-global); padding-right: var(--pad-global); 
    -ms-overflow-style: none; scrollbar-width: none; 
}
.event-carousel::-webkit-scrollbar { display: none; }
.event-carousel.center-cards { justify-content: center; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }

/* --- THE MAGIC EVENT CARD --- */
.event-card { 
    flex: 0 0 360px; scroll-snap-align: center; 
    background: linear-gradient(145deg, rgba(25,25,30,0.6) 0%, rgba(10,10,12,0.95) 100%); 
    backdrop-filter: blur(25px); 
    border-radius: 16px; 
    padding: 0; position: relative; display: flex; flex-direction: column; min-height: 460px; 
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    
    /* Advanced Moving Border Setup */
    border: 1px solid transparent; 
    background-clip: padding-box;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

/* The Animated Border Container */
.event-card::before {
    content: '';
    position: absolute;
    inset: -1px; /* Extends past the card to form the border */
    border-radius: 16px;
    padding: 1px; /* The thickness of the border */
    background: var(--border-faint); /* Default dull border */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
    transition: background 0.5s ease;
}

@media(hover:hover) { 
    .event-card:hover { 
        transform: translateY(-8px); 
        box-shadow: 0 25px 60px rgba(0,0,0,0.8), 0 0 40px rgba(255, 192, 0, 0.1); 
    } 
    .event-card:hover .card-visual img { transform: scale(1.05); opacity: 1; } 
    
    /* The Magical Moving Gold Shine on Hover */
    .event-card:hover::before {
        background: conic-gradient(from var(--border-angle), transparent 20%, var(--gold) 80%, transparent 100%);
        animation: borderSpin 3s linear infinite;
    }
}

/* CSS variable required for the spin animation */
@property --border-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0turn;
}
@keyframes borderSpin {
  to { --border-angle: 1turn; }
}

/* Card Image */
.card-visual { height: 190px; width: 100%; position: relative; overflow: hidden; background: #000; border-radius: 15px 15px 0 0; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: transform 0.8s ease, opacity 0.4s ease; }
.card-visual-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,12,1), transparent 90%); z-index: 1; }

.tags-container { position: absolute; top: 16px; left: 16px; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-weight: 800; font-size: 9px; text-transform: uppercase; letter-spacing: 2px; padding: 6px 12px; border: 1px solid var(--border-faint); border-radius: 4px; color: var(--text-muted); background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); }
.tag.live { color: var(--bg-void); background: var(--gold-light); border-color: var(--gold-light); box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }

.card-body { padding: 25px 25px 0; flex-grow: 1; display: flex; flex-direction: column; z-index: 2; }
.event-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; line-height: 1.3; margin: 0 0 20px 0; letter-spacing: -0.5px; }

.card-details-block { margin-top: auto; background: rgba(255,255,255,0.02); border: 1px solid var(--border-faint); border-radius: 8px; padding: 12px 15px; }
.card-detail-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-detail-row:last-child { margin-bottom: 0; }
.detail-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); }
.detail-value { font-size: 0.85rem; font-weight: 600; color: #fff; text-align: right; max-width: 65%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- SHINY BUTTONS & FOOTER --- */
.card-footer-actions { padding: 20px 25px 25px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; z-index: 5; }

.btn-action { 
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-body); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; 
    padding: 14px 0; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; width: 100%; border: none; 
    position: relative; overflow: hidden; z-index: 20;
}
.btn-action svg { stroke-width: 2.5px; } 

.btn-action.outline { background: transparent; border: 1px solid var(--border-highlight); color: var(--text-primary); pointer-events: none; /* Let parent handle click */ }

.btn-action.solid { 
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-dark) 100%); color: #000; 
    box-shadow: 0 4px 15px var(--gold-glow), inset 0 2px 4px rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-action.solid::after {
    content: ''; position: absolute; top: 0; left: -150%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); transition: left 0s;
}
.btn-action.solid:hover::after { left: 200%; transition: left 0.7s cubic-bezier(0.19, 1, 0.22, 1); }
.btn-action.solid:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 192, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.8); }

.btn-action.solid.disabled { background: #1a1a24; color: var(--text-muted); cursor: not-allowed; box-shadow: none; border: 1px solid var(--border-faint); }
.btn-action.solid.disabled::after { display: none; }

/* --- PREMIUM EVENT MODAL --- */
.premium-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; padding: var(--pad-global); opacity: 0; pointer-events: none; }
.premium-modal-container { background: var(--bg-elevated); border: 1px solid rgba(255, 192, 0, 0.2); border-radius: 20px; width: 100%; max-width: 900px; max-height: 90vh; overflow-y: auto; position: relative; transform: scale(0.95) translateY(20px); box-shadow: 0 40px 100px rgba(0,0,0,1), inset 0 1px 1px rgba(255,255,255,0.1); }
.premium-modal-container::-webkit-scrollbar { width: 4px; }
.premium-modal-container::-webkit-scrollbar-thumb { background: var(--gold); }

.modal-close { position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.6); border: 1px solid var(--border-faint); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 10; transition: 0.3s; backdrop-filter: blur(4px); }
.modal-close:hover { background: var(--gold); color: #000; border-color: var(--gold); transform: rotate(90deg); }

.modal-grid { display: grid; grid-template-columns: 1fr 1.2fr; min-height: 550px; }
.modal-poster-col { background: #000; position: relative; overflow: hidden; }
.modal-poster-col img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; position: absolute; inset: 0; }
.modal-poster-glow { position: absolute; inset: 0; background: linear-gradient(to right, transparent, var(--bg-elevated)); z-index: 1; }
.modal-info-col { padding: 40px; display: flex; flex-direction: column; z-index: 2; }

.modal-title { font-family: var(--font-heading); font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.1; margin: 0 0 25px 0; color: #fff; }
.modal-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--border-faint); }
.meta-item { display: flex; flex-direction: column; gap: 5px; }
.meta-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 1px; }
.meta-value { font-size: 0.95rem; font-weight: 600; color: #fff; }
.meta-value.link { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(255,192,0,0.3); text-underline-offset: 4px; }
.meta-value.link:hover { text-decoration-color: var(--gold); }
.text-gold { color: var(--gold-light); font-weight: 700; }

.modal-desc-container { flex-grow: 1; margin-bottom: 30px; }
.modal-desc { font-size: 0.95rem; line-height: 1.7; color: #d4d4d8; margin: 10px 0 0 0; white-space: pre-wrap; font-weight: 300; }
.modal-action-bar { margin-top: auto; }
.w-100 { width: 100%; }

/* --- 10. UTILITIES & FOOTER --- */
.empty-state { padding: 80px 20px; text-align: center; border: 1px dashed var(--border-faint); border-radius: 12px; background: rgba(10, 10, 12, 0.3); color: var(--text-muted); font-family: var(--font-mono); font-size: 0.9rem; }
.empty-state span { color: var(--gold); letter-spacing: 3px; font-size: 1rem; display: block; margin-bottom: 10px; text-transform: uppercase; }
.alert { padding: 15px; margin-bottom: 30px; font-size: 13px; letter-spacing: 1px; border-radius: 4px; text-align: center; font-weight: 600; }
.alert-gold { border: 1px solid rgba(255,192,0,0.3); background: rgba(255,192,0,0.1); color: var(--gold); }

.master-footer { border-top: 1px solid var(--border-faint); padding: 40px var(--pad-global); margin-top: 40px; background: rgba(5,5,7,0.8); }
.footer-bottom { max-width: var(--max-width-content); margin: 0 auto; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ==========================================================================
   MOBILE RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 992px) {
    .modal-grid { grid-template-columns: 1fr; }
    .modal-poster-col { height: 280px; }
    .modal-poster-col img { position: relative; }
    .modal-poster-glow { background: linear-gradient(to bottom, transparent, var(--bg-elevated)); }
    .modal-info-col { padding: 30px 20px; }
}

@media (max-width: 768px) {
    .utility-bar { padding: 10px var(--pad-global); } .date { display: none; } .auth-links { width: 100%; text-align: center; } 
    .masthead { padding: 15px 0 10px; }
    .main-nav { justify-content: flex-start; overflow-x: auto; white-space: nowrap; padding: 0 var(--pad-global) 15px; -ms-overflow-style: none; }
    .container { padding-top: 140px; padding-bottom: 40px; }
    .main-intro { margin-bottom: 30px; }
    
    .event-card { flex: 0 0 85vw; min-height: auto; }
    .event-carousel.center-cards { justify-content: flex-start; } 
    
    .card-footer-actions { padding: 15px 20px 20px; grid-template-columns: 1fr; gap: 10px; } 
    .btn-action { padding: 16px 0; } 
    
    .footer-bottom { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
}