:root {
   --primary: #9B2242;
   --secondary: #651D32;
   --accent: #474C55;
   --accent-transparent: #727372;
   --light: #f5f7fa;
   --text: #130D0E;
   --border: #e0e0e0;
}

body {
   font-family: "Segoe UI", system-ui, sans-serif;
   line-height: 1.5;
   color: var(--text);
   background-color: var(--light);
   margin: 0;
   padding: 0;
}

.container {
   width: 85%;
   /* max-width: 1200px; */
   margin: 0 auto;
   padding: 20px 0;
}

/* Header */
.header {
   background: white;
   padding: 15px 0;
   border-bottom: 1px solid var(--border);
}

.logo {
   font-size: 1.5rem;
   font-weight: 600;
   color: var(--primary);
}

/* Controles de vista */
.view-controls {
   display: flex;
   justify-content: flex-end;
   margin-bottom: 15px;
}

.view-btn {
   background: none;
   border: 1px solid var(--border);
   padding: 8px 12px;
   cursor: pointer;
   transition: all 0.6s;
}

.view-btn:first-child {
   border-radius: 4px 0 0 4px;
   border-right: none;
}

.view-btn:last-child {
   border-radius: 0 4px 4px 0;
}

.view-btn.active {
   background: var(--accent);
   color: white;
   border-color: var(--accent);
}


/* Filtros */
.div-controls {
   /* top: 0;
   padding-top: 1rem;
   z-index: 10;
   position: sticky;
   background-color: var(--light);*/
   border-radius: 1rem; 
}

.filters {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
   gap: 15px;
   margin: 20px 0;
   background: white;
   padding: 20px;
   border-radius: 6px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-group {
   display: flex;
   flex-direction: column;
}

.filter-group label {
   font-size: 0.85rem;
   margin-bottom: 5px;
   color: var(--secondary);
   font-weight: 500;
}

.filter-group input,
.filter-group select {
   padding: 10px 12px;
   border: 1px solid var(--border);
   border-radius: 4px;
   font-size: 0.9rem;
}

.sort-controls {
   display: flex;
   align-items: center;
   gap: 10px;
   margin-bottom: 15px;
}

.sort-controls select,
.sort-controls button {
   padding: 8px 12px;
   border: 1px solid var(--border);
   border-radius: 4px;
   background: white;
   cursor: pointer;
   font-size: 0.9rem;
}

.sort-controls button i {
   margin-right: 5px;
}

/* Vista de tarjetas */
.directory-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); /*280*/
   gap: 20px;
}
.no-found-grid{
   /* display: grid; */
   /* grid-template-columns: 1fr; */
   /* grid-column: 3; */
   text-align: center;
   padding: 15px 20px;
}

.employee-card {
   background: white;
   border-radius: 6px;
   padding: 20px;
   border: 1px solid var(--border);
   transition: all 0.6s ease;
   overflow-wrap: break-word; /* Rompe palabras largas */
   hyphens: none; /* Añade guiones si es posible */
}

.employee-card:hover {
   border-color: var(--accent);
   background-color: var(--accent-transparent);
   box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
   transform: translateY(-2.5px);
}

.employee-header {
   display: flex;
   align-items: center;
   margin-bottom: 15px;
}

.employee-avatar {
   width: 50px;
   height: 50px;
   border-radius: 50%;
   object-fit: cover;
   margin-right: 15px;
   border: 2px solid var(--border);
}

.employee-info {
   flex: 1;
}

.employee-name {
   font-weight: 600;
   margin: 0 0 3px;
   color: var(--primary);
   overflow-wrap: break-word; /* Rompe palabras largas */
   hyphens: none; /* Añade guiones si es posible */
}

.employee-position {
   font-size: 0.85rem;
   color: var(--accent);
   margin: 0;
}

.employee-department {
   display: inline-block;
   font-size: 0.75rem;
   background: var(--light);
   padding: 3px 8px;
   border-radius: 4px;
   margin: 5px 0 15px;
}

.employee-contact {
   font-size: 0.9rem;
   overflow-wrap: break-word; /* Rompe palabras largas */
   hyphens: none; /* Añade guiones si es posible */
}

.contact-item {
   margin-bottom: 8px;
   display: flex;
   align-items: center;
   overflow-wrap: break-word; /* Rompe palabras largas */
   hyphens: none; /* Añade guiones si es posible */
}

.contact-item i {
   width: 20px;
   color: var(--accent);
   font-size: 0.9rem;
}

/* Vista de lista */
.directory-list {
   display: none;
   background: white;
   border-radius: 6px;
   overflow: hidden;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.list-view .directory-grid {
   display: none;
}

.list-view .directory-list {
   display: block;
}

.employee-row {
   display: grid;
   grid-template-columns: 50px 1fr 1fr 1fr 1.5fr;
   align-items: center;
   padding: 15px 20px;
   border-bottom: 1px solid var(--border);
   transition: all 0.6s;
}
.no-found-row{
   display: grid;
   text-align: center;
   padding: 15px 20px;
   border-bottom: 1px solid var(--border);
}

.employee-row:hover {
   background: var(--accent-transparent);
}

.employee-row .employee-avatar {
   width: 40px;
   height: 40px;
   margin-right: 0;
}

.employee-row .employee-department {
   margin: 0;
   background: none;
   padding: 0;
}

.employee-row .contact-item {
   margin: 0;
}

.list-header {
   font-weight: 600;
   background: var(--light);
   border-bottom: 2px solid var(--border);
   top: 0rem;
   padding-top: 1rem;
   z-index: 10;
   /* position: sticky; */
   /* background-color: var(--light);
   border-radius: 1rem; */
}

/* ANIMACIONES */
.directory-grid,
.directory-list {
   transition: opacity 5.3s ease-in-out, transform 5.3s ease-in-out;
   opacity: 1;
   transform: scale(1);
}

body.list-view .directory-grid,
body.grid-view .directory-list {
   opacity: 0;
   transform: scale(0.95);
   pointer-events: none;
   position: absolute;
   width: 100%;
}


/* Responsive */
@media (max-width: 768px) {
   .filters {
      grid-template-columns: 1fr !important;
   }

   .directory-grid {
      grid-template-columns: 1fr;
   }

   .employee-row {
      grid-template-columns: 40px 1fr;
      grid-template-areas:
         "avatar name"
         "position position"
         "department department"
         "contact contact";
      gap: 10px;
      padding: 15px;
   }

   .employee-row > div:nth-child(3),
   .employee-row > div:nth-child(4) {
      display: none;
   }

   .employee-row .employee-department {
      grid-area: department;
      background: var(--light);
      padding: 3px 8px;
      border-radius: 4px;
   }

   .employee-row .employee-contact {
      grid-area: contact;
   }

   .list-header {
      display: none;
   }
}
@media (max-width: 580px) {
   .filters input,
   .filters select {
       font-size:0.5rem;
   }
}