* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a5490;
    --secondary: #f39c12;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
	background-color: #000000;  /* color de fondo en la pagina */
}

/* Header */
header {
    background: #000000; /* color de fondo menu */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* color de linea de borde principal */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: var(--primary);
}

header.scrolled nav ul li a {
    color: var(--white);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3B91FF; /* color de letra solescons */
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Logo con imagen */
.logo-img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Cuando el header hace scroll, el logo se mantiene visible sin filtro */
header.scrolled .logo-img {
    height: 50px;
}

.phone-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #3B91FF; /* color de numero de telefono */
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.phone-header:hover {
    color: var(--secondary);
}

header.scrolled .phone-header {
    color: var(--white);
}

.phone-header svg {
    width: 20px;
    height: 20px;
}

header.scrolled .logo {
    color: var(--white);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--white); /* color de letra menu */
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--secondary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: all 0.3s ease;
}

header.scrolled .menu-toggle span {
    background: var(--white);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(0, 8, 0, 0.01) 0%, rgba(41, 128, 185, 0.85) 100%), 
                url('images/hero-background.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 150px 5% 100px;
    text-align: center;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

/* Logo grande en el hero */
.hero-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 80%;
    border: 2px solid #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    animation: fadeInLeft 1s ease;
}

.hero-logo img {
    height: 150px;
    width: 150px;
    object-fit: contain;
    display: block;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,197.3C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
	color: #0A0573;
	text-shadow: 1px 1px 2px rgba(0, 255, 40, 0.8);
	!background: rgba(255, 255, 255, 0.2);
}

.hero p {
    font-size: 1.7rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
	color: #F57927;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);
	background: rgba(255, 255, 255, 0.1);
	
}

.cta-button {
    display: inline-block;
    padding: 10px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #F57927;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Services Section */
.services {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Imágenes en tarjetas de servicio */
.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none; /* Oculto por defecto, se muestra cuando hay imagen */
}

/* Mostrar imagen si existe */
.service-card img.service-image[src]:not([src=""]) {
    display: block;
}

/* Ocultar emoji si hay imagen */
.service-card img.service-image[src]:not([src=""]) ~ .service-icon {
    display: none;
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* About Section */
.about {
    background: var(--light);
    padding: 80px 5%;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary) 0%, #2980b9 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 4rem;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.about-emoji {
    font-size: 4rem;
}

/* Contact Section */
.contact {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Galería de Proyectos */
.gallery {
    padding: 80px 5%;
    background: var(--light);
}

.gallery-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    height: 350px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    background: linear-gradient(135deg, #e8eef2 0%, #d4dfe6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: none;
}

/* Mostrar imagen si existe */
.gallery-image[src]:not([src=""]) {
    display: block;
}

/* Ocultar placeholder si hay imagen */
.gallery-image[src]:not([src=""]) ~ .gallery-placeholder {
    display: none;
}

.gallery-placeholder {
    font-size: 5rem;
    opacity: 0.2;
    position: absolute;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26, 84, 144, 0.95) 0%, transparent 100%);
    color: var(--white);
    padding: 2rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gallery-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Patrón de layout alternativo para mayor interés visual */
.gallery-item:nth-child(1) {
    grid-column: span 1;
}

.gallery-item:nth-child(2) {
    grid-column: span 2;
}

.gallery-item:nth-child(3) {
    grid-column: span 2;
}

.gallery-item:nth-child(4) {
    grid-column: span 1;
}

.gallery-item:nth-child(5) {
    grid-column: span 1;
}

.gallery-item:nth-child(6) {
    grid-column: span 2;
}

/* Responsive Gallery */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item:nth-child(n) {
        grid-column: span 1 !important;
    }

    .gallery-item:nth-child(odd) {
        grid-column: span 2 !important;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item {
        height: 280px;
    }

    .gallery-item:nth-child(n) {
        grid-column: span 1 !important;
    }

    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(26, 84, 144, 0.85) 0%, transparent 100%);
    }
}

/* Modal para galería */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--white);
    padding: 20px;
    font-size: 1.2rem;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--secondary);
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Misión, Visión y Valores Section */
.mvv {
    padding: 80px 5%;
    background: var(--light);
}

.mvv-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.mvv-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.mvv-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.mvv-image-wrapper {
    width: 250px;
    height: 250px;
    margin: 0 auto 2rem;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #e8eef2 0%, #d4dfe6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mvv-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* Mostrar imagen si existe */
.mvv-image[src]:not([src=""]) {
    display: block;
}

/* Ocultar placeholder si hay imagen */
.mvv-image[src]:not([src=""]) ~ .mvv-image-placeholder {
    display: none;
}

.mvv-image-placeholder {
    font-size: 6rem;
    opacity: 0.3;
}

.mvv-card h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.mvv-card p {
    color: var(--dark);
    line-height: 1.8;
    font-size: 1rem;
}

/* Responsive MVV */
@media (max-width: 992px) {
    .mvv-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mvv-image-wrapper {
        width: 200px;
        height: 200px;
    }
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #134072;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 5% 1rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

.social-icons svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .phone-header {
        display: none;
    }

    /* Logo hero responsivo */
    .hero-logo {
        top: 10px;
        left: 10px;
        padding: 10px;
        border: 3px solid #f39c12;
    }

    .hero-logo img {
        height: 70px;
        width: 70px;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}
