:root {
    --color-primario: #0056b3;
    --color-secundario: #6c757d;
    --color-acento: #0057b0;
    --color-fondo: #f8f9fa;
    --color-texto: #333;
    --fuente-titulos: 'Montserrat', sans-serif;
    --fuente-texto: 'Raleway', sans-serif;
}

body {
    font-family: var(--fuente-texto);
    color: var(--color-texto);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fuente-titulos);
    font-weight: 600;
}

/* Header y Navegación - MEJORADO PARA MÓVILES */
.nav-custom {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.navbar-brand {
    font-family: var(--fuente-titulos);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primario) !important;
    margin: 0 auto; /* Centra el logo */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-brand img {
    height: 80px;
    margin-right: 8px;
}

.nav-list .nav-link {
    color: var(--color-primario) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav-list .nav-link:hover,
.nav-list .nav-link.active {
    color: var(--color-acento) !important;
}

.nav-list .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-acento);
    transition: width 0.3s ease;
}

.nav-list .nav-link:hover::after,
.nav-list .nav-link.active::after {
    width: 100%;
}

/* Botón Hamburguesa - MÁS PEQUEÑO Y A LA IZQUIERDA */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem; /* Más pequeño */
    margin-left: 0;
    order: -1; /* Lo coloca a la izquierda */
    z-index: 1020;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    width: 1.2em; /* Más pequeño */
    height: 1.2em; /* Más pequeño */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 86, 179, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Ajustes para el menú colapsado */
.navbar-collapse {
    text-align: center;
}

/* Botón WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    font-size: 24px;
    text-decoration: none;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn i {
    font-size: 28px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

/* Hero Section - MEJORADO PARA MÓVILES */
.hero-section {
    min-height: 70vh;
    height: auto;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/src/assets/img/img-albañileria-plomeria/index-albañileria.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
    padding: 80px 0 40px;
}

.hero-content {
    max-width: 800px;
    padding: 25px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    margin: 20px auto;
    text-align: center;
}

.hero-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.btn-custom {
    background-color: var(--color-acento);
    color: white;
    font-weight: bold;
    border-radius: 30px;
    padding: 10px 25px;
    border: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-custom:hover {
    background-color: #e67e00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sección Nosotros - MEJORADA */
.section-nosotros {
    padding: 60px 0;
    background-color: var(--color-fondo);
}

.custom-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    text-align: center;
    margin-bottom: 30px;
}

.img-description {
    width: 80%;
    max-width: 300px;
    border-radius: 10px;
    margin: 0 auto 20px;
    height: auto;
    display: block;
}

.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--color-primario);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Sección Servicios - MEJORADA */
.section-servicios {
    padding: 60px 0;
    background-color: white;
}

.servicios-header {
    text-align: center;
    margin-bottom: 40px;
}

.servicios-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--color-primario);
}

.servicio-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    height: 100%;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.servicio-imagen {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.servicio-overlay {
    padding: 20px;
}

.servicio-titulo {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-primario);
}

/* Sección Proyectos - MEJORADA */
.section-proyectos {
    padding: 60px 0;
    background-color: var(--color-fondo);
}

.proyecto-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.proyecto-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.proyecto-card:hover .proyecto-img {
    transform: scale(1.05);
}

.proyecto-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 15px;
    color: white;
}

/* Sección Contacto - MEJORADA */
.section-contact {
    padding: 60px 0;
    background-color: white;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h2 {
    color: var(--color-primario);
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact-info {
    background: var(--color-fondo);
    border-radius: 10px;
    padding: 25px;
    height: 100%;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-item i {
    margin-right: 12px;
    font-size: 1.1rem;
    color: var(--color-primario);
    width: 20px;
}

.contact-form {
    background: var(--color-fondo);
    border-radius: 10px;
    padding: 25px;
}

.form-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.form-control:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.submit-btn {
    background: var(--color-acento);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: #e67e00;
}

/* Footer - MEJORADO */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0 15px;
}

.footer-links a {
    color: #ecf0f1;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    margin-bottom: 8px;
}

.footer-links a:hover {
    color: var(--color-acento);
    text-decoration: none;
}

.social-icons {
    margin-top: 15px;
}

.social-icons a {
    color: white;
    font-size: 1.3rem;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-acento);
}

/* Mejoras de rendimiento y accesibilidad */
img {
    max-width: 100%;
    height: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* RESPONSIVE - MEJORADO PARA MÓVILES */

/* Tablets */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand img {
        height: 70px;
    }
}

/* Móviles Grandes */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 70px 0 30px;
    }
    
    .hero-content {
        padding: 20px;
        margin: 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .nav-list .nav-link {
        margin: 0 8px;
        font-size: 0.9rem;
    }
    
    .section-nosotros,
    .section-servicios,
    .section-proyectos,
    .section-contact {
        padding: 40px 0;
    }
    
    .custom-card,
    .contact-info,
    .contact-form {
        padding: 20px;
    }
    
    .servicio-imagen {
        height: 160px;
    }
    
    .proyecto-img {
        height: 180px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-btn i {
        font-size: 24px;
    }
    
    /* NAVBAR PARA MÓVILES - HAMBURGUESA IZQUIERDA, LOGO CENTRADO */
    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        font-size: 1.2rem;
    }
    
    .navbar-toggler {
        order: -1;
        margin-right: auto;
        padding: 0.2rem 0.4rem;
        border: 1px solid rgba(0, 86, 179, 0.3);
    }
    
    .navbar-toggler-icon {
        width: 1em;
        height: 1em;
    }
    
    .navbar-collapse {
        margin-top: 10px;
        text-align: left;
    }
}

/* Móviles Pequeños */
@media (max-width: 576px) {
    .hero-section {
        min-height: 50vh;
        padding: 60px 0 20px;
    }
    
    .hero-content {
        padding: 15px;
        margin: 10px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .btn-custom {
        padding: 8px 20px;
        font-size: 0.9rem;
        margin: 5px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand img {
        height: 79.8px;
    }
    
    .section-nosotros,
    .section-servicios,
    .section-proyectos,
    .section-contact {
        padding: 30px 0;
    }
    
    .servicios-header h2,
    .contact-header h2 {
        font-size: 1.6rem;
    }
    
    .custom-card,
    .contact-info,
    .contact-form {
        padding: 15px;
    }
    
    .icon-box {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
    
    .servicio-imagen {
        height: 140px;
    }
    
    .proyecto-img {
        height: 160px;
    }
    
    .servicio-overlay,
    .proyecto-overlay {
        padding: 12px;
    }
    
    .servicio-titulo {
        font-size: 1.1rem;
    }
    
    footer {
        padding: 20px 0 10px;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 45px;
        height: 45px;
    }
    
    .whatsapp-btn i {
        font-size: 20px;
    }
    
    /* NAVBAR MÓVILES PEQUEÑOS */
    .navbar-toggler {
        padding: 0.15rem 0.3rem;
    }
    
    .navbar-toggler-icon {
        width: 0.9em;
        height: 0.9em;
    }
}

/* Dispositivos muy pequeños (menos de 400px) */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.3rem;
    }
    
    .btn-custom {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .nav-list .nav-link {
        font-size: 0.85rem;
        margin: 0 5px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 20px;
    }
}