/* GENERAL */
* { box-sizing: border-box; }
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    background: #f0f2f5; 
    color: #333; 
    overflow-x: hidden; 
}

/* ENCABEZADO */
.main-header { 
    background: #ff6600; 
    padding: 15px 0; 
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
}
.header-content { 
    max-width: 1100px; 
    margin: auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px; 
}
.logo { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-size: 1.6rem; 
}
.logo span {
    font-weight: 300;
}
.logo strong {
    font-weight: 700;
}

/* FRANJA AZUL Y BUSCADOR */
.search-banner { 
    background-color: #0d1b3e; 
    padding: 40px 0; 
    color: white; 
}
.search-container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}
.search-container h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}
.search-container h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.9;
}
.search-box-row { 
    display: flex; 
    gap: 10px; 
    background: white; 
    padding: 10px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.input-group { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    border-right: 1px solid #eee; 
}
.input-group:last-of-type { 
    border-right: none; 
}
.input-group input { 
    border: none; 
    width: 100%; 
    outline: none; 
    font-size: 1rem; 
    color: #333; 
    padding: 10px 0; 
}

.btn-search-blue {
    background: #ff6600; 
    color: white; 
    border: none; 
    padding: 0 25px;
    border-radius: 4px; 
    font-weight: bold; 
    cursor: pointer; 
    height: 50px; 
    transition: 0.3s;
    white-space: nowrap;
}
.btn-search-blue:hover {
    background: #e55a00;
    transform: translateY(-2px);
}
.btn-clear {
    background: #4a5568; 
    color: white; 
    border: none; 
    padding: 0 20px;
    border-radius: 4px; 
    font-weight: bold; 
    cursor: pointer; 
    height: 50px; 
    transition: 0.3s;
}
.btn-clear:hover {
    background: #2d3748;
}

/* LAYOUT PRINCIPAL */
.main-layout { 
    max-width: 1100px; 
    margin: 30px auto; 
    padding: 0 20px; 
    min-height: 400px; 
}
.main-layout h2 {
    color: #0d1b3e;
    font-size: 1.8rem;
    margin-bottom: 5px;
}
.orange-bar { 
    width: 50px; 
    height: 4px; 
    background: #ff6600; 
    margin: 15px 0 30px 0; 
}

/* TARJETAS DE VACANTES */
.job-card-box { 
    background: white; 
    padding: 25px; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); 
    margin-bottom: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.job-card-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.job-info h3 { 
    margin: 0 0 10px 0; 
    color: #0d1b3e;
    font-size: 1.3rem;
}
.job-info p { 
    margin: 5px 0; 
    font-size: 0.95rem;
}
.job-empresa {
    color: #333;
    font-weight: 600;
}
.job-zona {
    color: #ff6600;
    font-weight: 500;
}
.job-fecha {
    color: #666;
    font-size: 0.85rem;
}

.btn-orange { 
    background: #ff6600; 
    color: white; 
    text-decoration: none; 
    padding: 12px 25px; 
    border-radius: 4px; 
    font-weight: bold; 
    transition: 0.3s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn-orange:hover {
    background: #e55a00;
    transform: translateY(-2px);
}

/* MODAL DE DETALLE */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6600;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-close:hover {
    background: #e55a00;
    transform: rotate(90deg);
}

.modal-header {
    background: #0d1b3e;
    color: white;
    padding: 30px;
    border-radius: 12px 12px 0 0;
}
.modal-header h2 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    color: white;
}
.modal-empresa {
    font-size: 1.1rem;
    margin: 8px 0;
    opacity: 0.9;
}
.modal-zona {
    font-size: 1rem;
    margin: 5px 0;
    opacity: 0.8;
}

.modal-body {
    padding: 30px;
}

.modal-section {
    margin-bottom: 30px;
}
.modal-section:last-child {
    margin-bottom: 0;
}
.modal-section h3 {
    color: #0d1b3e;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6600;
}
.modal-section p {
    line-height: 1.6;
    color: #555;
}

/* BOTONES DE CONTACTO */
.contacto-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-contacto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    flex: 1;
    min-width: 200px;
}

.btn-email {
    background: #0d1b3e;
    color: white;
}
.btn-email:hover {
    background: #1a2f5a;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}
.btn-whatsapp:hover {
    background: #1eb757;
    transform: translateY(-2px);
}

/* SECCIÓN CLIENTES */
.clientes-section { 
    padding: 5px 0;
    background: #fff; 
    text-align: center; 
} 
.clientes-section h3 { 
    margin-bottom: 25px; 
}

/* Variables: ajustá según gusto */
.slider-track {
  --slide-width: 220px; /* ancho de cada "slide" (logo) */
  --gap: 60px;          /* espacio entre slides */
  --items: 4;           /* cantidad de logos únicos (no contar la duplicación) */
  --duration: 22s;      /* duración del loop (ajustar velocidad) */

  display: flex;
  gap: var(--gap);
  align-items: center;
  /* la animación mueve exactamente (slide-width + gap) * items */
  animation: scroll var(--duration) linear infinite;
  will-change: transform;
}

/* Contenedor para ocultar el overflow */
.slider-wrapper {
  overflow: hidden;
  width: 100%;
}

/* Cada “caja” donde va el logo: tamaño fijo para evitar reflow */
.slide {
  flex: 0 0 var(--slide-width);
  height: 100px;           /* altura máxima de la fila de logos */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen: se limita y se centra sin distorsionar */
.slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;     /* mantiene la proporción dentro del cuadro */
  display: block;
  filter: grayscale(100%); /* si querés el efecto gris por defecto */
  opacity: 0.9;
  transition: filter .25s, opacity .25s;
}

/* Hover: opcional */
.slide img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Pausar al pasar el mouse */
.slider-wrapper:hover .slider-track {
  animation-play-state: paused;
}

/* Keyframes: se mueve exactamente la longitud del primer set de items */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc((var(--slide-width) + var(--gap)) * var(--items) * -1));
  }
}

/* --- Responsive: disminuir tamaño del slide en pantallas chicas --- */
@media (max-width: 900px) {
  .slider-track { --slide-width: 160px; --gap: 28px; --duration: 18s; }
  .slide { height: 80px; }
}
@media (max-width: 480px) {
  .slider-track { --slide-width: 120px; --gap: 20px; --duration: 14s; }
  .slide { height: 60px; }
}

/* WHATSAPP FLOTANTE */
.wpp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1d976c 0%, #075e54 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.wpp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    color: white;
}

.wpp-circle {
    background: white;
    color: #075e54;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* FOOTER */
.terra-footer-bar {
    background-color: #ff6600;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    width: 100%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .search-box-row {
        flex-direction: column;
    }
    
    .input-group {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .input-group:last-of-type {
        border-bottom: none;
    }
    
    .btn-search-blue,
    .btn-clear {
        width: 100%;
    }
    
    .job-card-box {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-orange {
        width: 100%;
        margin-top: 15px;
        text-align: center;
    }
    
    .contacto-info {
        flex-direction: column;
    }
    
    .btn-contacto {
        width: 100%;
    }
    
    .wpp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .wpp-float span {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3rem;
    }
    
    .search-container h2 {
        font-size: 1.5rem;
    }
    
    .search-container h3 {
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Estado de carga */
#loading {
    color: #666;
    font-size: 1.1rem;
}
