/* Variables de color */
:root {
    --color1: #060610;
    --color2: #5D6A73;
    --color3: #262B51;
    --color4: #3D65AA;
    --color5: #fafafa;
    --color6: #d9d9d9;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Estilos generales */
body {
    margin: 0;
    font-family: "Raleway", sans-serif;
    overflow-x: hidden;
}

/* Estilos del navbar */

.navbar {
    background-color: var(--color5);
    color: white;
    padding: 10px 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-navbar {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--color1);
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    font-weight: bold;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--color4);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover {
    color: var(--color4);
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
    color: var(--color1);
    z-index: 10000;
}

/* Estilos del carrusel */
.banner {
    background-image: url('../assets/foto3.jpeg');
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 100px 0;
    color: white;
    font-weight: bold;
    font-size: 24px;
    animation: fadeIn 1s ease-in-out;
    max-width: 100%;
    width: 100%;
    height: 800px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


.Nosotros {
    text-align: right; /* Alinea el título a la derecha */
    background-color: var(--color6);
}

.Nosotros .title {
    font-size: 32px;
    font-weight: bold;
    margin-right: 10%; /* Ajusta el margen derecho */
}

.Nosotros .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.image-container {
    display: flex;
    justify-content: center;
}

.image {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
    height: 400px;
    object-fit: cover;
}

.text-container {
    text-align: justify;
}

/* Segunda fila con imagen a la izquierda */
.row-reverse {
    display: contents;
}

.row-reverse .image-container {
    order: -1;
}

.Servicios {
    text-align: center;
    padding: 50px 20px;
    background-color: #b8bbe0;
}

.title {
    font-size: 28px;
    margin-bottom: 20px;
}

/* Contenedor de las tarjetas */
.cards-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: auto;
}

/* Estilo de las cards */
.card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease-in-out;
    width: 200px;
    height: 250px; /* Más alargadas */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Efecto hover */
.card:hover {
    transform: scale(1.05);
}

/* Íconos */
.card i {
    font-size: 40px;
    color: var(--color4);
    margin-bottom: 10px;
}

/* Estilos Generales */
.timeline-section {
    text-align: center;
    padding: 50px 20px;
    background-color: #f8f8f8;
}

.title {
    font-size: 28px;
    margin-bottom: 20px;
}

/* Contenedor de la línea de tiempo */
.timeline {
    position: relative;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Línea central */
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--color2); /* Cambia el color si quieres */
    transform: translateX(-50%);
}

/* Ítems de la línea de tiempo */
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    width: 80%;
    max-width: 400px;
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--color2);
    position: relative;
    border-left: none; /* Quita la línea */
}

/* Puntos de la línea de tiempo */
.timeline-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    background-color: var(--color4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Contenido de cada ítem */
.timeline-content {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 200px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* Alineación alternada */
.timeline-content.left {
    left: -220px;
    text-align: right;
}

.timeline-content.right {
    right: -220px;
    text-align: left;
}

/* Animación cuando aparecen en pantalla */
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 60px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.whatsapp-float img {
    width: 70%;
    height: auto;
}

.whatsapp-float a {
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.whatsapp-float .ig-link i {
    font-size: 34px;
    color: #C13584;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 130px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    position: absolute;
    bottom: 110%; /* por encima del ícono */
    left: 30%;
    transform: translateX(-50%);
    white-space: normal; /* permite saltos de línea */
    word-wrap: break-word; /* para dividir en varias líneas */
    overflow-wrap: break-word; /* equivalente moderno */
    transition: opacity 0.3s;
    font-size: 12px;
    z-index: 10000;
}

.whatsapp-float a:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.whatsapp-float a:hover {
    transform: scale(1.1);
}

/* Estilos del formulario de contacto */
.Contacto {
    background-color: var(--color5);
    padding: 60px 20px;
    text-align: center;
}

.Contacto .container {
    max-width: 800px;
    margin: 0 auto;
}

.Contacto .title {
    font-size: 32px;
    font-weight: bold;
    color: var(--color1);
    margin-bottom: 40px;
}

.contact-form-container {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color1);
    margin-bottom: 8px;
    font-size: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--color6);
    border-radius: 8px;
    font-size: 16px;
    font-family: "Raleway", sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color4);
    box-shadow: 0 0 0 3px rgba(61, 101, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: var(--color4);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--color3);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Estilos de validación del formulario */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    background-color: #fdf2f2;
}

.form-group input.success,
.form-group textarea.success {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
    background-color: #f8fff8;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message::before {
    content: "⚠";
    font-size: 16px;
}

.char-counter {
    font-size: 12px;
    color: var(--color2);
    text-align: right;
    margin-top: 5px;
}

.char-counter.warning {
    color: #f39c12;
    font-weight: 600;
}

.submit-btn:disabled {
    background-color: var(--color2);
    cursor: not-allowed;
    transform: none;
}

.submit-btn:disabled:hover {
    background-color: var(--color2);
    transform: none;
}

/* Estilos para notificaciones del formulario */
.success-notification,
.error-notification {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    animation: slideInFromTop 0.5s ease-out;
}

.success-notification {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-notification {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-icon {
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.error-icon {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.success-text,
.error-text {
    font-weight: 500;
    flex: 1;
}

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

.rrss-section {
    background-color: var(--color6);
    padding: 40px 20px;
}

.rrss-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rrss-item {
    display: flex;
    align-items: center;
    min-width: fit-content;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--color6);
    border-radius: 10px;
    text-decoration: none;
    color: var(--color1);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.rrss-item i {
    font-size: 22px;
    color: var(--color4);
    width: 26px;
    text-align: center;
}

.rrss-item:hover {
    border-color: var(--color4);
    transform: translateY(-1px);
}

.rrss-text {
    font-weight: 600;
}

/* Responsivo para Tablets */
@media (max-width: 768px) {
    .banner {
        background-image: url('../assets/foto3.jpeg');
    }

    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .nav-links {
        display: none;
        width: 100%;
        text-align: center;
    }

    .hamburger {
        display: block;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
    }

    .nav-links a {
        padding: 10px;
    }

    .carrousel {
        height: 400px;
    }

    .slide {
        height: 400px;
        padding: 15px;
    }

    .slide h1 {
        font-size: 24px;
    }

    .slide p {
        font-size: 15px;
    }

    button.prev, button.next {
        font-size: 20px; /* Ajusta el tamaño del botón */
        padding: 8px 16px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-content {
        width: 80%;
    }

    .timeline-content.left,
    .timeline-content.right {
        left: 40px;
        right: auto;
        text-align: left;
    }

    .cards-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 80%;
        max-width: 300px;
    }

    /* Estilos generales */
    .timeline-section {
        text-align: center;
        padding: 50px 20px;
        background-color: #f8f8f8;
    }

    .title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .container {
        flex-direction: column;
        text-align: center;
    }

    .image-container {
        padding-right: 0;
        margin-bottom: 20px;
    }

    .image {
        max-width: 100%;
        height: auto;
    }

    .title {
        font-size: 2rem;
    }

    .text {
        font-size: 1rem;
    }

    .timeline::before {
        left: 20px;
        max-width: 480px;
    }

    .timeline-content {
        width: 80%;
    }

    .timeline-content.left,
    .timeline-content.right {
        left: 40px;
        right: auto;
        text-align: left;
    }

    .Nosotros {
        text-align: center;
    }

    .Nosotros .container {
        display: flex;
        flex-direction: column;
        gap: 40px;
        padding: 20px 10px;
    }

    .Nosotros .title {
        font-size: 28px;
        margin-right: 0;
    }

    .image {
        height: auto;
        max-width: 100%;
    }

    .text-container {
        padding: 0;
        text-align: justify;
    }

    .row-reverse {
        display: flex;
        flex-direction: column;
        order: 1;
    }

    .whatsapp-float {
        display: flex !important;
        z-index: 999999;
        bottom: 20px; /* Posición inferior fija */
        right: 20px; /* Posición derecha fija */
    }

    .carrousel {
        position: relative;
        z-index: 1; /* Coloca el carrusel debajo del icono de WhatsApp */
    }
}

/* Responsivo para TV */
@media (max-width: 1024px) {
    .banner {
        background-image: url('../assets/foto3.jpeg');
    }

    .cards-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .carrousel {
        height: 500px;
    }

    .slide {
        height: 500px;
    }

    .slide h1 {
        font-size: 28px;
    }

    .slide p {
        font-size: 16px;
    }
}

/* Mobile Responsive */

@media (max-width: 480px) {

    html, body {
        overflow-x: hidden;
    }

    .logo-container {
        display: flex;
        align-items: center;
    }

    footer {
        font-size: 0.9rem;
        padding: 15px;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger {
        display: block;
        margin-left: auto; /* Esto mueve el menú hamburguesa a la derecha */
    }

    .nav-center {
        flex: 1;
        justify-content: flex-start;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background-color: var(--color4);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 1000;
        text-align: center;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        border-top: 1px solid #333;
    }

    .timeline, .timeline-content {
        width: 100%;
        max-width: 100%;
    }

    .cards-container {
        padding: 0 10px;
    }

    .whatsapp-float {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 9999 !important;
        width: 60px;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 10px;
        justify-content: center;
        align-items: center;
    }

    .whatsapp-float img {
        width: 70%;
        height: auto;
    }

    .whatsapp-float a {
        display: flex;
        width: 100%;
        height: 60px;
        justify-content: center;
        align-items: center;
    }
}


/* Formulario de contacto mobile */
.Contacto {
    padding: 40px 15px;
}

.contact-form-container {
    padding: 20px 15px;
    margin: 0 auto;
    border-radius: 10px;
}

.Contacto .title {
    font-size: 22px;
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    padding: 10px 12px;
    font-size: 14px;
}

.submit-btn {
    padding: 12px 25px;
    font-size: 16px;
}
