/* ==============================
   LexAcademia Posts — Estilos
   ============================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* --- Page --- */
body {
    background: #0f1419;
    color: #ccc;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.6;
}
a { color: #e74c3c; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Top Nav --- */
.topbar {
    background: #1a1f25;
    border-bottom: 1px solid #2a2f35;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.topbar-brand .lex { color: #e74c3c; }
.topbar-brand .acad { color: #fff; }
.topbar-nav { display: flex; gap: 8px; }
.topbar-nav a {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #999;
    transition: all 0.2s;
}
.topbar-nav a:hover, .topbar-nav a.active {
    background: #2a2f35;
    color: #fff;
    text-decoration: none;
}

/* --- Container --- */
.container { max-width: 1400px; margin: 0 auto; padding: 32px; }

/* --- Page Header --- */
.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.page-subtitle { color: #777; font-size: 0.95rem; margin-bottom: 40px; }

/* --- Day Cards (index) --- */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.day-card {
    background: #1a1f25;
    border: 1px solid #2a2f35;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    display: block;
    color: inherit;
}
.day-card:hover { border-color: #e74c3c; transform: translateY(-2px); text-decoration: none; color: inherit; }
.day-card__day { font-size: 0.8rem; color: #e74c3c; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.day-card__title { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 8px 0; }
.day-card__platforms { display: flex; gap: 12px; margin-top: 12px; }
.day-card__platform {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: #252a30;
    color: #aaa;
}
.day-card__platform i { margin-right: 4px; }

/* --- Platform Section --- */
.platform-section {
    background: #1a1f25;
    border: 1px solid #2a2f35;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
}
.platform-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2f35;
}
.platform-header i { font-size: 1.5rem; }
.platform-header .fa-instagram { color: #E1306C; }
.platform-header .fa-threads { color: #fff; }
.platform-header h2 { font-size: 1.2rem; font-weight: 700; color: #fff; }
.platform-header .badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: #252a30;
    color: #999;
    margin-left: auto;
}

/* --- Slides Row --- */
.slides-row {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
}
.slides-row::-webkit-scrollbar { height: 6px; }
.slides-row::-webkit-scrollbar-track { background: #252a30; border-radius: 3px; }
.slides-row::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.slide-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    scroll-snap-align: start;
}

/* ==============================
   INSTAGRAM SLIDES (540x540)
   ============================== */
.ig-slide {
    width: 540px;
    height: 540px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* --- Dark Variant --- */
.ig-slide--dark {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 40%, #34495e 100%);
    color: #ffffff;
}

/* --- Light Variant --- */
.ig-slide--light {
    background: #ffffff;
    color: #333333;
}

/* --- Accent Variant (purple) --- */
.ig-slide--accent {
    background: linear-gradient(135deg, #6c3483, #8e44ad, #a569bd);
    color: #ffffff;
}

/* --- Red Variant --- */
.ig-slide--red {
    background: linear-gradient(135deg, #c0392b, #e74c3c, #ff6b6b);
    color: #ffffff;
}

/* --- Slide Inner --- */
.ig-slide__inner {
    width: 100%;
    height: 100%;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.ig-slide__inner--top { justify-content: flex-start; padding-top: 64px; }

/* --- Background Icon --- */
.ig-slide__bg-icon {
    position: absolute;
    font-size: 220px;
    opacity: 0.06;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}
.ig-slide--light .ig-slide__bg-icon { opacity: 0.04; color: #2c3e50; }

/* --- Slide Number --- */
.ig-slide__num {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.5;
    z-index: 2;
}

/* --- Brand --- */
.ig-slide__brand {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
    opacity: 0.6;
}
.ig-slide__brand .lex { color: #e74c3c; }
.ig-slide--light .ig-slide__brand .lex { color: #e74c3c; }
.ig-slide--light .ig-slide__brand { color: #999; }

/* --- Title Large (gancho/cierre) --- */
.ig-slide__title-lg {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

/* --- Subtitle --- */
.ig-slide__subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.8;
    line-height: 1.5;
}

/* --- Content Slide Elements --- */
.ig-slide__left-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #8e44ad, #e74c3c);
    z-index: 2;
}

.ig-slide__icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
    background: rgba(142, 68, 173, 0.12);
    color: #8e44ad;
}
.ig-slide__icon-circle--red {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}
.ig-slide__icon-circle--green {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
}

.ig-slide__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 12px;
    line-height: 1.3;
}

.ig-slide__divider {
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #8e44ad);
    margin-bottom: 16px;
    border-radius: 2px;
}

.ig-slide__text {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #555;
}

.ig-slide__highlight {
    background: rgba(231, 76, 60, 0.08);
    border-left: 3px solid #e74c3c;
    padding: 10px 14px;
    margin-top: 14px;
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c0392b;
}

.ig-slide__list {
    list-style: none;
    margin-top: 8px;
}
.ig-slide__list li {
    padding: 6px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.ig-slide__list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #8e44ad;
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

/* --- CTA on dark slides --- */
.ig-slide__cta {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background: #e74c3c;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50px;
}

/* ==============================
   THREAD POSTS
   ============================== */
.threads-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 540px;
}

.th-post {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    width: 540px;
    color: #333;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    position: relative;
}

.th-post__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.th-post__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 11px;
}
.th-post__handle {
    font-weight: 700;
    font-size: 14px;
    color: #222;
}
.th-post__num {
    margin-left: auto;
    font-size: 12px;
    color: #999;
    font-weight: 600;
}
.th-post__body {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    white-space: pre-line;
}
.th-post__body strong { font-weight: 700; }

.th-connector {
    width: 2px;
    height: 20px;
    background: #ddd;
    margin-left: 41px;
}

/* --- Wrapper para thread post + boton --- */
.th-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* ==============================
   REEL PREVIEW
   ============================== */
.reel-slide {
    width: 304px;
    height: 540px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
.reel-slide--dark {
    background: linear-gradient(135deg, #1a252f, #2c3e50);
    color: white;
}
.reel-slide--red {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
}
.reel-slide__inner {
    width: 100%;
    height: 100%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.reel-slide__bg-icon {
    position: absolute;
    font-size: 160px;
    opacity: 0.06;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}
.reel-slide__title {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
}
.reel-slide__text {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.5;
}
.reel-slide__brand {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.5;
    z-index: 2;
}

/* ==============================
   CAPTION & HASHTAGS
   ============================== */
.caption-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #2a2f35;
}
.caption-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
}
.caption-text {
    background: #111419;
    border: 1px solid #2a2f35;
    border-radius: 8px;
    padding: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #ccc;
    white-space: pre-line;
    position: relative;
}
.hashtags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hashtags span {
    font-size: 0.8rem;
    padding: 3px 10px;
    background: #1e2530;
    border-radius: 6px;
    color: #8e44ad;
    font-weight: 500;
}

/* ==============================
   BUTTONS
   ============================== */
.btn-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #252a30;
    border: 1px solid #3a3f45;
    border-radius: 8px;
    color: #ccc;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-dl:hover { background: #e74c3c; border-color: #e74c3c; color: #fff; }

.btn-dl-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #e74c3c;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    font-family: inherit;
}
.btn-dl-all:hover { background: #c0392b; }

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #3a3f45;
    border-radius: 8px;
    color: #999;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    font-family: inherit;
}
.btn-copy:hover { border-color: #8e44ad; color: #8e44ad; }
.btn-copy.copied { border-color: #2ecc71; color: #2ecc71; }

/* Boton copiar especifico para posts de Threads */
.btn-copy--thread {
    margin-top: 0;
    font-size: 0.75rem;
    padding: 5px 12px;
    background: #1a1f25;
    border-color: #2a2f35;
}

/* ==============================
   BACK LINK
   ============================== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 24px;
}
.back-link:hover { color: #fff; text-decoration: none; }

/* ==============================
   SECTION LABEL
   ============================== */
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555;
    margin-bottom: 24px;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 700px) {
    .container { padding: 16px; }
    .ig-slide { width: 360px; height: 360px; }
    .ig-slide__inner { padding: 28px; }
    .ig-slide__title-lg { font-size: 1.6rem; }
    .ig-slide__title { font-size: 1.1rem; }
    .ig-slide__text { font-size: 0.8rem; }
    .th-post { width: 360px; }
    .reel-slide { width: 203px; height: 360px; }
    .platform-section { padding: 20px; }
    .days-grid { grid-template-columns: 1fr; }
}
