:root {
    --primary: #007AFF;
    --dark: #1d1d1f;
    --light: #f5f5f7;
    --white: #ffffff;
}

* {
    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: 100px 0;
}

.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 */
}

.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: 80px 0;
}

.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(29, 29, 31, 0.9) 0%, rgba(29, 29, 31, 0.2) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 1; /* Ahora es visible por defecto */
    transition: opacity 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: 100px 0;
    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);
}