/* RESET & VINTAGE NEWSPAPER THEME - ESCALA DE GRISES */
:root {
    --bg-paper: #e5e5e5;
    --paper-texture: #d8d8d8;
    --ink-black: #111111;
    --ink-dark: #2a2a2a;
    --ink-medium: #555555;
    --ink-light: #888888;
    --border-dark: #1a1a1a;
    --border-double: #222222;
    --shadow-vintage: 4px 4px 0px #111111;
    --shadow-modal: 8px 8px 0px #000000;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Snap scroll managed inside container */
    background-color: #1a1a1a;
    font-family: 'Courier Prime', monospace;
    color: var(--ink-black);
    filter: grayscale(100%); /* Pure grayscale aesthetic */
}

/* SNAP SCROLL CONTAINER FOR PAGE-BY-PAGE NEWSPAPER */
.newspaper-container {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* PAGE SECTION */
.newspaper-page {
    width: 100vw;
    min-height: 100vh;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background-color: var(--bg-paper);
    background-image: radial-gradient(#cccccc 1px, transparent 0);
    background-size: 8px 8px; /* Newspaper halftone dots effect */
    padding: 1.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 8px solid var(--border-dark);
    position: relative;
}

/* HEADER & MASTHEAD */
.newspaper-header {
    width: 100%;
    text-align: center;
    border-bottom: 4px double var(--border-dark);
    padding-bottom: 0.4rem;
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    border-bottom: 2px solid var(--border-dark);
    padding-bottom: 4px;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.masthead {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.3rem 0;
}

.logo-wrapper {
    margin-bottom: 0.3rem;
}

.vintage-logo {
    max-height: 95px;
    filter: grayscale(100%) contrast(140%);
    border: 3px solid var(--border-dark);
    box-shadow: 3px 3px 0px #000;
}

.newspaper-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.6rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.2rem;
    text-shadow: 1px 1px 0px #ffffff;
}

.newspaper-subtitle {
    font-family: 'Special Elite', cursive;
    font-size: 0.92rem;
    letter-spacing: 1.5px;
    font-style: italic;
    color: var(--ink-dark);
}

.header-divider-double {
    border-top: 3px double var(--border-dark);
    margin-top: 4px;
}

/* HEADLINE ARTICLE - BALANCED 3 COLUMNS */
.headline-story {
    margin-top: 0.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.story-category {
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
}

.main-headline {
    font-family: 'Playfair Display', serif;
    font-size: 2.1rem;
    text-align: center;
    line-height: 1.15;
    border-top: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
    padding: 0.4rem 0;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.story-columns-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.8rem;
    align-items: start;
    text-align: justify;
    font-size: 0.92rem;
    line-height: 1.5;
}

.column {
    display: flex;
    flex-direction: column;
}

.column .drop-cap {
    float: left;
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    line-height: 0.8;
    padding-top: 4px;
    padding-right: 8px;
    font-weight: bold;
}

.column-center {
    align-items: center;
    text-align: justify;
}

.column-text-padded {
    margin-top: 0.8rem;
    margin-bottom: 1rem;
}

/* INGRESAR BUTTON UNDER COLUMN 2 */
.ingresar-btn-wrapper {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-ingresar-destacado {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
    background: var(--ink-black);
    color: #ffffff;
    border: 3px double #ffffff;
    outline: 2px solid var(--border-dark);
    box-shadow: 4px 4px 0px #000;
}

.btn-ingresar-destacado:hover {
    background: #333333;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #000;
}

.vintage-illustration-box {
    border: 3px double var(--border-dark);
    padding: 6px;
    background: #ffffff;
    box-shadow: var(--shadow-vintage);
    text-align: center;
    width: 100%;
}

.vintage-story-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    filter: grayscale(100%) contrast(130%);
    border: 1px solid var(--border-dark);
}

.caption {
    display: block;
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 0.4rem;
    padding: 0 4px;
}

.column-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.newspaper-quote {
    font-family: 'Special Elite', cursive;
    font-size: 1rem;
    border-left: 4px solid var(--border-dark);
    padding-left: 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

.action-card-mini {
    border: 2px solid var(--border-dark);
    padding: 1rem;
    background: #fff;
    box-shadow: var(--shadow-vintage);
    text-align: center;
    width: 100%;
}

.mini-title {
    font-weight: bold;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}

/* BUTTONS VINTAGE */
.vintage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--ink-black);
    color: #ffffff;
    border: 2px solid var(--border-dark);
    padding: 0.6rem 1.1rem;
    font-family: 'Special Elite', cursive;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 3px 3px 0px #555;
    transition: all 0.15s ease;
    text-decoration: none;
    width: 100%;
}

.vintage-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #000;
    background: #2a2a2a;
}

.vintage-btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #000;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* PAGE 2: DOCUMENTS SHOWCASE GRID WITH LOGOS & SATIRE JOKES */
.page-sub-header {
    border-bottom: 2px solid var(--border-dark);
    margin-bottom: 0.8rem;
}

.sub-header-line {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 0.85rem;
    padding-bottom: 0.4rem;
}

.catalog-headline {
    text-align: center;
    margin-bottom: 1rem;
}

.catalog-headline h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.documents-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    flex-grow: 1;
}

.document-list-card {
    background: #ffffff;
    border: 3px double var(--border-dark);
    padding: 1.2rem;
    box-shadow: var(--shadow-vintage);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.doc-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 2px solid var(--border-dark);
    padding-bottom: 0.6rem;
    margin-bottom: 0.8rem;
}

.doc-header-img {
    height: 65px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%) contrast(140%);
    margin-bottom: 0.4rem;
}

.doc-card-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    text-transform: uppercase;
}

.vintage-doc-list {
    list-style: none;
    padding: 0;
    margin-bottom: 0.8rem;
}

.vintage-doc-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed #ccc;
}

.doc-bullet-icon {
    width: 16px;
    height: 16px;
    color: var(--ink-black);
    flex-shrink: 0;
    margin-top: 1px;
}

.satire-joke-box {
    background: rgba(0, 0, 0, 0.04);
    border-left: 3px solid var(--border-dark);
    padding: 0.6rem 0.8rem;
    font-family: 'Special Elite', cursive;
    font-size: 0.82rem;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* PAGE 3: CENTERED WHATSAPP FORM */
.page3-centered-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 0.5rem 0;
}

.contact-form-container-centered {
    background: #ffffff;
    border: 3px double var(--border-dark);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-vintage);
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
}

/* AUTHENTICATION STYLES WITH BACKGROUND_FORM.JPG */
.auth-body {
    overflow-y: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    background-color: #121212;
    position: relative;
}

.custom-bg-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../rsr/background_form.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%) contrast(120%) brightness(0.6);
    z-index: 1;
}

.auth-card-container {
    background: rgba(255, 255, 255, 0.96);
    border: 4px double var(--border-dark);
    padding: 2.2rem 2.5rem;
    box-shadow: 12px 12px 0px #000000;
    width: 100%;
    max-width: 540px;
    position: relative;
    z-index: 10;
}

.auth-header {
    text-align: center;
    border-bottom: 2px solid var(--border-dark);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.circular-logo-wrapper {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.6rem auto;
    border: 3px solid var(--border-dark);
    box-shadow: 3px 3px 0px #000;
}

.circular-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(140%);
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
}

.auth-subtitle {
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.flag-prefix {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--ink-black);
    color: #fff;
    padding: 0.55rem 0.7rem;
    flex-shrink: 0;
    border: 2px solid var(--border-dark);
    border-right: none;
}

.flag-mx {
    font-size: 1rem;
}

.label-with-icon {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-tooltip-trigger {
    cursor: pointer;
    color: var(--ink-medium);
}

.info-icon {
    width: 16px;
    height: 16px;
}

.username-input-wrapper, .password-input-wrapper, .phone-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.btn-generate-user, .btn-toggle-pw {
    background: var(--ink-black);
    color: #fff;
    border: 2px solid var(--border-dark);
    padding: 0.55rem 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
}

.eye-icon {
    width: 18px;
    height: 18px;
}

.field-hint {
    font-size: 0.72rem;
    color: var(--ink-medium);
    margin-top: 3px;
    display: block;
}

.pw-strength-bar-wrapper {
    width: 100%;
    height: 6px;
    background: #ccc;
    margin-top: 4px;
    border: 1px solid var(--border-dark);
}

.pw-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.captcha-group {
    border-top: 2px dashed var(--border-dark);
    padding-top: 0.8rem;
    margin-top: 1rem;
}

.cf-turnstile-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.8rem 0;
    width: 100%;
}

.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0.8rem 0;
    width: 100%;
}

.captcha-img {
    border: 3px solid var(--border-dark);
    box-shadow: 3px 3px 0px #000;
    width: 260px;
    height: 80px;
    object-fit: cover;
    background: #ffffff;
}

.btn-reload-captcha {
    background: var(--ink-black);
    color: #fff;
    border: 2px solid var(--border-dark);
    padding: 0.6rem;
    cursor: pointer;
}

.captcha-text-input {
    letter-spacing: 3px;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-auth-submit {
    margin-top: 1.2rem;
    padding: 0.8rem;
    font-size: 0.95rem;
}

.auth-footer-links {
    text-align: center;
    border-top: 2px solid var(--border-dark);
    padding-top: 1rem;
    margin-top: 1.5rem;
    font-size: 0.82rem;
}

.auth-link {
    color: var(--ink-black);
    font-weight: bold;
    text-decoration: underline;
}

/* INPUTS ESTILIZADOS VINTAGE */
.vintage-input, .vintage-select, .vintage-textarea {
    border: 2px solid var(--border-dark);
    background: var(--bg-paper);
    padding: 0.6rem 0.8rem;
    font-family: 'Courier Prime', monospace;
    font-size: 0.88rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.vintage-input:focus, .vintage-select:focus, .vintage-textarea:focus {
    background: #ffffff;
    box-shadow: 3px 3px 0px #000;
    border-color: #000;
}

/* FOOTER BAR & CENTERED SLOGAN */
.page-footer-bar {
    border-top: 2px solid var(--border-dark);
    padding-top: 0.4rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.footer-centered-slogan {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

/* MODALES CUSTOM - SIN ALERTS NATIVOS */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}

.toast-message {
    pointer-events: auto;
    background: var(--ink-black);
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 0.8rem 1.5rem;
    font-family: 'Special Elite', cursive;
    font-size: 0.9rem;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 300px;
    max-width: 500px;
    animation: toastSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               toastFadeUp 0.6s ease 2.2s forwards;
}

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

@keyframes toastFadeUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-80px);
        opacity: 0;
    }
}

/* CONFIRM MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    background: var(--bg-paper);
    border: 4px solid var(--border-dark);
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    animation: popIn 0.25s ease-out;
}

@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: var(--ink-black);
    color: #fff;
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-badge {
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: bold;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-top: 2px dashed var(--border-dark);
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem;
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    cursor: pointer;
    border: 2px solid var(--border-dark);
    box-shadow: 2px 2px 0px #000;
}

.btn-cancel {
    background: #d0d0d0;
    color: var(--ink-black);
}

.btn-confirm {
    background: var(--ink-black);
    color: #ffffff;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .newspaper-page {
        padding: 1rem;
    }
    .story-columns-3, .documents-showcase-grid, .form-row-2 {
        grid-template-columns: 1fr;
    }
    .newspaper-title {
        font-size: 2.2rem;
    }
    .main-headline {
        font-size: 1.4rem;
    }
}
