/* Event Details Page - ksis-style */

:root {
  --primary-color: #004466;
  --accent-color: #0077aa;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --background-color: #f8f9fa;
  --light-color: #ffffff;
  --text-color: #333333;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 20px;
  box-shadow: var(--box-shadow);
}

.header-flex {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  height: 50px;
  width: auto;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

header nav {
  margin-top: 15px;
  text-align: center;
}

header nav a {
  color: white;
  text-decoration: none;
  margin: 0 12px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
}

header nav a:hover {
  background: rgba(255,255,255,0.15);
}

/* Main Container */
.event-details-container {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 20px;
}

/* Loading State */
.loading-state,
.not-found-state {
  text-align: center;
  padding: 100px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--box-shadow);
}

.loader {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.not-found-state i {
  font-size: 4rem;
  color: var(--warning-color);
  margin-bottom: 20px;
}

.btn-back {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 20px;
  transition: var(--transition);
}

.btn-back:hover {
  background: var(--primary-color);
}

/* Event Content Layout */
#eventContent {
  display: grid;
  grid-template-areas:
    "banner banner"
    "main sidebar";
  grid-template-columns: 1fr 350px;
  gap: 30px;
}

/* Banner */
.event-banner {
  grid-area: banner;
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.event-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main Info */
.event-main-info {
  grid-area: main;
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--box-shadow);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
}

.event-header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-muted);
  font-size: 1rem;
}

.event-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-meta i {
  color: var(--accent-color);
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem !important;
  text-transform: uppercase;
}

.status-badge.open {
  background: #e8f5e9;
  color: var(--success-color);
}

.status-badge.closed {
  background: #ffebee;
  color: var(--danger-color);
}

.event-actions {
  display: flex;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--success-color), #20c997);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
  background: var(--border-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background: var(--text-muted);
  color: white;
}

/* Event Sections */
.event-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.event-section:last-child {
  border-bottom: none;
}

.event-section h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-section p {
  color: var(--text-color);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: var(--background-color);
  border-radius: 8px;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--accent-color);
  width: 30px;
  text-align: center;
}

.contact-item strong {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.contact-item p {
  margin: 0;
}

.contact-item a {
  color: var(--accent-color);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Sidebar */
.event-sidebar {
  grid-area: sidebar;
}

.sidebar-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
}

.sidebar-card h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.info-list {
  list-style: none;
}

.info-list li {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.info-list i {
  font-size: 1.2rem;
  color: var(--accent-color);
  width: 20px;
}

.info-list strong {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 5px;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.whatsapp {
  background: #25d366;
}

.share-btn.copy {
  background: var(--text-muted);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Footer */
footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 25px 20px;
  margin-top: 50px;
}

/* Responsive */
@media (max-width: 1024px) {
  #eventContent {
    grid-template-areas:
      "banner"
      "main"
      "sidebar";
    grid-template-columns: 1fr;
  }
  
  .event-sidebar {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .event-header {
    flex-direction: column;
  }
  
  .event-header h1 {
    font-size: 1.8rem;
  }
  
  .event-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  .event-banner {
    height: 250px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   Regulations Files
   =========================== */
.regulations-files-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.regulation-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.regulation-file-item:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateX(5px);
}

.regulation-file-item .file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.regulation-file-item .file-info i {
  font-size: 24px;
  color: #d32f2f;
}

.regulation-file-item .file-name {
  font-weight: 500;
  color: #333;
  flex: 1;
}

.regulation-file-item .file-size {
  color: #666;
  font-size: 14px;
  margin-left: 10px;
}

.regulation-file-item .file-actions {
  display: flex;
  gap: 10px;
}

.regulation-file-item .btn-view,
.regulation-file-item .btn-download {
  padding: 8px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.regulation-file-item .btn-view {
  background: #2196F3;
  color: white;
}

.regulation-file-item .btn-view:hover {
  background: #1976D2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.regulation-file-item .btn-download {
  background: #4CAF50;
  color: white;
}

.regulation-file-item .btn-download:hover {
  background: #388E3C;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

@media (max-width: 768px) {
  .regulation-file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .regulation-file-item .file-info {
    width: 100%;
  }
  
  .regulation-file-item .file-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .regulation-file-item .btn-view,
  .regulation-file-item .btn-download {
    flex: 1;
    justify-content: center;
  }
}

