:root {
    --primary: #007AFF;
    --dark: #1d1d1f;
    --light: #f5f5f7;
    --white: #ffffff;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- AJUSTE LOGO --- */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    height: 120px; /* Controlamos el alto máximo para que no rompa el nav */
}

.logo img {
    height: 100%;  /* Que ocupe el alto del enlace */
    width: auto;    /* Que el ancho se ajuste solo para no deformar */
    object-fit: contain;
    padding: 5px 0; /* Espaciado interno para que no toque los bordes */
}

/* --- RE-ALINEACIÓN DEL NAV --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px; /* Definimos un alto fijo al nav para que todo se alinee al medio */
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--dark);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    background: radial-gradient(circle at bottom, #f0f7ff 0%, #ffffff 70%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto 30px;
}

.typewriter {
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 15px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-secondary {
    border: 1px solid #ddd;
    padding: 15px 35px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark);
    transition: 0.3s;
}

.btn-secondary:hover {
    background: #eee;
}

/* Services Grid */
.services {
    padding-top: 100px;
    padding-bottom: 100px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center; /* Centra el texto y elementos inline */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los elementos hijos en el eje horizontal */
    text-decoration: none;
    color: inherit;
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: #f8f9fa; /* Un fondo sutil para que resalte el círculo */
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: auto;  /* Estos dos aseguran el centrado si no usas flex en la card */
    margin-right: auto;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    transform: translateY(-10px);
}

.price-tag {
    display: inline-block;
    margin-top: 20px;
    padding: 6px 15px;
    background-color: #f0f0f0; /* Un gris muy suave */
    color: #1d1d1f; /* El color oscuro de tu marca */
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.service-card:hover .price-tag {
    background-color: #1d1d1f;
    color: #ffffff;
    border-color: #1d1d1f;
}

/* WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
}

/* El efecto de pulso (el aro que se expande) */
.whatsapp-btn::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: pulse-green 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

@keyframes pulse-green {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Animación del cursor titilando */
.typewriter {
    color: var(--primary);
    border-right: 3px solid var(--primary);
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary);
    }
}

/* Clase opcional para cuando está escribiendo (quitar el parpadeo mientras se mueve) */
.typewriter.typing {
    animation: none;
    border-right: 3px solid var(--primary);
}

/* Portfolio Section */
.portfolio {
    padding-top: 80px;
    padding-bottom: 80px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Efecto Hover Imagen */
.portfolio-item:hover img {
    transform: scale(1.1);
}

/* Overlay (Capa superior) */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(20, 20, 22, 0.95) 0%, rgba(20, 20, 22, 0.7) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 1; /* Ahora es visible por defecto */
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

@media (hover: hover) {
    .portfolio-overlay {
        opacity: 0;
    }
    
    .portfolio-item:hover .portfolio-overlay {
        opacity: 1;
    }
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.overlay-content span {
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.overlay-content h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin: 5px 0;
}

.overlay-content p {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.view-project {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--primary);
}


/* Contact Section */
.contact {
    padding-top: 100px;
    padding-bottom: 100px;
    background-color: #fcfcfd;
}

.contact-box {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    background: var(--white);
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.info-item .icon {
    font-size: 1.5rem;
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input {
    transition: border-color 0.3s ease;
}

/* Efecto Minimalista */
.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 2px solid #eee;
    outline: none;
    font-size: 1rem;
    background: transparent;
    transition: 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
}

.input-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: #999;
    pointer-events: none;
    transition: 0.3s;
}

/* Animación del Label */
.input-group input:focus~label,
.input-group input:valid~label,
.input-group textarea:focus~label,
.input-group textarea:valid~label {
    top: -12px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
}

.btn-submit {
    background: var(--dark);
    color: var(--white);
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: var(--primary);
    transform: scale(1.02);
}


/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #888;
    text-align: center;
}


/* --- NUEVOS ESTILOS PARA EL MENÚ HAMBURGUESA --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--dark);
    transition: 0.3s;
}

/* --- RESPONSIVE 900px (Tablets) --- */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .contact-box {
        grid-template-columns: 1fr;
        padding: 40px;
    }
}

/* --- RESPONSIVE 600px (Mobile) --- */
@media (max-width: 600px) {
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .logo a {
        height: 90px; 
    }
    
    nav {
        padding: 0 10px;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        height: 100vh;
        justify-content: center;
        transition: 0.4s;
        box-shadow: -10px 0 20px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-btns {
        flex-direction: column;
        padding: 0 20px;
    }

    .contact-box {
        padding: 30px 20px;
    }

    .contact-info h2 {
        font-size: 1.8rem;
    }

    .whatsapp-btn {
        width: 50px;  /* Bajamos de 60px a 50px */
        height: 50px;
        bottom: 20px; /* Lo acercamos un poquito más al borde */
        right: 20px;
    }

    .whatsapp-btn img {
        width: 45px;  /* Achicamos el logo de WA proporcionalmente */
        height: 45px;
    }
    
    /* Ajustamos el pulso para que no sea tan gigante en el celu */
    @keyframes pulse-green {
        0% {
            transform: scale(0.9);
            box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
        }
        70% {
            transform: scale(1.3); /* Un poco menos de expansión */
            box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
        }
        100% {
            transform: scale(0.9);
            box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        }
    }
}

/* Animación del botón X */
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.toast {
    background: var(--white);
    color: var(--dark);
    padding: 16px 24px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    border-left: 4px solid var(--primary);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #34c759; /* Apple iOS Green */
}

.toast.error {
    border-left-color: #ff3b30; /* Apple iOS Red */
}

.toast.warning {
    border-left-color: #ff9500; /* Apple iOS Orange */
}

.toast-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsivo para Celulares */
@media (max-width: 600px) {
    .toast-container {
        top: 20px;
        right: 20px;
        left: 20px;
        align-items: center;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        transform: translateY(-120%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* --- PROCESO / LINEA DE TIEMPO --- */
.process-section {
    padding: 100px 0;
    background-color: var(--white);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #eee;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--white);
    border: 4px solid var(--primary);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.timeline-item:hover::after {
    background-color: var(--primary);
}

.left {
    left: 0;
    text-align: right;
}

.left::after {
    right: 0;
    left: auto;
    transform: translateX(50%);
}

.right {
    left: 50%;
}

.right::after {
    left: 0;
    right: auto;
    transform: translateX(-50%);
}

.timeline-content {
    padding: 25px 30px;
    background-color: var(--light);
    position: relative;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.timeline-content span {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.timeline-content p {
    font-size: 0.95rem;
    color: #666;
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item::after {
        left: 21px;
        right: auto;
        transform: none;
    }
    .left {
        left: 0;
        text-align: left;
    }
    .right {
        left: 0;
    }
}

/* --- FAQ ACCORDION --- */
.faq-section {
    padding: 100px 0;
    background-color: #fcfcfd;
}

.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f2;
}

.faq-question {
    width: 100%;
    padding: 22px 30px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #fafafc;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    padding: 0 30px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.active {
    border-color: var(--primary);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding-bottom: 25px;
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0), padding 0.3s ease;
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* --- TESTIMONIALS / CASE STUDIES --- */
.testimonials-section {
    padding: 100px 0;
    background-color: var(--light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
}

.testimonial-text {
    font-size: 1rem;
    color: #444;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
}

.testimonial-metric {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.testimonial-client {
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.client-logo-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.client-info h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 2px;
}

.client-info span {
    font-size: 0.8rem;
    color: #888;
}

/* --- GRID DE BENEFICIOS (4 COLUMNAS) --- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}