/* =========================
   VARIABLES
========================= */
:root {
    --color-principal: #c9a24d;
    --color-principal-oscuro: #a88435;
    --color-acento: #25D366;

    --color-fondo: #f5f5f2;
    --color-card: #ffffff;
    --color-texto: #1f2933;
    --color-texto-suave: #6b7280;

    --radio: 14px;
    --sombra: 0 10px 25px rgba(0, 0, 0, 0.08);
    --sombra-hover: 0 16px 35px rgba(0, 0, 0, 0.12);
}

/* =========================
   RESET
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #f5f5f2;
    color: #1f2937;
}

i.fa-solid,
i.fa-brands {
    font-size: 1em;
}

/* =========================
   TIPOGRAFÍA
========================= */
h1 {
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

h2::after {
    content: "";
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-principal), transparent);
    display: block;
    margin: 12px auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

p {
    font-size: 0.95rem;
    color: var(--color-texto-suave);
}

/* =========================
   HEADER
========================= */
.header-inner {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    transition:
        gap 0.25s ease,
        align-items 0.25s ease,
        flex-direction 0.25s ease;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.header-text h1 {
    margin-bottom: 6px;
}

.header-text p {
    font-size: 0.95rem;
    color: var(--color-texto-suave);
}

/* =========================
   LOGO
========================= */
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0px 16px;
    border-radius: 18px;
    background:
        linear-gradient(#f5f5f2, #f5f5f2) padding-box,
        linear-gradient(135deg,
            var(--color-principal),
            var(--color-principal-oscuro)) border-box;
    border: 2px solid transparent;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Texto logo */
.logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    color: var(--color-texto);
    line-height: 1;
}

.logo-text small {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-principal);
    margin-top: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Hover branding */
.logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.logo img {
    height: 100px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.trabajos-header {
    padding: 40px 20px 20px;
}

.trabajos-header h1 {
    margin: 0;
    line-height: 1.1;
}

.trabajos-header p {
    margin: 0;
    font-size: 0.95rem;
}

/* Filtros */
.trabajos-filtros {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.trabajos-filtros button {
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    background: #e5e7eb;
    font-weight: 500;
}

.trabajos-filtros button.active {
    background: var(--color-principal);
    color: white;
}

/* Grid */
.trabajos-grid {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* Tarjeta */
.trabajo-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    align-self: flex-start;
}

.trabajo-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.trabajo-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.trabajo-card.open {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Highlight al cambiar de filtro */
.trabajo-card.highlight {
    animation: card-highlight 0.6s ease;
}

@keyframes card-highlight {
    0% {
        background-color: #fff7e6;
        transform: translateY(6px);
    }
    100% {
        background-color: #ffffff;
        transform: translateY(0);
    }
}

.trabajo-precio {
    margin-top: 16px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-principal);
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.trabajo-card.open .trabajo-precio {
    transform: translateY(-4px) scale(1.05);
    opacity: 1;
}

/* Detalle oculto */
.trabajo-detalle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

/* Card abierta */
.trabajo-card.open .trabajo-detalle {
    max-height: 300px;
    /* suficiente para el contenido */
    opacity: 1;
    padding-bottom: 12px;
}


.trabajo-card.open .trabajo-precio {
    margin-top: 10px;
    opacity: 0.9;
}

.trabajo-card.open .btn-consultar {
    position: sticky;
    bottom: 0;
    margin-left: auto;
    margin-right: auto;
}

/* Botón ver detalle */
.btn-detalle {
    margin-top: 12px;
    background: none;
    border: none;
    padding: 0;
    color: var(--color-principal);
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}

/* CTA consultar */
.btn-consultar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 999px;
    background: #25D366;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;

    width: auto;
    /* 👈 clave */
    max-width: 260px;
    /* 👈 evita overflow */
}

.btn-consultar:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
}

.btn-consultar i {
    transition: transform 0.3s ease;
}

.trabajo-card.open .btn-consultar i {
    animation: whatsapp-pulse 1.4s ease infinite;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.badge-destacado {
    position: absolute;
    top: 14px;
    right: 15px;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #1f2937;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    border: 2px solid var(--color-principal);
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

.trabajo-card.destacado {
    padding-top: 44px;
}

/* =========================
   FOOTER
========================= */
footer {
    background: var(--color-principal);
    text-align: center;
    padding: 18px;
}

footer p {
    color: white;
    font-size: 0.9rem;
}

@media (max-width: 768px) {

    .header-inner {
        flex-direction: column;
        align-items: center;
        gap: 26px;
    }

    .header-text {
        text-align: center;
    }

    .logo img {
        height: 90px;
    }

    .trabajo-card {
        cursor: pointer;
        padding: 16px;
    }

    .trabajo-card h3 {
        font-size: 1rem;
    }

    .trabajo-card.open {
        box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
    }

    .trabajo-precio {
        margin-top: 10px;
        font-size: 1.2rem;
    }

    .trabajo-detalle {
        margin-top: 1rem;
        text-align: center;
    }

    .btn-detalle {
        font-size: 0.85rem;
    }

    .trabajo-detalle .btn-consultar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;

        padding: 0.75rem 1.5rem;
        font-weight: 600;

        border-radius: 999px;
    }

    .reveal {
        transition-duration: 0.5s;
    }

    .reveal.delay-1,
    .reveal.delay-2,
    .reveal.delay-3 {
        transition-delay: 0s;
    }
}

/* =========================
   6.6 REVEAL SCROLL
========================= */

.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes opcionales */
.reveal.delay-1 {
    transition-delay: 0.15s;
}

.reveal.delay-2 {
    transition-delay: 0.3s;
}

.reveal.delay-3 {
    transition-delay: 0.45s;
}