:root {
    --primary: #0077b6;
    /* Azul cian intenso */
    --primary-light: #00b4d8;
    --secondary: #6c757d;
    /* Gris */
    --dark: #212529;
    --light: #f8f9fa;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bg-shape {
    position: absolute;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.05) 0%, rgba(0, 180, 216, 0.05) 100%);
    border-radius: 50%;
    pointer-events: none;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
}

.shape-3 {
    width: 500px;
    height: 500px;
    top: 20%;
    left: -250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- Components --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 119, 182, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 119, 182, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* --- Header --- */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
    animation: glowPulse 2.5s infinite ease-in-out;
    display: inline-block;
}

@keyframes glowPulse {
    0% {
        color: var(--secondary);
        text-shadow: none;
    }

    50% {
        color: var(--primary);
        text-shadow: 0 0 20px rgba(0, 119, 182, 0.8);
        transform: scale(1.05);
    }

    100% {
        color: var(--secondary);
        text-shadow: none;
    }
}

@keyframes grayGlowPulse {
    0% {
        color: var(--secondary);
        text-shadow: none;
    }

    50% {
        color: var(--secondary);
        text-shadow: 0 0 15px rgba(108, 117, 125, 0.5);
        transform: scale(1.05);
    }

    100% {
        color: var(--secondary);
        text-shadow: none;
    }
}

.hero h1 span {
    animation: grayGlowPulse 2.5s infinite ease-in-out;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--dark);
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* --- Mobile Menu --- */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    background: var(--white);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--secondary);
    cursor: pointer;
}

.mobile-nav-links {
    text-align: center;
}

.mobile-nav-links li {
    margin-bottom: 2rem;
}

.mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- Hero --- */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 20% 50%, rgba(0, 180, 216, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 119, 182, 0.05) 0%, transparent 50%),
        var(--light);
    overflow: hidden;
    padding: 100px 0 50px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 550px;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
}

.hero-image-container {
    flex: 1;
    height: 70vh;
    margin-left: 3rem;
    position: relative;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background-image: url('fondo1.jpeg');
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.1);
}

/* --- Services --- */

.services {
    padding: 3rem 0;
    /* Reduced from 5rem */
    background-color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    /* Reduced from 3rem */
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-title .underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.service-card {
    padding: 2rem 1.5rem;
    /* More compact */
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(0, 119, 182, 0.05);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-15px);
    border-bottom: 4px solid var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* --- CTA Section --- */

.cta {
    padding: 3rem 0;
    /* Reduced from 80px */
    background: linear-gradient(rgba(0, 119, 182, 0.9), rgba(0, 119, 182, 0.9));
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* --- Contact --- */

.contact {
    padding: 3rem 0;
    /* Reduced from 5rem */
    background-color: var(--light);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* --- WhatsApp Floating --- */

.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 65px;
    height: 65px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1001;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #128c7e;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* --- Portfolio --- */

.portfolio {
    padding: 3rem 0;
    /* Reduced from 5rem */
    background-color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 250px;
    /* Even more compact */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.view-more-container {
    text-align: center;
}

/* --- Gallery Overlay --- */

.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 3000;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    padding: 5rem 2rem;
}

.gallery-overlay.active {
    display: flex;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 3rem;
    width: 100%;
}

.close-gallery {
    font-size: 2rem;
    cursor: pointer;
    color: var(--dark);
    transition: var(--transition);
}

.close-gallery:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    position: relative;
    transform: scale(0.8);
    opacity: 0;
    transition: var(--transition);
}

.modal-content.active {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.modal-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.modal-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* --- Footer --- */

footer {
    padding: 2rem 0 2rem;
    /* Reduced from 4rem */
    background-color: var(--dark);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
    opacity: 0.7;
}

.footer-links ul li:hover {
    opacity: 1;
    color: var(--primary-light);
}

/* --- Certifications --- */

.certifications {
    padding: 3rem 0;
    /* Reduced from 5rem */
    background-color: var(--light);
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.cert-item {
    transition: var(--transition);
}

.cert-item:hover {
    transform: translateY(-5px);
}

.cert-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.cert-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.cert-item p {
    font-size: 0.85rem;
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.5;
}

/* --- Image Zoom / Lightbox --- */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 4000;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
}

/* --- Animations --- */

[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */

@media (max-width: 992px) {

    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-image-container {
        width: 100%;
        height: 350px;
        margin-left: 0;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .hero-btns .btn {
        margin-left: 0 !important;
        width: 100%;
    }

    .modal-content {
        padding: 2.5rem 1.5rem;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 2rem;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}