/* Custom styles for Avanti website */

/* General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loader Styles */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color); /* Avanti color */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader-text {
    color: white;
    font-size: 3em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 5px;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Carousel Captions */
#mainCarousel .carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 8px;
    top: 40%;
    transform: translateY(-50%);
    bottom: auto;
}
#mainCarousel .carousel-caption h5 {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-light);
}
#mainCarousel .carousel-caption p {
    font-size: 1.2rem;
    color: var(--text-light);
}
#mainCarousel .carousel-caption .btn {
    margin-top: 15px;
    font-size: 1.1rem;
    padding: 10px 25px;
    border-radius: 50px;
}

/* Section Titles */
h2.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}
h2.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color); /* Primary color */
    border-radius: 2px;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: none;
    border-radius: 10px;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}
.product-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Parallax Section */
.parallax {
    background-image: url('images/paraxall.jpg'); /* Use existing image */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 300px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    border-radius: 10px;
    overflow: hidden;
}
.parallax-content {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
}

/* Technology Logos */
.tech-logo {
    max-height: 80px;
    width: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease-in-out;
}
.tech-logo:hover {
    filter: grayscale(0%);
}

/* Chatbot CSS from chatico.php */
.menu-flotante {
  position: fixed;
  right: 20px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 1000;
}

.boton-flotante {
  display: flex;
  align-items: center;
  background-color: var(--secondary-color);
  padding: 8px 12px;
  border-radius: 30px;
  text-decoration: none;
  color: var(--text-light);
  cursor: pointer;
}

.boton-flotante:hover {
  background-color: #444;
}

.boton-flotante i {
  background: var(--text-light);
  color: var(--primary-color);
  border-radius: 50%;
  padding: 10px;
  font-size: 16px;
  margin-right: 10px;
}

.boton-toggle {
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.oculto {
  display: none;
}

#chatContainer {
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 360px;
  height: 500px;
  background: var(--text-light);
  border: 2px solid #ccc;
  border-radius: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  z-index: 1000;
}

#chatHeader {
  background: var(--secondary-color);
  color: var(--text-light);
  padding: 10px;
  text-align: center;
  font-weight: bold;
  position: relative;
}

#chatHeader .cerrar-chat {
  position: absolute;
  right: 10px;
  top: 8px;
  color: var(--text-light);
  cursor: pointer;
  font-size: 18px;
}

#chatMessages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: var(--background-light);
}

#chatMessages .user {
  text-align: right;
  color: var(--text-dark);
  margin: 5px 0;
}

#chatMessages .bot {
  text-align: left;
  color: var(--text-dark);
  margin: 5px 0;
}

#chatForm {
  display: flex;
  border-top: 1px solid #ccc;
}

#chatInput {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  outline: none;
}

#sendBtn {
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
}

#endChatBtn {
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  width: 100%;
  padding: 10px;
  cursor: pointer;
  font-weight: bold;
  border-top: 1px solid #ccc;
}

#endChatBtn:hover {
  background: #c82333;
}

/* Custom Color Classes */
.bg-custom-primary { background-color: var(--primary-color) !important; }
.bg-custom-dark { background-color: var(--secondary-color) !important; }
.text-custom-light { color: var(--text-light) !important; }
.btn-custom-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}
.btn-custom-primary:hover {
    background-color: #7a4a44; /* Slightly darker #8E5B55 */
    border-color: #7a4a44;
}
.btn-outline-custom-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-custom-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Counter Section */
.counter-box {
    padding: 20px;
    background-color: var(--secondary-color); /* Dark background for counters */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease-in-out;
}
.counter-box:hover {
    transform: translateY(-5px);
}
.counter-box i {
    color: var(--primary-color); /* Primary color for icons */
    margin-bottom: 15px;
}
.counter-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-light); /* White text for numbers */
    margin-bottom: 5px;
}
.counter-label {
    font-size: 1.1rem;
    color: var(--text-light); /* White text for labels */
}

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 90px; /* Place the button slightly above the chatbot */
    right: 20px; /* Place the button 20px from the right */
    z-index: 999; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    font-size: 18px; /* Increase font size */
    width: 50px;
    height: 50px;
    line-height: 20px; /* Center icon vertically */
    text-align: center;
}

#scrollToTopBtn:hover {
    background-color: #555; /* Darker background on hover */
}

/* Navbar Logo */
.navbar-logo {
    height: 40px; /* Adjust size as needed */
    width: auto;
}

/* Adjust main content padding to account for fixed header */
main {
    padding-top: 70px; /* Approximate height of navbar + some padding */
}

/* Navbar adjustments */
.navbar {
    z-index: 1030; /* Ensure navbar is above other content */
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

/* Lineas de Negocio Section */
.linea-negocio-section {
    padding: 80px 0;
    overflow: hidden;
    position: relative;
}

.linea-negocio-section .container {
    position: relative;
    z-index: 2;
}

.linea-negocio-section .content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.linea-negocio-section .text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.linea-negocio-section .description {
    flex-grow: 1;
}

.linea-negocio-section .btn-container {
    text-align: right;
}

.linea-negocio-section .media-content {
    flex: 1;
    text-align: center;
}

.linea-negocio-section .img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.linea-negocio-icon {
    font-size: 10rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
}

.linea-negocio-section:hover .linea-negocio-icon {
    transform: scale(1.1);
}

.linea-negocio-section h2 {
    font-size: 3rem;
    font-weight: 900; /* Extra bold */
    margin-bottom: 20px;
    color: #333;
}

.linea-negocio-section p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #555;
}

.btn-linea {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-linea:hover {
    background-color: #7a4a44;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(142, 91, 85, 0.4);
}

/* Curtain effects - using subtle gradients */
.curtain-effect-1 {
    background: #f8f9fa; /* Light Gray */
}

.curtain-effect-2 {
    background: #ffffff; /* White */
}

.curtain-effect-3 {
    background: #e9ecef; /* Lighter Gray */
}

/* Align content based on order */
.linea-negocio-section.order-even .content-wrapper {
    flex-direction: row-reverse;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .linea-negocio-section h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .linea-negocio-section {
        text-align: center;
    }
    .linea-negocio-section .content-wrapper,
    .linea-negocio-section.order-even .content-wrapper {
        flex-direction: column;
    }
    .linea-negocio-section .text-content {
        order: 2;
        margin-top: 30px;
    }
    .linea-negocio-section .media-content {
        order: 1;
    }
    .linea-negocio-section .btn-container {
        text-align: center;
    }
    .linea-negocio-icon {
        font-size: 8rem;
    }
}