/* Reset y variables */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --info-color: #17a2b8;
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --border-color: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section */
.hero-section {
  background: var(--gradient-primary);
  color: white;
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-actions {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.btn-historial {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-historial:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  color: white;
  text-decoration: none;
}

.btn-historial img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* Agenda Section */
.agenda-section {
  padding: 80px 0;
  background: var(--bg-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Year Header */
.year-header {
  text-align: center;
  margin-bottom: 60px;
}

.year-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
}

.year-divider {
  width: 100px;
  height: 4px;
  background: var(--gradient-accent);
  margin: 0 auto;
  border-radius: 2px;
}

/* Month Sections */
.month-section {
  margin-bottom: 60px;
}

.month-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.month-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  text-transform: capitalize;
}

.month-indicator {
  flex: 1;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
}

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

/* Event Cards */
.event-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  min-height: 120px;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Event Date */
.event-date {
  background: var(--gradient-accent);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 1rem;
  position: relative;
}

.event-date::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid #4facfe;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.date-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.date-month {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Event Content */
.event-content {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-location {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.event-session {
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gradient-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.event-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.event-time img {
  width: 16px;
  height: 16px;
  filter: hue-rotate(200deg);
}

/* Special Event Types */
.event-card.pending {
  border-left: 4px solid var(--warning-color);
}

.event-card.pending .event-date {
  background: var(--gradient-warning);
}

.event-card.pending .event-session {
  color: var(--warning-color);
}

.event-card.special {
  border-left: 4px solid var(--info-color);
}

.event-card.special .event-date {
  background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

.event-card.special .event-session {
  color: var(--info-color);
}

.event-card.workshop {
  border-left: 4px solid var(--success-color);
}

.event-card.workshop .event-date {
  background: var(--gradient-success);
}

.event-card.workshop .event-session {
  color: var(--success-color);
}

/* Event Schedule for Special Events */
.event-schedule {
  margin: 0.5rem 0 1rem 0;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.schedule-time {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.schedule-type {
  color: var(--text-color);
  font-size: 0.9rem;
}

/* Event Details for Workshops */
.event-details {
  margin: 0.5rem 0 1rem 0;
}

.event-location,
.event-partner,
.event-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0.25rem 0;
}

.event-location {
  font-weight: 600;
  color: var(--primary-color);
}

.event-partner {
  font-style: italic;
}

.event-note {
  font-style: italic;
  color: var(--warning-color);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animations for event cards */
.event-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.event-card:nth-child(1) { animation-delay: 0.1s; }
.event-card:nth-child(2) { animation-delay: 0.2s; }
.event-card:nth-child(3) { animation-delay: 0.3s; }
.event-card:nth-child(4) { animation-delay: 0.4s; }
.event-card:nth-child(5) { animation-delay: 0.5s; }
.event-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .year-title {
    font-size: 2.5rem;
  }
  
  .month-title {
    font-size: 1.5rem;
  }
  
  .events-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .event-card {
    min-height: auto;
  }
  
  .event-content {
    padding: 1rem;
  }
  
  .event-location {
    font-size: 1.1rem;
  }
  
  .event-session {
    font-size: 0.9rem;
  }
  
  .date-number {
    font-size: 1.5rem;
  }
  
  .date-month {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .agenda-section {
    padding: 60px 0;
  }
  
  .year-header {
    margin-bottom: 40px;
  }
  
  .month-section {
    margin-bottom: 40px;
  }
  
  .month-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .month-indicator {
    width: 100%;
  }
  
  .event-card {
      flex-direction: column;
    }
  
  .event-date {
    min-width: auto;
    flex-direction: row;
    gap: 1rem;
    padding: 0.75rem 1rem;
  }
  
  .event-date::after {
    display: none;
  }
  
  .date-number {
    font-size: 1.25rem;
  }
  
  .date-month {
    font-size: 0.75rem;
  }
  
  .event-content {
    padding: 0.75rem;
  }
}

/* Print styles */
@media print {
  .hero-section {
    display: none;
  }
  
  .event-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    margin-bottom: 10px;
  }
  
  .event-card:hover {
    transform: none;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn-historial:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Loading states */
.event-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.event-card.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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