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

:root {
    --primary-yellow: #E8D84F;
    --dark-navy: #1A1D2E;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
}

body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation */
nav {
    background-color: #1A152D;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 120px;
    height: 80px;
}

.logo-text {
    color: var(--primary-yellow);
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
}

.nav-links a:hover {
    color: var(--primary-yellow);
    border-bottom: 2px solid var(--primary-yellow);
}

/* Hero Section (Inicio) */
.hero {
    color: var(--white);
    padding: 150px 2rem 100px;
    text-align: center;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out, transform 8s ease-in-out, filter 8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Efectos de transición aleatorios */
.hero-slide.zoom-in {
    transform: scale(1.2);
}

.hero-slide.zoom-out {
    transform: scale(0.9);
}

.hero-slide.slide-left {
    transform: translateX(-5%);
}

.hero-slide.slide-right {
    transform: translateX(5%);
}

.hero-slide.blur-effect {
    filter: blur(3px);
}

.hero-slide.brightness-effect {
    filter: brightness(1.2);
}

.hero-slide.pixelate-effect {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transform: scale(1.05);
}

@keyframes tileReveal {
    0% {
        clip-path: polygon(
            0% 0%, 25% 0%, 25% 25%, 0% 25%,
            25% 0%, 50% 0%, 50% 25%, 25% 25%,
            50% 0%, 75% 0%, 75% 25%, 50% 25%,
            75% 0%, 100% 0%, 100% 25%, 75% 25%,
            0% 25%, 25% 25%, 25% 50%, 0% 50%,
            25% 25%, 50% 25%, 50% 50%, 25% 50%,
            50% 25%, 75% 25%, 75% 50%, 50% 50%,
            75% 25%, 100% 25%, 100% 50%, 75% 50%,
            0% 50%, 25% 50%, 25% 75%, 0% 75%,
            25% 50%, 50% 50%, 50% 75%, 25% 75%,
            50% 50%, 75% 50%, 75% 75%, 50% 75%,
            75% 50%, 100% 50%, 100% 75%, 75% 75%,
            0% 75%, 25% 75%, 25% 100%, 0% 100%,
            25% 75%, 50% 75%, 50% 100%, 25% 100%,
            50% 75%, 75% 75%, 75% 100%, 50% 100%,
            75% 75%, 100% 75%, 100% 100%, 75% 100%
        );
    }
    100% {
        clip-path: polygon(
            0% 0%, 100% 0%, 100% 100%, 0% 100%
        );
    }
}

.hero-slide.tile-effect {
    animation: tileReveal 2s ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 29, 46, 0.85) 0%, rgba(42, 45, 62, 0.85) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--primary-yellow);
}

.hero p {
    font-size: 1.3rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Section Styles */
section {
    padding: 80px 2rem;
}

section#nosotros {
    padding: 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1A152D;
    font-weight: 700;
    position: relative;
    padding: 1rem 0;
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background-color: var(--primary-yellow);
}

.section-title::before {
    top: 0;
}

.section-title::after {
    bottom: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Nosotros Section */
#nosotros {
    background-color: var(--light-gray);
}

#nosotros > .container:first-child {
    padding: 80px 2rem 0;
}

.about-text {
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    background:
        linear-gradient(135deg, rgba(26, 29, 46, 0.85) 0%, rgba(42, 45, 62, 0.85) 100%),
        url('../images/fondo2.JPG') center/cover no-repeat;
    padding: 3rem 0;
    margin: 0;
    margin-bottom: 4rem;
    color: var(--white);
    width: 100%;
    height: 450px;
}

.container-text{
    margin: auto;
    width: 50%;
}

.mvv-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 0;
    padding: 0 2rem 4rem;
}

.mvv-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.mvv-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.mvv-icon i {
    color: #000000;
    font-size: 2rem;
}

.mvv-card h3 {
    color: var(--dark-navy);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.mvv-card p {
    color: #555;
    line-height: 1.7;
}

.mvv-card ul {
    list-style: none;
    text-align: left;
    margin-top: 1rem;
}

.mvv-card li {
    padding: 0.5rem 0;
    color: #555;
}

.mvv-card li::before {
    content: "• ";
    color: var(--primary-yellow);
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Valores Corporativos Card - Expandable */
.valores-card {
    transition: all 0.5s ease;
    overflow: hidden;
}

.valores-card .valor-hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
}

.valores-card:hover .valor-hidden {
    max-height: 100px;
    opacity: 1;
    padding: 0.5rem 0;
}

/* Team Section */
.team-title {
    margin-top: 3rem;
    padding: 0 2rem;
}

.team-container {
    width: 100%;
    margin: 2rem 0 0 0;
    background: linear-gradient(135deg, rgba(26, 29, 46, 0.85) 0%, rgba(42, 45, 62, 0.85) 100%);
    padding: 3rem 0;
}

.team-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.team-member {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
    text-align: left;
}

.team-photo {
    width: 150px;
    height: 180px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
    border: 3px solid var(--primary-yellow);
}

.team-info {
    flex: 1;
}

.team-member h4 {
    color: var(--dark-navy);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.team-member p {
    color: #666;
    font-size: 0.95rem;
}

/* Servicios Section */
#servicios {
    background-color: var(--white);
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

@keyframes dash {
    to {
        stroke-dashoffset: -400;
    }
}

.service-card {
    background: var(--light-gray);
    padding: 2.5rem;
    border-radius: 10px;
    border-left: 5px solid var(--primary-yellow);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, var(--primary-yellow) 50%, transparent 50%);
    background-size: 20px 2px, 2px 20px, 20px 2px, 2px 20px;
    background-position: 0 0, 100% 0, 100% 100%, 0 100%;
    background-repeat: repeat-x, repeat-y, repeat-x, repeat-y;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    animation: dash 20s linear infinite;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card h3 {
    color: var(--dark-navy);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    padding: 0.5rem 0;
    color: #555;
}

.service-card li::before {
    content: "✓ ";
    color: var(--primary-yellow);
    font-weight: bold;
    margin-right: 0.5rem;
}

.service-card-description {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.service-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--dark-navy);
    background-color: var(--primary-yellow);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-family: 'Raleway', sans-serif;
}

.service-modal-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(232, 216, 79, 0.4);
}

.service-modal-btn i {
    font-size: 0.85rem;
    transition: transform 0.3s;
}

.service-modal-btn:hover i {
    transform: translateX(3px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #333;
    color: var(--white);
    margin: auto;
    padding: 3rem;
    border-radius: 15px;
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    color: var(--primary-yellow);
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--white);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--primary-yellow);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    border-bottom: 1px solid rgba(232, 216, 79, 0.2);
}

.modal-list li:last-child {
    border-bottom: none;
}

.modal-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-yellow);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Service Card Horizontal */
.service-card-horizontal {
    background: var(--light-gray);
    padding: 2.5rem;
    border-radius: 10px;
    border-left: 5px solid var(--primary-yellow);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    margin-top: 2rem;
    width: 100%;
}

.service-card-horizontal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, var(--primary-yellow) 50%, transparent 50%);
    background-size: 20px 2px, 2px 20px, 20px 2px, 2px 20px;
    background-position: 0 0, 100% 0, 100% 100%, 0 100%;
    background-repeat: repeat-x, repeat-y, repeat-x, repeat-y;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    animation: dash 20s linear infinite;
}

.service-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-card-horizontal:hover::before {
    opacity: 1;
}

.service-card-horizontal h3 {
    color: var(--dark-navy);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.horizontal-service-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-item {
    display: flex;
    flex-direction: column;
}

.service-item h4 {
    color: var(--dark-navy);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: left;
}

.service-content-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.service-logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.service-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-text p {
    color: #555;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--dark-navy);
    background-color: var(--primary-yellow);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.3s, box-shadow 0.3s;
    align-self: flex-start;
}

.service-link:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(232, 216, 79, 0.4);
}

.service-link i {
    font-size: 0.85rem;
    transition: transform 0.3s;
}

.service-link:hover i {
    transform: translateX(3px);
}

/* Contacto Section */
#contacto {
    background: linear-gradient(135deg, var(--dark-navy) 0%, #2a2d3e 100%);
    color: var(--white);
    padding: 60px 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-main {
    max-width: 400px;
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-navy);
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s, color 0.3s;
    font-size: 1.1rem;
}

.footer-social-icon:hover {
    background-color: #000000;
    color: var(--primary-yellow);
    transform: scale(1.1);
}

.footer-contact-info {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-contact-info a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-contact-info a:hover {
    color: var(--primary-yellow);
}

.footer-column h3 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s, padding-left 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-yellow);
    padding-left: 5px;
}

/* Footer */
footer {
    background-color: #0f1119;
    color: var(--white);
    text-align: center;
    padding: 2rem;
    font-size: 0.8em;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

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

    .mvv-container,
    .services-container {
        grid-template-columns: 1fr;
    }

    .team-member {
        flex-direction: column;
        text-align: center;
    }

    .team-photo {
        width: 180px;
        height: 220px;
    }

    .horizontal-service-content {
        grid-template-columns: 1fr;
    }

    .service-content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .service-item h4 {
        text-align: center;
    }

    .service-logo {
        margin-bottom: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-main {
        max-width: 100%;
    }

    .footer-column h3 {
        font-size: 1.1rem;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        padding-right: 1.5rem;
    }

    .modal-description {
        font-size: 1rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }

    .modal-list li {
        font-size: 0.9rem;
    }
}
