/* --- Variables y Reset --- */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e293b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --whatsapp-green: #25d366;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--secondary-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- Header --- */
.main-header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo-container { display: flex; justify-content: center; align-items: center; }
.logo { max-height: 60px; width: auto; }

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
}
.hero h1 { font-size: 2.5rem; margin-bottom: 20px; }
.cta-button {
    display: inline-block; padding: 12px 30px;
    background-color: var(--primary-color); color: var(--white);
    text-decoration: none; border-radius: 5px; font-weight: bold;
    transition: background 0.3s ease;
}
.cta-button:hover { background-color: #1d4ed8; }

/* --- Servicios --- */
.services { padding: 60px 0; text-align: center; }
.services h2 { font-size: 2rem; margin-bottom: 40px; color: var(--secondary-color); }

.services-grid {
    display: flex; flex-wrap: wrap; gap: 30px; justify-content: center;
}
.service-card {
    background: var(--white); padding: 30px; border-radius: 10px;
    width: 100%; max-width: 400px; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.service-card .icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; }

/* --- NUEVOS ESTILOS: PORTAFOLIO --- */
.portfolio {
    padding: 60px 0;
    background-color: var(--white); /* Fondo blanco para diferenciar sección */
    text-align: center;
}

.portfolio h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.section-subtitle {
    margin-bottom: 40px;
    color: #64748b;
}

.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.portfolio-item {
    position: relative;
    display: block;
    width: 100%;
    max-width: 320px; /* Tamaño máximo por imagen */
    aspect-ratio: 1 / 1; /* FUERZA LA PROPORCIÓN CUADRADA 1x1 */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el cuadrado sin deformarse */
    transition: transform 0.5s ease;
}

/* Efecto Hover (opcional pero profesional) */
.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(30, 41, 59, 0.7);
    display: flex; justify-content: center; align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay span {
    color: white; font-weight: bold; border: 2px solid white;
    padding: 10px 20px; border-radius: 5px;
}

.portfolio-item:hover .overlay { opacity: 1; }
.portfolio-item:hover img { transform: scale(1.1); }


/* --- Footer --- */
.main-footer {
    background-color: var(--secondary-color); color: var(--white);
    padding: 40px 0 20px; text-align: center;
}
.social-links a {
    color: var(--white); font-size: 1.5rem; margin: 0 15px;
}
.copyright {
    font-size: 0.9rem; opacity: 0.7; margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
}

/* --- Botón Whatsapp --- */
.whatsapp-float {
    position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px;
    background-color: var(--whatsapp-green); color: #FFF; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; text-decoration: none; box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .portfolio-grid { flex-direction: column; align-items: center; }
}