:root {
  --primary-color: #0d1126;
  --primary-light: #1a237e;
  --secondary-color: #ffab00;
  --light-color: #f8f9fa;
  --text-color: #333;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--light-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* === Hero Section === */
.proyectos-hero {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  opacity: 0.9;
}

/* === Project Cards === */
.project-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.project-card:hover::before {
  opacity: 1;
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem;
}

.project-image img {
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: all 0.4s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.project-card:hover .project-image img {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.5rem;
}

.project-title {
  font-size: 1.35rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
  line-height: 1.4;
  min-height: 2.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Project Dates === */
.project-dates {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-date {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-date-label {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary-color);
  margin-bottom: 0;
}

.project-date-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* === Project Areas === */
.project-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  padding: 0;
}

.area-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 24px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.area-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.4s ease;
}

.area-badge:hover::before {
  left: 100%;
}

.area-badge i {
  font-size: 0.9rem;
}

.area-badge[data-area="energia"] {
  background: linear-gradient(135deg, #FFB800 0%, #FF9500 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(255, 184, 0, 0.35);
}

.area-badge[data-area="agricultura"] {
  background: linear-gradient(135deg, #00A200 0%, #007A00 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 162, 0, 0.35);
}

.area-badge[data-area="ambiente"] {
  background: linear-gradient(135deg, #00A8E8 0%, #007AC2 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(0, 168, 232, 0.35);
}

.area-badge[data-area="computo"] {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.35);
}

.area-badge[data-area="social"] {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

.area-badge:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* === ODS Container === */
.ods-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #fafafa 0%, #fff 100%);
  border-radius: 8px;
  flex-wrap: wrap;
}

.ods-logo {
  height: 48px;
  width: 48px;
  object-fit: contain;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.ods-logo:hover {
  transform: scale(1.2) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* === Button === */
.btn-project {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a237e 100%);
  color: white;
  padding: 0.85rem 2rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(13, 17, 38, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-project:hover::before {
  left: 100%;
}

.btn-project:hover {
  background: linear-gradient(135deg, #1a237e 0%, var(--secondary-color) 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 17, 38, 0.3);
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .project-image {
    height: 180px;
    padding: 1rem;
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .project-title {
    font-size: 1.2rem;
    min-height: auto;
  }
  
  .project-dates {
    gap: 1rem;
    padding: 0.8rem;
  }
  
  .area-badge {
    font-size: 0.68rem;
    padding: 0.4rem 0.8rem;
  }
  
  .ods-logo {
    height: 40px;
    width: 40px;
  }
  
  .btn-project {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .project-dates {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .area-badge {
    font-size: 0.65rem;
    padding: 0.35rem 0.7rem;
  }
  
  .ods-container {
    gap: 0.5rem;
    padding: 0.8rem;
  }
  
  .ods-logo {
    height: 36px;
    width: 36px;
  }
}
