/* ============================================
   ESTILOS GENERALES
   ============================================ */

:root {
    --primary-red: #dc3545;
    --dark-red: #b02a37;
    --light-red: #f8d7da;
    --dark-bg: #212529;
    --light-bg: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   HEADER PRINCIPAL
   ============================================ */

.header-top {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.company-name {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.contact-info {
    display: flex;
    gap: 30px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.contact-item {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    color: #fff;
    transform: translateY(-2px);
}

.contact-item i {
    font-size: 1.2rem;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 500;
    padding: 10px 20px !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-red) !important;
    background-color: rgba(220, 53, 69, 0.1);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--primary-red);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    height: 70vh;
    background-image: url('../images/asfalto-en-la-carretera.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section h2 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease;
}

.hero-section .lead {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BOTONES
   ============================================ */

.btn-primary {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--dark-red);
    border-color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* ============================================
   SECCIONES
   ============================================ */

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-bg);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
}

/* ============================================
   CARDS
   ============================================ */

.card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.card-title i {
    margin-right: 10px;
}

/* ============================================
   SERVICIOS
   ============================================ */

.service-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotate(360deg);
}

.service-icon i {
    font-size: 2.5rem;
    color: white;
}

.service-card h4 {
    color: var(--dark-bg);
    font-weight: 600;
    margin: 20px 0 15px;
}

/* ============================================
   EXPERIENCIA
   ============================================ */

.experience-stats {
    margin-top: 30px;
}

.stat-item {
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-red);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* ============================================
   GALERÍA
   ============================================ */

/* Carrusel Principal */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

#carouselProyectos {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

#carouselProyectos .carousel-inner img {
    height: 600px;
    object-fit: cover;
    width: 100%;
}

#carouselProyectos .carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px 20px;
}

#carouselProyectos .carousel-caption h5 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

#carouselProyectos .carousel-caption p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

#carouselProyectos .carousel-control-prev,
#carouselProyectos .carousel-control-next {
    width: 10%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#carouselProyectos:hover .carousel-control-prev,
#carouselProyectos:hover .carousel-control-next {
    opacity: 1;
}

#carouselProyectos .carousel-control-prev-icon,
#carouselProyectos .carousel-control-next-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(220, 53, 69, 0.8);
    border-radius: 50%;
    padding: 10px;
}

#carouselProyectos .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
}

#carouselProyectos .carousel-indicators button.active {
    background-color: var(--primary-red);
    transform: scale(1.2);
}

/* Video Section */
.video-section {
    margin-top: 50px;
}

.video-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    background: #000;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
}

.video-container .ratio {
    border-radius: 15px;
    overflow: hidden;
}

/* Grid de Galería */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 250px;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 3rem;
    color: white;
    animation: zoomPulse 1s ease infinite;
}

@keyframes zoomPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Modal de Galería */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-body {
    padding: 20px;
}

#imagenModal {
    border-radius: 10px;
    max-height: 80vh;
    object-fit: contain;
}

/* ============================================
   CONTACTO
   ============================================ */

.contact-info-box {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.contact-info-box i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.form-control {
    border: 2px solid #e0e0e0;
    padding: 12px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ============================================
   FOOTER
   ============================================ */

.footer-section {
    background: var(--dark-bg);
    color: white;
    padding: 50px 0 20px;
}

.footer-section h5 {
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-red);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--dark-red);
    transform: translateY(-5px);
}

.social-links i {
    font-size: 1.2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .company-name {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .contact-info {
        justify-content: center;
        margin-top: 15px;
    }
    
    .hero-section {
        height: 50vh;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    /* Carrusel Responsive */
    #carouselProyectos .carousel-inner img {
        height: 300px;
    }
    
    #carouselProyectos .carousel-caption h5 {
        font-size: 1.3rem;
    }
    
    #carouselProyectos .carousel-caption p {
        font-size: 0.9rem;
    }
    
    #carouselProyectos .carousel-control-prev-icon,
    #carouselProyectos .carousel-control-next-icon {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .contact-item span {
        font-size: 0.9rem;
    }
    
    .service-card {
        margin-bottom: 20px;
    }
    
    #carouselProyectos .carousel-inner img {
        height: 250px;
    }
    
    #carouselProyectos .carousel-caption {
        padding: 20px 10px 10px;
    }
    
    #carouselProyectos .carousel-caption h5 {
        font-size: 1.1rem;
    }
    
    #carouselProyectos .carousel-caption p {
        font-size: 0.8rem;
    }
}