/* ===== SERVICES PAGE ===== */
.services-page-section,
.events-page-section,
.community-page-section,
.error-page-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--blue-very-light) 0%, #e8f0f8 100%);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.service-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition-smooth);
  animation: fadeInUp 0.5s ease-out backwards;
  position: relative;
  overflow: hidden;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(240, 111, 12, 0.08), transparent);
  transition: left 0.5s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.service-title {
  font-family: 'NeoTech Bold', 'Arial Black', Arial, sans-serif;
  color: var(--primary-blue);
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.service-description {
  color: var(--gray-text);
  line-height: 1.6;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
}

.event-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  display: flex;
  gap: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition-smooth);
  animation: fadeInUp 0.5s ease-out backwards;
  position: relative;
  overflow: hidden;
}

.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::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--primary-orange);
  transition: height 0.3s ease;
}

.event-card:hover::before {
  height: 100%;
}

.event-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-hover);
  border-left: 4px solid var(--primary-orange);
}

.event-date {
  flex-shrink: 0;
  text-align: center;
  background: var(--primary-blue);
  color: white;
  padding: 20px;
  border-radius: 15px;
  min-width: 100px;
}

.event-day {
  font-size: 2rem;
  font-weight: bold;
}

.event-month {
  font-size: 0.9rem;
  margin-top: 5px;
}

.event-content {
  flex: 1;
}

.event-title {
  font-family: 'NeoTech Bold', 'Arial Black', Arial, sans-serif;
  color: var(--primary-blue);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.event-description {
  color: var(--gray-text);
  margin-bottom: 15px;
}

.event-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.event-time,
.event-location {
  color: var(--primary-blue);
  font-size: 0.95rem;
}

.no-events-message,
.no-projects-message,
.coming-soon {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-text);
  font-size: 1.1rem;
}

/* Services page specific styles */
.services-section {
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden !important; /* Evita scroll horizontal */
  margin: 0;
  position: relative;
}

.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: calc(100% - 40px);
  overflow-x: hidden !important; /* Evita scroll horizontal */
  position: relative;
}

.services-container * {
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .services-container {
    max-width: 1200px;
    padding: 0 40px;
  }
}

.services-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: -0.5px;
}

.services-subtitle-text {
  text-align: center;
  color: var(--gray-text);
  font-size: 1.1rem;
  margin-bottom: 32px;
  font-style: italic;
}

.services-content-wrapper {
  animation: servicesFadeIn 0.5s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* Evita scroll horizontal */
}

.services-calendar-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* Evita scroll horizontal */
}

@keyframes servicesFadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.services-section .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 10px;
}

.services-flip-card {
  perspective: 1000px;
  cursor: pointer;
  height: 220px;
}

.services-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.services-flip-front,
.services-flip-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease;
}

.services-flip-card:hover .services-flip-front,
.services-flip-card:hover .services-flip-back {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.services-flip-front {
  background: linear-gradient(135deg, #f06f0c 0%, #ff8c3a 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.3rem;
  text-align: center;
  gap: 12px;
}

.services-flip-icon {
  font-size: 2.5rem;
}

.services-flip-back {
  background: #fff;
  border: 2px solid var(--primary-blue);
  transform: rotateY(180deg);
  color: var(--primary-blue);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  overflow-y: auto;
}

.services-flip-card.active .services-flip-inner {
  transform: rotateY(180deg);
}

.services-calendar-wrap {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.services-calendar-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 3px solid #f06f0c;
}

.services-calendar-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.services-calendar-desc {
  color: var(--gray-text);
  font-style: italic;
}

.services-loading-state,
.services-error-state,
.services-empty-state {
  text-align: center;
  padding: 48px 24px;
}

.services-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #f06f0c;
  border-radius: 50%;
  animation: servicesSpin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes servicesSpin {
  to { transform: rotate(360deg); }
}

.services-error-state {
  color: #b91c1c;
}

.services-error-icon,
.services-empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.services-empty-hint {
  display: block;
  margin-top: 8px;
  color: #999;
  font-size: 0.9rem;
}

.services-month-block {
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* Evita scroll horizontal */
}

.services-month-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0a3d6e 100%);
  color: #fff;
  font-weight: 800;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(7, 40, 80, 0.25);
  text-transform: capitalize;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 auto 20px auto;
  position: relative;
}

.services-month-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-orange), transparent);
}

.services-month-icon {
  font-size: 1.5rem;
}

.services-event-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden !important; /* Evita scroll horizontal */
}

.services-event-list * {
  max-width: 100%;
  box-sizing: border-box;
}

.services-event-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: none;
  border-radius: 16px;
  padding: 0;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(7, 40, 80, 0.1);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden !important;
  margin: 0 auto;
  position: relative;
}

.services-event-item:hover {
  box-shadow: 0 8px 24px rgba(240, 111, 12, 0.2);
  transform: translateY(-2px);
}

/* Desktop: diseño horizontal */
@media (min-width: 769px) {
  .services-event-item {
    flex-direction: row !important;
    border-radius: 16px;
    align-items: stretch;
  }

  .services-event-date-box {
    border-radius: 16px 0 0 16px !important;
    flex-direction: column !important;
    padding: 24px 20px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    width: 140px !important;
    flex-shrink: 0;
    gap: 8px;
  }

  .services-event-date-box::after {
    display: none;
  }

  .services-event-date-box::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  }

  .services-event-day {
    font-size: 3.5rem !important;
    margin: 0;
  }

  .services-event-month {
    font-size: 1.1rem !important;
    margin: 0;
  }

  .services-event-time {
    margin-top: 12px !important;
    width: 100% !important;
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
  }

  .services-event-body {
    padding: 24px !important;
    flex: 1;
    border-radius: 0 16px 16px 0;
    max-width: none !important;
  }

  .services-event-title {
    font-size: 1.4rem !important;
  }

  .services-event-desc {
    font-size: 1rem !important;
  }

  .services-event-location {
    font-size: 1rem !important;
  }
}

.services-event-date-box {
  background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c3a 100%);
  border-radius: 16px 16px 0 0;
  padding: 16px 12px;
  text-align: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(240, 111, 12, 0.2);
  overflow: hidden !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  margin: 0;
}

.services-event-date-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.services-event-day {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: fit-content;
  box-sizing: border-box;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.services-event-month {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.95;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: fit-content;
  box-sizing: border-box;
  letter-spacing: 1px;
}

.services-event-time {
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.25);
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  overflow: hidden !important;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 1;
}

.services-event-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden !important;
  min-width: 0;
  padding: 16px 14px;
  background: #fff;
  margin: 0;
  flex: 1;
}

.services-event-title {
  font-weight: 800;
  color: var(--primary-blue);
  font-size: 1.3rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.services-event-desc {
  color: var(--gray-text);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.95rem;
  margin: 0;
}

.services-event-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.services-location-icon {
  color: var(--primary-orange);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.services-add-event-btn {
  background: linear-gradient(135deg, #f06f0c 0%, #ff8c3a 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(240, 111, 12, 0.3);
}

.services-add-event-btn:hover {
  background: linear-gradient(135deg, #e0650a 0%, #ff7b29 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(240, 111, 12, 0.4);
}

.services-event-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.services-edit-btn,
.services-delete-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.services-edit-btn {
  background: var(--primary-blue);
  color: white;
}

.services-edit-btn:hover {
  background: #0a3d6e;
  transform: translateY(-2px);
}

.services-delete-btn {
  background: #dc2626;
  color: white;
}

.services-delete-btn:hover {
  background: #b91c1c;
  transform: translateY(-2px);
}

.services-event-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.services-event-modal-content {
  background-color: white;
  border-radius: 16px;
  padding: 0;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.services-event-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.services-event-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-blue);
  font-weight: 800;
}

.services-event-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.services-event-modal-close:hover {
  background: #f3f4f6;
  color: #000;
}

.services-event-form-group {
  margin-bottom: 20px;
}

.services-event-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary-blue);
  font-size: 0.95rem;
}

.services-event-form-group input,
.services-event-form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.services-event-form-group input:focus,
.services-event-form-group textarea:focus {
  outline: none;
  border-color: #f06f0c;
  box-shadow: 0 0 0 3px rgba(240, 111, 12, 0.1);
}

.services-event-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.services-event-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.services-event-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
  margin-top: 20px;
}

.services-event-cancel-btn,
.services-event-save-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.services-event-cancel-btn {
  background: #f3f4f6;
  color: #666;
}

.services-event-cancel-btn:hover {
  background: #e5e7eb;
}

.services-event-save-btn {
  background: linear-gradient(135deg, #f06f0c 0%, #ff8c3a 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(240, 111, 12, 0.3);
}

.services-event-save-btn:hover {
  background: linear-gradient(135deg, #e0650a 0%, #ff7b29 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(240, 111, 12, 0.4);
}

.community-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.community-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.community-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.community-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.community-card h3 {
  font-family: 'NeoTech Bold', 'Arial Black', Arial, sans-serif;
  color: var(--primary-blue);
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.community-card p {
  color: var(--gray-text);
  line-height: 1.6;
}

.error-content {
  text-align: center;
  padding: 60px 20px;
}

.error-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.error-title {
  font-family: 'NeoTech Bold', 'Arial Black', Arial, sans-serif;
  font-size: 6rem;
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.error-subtitle {
  font-family: 'NeoTech Bold', 'Arial Black', Arial, sans-serif;
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 20px;
}

.error-description {
  color: var(--gray-text);
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.error-btn {
  background: linear-gradient(135deg, var(--primary-orange), #ff8c42);
  color: white;
  text-decoration: none;
  padding: 16px 35px;
  border-radius: 10px;
  font-family: 'NeoTech Bold', 'Arial Black', Arial, sans-serif;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(240, 111, 12, 0.4);
}

.error-btn:hover {
  background: linear-gradient(135deg, #e0650a, #ff7b29);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(240, 111, 12, 0.6);
}

