/* ============================================================
   PAGES.CSS — Estilos compartidos para páginas internas
   ============================================================ */

/* ---- Layout principal ---- */
.page-main {
    padding-top: 130px;
    min-height: 100vh;
}

/* ---- Back link ---- */
.page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font);
    font-size: 0.85rem;
    color: var(--copper);
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.page-back:hover {
    color: var(--copper-bright);
    gap: 0.6rem;
}

.page-back svg {
    width: 14px;
    height: 14px;
}

/* ---- Hero de página interna ---- */
.page-hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 2.5rem;
    text-align: center;
}

.page-hero-label {
    font-family: var(--font);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 1rem;
}

.page-hero-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 1.2rem;
}

.page-hero-sub {
    font-family: var(--font);
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.75;
}

/* ---- Grid de carátulas (proceso-creativo.html) ---- */
.cases-section {
    padding: 1rem 2rem 5rem;
}

.cases-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.case-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--charcoal-mid);
    border: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.45), 0 0 0 1px var(--copper-glow);
}

.case-card__img-wrap {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.case-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.case-card:hover .case-card__img {
    transform: scale(1.04);
}

.case-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c1108, #2e1f0e, #3a2a14);
    font-family: Georgia, serif;
    font-size: 5rem;
    font-weight: 700;
    color: var(--copper);
    opacity: 0.7;
    letter-spacing: -2px;
}

.case-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,10,4,0.88) 0%, rgba(15,10,4,0.15) 55%, transparent 100%);
    transition: opacity 0.3s ease;
}

.case-card:hover .case-card__overlay {
    opacity: 1.15;
}

.case-card__content {
    padding: 1.5rem 1.6rem 1.8rem;
}

.case-card__category {
    font-family: var(--font);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 0.5rem;
    display: block;
}

.case-card__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    line-height: 1.25;
}

.case-card__subtitle {
    font-family: var(--font);
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.case-card__arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font);
    font-size: 0.82rem;
    color: var(--copper);
    transition: gap 0.2s ease;
}

.case-card:hover .case-card__arrow {
    gap: 0.55rem;
}

/* ---- Artículo largo (pablo-burmann.html, disenioweb-proceso.html) ---- */
.case-header {
    padding: 3rem 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.case-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.case-intro {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-style: italic;
}

.case-featured-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 3rem;
    display: block;
    border: 1px solid rgba(255,255,255,0.07);
}

.case-section {
    margin-bottom: 2.8rem;
}

.case-section h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    position: relative;
    padding-left: 1.2rem;
}

.case-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 3px;
    background: var(--copper);
    border-radius: 2px;
}

.case-section h3 {
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--copper-bright);
    margin: 1.8rem 0 0.55rem;
    letter-spacing: 0.01em;
}

.case-section p {
    font-family: var(--font);
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.88;
    margin-bottom: 1rem;
}

.case-section p:last-child {
    margin-bottom: 0;
}

.case-section ul {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.case-section ul li {
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.75;
}

.case-section ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    font-size: 0.55rem;
    color: var(--copper);
    top: 5px;
}

.case-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(200,145,106,0.18), transparent);
    margin: 2.5rem 0;
    border: none;
}

/* ---- Testimonial ---- */
.case-testimonial-placeholder {
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 1.8rem;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.6;
    margin: 2rem 0;
}

/* ---- CTA final del artículo ---- */
.case-cta {
    background: rgba(200, 145, 106, 0.06);
    border: 1px solid rgba(200, 145, 106, 0.18);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.case-cta h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.case-cta p {
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.75;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.case-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2.2rem;
    background: var(--copper);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, transform 0.2s ease;
}

.case-cta-btn:hover {
    background: var(--copper-bright);
    transform: translateY(-2px);
}

/* ---- Fade-in ---- */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .page-main {
        padding-top: 110px;
    }

    .page-hero {
        padding: 2.5rem 1.5rem 2rem;
    }

    .cases-section {
        padding: 1rem 1.5rem 4rem;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .case-card__img-wrap {
        height: 210px;
    }

    .case-header,
    .case-article {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .case-featured-img {
        height: 220px;
    }

    .case-intro {
        font-size: 1rem;
    }

    .case-cta {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-hero-title {
        font-size: 1.9rem;
    }

    .case-section h2 {
        font-size: 1.35rem;
    }

    .case-featured-img {
        height: 180px;
        border-radius: 14px;
    }
}

/* ---- Galería Antes / Después ---- */
.ayd-gallery {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.ayd-slider {
    width: 100%;
}

.ayd-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 24px;
    cursor: ew-resize;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    user-select: none;
    -webkit-user-select: none;
}

.ayd-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
    display: block;
}

.ayd-img--before {
    z-index: 1;
}

.ayd-img--after {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.ayd-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--copper);
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(200, 145, 106, 0.5);
    pointer-events: none;
}

.ayd-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    background: var(--copper);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(200, 145, 106, 0.25);
    transition: background 0.15s ease, transform 0.15s ease;
}

.ayd-handle:active,
.ayd-container:active .ayd-handle {
    background: var(--copper-bright);
    transform: translate(-50%, -50%) scale(1.08);
}

.ayd-handle svg {
    width: 20px;
    height: 10px;
    color: #fff;
    pointer-events: none;
    flex-shrink: 0;
}

.ayd-badge {
    position: absolute;
    top: 14px;
    z-index: 4;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.82);
    pointer-events: none;
}

.ayd-badge--before {
    left: 14px;
}

.ayd-badge--after {
    right: 14px;
}

@media (max-width: 768px) {
    .ayd-gallery {
        padding: 1.5rem 1.5rem 2.5rem;
        gap: 2rem;
    }

    .ayd-container {
        border-radius: 16px;
    }

    .ayd-handle {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .ayd-container {
        aspect-ratio: 4 / 3;
        border-radius: 12px;
    }

    .ayd-handle {
        width: 34px;
        height: 34px;
    }

    .ayd-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
}
