/*
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Description: Child theme for Kadence
Version: 1.0.0
Template: kadence
*/

/* OpenAgenda Modern Styling */

/* Grid Layout for Event Cards */
.oa-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* Individual Card Styles */
.oa-list-item {
  border: none !important;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.oa-list-item:hover {
  transform: translateY(-5px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.oa-event-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: inherit;
}

.oa-event-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background: #f7fafc;
}

.oa-event-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.oa-list-item:hover .oa-event-thumbnail img {
  transform: scale(1.05);
}

/* Date Badge Styles */
.oa-date-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #ffd700;
  color: #1a202c;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  line-height: 1;
}

.oa-date-day {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.oa-date-month {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.oa-event-details {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.oa-event-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1a202c;
  margin-bottom: 12px;
}

.oa-event-description {
  font-size: 0.9rem;
  color: #718096;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.oa-event-location-label {
  margin-top: auto;
  font-size: 0.8rem;
  color: #a0aec0;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.oa-event-location-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #cbd5e0;
  border-radius: 50%;
  margin-right: 8px;
}

/* Pagination & Controls */
.oa-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
  gap: 10px;
}

.oa-controls button,
.oa-controls a {
  padding: 10px 20px;
  border-radius: 6px;
  background: #4a5568;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  text-decoration: none;
}

.oa-controls button:hover,
.oa-controls a:hover {
  background: #2d3748;
}

/* ============================================
   SINGLE EVENT PAGE STYLING
   ============================================ */

/* Hero Image Section */
.oa-single-hero {
  width: 100%;
  margin-bottom: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.oa-single-thumbnail {
  width: 100%;
  margin: 0;
  position: relative;
}

.oa-single-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

.oa-image-credits {
  position: absolute;
  bottom: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Main Content Grid (2 columns) */
.oa-single-content {
  display: grid !important;
  grid-template-columns: 2fr 1fr !important;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 968px) {
  .oa-single-content {
    grid-template-columns: 1fr !important;
  }
}

/* Left Column: Main Content */
.oa-single-main {
  background: white;
}

.oa-single-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 20px;
  line-height: 1.2;
}

.oa-single-description {
  font-size: 1.1rem;
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: 25px;
  font-weight: 500;
}

.oa-single-long-description {
  font-size: 1rem;
  color: #718096;
  line-height: 1.8;
  margin-bottom: 30px;
}

.oa-single-long-description p {
  margin-bottom: 15px;
}

/* Keywords Badges */
.oa-keywords-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.oa-keyword-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #f2311e;
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.oa-keyword-tag:hover {
  transform: translateY(-2px);
}

/* Right Column: Info Cards */
.oa-single-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: sticky;
  top: 50px;
  align-self: flex-start;
}

.oa-info-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 15px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.oa-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.oa-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #f2311e;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.oa-card-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.oa-card-content {
  flex-grow: 1;
}

.oa-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.oa-card-value {
  font-size: 0.95rem;
  color: #2d3748;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

.oa-card-value a {
  color: #f2311e;
  text-decoration: none;
}

.oa-card-value a:hover {
  text-decoration: underline;
}

/* Share Button - Standalone (no card) */
.oa-share-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  gap: 15px;
}

.oa-share-card:hover {
  transform: none;
  box-shadow: none;
}

/* Share Button - Forced Styling */
.oa-share-button-wrapper button,
.oa-share-button-wrapper .oa-share-button,
.oa-share-button-wrapper a {
  background: #f2311e !important;
  color: white !important;
  padding: 14px 24px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  border: none !important;
  cursor: pointer;
  text-decoration: none;
  display: block; /* Changed to block ensure width applies */
  width: 100% !important;
  text-align: center;
  font-size: 0.95rem !important;
  box-shadow: 0 2px 6px rgba(242, 49, 30, 0.25) !important;
  margin: 0 !important;
  min-width: 100% !important; /* Force width */
}

.oa-share-button-wrapper button:hover,
.oa-share-button-wrapper .oa-share-button:hover,
.oa-share-button-wrapper a:hover {
  background: #c41f10 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 49, 30, 0.35) !important;
  border-color: transparent !important;
  color: white !important;
}

/* Online Access Banner */
.oa-access-link-banner {
  max-width: 1200px;
  margin: 40px auto;
  padding: 25px 30px;
  background: linear-gradient(135deg, #f2311e 0%, #c41f10 100%);
  border-radius: 12px;
  color: white;
  text-align: center;
  box-shadow: 0 4px 15px rgba(242, 49, 30, 0.3);
}

.oa-access-link-banner strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.oa-access-button {
  display: inline-block;
  padding: 12px 30px;
  background: white;
  color: #f2311e;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.oa-access-button:hover {
  background: #f7fafc;
  transform: scale(1.05);
}

/* Additional Fields, Location & Timings Styling */
.oa-event-additional-fields,
.oa-timings-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Updated shadow */
  transition: box-shadow 0.2s ease; /* Removed transform transition */
}

.oa-event-location {
  background: white;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.oa-event-location-title {
  width: 100%;
  border-bottom: 2px solid #f2311e;
  padding-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  display: block;
}

.oa-location-map-wrapper {
  flex: 1;
  min-width: 300px;
}

/* Add hover effect - Shadow only */
.oa-event-additional-fields:hover,
.oa-timings-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.oa-event-additional-fields .oa-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  display: block;
}

/* Bottom Grid Layout */
.oa-bottom-info-grid {
  display: flex;
  gap: 30px;
  margin: 40px 0;
}

.oa-bottom-info-grid > * {
  flex: 1;
}

.oa-timings-section,
.oa-event-additional-fields {
  margin-bottom: 0 !important;
  height: auto;
}

@media (max-width: 968px) {
  .oa-bottom-info-grid {
    flex-direction: column;
  }
}

.oa-event-additional-fields .oa-label {
  font-size: 1.1rem;
  color: #4a5568;
  font-weight: 600;
}

.oa-event-location-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2d3748;
  display: block;
  margin-bottom: 5px;
}

.oa-event-location-address,
.oa-event-location-city,
.oa-event-location-region {
  color: #718096;
  font-style: normal;
  line-height: 1.6;
}

.oa-event-location-address-link {
  color: #f2311e;
  text-decoration: none;
  font-weight: 500;
}

.oa-event-location-address-link:hover {
  text-decoration: underline;
}

.oa-label {
  display: block;
  font-weight: 700;
  color: #2d3748;
}

.oa-event-location-map {
  margin-top: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.leaflet-container {
  z-index: 1; /* Fix for map overlay issues */
}

/* Event Loop Controls - Modern Styling */
.oa-controls.oa-controls-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 30px;
  border-bottom: 2px solid #f1f5f9;
}

.oa-controls-top .oa-back-link {
  color: #f2311e;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.oa-controls-top .oa-back-link:hover {
  color: #c41f10;
  transform: translateX(-3px);
}

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

.oa-event-navigation .oa-nav-link {
  background: #f2311e;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(242, 49, 30, 0.25);
}

.oa-event-navigation .oa-nav-link:hover {
  background: #c41f10;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 49, 30, 0.35);
}

.oa-event-navigation .oa-nav-link:visited,
.oa-event-navigation .oa-nav-link:active,
.oa-event-navigation .oa-nav-link:focus {
  color: white;
  background: #f2311e;
}

.oa-event-navigation .oa-nav-link .oa-icon {
  height: 16px;
  fill: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  /* Stack controls vertically */
  .oa-controls.oa-controls-top {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    text-align: center;
  }

  .oa-controls-top .oa-back-link {
    justify-content: center;
  }

  .oa-event-navigation {
    justify-content: space-between;
    width: 100%;
  }

  .oa-event-navigation .oa-nav-link {
    flex: 1;
    justify-content: center;
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  /* Reset Sidebar Sticky on Mobile */
  .oa-single-sidebar {
    position: static;
    margin-top: 0;
  }

  /* Ensure full width buttons */
  .oa-share-button-wrapper button,
  .oa-share-button-wrapper a {
    width: 100%;
    padding: 14px 20px;
  }

  h1.oa-single-title {
    font-size: 1.5rem;
  }

  /* Reduce all card padding to 10px on mobile */
  .oa-event-additional-fields,
  .oa-timings-section {
    padding: 10px !important;
  }

  /* Stack location layout on mobile */
  .oa-event-location {
    flex-direction: column;
  }

  .oa-location-map-wrapper {
    min-width: 100%;
  }

  .entry-content-wrap {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}
