/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Header y Navegación */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    height: 80px;
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.nav-logo h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-shrink: 0;
}

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

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    flex-shrink: 0;
    margin-left: auto;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section - Optimizado para móviles */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    /* Optimización sutil para móviles */
    -webkit-transform: translateZ(0);
    transform: translateZ(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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 80px);
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    /* Optimización sutil para texto */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gradient-text {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    /* Optimización sutil para móviles */
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(240, 147, 251, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
}

/* Estilos para el contenedor de botones del formulario */
.form-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Estilos para el botón de WhatsApp */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    border: none !important;
}

.btn-whatsapp:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.4) !important;
    color: white !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%) !important;
}

.btn-whatsapp i {
    font-size: 1.2rem !important;
}

/* Estilos específicos para el botón de WhatsApp del formulario */
.whatsapp-contact-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    color: white !important;
    border: none !important;
    text-decoration: none !important;
}

.whatsapp-contact-btn:hover {
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%) !important;
    color: white !important;
    text-decoration: none !important;
}

/* Responsive para los botones del formulario */
.form-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    flex-direction: row; /* Forzar dirección horizontal en desktop */
}

/* Solo apilar en móviles */
@media (max-width: 768px) {
    .form-buttons {
        flex-direction: column !important;
    }
    
    .btn-whatsapp,
    .whatsapp-contact-btn {
        justify-content: center !important;
    }
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    color: white;
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

/* Ocultar tarjetas flotantes solo en móviles */
@media (max-width: 768px) {
    .floating-card {
        display: none !important;
    }
}

.floating-card:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.floating-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.floating-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Desactivar keyframe en móviles */
@media (max-width: 768px) {
    @keyframes float {
        0%, 100% { transform: none; }
        50% { transform: none; }
    }
}

/* Secciones generales */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Servicios */
.services {
    padding: 6rem 0;
    background: #f8f9fa;
}

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

.service-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.service-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.service-card.featured .service-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.service-features i {
    color: #667eea;
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.service-card.featured .service-features i {
    color: white;
}

/* Proceso */
.process {
    padding: 6rem 0;
    background: white;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* Portafolio */
.portfolio {
    padding: 6rem 0;
    background: #f8f9fa;
}

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

.portfolio-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    /* Optimizar para móviles */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.portfolio-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Optimizar para móviles */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    background-color: #f8f9fa;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    background-color: #f8f9fa;
    /* Optimizar para móviles */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Prevenir problemas de renderizado */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Mejorar la calidad de imagen */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    /* Optimizar para móviles */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.portfolio-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay span {
    font-weight: 600;
    font-size: 1.1rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-content p {
    color: #666;
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-tags span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Testimonios */
.testimonials {
    padding: 6rem 0;
    background: white;
}

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

.testimonial-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #555;
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.author-info h4 {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.author-info span {
    color: #666;
    font-size: 0.9rem;
}

/* Contacto */
.contact {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.contact-item i {
    font-size: 1.2rem;
    color: #f093fb;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #f093fb;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 147, 251, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f093fb;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

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

.footer-section ul li a:hover {
    color: #f093fb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1.5rem;
        z-index: 999;
        margin: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 15px;
        max-width: 90%;
        margin: 0 auto;
        min-height: auto;
        padding-bottom: 2rem;
    }

    .hero-content {
        max-width: 90%;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 1.2rem 2rem;
        -webkit-tap-highlight-color: transparent;
    }

    .floating-card {
        display: none !important;
    }

    .hero-image {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        min-height: 300px;
        justify-content: center;
        padding: 1rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
    }

    .service-card {
        padding: 2rem 1.5rem;
        margin: 0 10px;
    }

    .service-card.featured {
        transform: none;
        margin: 1rem 10px;
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 15px;
    }

    .step {
        padding: 1.5rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
    }

    .portfolio-item {
        margin: 0 10px;
    }
    
    .portfolio-image {
        height: 250px;
        background-color: #f8f9fa;
        position: relative;
    }
    
    .portfolio-image img {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        /* Asegurar que las imágenes se vean correctamente en móviles */
        object-fit: contain;
        object-position: center;
        width: 100%;
        height: 100%;
    }
    
    /* Mejorar la visualización de imágenes en móviles */
    @media (max-width: 768px) {
        .portfolio-image {
            height: 220px;
            background-color: #f8f9fa;
            border-radius: 10px 10px 0 0;
            overflow: hidden;
            position: relative;
        }
        
        .portfolio-image img {
            object-fit: contain;
            object-position: center;
            background-color: #f8f9fa;
            /* Prevenir transformaciones en móviles */
            transition: none;
        }
        
        /* Asegurar que el botón de visitar sea siempre visible */
        .mobile-visit-button {
            position: absolute;
            bottom: 10px;
            right: 10px;
            background: rgba(255, 255, 255, 0.95);
            color: #667eea;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .mobile-visit-button i {
            margin-right: 4px;
            font-size: 0.7rem;
        }
        
        .mobile-visit-button span {
            font-size: 0.75rem;
        }
        
        /* Ocultar completamente el overlay en móviles */
        .portfolio-overlay {
            display: none !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        
        /* Prevenir cualquier hover en móviles */
        .portfolio-item:hover .portfolio-overlay,
        .portfolio-item:active .portfolio-overlay,
        .portfolio-item:focus .portfolio-overlay {
            display: none !important;
            opacity: 0 !important;
        }
        
        /* Prevenir transformaciones de imagen en móviles */
        .portfolio-item:hover .portfolio-image img,
        .portfolio-item:active .portfolio-image img,
        .portfolio-item:focus .portfolio-image img {
            transform: none !important;
            transition: none !important;
        }
    }

    .portfolio-overlay {
        opacity: 0.8;
        background: rgba(102, 126, 234, 0.9);
        pointer-events: auto;
    }
    
    .portfolio-item:active .portfolio-overlay,
    .portfolio-item:focus .portfolio-overlay {
        opacity: 1;
        background: rgba(102, 126, 234, 1);
        transform: scale(0.98);
    }
    
    .portfolio-item:active .mobile-visit-button,
    .portfolio-item:focus .mobile-visit-button {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 1);
    }
    
    .portfolio-overlay i {
        font-size: 1.5rem;
    }
    
    .portfolio-overlay span {
        font-size: 1rem;
    }
    
    /* Ocultar el overlay original en móviles */
    .portfolio-overlay {
        display: none;
    }
    
    /* Mostrar botón móvil solo en dispositivos móviles */
    @media (max-width: 768px) {
        /* Ocultar completamente el overlay en móviles */
        .portfolio-overlay {
            display: none !important;
        }
        
        /* Prevenir hover en móviles */
        .portfolio-item:hover .portfolio-overlay {
            opacity: 0;
            display: none;
        }
        
        /* Prevenir transformaciones de imagen en móviles */
        .portfolio-item:hover .portfolio-image img {
            transform: none;
        }
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
    }

    .testimonial-card {
        margin: 0 10px;
        padding: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 15px;
    }

    .contact-info h2 {
        font-size: 2rem;
        text-align: center;
    }

    .contact-info p {
        text-align: center;
        font-size: 1rem;
    }

    .contact-details {
        align-items: center;
        text-align: center;
    }

    .contact-form {
        margin: 0 10px;
        padding: 1.5rem;
    }

    .section-header {
        padding: 0 15px;
        margin-bottom: 3rem;
    }

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

    .section-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 15px;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 0.9rem;
    }

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

    .section-description {
        font-size: 0.9rem;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
        max-width: 250px;
    }

    .service-card {
        padding: 1.5rem 1rem;
        margin: 0 5px;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    .portfolio-image {
        height: 220px;
    }
    
    .portfolio-image img {
        object-fit: contain;
        object-position: center;
        background-color: #f8f9fa;
    }
    
    .portfolio-content {
        padding: 1.5rem;
    }

    .portfolio-content h3 {
        font-size: 1.2rem;
    }

    .portfolio-content p {
        font-size: 0.9rem;
    }

    .testimonial-card {
        padding: 1.5rem;
        margin: 0 5px;
    }

    .testimonial-content p {
        font-size: 0.9rem;
    }

    .contact-info h2 {
        font-size: 1.8rem;
    }

    .contact-info p {
        font-size: 0.9rem;
    }

    .contact-form {
        padding: 1.5rem;
        margin: 0 5px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .floating-card i {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .floating-card h3 {
        font-size: 0.9rem;
        margin: 0;
    }

    /* Reducir aún más el ancho del hero en pantallas pequeñas */
    .hero-container {
        max-width: 85%;
        padding-bottom: 1.5rem;
    }

    .hero-content {
        max-width: 85%;
    }

    .nav-container {
        padding: 0 15px;
    }
}



    .nav-logo h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 10px;
    }
    
    /* Asegurar que el header no tape el contenido en móviles pequeños */
    body {
        padding-top: 60px;
    }
    
    html {
        scroll-padding-top: 60px;
    }
    
    .hero {
        padding-top: 60px;
        margin-top: 0;
    }
    
    .header {
        height: 70px;
    }
    
    .nav-menu {
        top: 70px;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras para móviles */
@media (max-width: 768px) {
    /* Mejorar el scroll en móviles */
    html {
        scroll-padding-top: 80px;
    }
    
    /* Evitar que el contenido se desborde */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Agregar padding-top para compensar el header fijo */
    body {
        padding-top: 80px;
    }
    
    /* Ajustar el hero para que no se vea tapado */
    .hero {
        padding-top: 80px;
        margin-top: 0;
    }
    
    /* Mejorar la legibilidad del texto */
    p, li {
        line-height: 1.7;
    }
    
    /* Espaciado mejorado para secciones */
    .services,
    .process,
    .portfolio,
    .testimonials,
    .contact {
        padding: 4rem 0;
    }
    
    /* Mejorar el contraste en móviles */
    .service-card.featured {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    }
    
    /* Mejorar la accesibilidad de los botones */
    .btn {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mejorar el formulario en móviles */
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
        font-size: 16px; /* Evita zoom en iOS */
    }
}

.service-card,
.portfolio-item,
.testimonial-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll suave para navegación */
html {
    scroll-behavior: smooth;
}

/* Efectos hover mejorados */
.service-card:hover .service-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.portfolio-item:hover .portfolio-tags span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Popup Modal */
.popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    padding-top: 80px;
    box-sizing: border-box;
    overflow-y: auto;
}

.popup-modal.active {
    display: flex;
    opacity: 1;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.popup-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    padding-top: 3rem;
    max-width: 700px;
    width: 85%;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 20px;
    margin-bottom: 40px;
    min-height: auto;
}

/* Para pantallas muy grandes */
@media (min-width: 1400px) {
    .popup-content {
        max-width: 800px;
        width: 80%;
    }
}

.popup-modal.active .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e0e0e0;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.popup-close:hover {
    background: #f44336;
    color: white;
    transform: rotate(90deg);
    border-color: #f44336;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.popup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.popup-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.popup-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-header p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

.popup-story {
    margin-bottom: 2rem;
}

.popup-story h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.popup-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.popup-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.popup-benefit {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.popup-benefit i {
    color: #667eea;
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.popup-benefit h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #333;
}

.popup-benefit p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.popup-features h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.popup-feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.popup-feature i {
    color: #4CAF50;
    font-size: 1rem;
    flex-shrink: 0;
}

.popup-offer {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    text-align: center;
}

.popup-offer h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.popup-discount {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.popup-includes {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.popup-testimonials {
    text-align: center;
}

.popup-stats {
    color: #4CAF50;
    font-weight: 600;
    margin-top: 0.5rem;
}

.popup-stats-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.popup-stats-section h3 {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #f093fb;
}

.stat-text {
    font-size: 0.8rem;
    opacity: 0.9;
    line-height: 1.3;
}

.popup-body {
    margin-bottom: 2rem;
}

.popup-features {
    margin-bottom: 2rem;
}

.popup-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.popup-feature i {
    color: #4CAF50;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.popup-feature span {
    font-weight: 500;
    color: #333;
}

.popup-cta {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.popup-timer {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.popup-timer span {
    font-weight: 700;
    color: #f44336;
    font-size: 1.2rem;
}

.popup-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(240, 147, 251, 0.4);
}

.popup-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.popup-footer p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive para popup */
@media (max-width: 1024px) {
    .popup-content {
        max-width: 600px;
        width: 90%;
    }
    
    .popup-benefits {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

@media (max-width: 768px) {
    .popup-content {
        padding: 1.5rem;
        padding-top: 2.5rem;
        margin: 15px;
        max-width: 500px;
        width: 95%;
    }
    
    .popup-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #ddd;
    }
    
    .popup-modal {
        padding: 15px;
        padding-top: 80px;
    }
    
    .popup-modal.active {
        padding-top: 60px;
    }
    
    .popup-header h2 {
        font-size: 1.8rem;
    }
    
    .popup-header p {
        font-size: 1rem;
    }
    
    .popup-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .popup-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .popup-benefits {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .popup-benefit {
        padding: 0.8rem;
    }
    
    .popup-benefit h4 {
        font-size: 0.9rem;
    }
    
    .popup-benefit p {
        font-size: 0.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .popup-feature {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-text {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .popup-content {
        padding: 1rem;
        padding-top: 2rem;
        margin: 10px;
        max-width: 350px;
        width: 98%;
    }
    
    .popup-close {
        top: 5px;
        right: 5px;
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #ddd;
    }
    
    .popup-modal {
        padding: 10px;
        padding-top: 60px;
    }
    
    .popup-modal.active {
        padding-top: 50px;
    }
    
    .popup-header h2 {
        font-size: 1.5rem;
    }
    
    .popup-feature {
        gap: 0.8rem;
    }
    
    .popup-feature span {
        font-size: 0.9rem;
    }
}

/* Optimizaciones específicas para iPhone 14 Pro Max y dispositivos similares */
@media (max-width: 430px) {
    .popup-content {
        padding: 1.2rem;
        padding-top: 2.2rem;
        margin: 8px;
        max-width: 400px;
        width: 99%;
    }
    
    .popup-modal {
        padding: 8px;
        padding-top: 70px;
    }
    
    .popup-modal.active {
        padding-top: 60px;
    }
    
    .popup-header h2 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .popup-header p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .popup-icon {
        width: 65px;
        height: 65px;
        font-size: 1.6rem;
    }
    
    .popup-btn {
        padding: 1.1rem 1.8rem;
        font-size: 1.05rem;
    }
    
    .popup-benefit {
        padding: 1rem;
    }
    
    .popup-benefit h4 {
        font-size: 1rem;
    }
    
    .popup-benefit p {
        font-size: 0.85rem;
    }
    
    .popup-feature {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    .popup-feature span {
        font-size: 0.9rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-text {
        font-size: 0.8rem;
    }
}

/* Optimizaciones para pantallas muy grandes en móviles (iPhone 14 Pro Max) */
@media (min-width: 430px) and (max-width: 500px) {
    .popup-content {
        padding: 1.5rem;
        padding-top: 2.5rem;
        margin: 12px;
        max-width: 450px;
        width: 97%;
    }
    
    .popup-header h2 {
        font-size: 1.7rem;
    }
    
    .popup-header p {
        font-size: 1rem;
    }
    
    .popup-icon {
        width: 70px;
        height: 70px;
        font-size: 1.7rem;
    }
    
    .popup-btn {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
    
    .popup-benefit {
        padding: 1.1rem;
    }
    
    .popup-benefit h4 {
        font-size: 1.05rem;
    }
    
    .popup-benefit p {
        font-size: 0.9rem;
    }
    
    .popup-feature {
        padding: 0.9rem;
        font-size: 0.9rem;
    }
    
    .popup-feature span {
        font-size: 0.95rem;
    }
    
    .stat-item {
        padding: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.7rem;
    }
    
    .stat-text {
        font-size: 0.85rem;
    }
} 

/* Botón de visitar para móviles - oculto por defecto en desktop */
.mobile-visit-button {
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.mobile-visit-button i {
    margin-right: 4px;
    font-size: 0.7rem;
}

.mobile-visit-button span {
    font-size: 0.75rem;
}

/* Mostrar botón solo en móviles */
@media (max-width: 768px) {
    .mobile-visit-button {
        display: flex;
    }
} 