/* =================================
   STYLES FOR INICIO, COMO-TRABAJAMOS, CONTACTO
   ================================= */

/* General Layout */
.page-container {
    max-width: 72rem;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* --- TARJETA DE CONTENIDO PARA DESKTOP --- */
.content-card {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

@media (min-width: 48rem) {
    .content-card {
        background-color: var(--white-color);
        padding: 3rem;
        border-radius: 1rem;
        box-shadow: 0 .625rem 1.875rem rgba(0, 0, 0, 0.07);
        margin-top: 2rem;
    }
    .solo-tel {
        display: none;
    }
}
@media (max-width: 47.9375rem) {
    .solo-desktop {
        display: none;
    }
}


.page-header {
    text-align: center;
    margin-bottom: 0;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

/* --- INICIO PAGE --- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    max-width: 69rem;
    margin: 1.5rem auto;
    padding: 2rem 1.5rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 1.125rem;
}

.hero-image img {
    width: 29rem;
    max-width: 100%;
    margin: 0 auto;
}

.familiar-scenarios {
    max-width: 69rem;
    margin: 4rem auto 1rem;
    padding: 0 1.5rem;
    text-align: center;
}

.familiar-scenarios h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.scenario-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: .625rem;
    box-shadow: 0 .25rem .9375rem rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.scenario-card blockquote {
    border-left: .1875rem solid var(--secondary-color);
    padding-left: 1.5rem;
    font-style: italic;
    flex-grow: 1;
}

.scenario-card blockquote footer {
    font-style: normal;
    font-weight: 600;
    margin-top: 1rem;
    color: var(--primary-color);
}

.card-link {
    margin-top: 1.5rem;
    font-weight: 600;
}

/* --- COMO TRABAJAMOS PAGE --- */
.about-me-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.about-me-text {
    text-align: left;
}

.author-portrait {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

@media (min-width: 48rem) {
    .about-me-wrapper {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 2.5rem;
    }
}

.content-section {
    margin-bottom: 2.5rem;
}

.text-section {
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.text-section p {
    font-size: 1.1rem;
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile first: una columna */
    gap: 2rem;
    align-items: center;
    margin: 4rem 0;
}

.feature-block.reverse .feature-text {
    order: 1;
}

.feature-block.reverse img {
    order: 2;
}

@media (min-width: 48rem) {
    .feature-block {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .feature-block.reverse {
        grid-template-columns: 1fr 1fr;
    }

    .feature-block.reverse .feature-text {
        order: 2;
    }

    .feature-block.reverse img {
        order: 1;
    }
}


.feature-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.feature-text blockquote {
    margin-top: 1.5rem;
    padding-left: 1rem;
    border-left: .125rem solid var(--border-color);
    font-size: 0.9rem;
    font-style: italic;
}

.feature-block img {
    border-radius: .625rem;
    max-width: 25rem;
    margin: 0 auto;
}

@media (min-width: 48rem) {
    .feature-block img {
        max-width: 100%;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 48rem) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card img {
    max-width: 100%;
    /* FIX: La imagen no desborda la tarjeta */
    height: auto;
    margin: 0 auto 1.5rem;
}

.service-card h4 {
    font-size: 1.2rem;
}

.final-cta {
    border-top: .0625rem solid var(--border-color);
    padding-top: 3rem;
    margin-top: 4rem;
}

/* --- CONTACTO PAGE --- */
.contact-page {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 40rem;
}

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

.main-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.main-form input,
.main-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: .0625rem solid var(--border-color);
    border-radius: .3125rem;
    font-family: var(--font-family-main);
}

.main-form textarea {
    resize: vertical;
}

.main-form button {
    width: 100%;
    padding: 1rem;
}

.contact-response-hidden {
    display: none;
}

#contact-success {
    background: var(--white-color);
    padding: 2rem;
    border-radius: .625rem;
    text-align: center;
    border: .0625rem solid var(--border-color);
}

#contact-success .avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

#contact-success .email-body {
    text-align: left;
    background: var(--light-gray);
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: .3125rem;
    font-size: 0.9rem;
}

.whatsapp-cta {
    text-align: center;
    border-top: .0625rem solid var(--border-color);
    padding-top: 2rem;
    margin-top: 2rem;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto;
}

.btn-whatsapp svg {
    width: 1.5rem;
    height: 1.5rem;
}

.whatsapp-cta small {
    display: block;
    opacity: 0.8;
}

/* --- FIX: Clase de utilidad para ocultar feedback del newsletter --- */
.feedback-hidden {
    display: none;
}

/* Para centrar botón 'Compartir' */
.share-section {
    margin-top: 1rem;
    padding-top: 1rem;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 53rem) {
    .page-header h1 {
        font-size: 2.2rem;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/*** Enlaces del boletín ***/
.newsletter-links {
    text-align: center;
    padding: 1rem 1rem;
    background-color: transparent;
}

.newsletter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 66rem;
    margin: 0 auto 0;
}

.newsletter-card {
    background: var(--white-color);
    padding: 1.5rem;
    border-radius: .5rem;
    box-shadow: 0 .25rem .9375rem rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-card:hover {
    transform: translateY(-.3125rem);
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, 0.1);
}

.newsletter-card a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

/* Animación de cursor para efecto máquina de escribir */
.cursor-blink {
    font-weight: bold;
    color: var(--primary-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Clase para mensajes de validación debajo del textarea */
.char-counter {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
    text-align: right;
    display: block;
}
.char-counter.too-short { color: #d9534f; } /* Rojo suave */
.char-counter.warning { color: var(--secondary-color); } /* Naranja */
.char-counter.good { color: #5cb85c; } /* Verde */

/* Clase para desvanecer el formulario */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

@media (min-width: 48rem) {
    .newsletter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64rem) {
    .newsletter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ... código existente ... */

/* --- NUEVOS ESTILOS CONTACTO (Versión Corregida) --- */

.response-header-row {
    display: flex;
    gap: 1.5rem;
    align-items: center; /* Centrado verticalmente respecto al avatar */
    margin-bottom: 1.5rem;
}

.response-header-row .avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-msg {
    text-align: left;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.5;
}

/* El área de interacción está FUERA del flex row, por lo tanto ocupa todo el ancho */
#interaction-area {
    display: block;
    width: 100%;
}

.response-separator {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    width: 60%; /* Ancho solicitado */
    margin: 0 0 1.5rem 0; /* Alineado a la izquierda */
}

.llm-container {
    text-align: left;
    margin-bottom: 1rem;
    min-height: 2rem; 
    line-height: 1.6;
}

.edit-link-wrapper {
    text-align: center;
    margin-top: 1.5rem;
}

.edit-link-wrapper a {
    font-size: 0.9rem;
    text-decoration: underline;
    color: var(--secondary-color);
    cursor: pointer;
}

.header-hidden {
    display: none !important;
}

@media (max-width: 48rem) {
    .response-header-row {
        flex-direction: column;
        text-align: center;
    }
    .status-msg {
        text-align: center;
    }
    .response-separator {
        margin: 0 auto 1.5rem auto;
    }
}