/* Diseño responsivo y animaciones - Basado en menu.html */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f7f4;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #2c3e50;
  line-height: 1.6;
}

/* Responsive container */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

h1, h2, h3 {
  color: #557a6b;
  margin-bottom: 20px;
  font-weight: 600;
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  body {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.25rem;
  }
}

/* Cards */
.carta {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 24px;
  width: 100%;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.carta:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .carta {
    padding: 16px;
    margin-bottom: 15px;
  }
}

/* Lists */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item {
  margin-bottom: 12px;
}

.item:last-child {
  margin-bottom: 0;
}

/* Links y botones */
.item a, a.btn, button {
  display: block;
  background-color: #9FE2BF;
  color: #1c3d27;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.item a:hover, a.btn:hover, button:hover {
  background-color: #8ecfa1;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(142, 207, 161, 0.3);
}

.item a:active, a.btn:active, button:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(142, 207, 161, 0.2);
}

/* Form elements */
form {
  width: 100%;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #9FE2BF;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #557a6b;
  box-shadow: 0 0 0 3px rgba(85, 122, 107, 0.1);
  background-color: #f9fffe;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

th {
  background-color: #9FE2BF;
  color: #1c3d27;
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid #e0e0e0;
}

tr:hover {
  background-color: #f5f5f5;
  transition: background-color 0.3s ease;
}

/* Code blocks */
pre, code {
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 4px 8px;
  font-family: 'Courier New', monospace;
  color: #333;
}

pre {
  padding: 15px;
  overflow-x: auto;
  margin-bottom: 20px;
}

/* Grid layout responsive */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
}

.grid-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Flex layout responsive */
.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .flex-container {
    flex-direction: column;
  }
}

/* Animation classes */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-in {
  animation: slideIn 0.5s ease-out;
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* Mobile first responsive */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .item a, a.btn, button {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
  
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 10px;
  }
}
