/* Estilos generales */
:root {
    --primary-color: #7c3aed;
    --secondary-color: #5b21b6;
    --accent-color: #8e2de2;
    --text-color: #333;
    --light-text: #fff;
    --background-color: #f0f0f0;
    --card-bg: #ffffff;
    --synapse-color-1: #6e48aa;
    --synapse-color-2: #9d50bb;
    --synapse-pulse: rgba(110, 72, 170, 0.5);
    --border-color: #e5e7eb;
    --shadow: 0 10px 20px rgba(110, 72, 170, 0.1);
    --card-shadow: 0 15px 25px rgba(110, 72, 170, 0.08);
    --transition: all 0.3s ease;
    --gradient-1: linear-gradient(135deg, #4a1d96 0%, #5b21b6 50%, #4338ca 100%);
    --gradient-2: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
    --radius: 0.375rem;
    --yellow: #f59e0b;
    --red: #ef4444;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
  }
  
  body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
  }
  
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  /* Header */
  header {
    background: var(--gradient-1);
    color: var(--light-text);
    padding: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
  }
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0 1rem;
    position: relative;
    display: none;
  }
  
  @media (min-width: 768px) {
    .search-bar {
      display: block;
    }
  }
  
  .search-bar input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
  }
  
  .search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .search-bar i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
  }
  
  .btn-primary {
    background: var(--gradient-2);
    color: white;
    box-shadow: 0 4px 10px rgba(142, 45, 226, 0.3);
  }
  
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(142, 45, 226, 0.4);
  }
  
  .btn-outline {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
  
  .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
  }
  
  .btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
  }
  
  .avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: white;
    cursor: pointer;
  }
  
  .mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
  }
  
  @media (min-width: 768px) {
    .mobile-menu-btn {
      display: none;
    }
  }
  
  .mobile-menu {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .mobile-menu.active {
    display: block;
  }
  
  .mobile-menu .search-bar {
    display: block;
    margin-bottom: 1rem;
  }
  
  .mobile-menu .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Selector de tipo de servicio */
  .service-type-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem auto;
    max-width: 500px;
  }
  
  .service-type-btn {
    flex: 1;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(110, 72, 170, 0.3);
    opacity: 0.7;
  }
  
  .service-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(110, 72, 170, 0.4);
  }
  
  .service-type-btn.active {
    opacity: 1;
    background: var(--gradient-2);
    box-shadow: 0 6px 15px rgba(142, 45, 226, 0.4);
  }
  
  /* Main content */
  .main-content {
    padding: 1rem 0 2rem;
  }
  
  .page-title {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .page-title h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
  }
  
  .page-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
  }
  
  /* Filtros y controles */
  .board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    background-color: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
  }
  
  .filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    background-color: white;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .tag:hover, .tag.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }
  
  /* Muro de clasificados */
  .classified-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f0f0f0;
    border-radius: 10px;
    min-height: 60vh;
    position: relative;
  }
  
  /* Tarjeta de clasificado */
  .classified-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    transform-origin: center;
    animation: cardAppear 0.5s forwards;
    height: 20vh; /* Altura inicial compacta */
    cursor: pointer;
    z-index: 1;
  }
  
  @keyframes cardAppear {
    from {
      opacity: 0;
      transform: scale(0.8) translateY(20px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
  
  .classified-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 30px rgba(110, 72, 170, 0.2);
    z-index: 10;
    height: 85vh; /* Se expande al hacer hover */
  }
  
  .classified-card.offer {
    border-top: 4px solid #4c1d95;
  }
  
  .classified-card.request {
    border-top: 4px solid #8e2de2;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    margin-top: 2vh;
}
  
  .card-type {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    color: white;
  }
  
  .card-type.offer {
    background-color: #4c1d95;
  }
  
  .card-type.request {
    background-color: #8e2de2;
  }
  
  .card-price {
    font-weight: 600;
    color: #10b981;
    font-size: 0.875rem;
  }
  
  .card-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .card-category {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .card-category i {
    color: var(--primary-color);
  }
  
  /* Elementos que se muestran solo al hacer hover */
  .card-description,
  .card-meta,
  .card-footer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  .classified-card:hover .card-description,
  .classified-card:hover .card-meta,
  .classified-card:hover .card-footer {
    max-height: 200px;
    opacity: 1;
    overflow: visible;
  }
  
  .card-description {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.625rem;
    color: #666;
    margin-bottom: 0.75rem;
  }
  
  .card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
  }
  
  .card-provider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .provider-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
  }
  
  .provider-info {
    display: flex;
    flex-direction: column;
  }
  
  .provider-name {
    font-size: 0.75rem;
    font-weight: 500;
  }
  
  .provider-date {
    font-size: 0.625rem;
    color: #666;
  }
  
  .card-actions {
    display: flex;
    gap: 0.5rem;
  }
  
  .card-action-btn {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f3f4f6;
    border: none;
    cursor: pointer;
    color: #666;
    transition: var(--transition);
  }
  
  .card-action-btn:hover {
    background-color: var(--primary-color);
    color: white;
  }
  
  /* Botones de acción en tarjetas */
  .pin-btn {
    position: absolute;
    top: 0.5rem;
    right: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    border: none;
    color: #666;
    transition: all 0.2s;
    font-size: 0.75rem;
  }
  
  .pin-btn:hover {
    background-color: white;
    color: var(--yellow);
  }
  
  .pin-btn.pinned {
    color: var(--yellow);
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  
  .delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    border: none;
    color: #666;
    transition: all 0.2s;
    font-size: 0.75rem;
  }
  
  .delete-btn:hover {
    background-color: white;
    color: var(--red);
  }
  
  .new-badge {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    z-index: 5;
  }
  
  .featured-badge {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background-color: var(--yellow);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    z-index: 5;
  }
  
  /* Botón para añadir clasificado */
  .add-classified-btn {
    background-color: white;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    height: 180px;
  }
  
  .add-classified-btn:hover {
    border-color: var(--primary-color);
    background-color: rgba(124, 58, 237, 0.05);
    transform: scale(1.05);
  }
  
  .add-classified-btn i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
  }
  
  .add-classified-btn span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
  }
  
  /* Modal */
  .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }
  
  .modal-backdrop.active {
    opacity: 1;
    visibility: visible;
  }
  
  .modal {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s;
  }
  
  .modal-backdrop.active .modal {
    transform: scale(1);
  }
  
  .modal-header {
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-1);
    color: white;
    border-radius: 15px 15px 0 0;
  }
  
  .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
  }
  
  .modal-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
  }
  
  /* Form */
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--primary-color);
  }
  
  .form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: var(--transition);
  }
  
  .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(110, 72, 170, 0.1);
  }
  
  .form-textarea {
    min-height: 100px;
    resize: vertical;
  }
  
  .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background-color: white;
  }
  
  .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  @media (min-width: 640px) {
    .form-row {
      grid-template-columns: 1fr 1fr;
    }
  }
  
  .file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .file-upload:hover {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    color: white;
  }
  
  .file-upload i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
  }
  
  .file-upload p {
    margin-bottom: 0.25rem;
  }
  
  .file-upload .small {
    font-size: 0.75rem;
    opacity: 0.8;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .service-type-selector {
      flex-direction: column;
      max-width: 300px;
    }
    
    .classified-wall {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
  }
  
  @media (min-width: 1200px) {
    .classified-wall {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
  }