/* Custom CSS for TechCorp Solutions */

/* Accessibility: Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* Hero section styling */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.hero h1, .modal-dialog {
    color: #212529;
}

/* Service cards */
.service-item {
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-features {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.service-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0d6efd;
    font-weight: bold;
}

/* Team cards */
.team-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-card img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
}

/* Process steps */
.process-step {
    position: relative;
    padding: 2rem 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #263ab7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Contact form styling */
.contact-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    height: fit-content;
}

.contact-item {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #263ab7 !important;
}

/* Form validation styling */
.form-control.is-invalid,
.form-select.is-invalid,
.form-check-input.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
}

/* Override Bootstrap primary color */
.btn-primary {
    background-color: #263ab7 !important;
    border-color: #263ab7 !important;
}

.text-primary {
    color: #263ab7 !important;
}

.bg-primary {
    background-color: #263ab7 !important;
}

.green {
    color: #067128;
}

.width-inherit {
    width: inherit;
}

/* Tooltip container */
.tooltip-test {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black; /* Add dots under the hoverable text */
  cursor: pointer;
}

/* Tooltip text */
.tooltiptext {
  visibility: hidden; /* Hidden by default */
  width: 130px;
  bottom: 100%;
  left: 65%;
  margin-left: -65px; /* Use half of the width (130/2 = 65), to center the tooltip */
  background-color: black;
  color: #ffffff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  position: absolute;
  z-index: 1; /* Ensure tooltip is displayed above content */
}

/* Show the tooltip text on hover */
.tooltip-test:hover .tooltiptext {
  visibility: visible;
}

.telephone {
    font-size: 1.2em;
}
/* CSS para truncar el correo electrónico i telefono */
.single-line-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Limitar a 1 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Permitir saltos de línea */
}

/* CSS para truncar el correo electrónico */
.two-line-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limitar a 1 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Permitir saltos de línea */
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .service-item {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .contact-form-wrapper {
        margin-bottom: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }

    .dropdown-menu {
        left: 0 !important;
        right: auto !important;
    }
}

/* Focus indicators for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.btn.example:hover {
    background-color: lightblue;
}

textarea.example::placeholder {
    color: #b60000 !important; /* Darker gray for better contrast 828282 */
    opacity: 0.5;
}

.nav-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Accessibility: Enhanced focus styles inverted */
.inverted-focus:focus,
.inverted-focus:focus-visible,
.page-item.active .page-link:focus,
.page-item.active .page-link:focus-visible {
    outline: 3px solid black !important; /* Primary color */
    outline-offset: 2px;
    box-shadow: 0 0 0 3px white !important; /* Secondary color */
}

/* Accessibility: Enhanced focus styles */
:focus,
:focus-visible {
    outline: 3px solid white !important; /* Primary color */
    outline-offset: 2px;
    box-shadow: 0 0 0 3px black !important; /* Secondary color */
}

.carousel-control-prev:focus,
.carousel-control-next:focus,
.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible {
    opacity: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card,
    .service-item,
    .contact-form-wrapper,
    .contact-info {
        border: 2px solid #000;
    }
    
    .step-number {
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .service-item:hover,
    .team-card:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .skip-link,
    .btn,
    footer {
        display: none !important;
    }
    
    .hero,
    .service-item,
    .contact-form-wrapper {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Loading animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Language selector improvements */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-item:focus,
.dropdown-item:hover {
    background-color: #e9ecef;
}

/* Error and success message styling */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* News carousel styles */
.news-bar {
    width: 100%;
    background-color: #333; /* Dark gray background */
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    justify-content: center;
}

.news-arrow {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin: 0 10px; /* Adjust margin to bring arrows closer to the text */
}

#close-news {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    right: 10px;
}

#close-news:focus, .news-arrow:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Mostrar el foco solo cuando se usa el teclado */
body:not(.user-is-tabbing) :focus {
    outline: none;
}