
/* Variables CSS para una gestión de color más sencilla */
:root {
    --color-primary: #3B72F4;
    --color-secondary: #2C3E50;
    --color-background: #F8F9FA;
    --color-light-gray: #E9ECEF;
    --color-text-light: #6C757D;
    --color-success: #28a745;
    --font-family-body: 'Roboto', sans-serif;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 32px;
    --spacing-lg: 64px;
}

/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    color: var(--color-secondary);
    background-color: var(--color-background);
    line-height: 1.6;
    padding-top: 60px;
}

/* Contenedores y secciones */
section {
    padding: var(--spacing-lg) var(--spacing-sm);
    max-width: 1100px;
    margin: auto;
    border-bottom: 2px solid;
    border-image: linear-gradient(to right, rgba(233, 236, 239, 0) 0%, var(--color-light-gray) 50%, rgba(233, 236, 239, 0) 100%);
    border-image-slice: 1;
}

section:last-of-type {
    border-bottom: none;
}


/* --- Header y navegación --- */
.main-nav {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
}

.main-nav .logo {
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: var(--spacing-sm);
}

.main-nav a {
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav a:hover {
    background-color: var(--color-light-gray);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-secondary);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

.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);
}
/* --- Hero Section --- */
header#home {
    background: linear-gradient(135deg, #E0EBFB 0%, #F8F9FA 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

header#home h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

header#home p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-secondary);
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    animation: fadeInUp 1.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-md) auto;
}

/* Títulos y textos */
h1, h2, h3, h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

h2 {
    font-size: 2rem;
    display: block;
    padding-bottom: 5px;
    margin-bottom: var(--spacing-lg);
    border-bottom: none;
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
    color: var(--color-text-light);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Botones */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-primary);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-3px);
}

/* Sección Quién soy */
#quien-soy {
    text-align: center;
}

#quien-soy .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#quien-soy img {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#quien-soy p {
    text-align: justify;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Sección Servicios (mejoras de estilo) */
#servicios .servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.servicio {
    background-color: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

.servicio:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.servicio h3 {
    text-align: center;
}

/* Sección Cómo trabajo (mejoras de estilo) */
#como-trabajo .timeline {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-lg);
}

.paso {
    flex-basis: 180px;
}

.paso span {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
}

/* Sección Proyectos (mejoras de estilo) */
#proyectos .proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Proyectos con carrusel */
#proyectos .carrusel-container {
    position: relative;
    overflow: hidden; 
    max-width: 600px;
    margin: auto;
}

#proyectos .carrusel {
    display: flex;
    transition: transform 0.5s ease;
}

#proyectos .caso-estudio-carrusel {
    min-width: 100%; 
    padding: var(--spacing-md);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carrusel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carrusel-btn.prev {
    left: 10px;
}

.carrusel-btn.next {
    right: 10px;
}

/* Estilos para el modal */
.modal {
    display: none; 
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 1px auto;
    padding: 10px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 10;
}

.close-btn:hover,
.close-btn:focus {
    color: #333;
    text-decoration: none;
}

/* Estilos para la galería dentro del modal */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.modal-carrusel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 700px;
    min-height: 320px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.modal-carrusel {
    display: flex;
    transition: transform 0.5s cubic-bezier(.77,0,.18,1);
    width: 100%;
    height: 100%;
}


.modal-carrusel img {
    max-width: 90%;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin: 0 auto;
    display: block;
}
.modal-carrusel figure {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-epigrafe {
    font-size: 1rem;
    color: var(--color-text-light, #666);
    margin-top: 8px;
    margin-bottom: 0;
    text-align: center;
    font-style: italic;
    letter-spacing: 0.5px;
}
.modal-carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.modal-carrusel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-carrusel-btn.prev {
    left: 10px;
}

.modal-carrusel-btn.next {
    right: 10px;
}


.caso-estudio {
    background-color: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 420px;
    height: 100%;
    box-sizing: border-box;
}

.caso-estudio img {
    width: 100%;
    max-width: 320px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    background: #f4f4f4;
    display: block;
}

.caso-estudio:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.caso-estudio .testimonio {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--color-secondary);
    text-align: center;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px dashed var(--color-light-gray);
}

.caso-estudio h4 {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px; 
}

.caso-estudio .btn-primary {
    margin-top: auto;
    align-self: center;
}

/* Sección Beneficios (mejoras de estilo) */
#beneficios .beneficios-grid {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

#beneficios li {
    background-color: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-basis: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
#beneficios li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

#beneficios li i {
    font-size: 2rem;
    color: var(--color-primary);
}

/* Sección Planes de trabajo (NUEVOS ESTILOS) */
#planes .planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.plan {
    background-color: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.plan h3 {
    text-align: center;
}

/* Sección Contacto y Formularios */
#contacto form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 600px;
    margin: auto;
    background-color: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

#contacto label {
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
}

#contacto input, #contacto textarea {
    padding: 10px;
    border: 1px solid var(--color-light-gray);
    border-radius: 5px;
    width: 100%;
    transition: border-color 0.3s ease;
}

#contacto input:focus, #contacto textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.social-links {
    text-align: center;
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.social-links i {
    font-size: 2.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.social-links i:hover {
    transform: scale(1.1);
}
.contacto-botones {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 32px 0;
    flex-wrap: wrap;
}
.contacto-mail {
    margin-top: 18px;
    text-align: center;
    font-size: 1.1rem;
    color: #444;
    word-break: break-all;
    user-select: all;
}
.contacto-mail i {
    color: #3B72F4;
    margin-right: 8px;
}
.btn-contacto {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    padding: 18px 32px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: none;
}

.btn-contacto.whatsapp {
    background: #25D366;
    color: #fff;
}

.btn-contacto.mail {
    background: #3B72F4;
    color: #fff;
}

.btn-contacto:hover {
    transform: translateY(-3px) scale(1.04);
    filter: brightness(1.08);
}
/* Sección Preguntas Frecuentes (mejoras de estilo) */
#faq .faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.faq-item {
    background-color: #fff;
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.faq-item h4 {
    text-align: left;
    margin-bottom: var(--spacing-xs);
}

.faq-item p {
    text-align: left;
    margin: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-sm);
    background-color: var(--color-secondary);
    color: #fff;
    font-size: 0.9rem;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 0 12px 0;
    font-size: 1.2rem;
    color: #888;
}

.footer-content a {
    color: #3B72F4;
    margin: 0 8px;
    font-size: 1.5em;
    transition: color 0.2s;
}

.footer-content a:hover {
    color: #25D366;
}

.footer-content small {
    font-size: 0.9em;
    color: #888;
}

/* Diseño responsive */
@media (max-width: 768px) {
    .main-nav {
        padding: 20px 20px;
    }
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .timeline {
        flex-direction: column;
        align-items: center;
    }
    .modal {
        padding-top: 30px;
    }
    .modal-body {
        flex-direction: column;
    }
    .modal-carrusel-container {
        min-height: 180px;
        max-width: 100vw;
        margin-bottom: 16px;
    }
    .modal-carrusel img {
        max-width: 95vw;
        max-height: 30vh;
        margin: 0 auto;
    }
    .modal-carrusel figure {
        margin-bottom: 12px;
    }
    .modal-content {
        width: 98vw;
        max-width: 98vw;
        padding: 4px;
    }
    .caso-estudio {
        min-height: 340px;
    }
    .caso-estudio img {
        max-width: 100%;
        height: 180px;
    }
      .menu-toggle {
        display: flex;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 60px;
        left: 0;
        text-align: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        border-top: 1px solid var(--color-light-gray);
    }
    
    .nav-menu.is-active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--color-light-gray);
    }

    .nav-menu a {
        padding: 15px;
        display: block;
    }
    header#home{
        height: 85vh;
    }
    header#home h1 {
        font-size: 2.5rem;
    }
    header#home p{
        font-size: 1.2rem;
        padding-bottom: 4vh;
    }
    .hero-buttons {
        font-size: smaller;
    }
    #quien-soy h2{
        margin-bottom: 0px;
    }
    .contacto-botones {
        flex-direction: column;
        gap: 18px;
    }
    .btn-contacto {
        width: 100%;
        justify-content: center;
        font-size: 1.1rem;
        padding: 14px 0;
    }
    .footer-content {
        font-size: 0.95rem;
        gap: 6px;
    }
}