/* ------------------------ */
/* Nueva Paleta de Colores */
/* ------------------------ */
:root {
    --primary-color: #002244; /* Azul Marino Profundo */
    --secondary-color: #FF6B00; /* Naranja Vibrante */
    --light-bg: #F4F7FC; /* Azul Grisáceo Claro */
    --dark-text: #1A1A1A; /* Texto Oscuro */
    --gray-text: #555; /* Texto Secundario */
    --white-bg: #FFFFFF; /* Fondo Blanco */
}

/* ------------------------ */
/* Estilos Generales */
/* ------------------------ */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

/* ------------------------ */
/* Estilos del Navbar */
/* ------------------------ */
.custom-navbar {
    background: var(--primary-color); /* Se mantiene siempre azul */
    padding: 15px 20px;
    transition: box-shadow 0.3s ease-in-out;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.custom-navbar .nav-link {
    color: white;
    font-weight: 500;
    margin-left: 20px;
    transition: color 0.3s ease-in-out;
    font-size: 1.1rem;
}

.custom-navbar .nav-link:hover {
    color: var(--secondary-color);
}

/* ------------------------ */
/* Tamaño del Logo en Navbar */
/* ------------------------ */
.custom-navbar .navbar-brand img {
    height: 70px; /* Ajusta el tamaño del logo */
    max-width: 200px; /* Asegura que no se haga muy grande */
    width: auto;
}


/* ------------------------ */
/* Hero Section Mejorado */
/* ------------------------ */
.hero {
    background: linear-gradient(to right, rgba(0, 34, 68, 0.85), rgba(0, 34, 68, 0.7)), 
                url('media/hero-bg.jpg'); /* Imagen de fondo */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 85vh; /* Mantiene un buen tamaño en todas las pantallas */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero .container {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 20px;
    color: #f1f1f1;
}

/* Botón */
.hero .btn-accent {
    background-color: var(--secondary-color);
    padding: 14px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    transition: background 0.3s ease-in-out;
}

.hero .btn-accent:hover {
    background-color: #cc5500;
}

/* Responsive: Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
    .hero {
        height: 70vh;
        padding: 30px;
        background-attachment: scroll; /* Evita problemas en móviles */
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero .btn-accent {
        padding: 12px 24px;
        font-size: 1rem;
    }
}


/* ------------------------ */
/* Botones Mejorados */
/* ------------------------ */
.btn-accent {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    transition: background 0.3s ease-in-out;
}

.btn-accent:hover {
    background-color: #cc5500;
}

/* ------------------------ */
/* Sección de Servicios */
/* ------------------------ */
.services {
    background-color: white;
    padding: 80px 20px;
    text-align: center;
}

.service-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.service-card h4 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);
}

/* ------------------------ */
/* Sección de Beneficios */
/* ------------------------ */
.benefits {
    background-color: white;
    padding: 80px 20px;
    text-align: center;
}

.benefit-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.benefit-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.benefit-card h4 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

/* ------------------------ */
/* Footer */
/* ------------------------ */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 30px;
    font-size: 1rem;
}
/* ------------------------ */
/* Sección Sobre Nosotros Mejorada */
/* ------------------------ */
.about {
    background-color: var(--light-bg);
    padding: 100px 20px;
}

.about-img {
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    transition: transform 0.3s ease-in-out;
}

.about-img:hover {
    transform: scale(1.05);
}

.about-text {
    font-size: 1.2rem;
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .about .row {
        text-align: center;
    }
    
    .about-img {
        width: 90%;
        margin-bottom: 20px;
    }
}

/* ------------------------ */
/* Footer Mejorado */
/* ------------------------ */
.footer {
    background-color: var(--primary-color); /* Igual que el header (Azul Marino) */
    color: white;
    padding: 50px 20px;
    text-align: left;
}

.footer h4 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer p {
    font-size: 1rem;
    margin-bottom: 10px;
}

.footer i {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Enlaces del footer */
.footer-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-link:focus {
    color: var(--secondary-color);
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Formulario de suscripción */
.subscribe-form {
    display: flex;
    flex-direction: column;
    max-width: 350px;
}

.subscribe-form input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.subscribe-form button {
    background-color: var(--secondary-color); /* Naranja Vibrante */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.subscribe-form button:hover {
    background-color: #cc5500; /* Naranja más oscuro en hover */
}

/* Derechos reservados centrados */
.footer .text-center {
    margin-top: 20px;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .footer .row {
        text-align: center;
    }

    .subscribe-form {
        margin: 0 auto;
    }
}

/* ------------------------ */
/* Estilos de Validación del Formulario */
/* ------------------------ */

/* Grupo de formulario */
.form-group {
    position: relative;
    text-align: left;
}

/* Estados de los campos */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25);
    outline: none;
}

/* Estados de validación */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.77 1.77L7.4 4.2l.94.94L4.97 8.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 .4.4.4-.4m-.4.4v1.2'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Mensajes de error */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Mensaje de éxito */
.valid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
    font-weight: 500;
}

.form-control.is-valid ~ .valid-feedback {
    display: block;
}

/* Contador de caracteres */
.character-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--gray-text);
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

.character-counter.warning {
    color: #ffc107;
}

.character-counter.danger {
    color: #dc3545;
}

/* Botón de envío - estados */
.btn-accent:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-accent.loading {
    position: relative;
    color: transparent;
}

.btn-accent.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Animaciones para los mensajes */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.form-control.shake {
    animation: shake 0.5s ease-in-out;
}

/* Estilos responsive para el formulario */
@media (max-width: 768px) {
    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .character-counter {
        font-size: 0.75rem;
    }
}

/* ------------------------ */
/* Estilos de Validación del Newsletter */
/* ------------------------ */

.newsletter-input-group {
    position: relative;
    margin-bottom: 10px;
}

.subscribe-form input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.subscribe-form input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25);
    outline: none;
}

/* Estados de validación para newsletter */
.subscribe-form input.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.77 1.77L7.4 4.2l.94.94L4.97 8.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.subscribe-form input.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 .4.4.4-.4m-.4.4v1.2'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.subscribe-form input.shake {
    animation: shake 0.5s ease-in-out;
}

/* Mensaje de error del newsletter */
.newsletter-error {
    display: none;
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 500;
    margin-top: 2px;
    text-align: left;
}

.newsletter-error.show {
    display: block;
}

/* Botón del newsletter con estados */
.subscribe-form button {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: relative;
    width: 100%;
}

.subscribe-form button:hover {
    background-color: #cc5500;
}

.subscribe-form button:disabled {
    background-color: #6c757d;
    opacity: 0.65;
    cursor: not-allowed;
}

.subscribe-form button.loading {
    color: transparent;
}

.subscribe-form button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

/* ------------------------ */
/* Sección de Información del Negocio */
/* ------------------------ */

.business-info {
    background-color: var(--light-bg);
    padding: 80px 20px;
}

.business-info h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.business-info .text-center p {
    font-size: 1.2rem;
    color: var(--gray-text);
    max-width: 700px;
    margin: 0 auto;
}

/* Tarjetas de Estadísticas */
.stat-card {
    background: white;
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray-text);
    font-weight: 500;
}

/* Tarjetas de Información */
.info-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
}

.info-card p {
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Lista de Cobertura */
.coverage-list {
    list-style: none;
    padding: 0;
}

.coverage-list li {
    padding: 8px 0;
    font-size: 1rem;
    color: var(--gray-text);
    border-bottom: 1px solid #f0f0f0;
}

.coverage-list li:last-child {
    border-bottom: none;
}

/* Estadísticas de Flota */
.fleet-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fleet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 10px;
}

.fleet-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.fleet-item span:last-child {
    font-size: 0.9rem;
    color: var(--gray-text);
}

/* Sección de Certificaciones */
.certifications-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.certifications-section h4 {
    color: var(--primary-color);
    font-weight: bold;
}

.cert-card {
    text-align: center;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    transition: transform 0.3s ease;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cert-card:hover {
    transform: scale(1.05);
}

.cert-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.cert-card h6 {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.cert-card p {
    font-size: 0.8rem;
    color: var(--gray-text);
    margin: 0;
}

/* Tarjetas Corporativas */
.corporate-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.corporate-card:hover {
    transform: translateY(-5px);
}

.corporate-card h5 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.financial-list,
.corporate-list,
.sustainability-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.financial-list li,
.corporate-list li,
.sustainability-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--gray-text);
    font-size: 0.95rem;
}

.financial-list li:last-child,
.corporate-list li:last-child,
.sustainability-list li:last-child {
    border-bottom: none;
}

/* Responsive para Business Info */
@media (max-width: 768px) {
    .business-info h2 {
        font-size: 2rem;
    }
    
    .stat-card {
        height: 180px;
        padding: 30px 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        font-size: 2.5rem;
    }
    
    .fleet-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .fleet-number {
        font-size: 1.5rem;
    }
    
    .certifications-section {
        padding: 20px;
    }
    
    .cert-card {
        height: 100px;
        padding: 15px;
    }
    
    .cert-card i {
        font-size: 1.5rem;
    }
}