:root {
    --primary-color: #2c3e50;
    --secondary-color: #e67e22;
    --accent-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    outline: none; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #d35400;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.header {
    background-color: black;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-top: -5px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

.nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: flex;
    align-items: start;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-content h2 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

.hero-content li {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #555;
    margin-left: 5%;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.services {
    padding: 80px 0;
    background-color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--secondary-color);
    font-size: 2rem;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.projects {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.about {
    padding: 80px 0;
    background-color: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-text a {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.skills {
    margin-top: 30px;
}

.skill {
    margin-bottom: 20px;
}

.skill span {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease;
}

.contact {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-info img {
    width: 60%;
}

.contact-info p {
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

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

.contact-item i {
    color: var(--secondary-color);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.galeria {
    max-width: 100%;
    margin: 20px auto; 
    padding: 10px;
    border: 1px solid rgba(204, 204, 204, 0.3); 
    background-color: rgba(249, 249, 249, 0.5); 
    border-radius: 8px;
    overflow: hidden;
}

.visor-imagen-principal {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; 
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

#imagenGrande,
#imagenGrandeInstalaciones {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 5px;
}

.carrusel-miniaturas {
    display: flex; 
    overflow-x: auto; 
    overflow-y: hidden;
    padding: 10px 0;
    white-space: nowrap;
    gap: 10px;
    justify-content: center;
}

.miniatura {
    width: 100px;
    height: 75px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.miniatura:hover {
    border-color: #aaa;
    transform: scale(1.05);
}

.miniatura.activa {
    border-color: #007bff;
    box-shadow: 0 0 8px #007bff;
    transform: scale(1.1);
}

.miniatura-instalaciones {
    width: 100px;
    height: 75px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.miniatura-instalaciones:hover {
    border-color: #aaa;
    transform: scale(1.05);
}

.miniatura-instalaciones.activa-instalaciones {
    border-color: #28a745;
    box-shadow: 0 0 8px #28a745;
    transform: scale(1.1);
}

#instalaciones {
    background-color: #f8f9fa;
    padding: 80px 0;
}

#instalaciones .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#instalaciones .hero-content {
    width: 100%;
    max-width: 900px;
    margin-bottom: 30px;
}

#instalaciones .hero-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

#instalaciones .hero-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

#instalaciones .galeria {
    order: 1;
    width: 100%;
}

#instalaciones .visor-imagen-principal {
    order: 2;
    margin-top: 20px;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
}

@media (max-width: 992px) {
    .hero .container,
    .about-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-content,
    .hero-image {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: black;
        box-shadow: var(--shadow);
        padding: 20px;
    }
    
    .nav.active {
        display: block;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav a {
        color: white !important;
        padding: 10px 0;
        display: block;
        font-weight: 500;
    }
    
    .nav a:hover {
        color: var(--secondary-color) !important;
    }
    
    .dropdown-menu {
        display: none !important;
    }
    
    .dropdown > a i {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        color: white;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo p {
        font-size: 0.8rem;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        gap: 20px;
    }

    .visor-imagen-principal,
    #instalaciones .visor-imagen-principal {
        max-width: 90vw;
        margin-left: auto;
        margin-right: auto;
    }

    .miniatura,
    .miniatura-instalaciones {
        width: 80px;
        height: 60px;
    }

    .galeria {
        padding: 8px;
        margin: 15px auto;
        max-width: 95vw;
    }

    .hero .container {
        gap: 20px;
    }

    #instalaciones {
        padding: 60px 0;
    }

    .hero-content,
    .hero-image {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .visor-imagen-principal,
    #instalaciones .visor-imagen-principal {
        max-width: 95vw;
    }
    
    .miniatura,
    .miniatura-instalaciones {
        width: 70px;
        height: 50px;
    }

    .galeria {
        padding: 5px;
        margin: 10px auto;
        max-width: 98vw;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    #instalaciones .hero-content h3 {
        font-size: 1.5rem;
    }

    #instalaciones {
        padding: 40px 0;
    }

    .carrusel-miniaturas {
        gap: 5px;
        padding: 5px 0;
    }
}

@media (max-width: 360px) {
    .visor-imagen-principal,
    #instalaciones .visor-imagen-principal {
        max-width: 95vw;
    }
    
    .miniatura,
    .miniatura-instalaciones {
        width: 60px;
        height: 45px;
    }

    .galeria {
        max-width: 99vw;
    }
}

.carrusel-miniaturas::-webkit-scrollbar {
    height: 8px;
}

.carrusel-miniaturas::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.carrusel-miniaturas::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.carrusel-miniaturas::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: black;
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 10px 0;
    margin-top: 15px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: white !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 100%;
    text-decoration: none;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color) !important;
}

.dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white !important;
}

.dropdown > a i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: white !important;
}

.dropdown:hover > a i {
    transform: rotate(180deg);
}

.dropdown-menu a {
    position: relative;
}

.dropdown-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20px;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.dropdown-menu a:hover::after {
    width: calc(100% - 40px);
}

@media (max-width: 768px) {
    .nav {
        z-index: 1000;
    }
    
    .mobile-menu-btn {
        z-index: 1001;
    }
}

body.menu-open {
    overflow: hidden;
}
