/* ==========================================================================
   +ROMANTICS Ghost Theme Styles
   ========================================================================== */

/* Import Tailwind CSS from CDN - loaded in default.hbs */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Rock+Salt&display=swap');

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    background-color: #1b3b2a;
    color: #ffffff;
    font-family: "Times New Roman", Times, Georgia, serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.content-sheet {
    max-width: 740px;
    margin: 0 auto;
    background-color: transparent;
    position: relative;
}

/* ==========================================================================
   Header
   ========================================================================== */

header {
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

/* Logo Container */
.logo-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.simulation-text {
    font-family: "Rock Salt", cursive;
    color: #fff;
    font-size: clamp(1.2rem, 7vw, 5rem);
    line-height: 1.2;
    transform: rotate(-2deg);
    transform-origin: left center;
    margin-bottom: 1rem;
    opacity: 0.9;
    white-space: nowrap;
    position: relative;
    z-index: 20;
    transition: opacity 0.3s ease;
}

/* The Glow Layer - GPU Accelerated */
.simulation-text::before {
    content: "+ROMANTICS";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #fff;
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.4s ease-out;
    z-index: -1;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(255,255,255,0.8);
}

a.home-link:hover .simulation-text::before {
    opacity: 1;
}

a.home-link:hover .simulation-text {
    opacity: 1;
}

a.home-link {
    text-decoration: none;
}

/* Navigation */
.nav-links {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    border-bottom: 1px solid #fff;
}

.nav-separator {
    margin: 0 0.4rem;
    color: #fff;
    opacity: 0.4;
    font-weight: 300;
}

/* Header Meta Row */
.header-meta-row {
    display: flex;
    align-items: baseline;
    width: 100%;
    margin-top: 1rem;
}

.header-line {
    flex-grow: 1;
    border-bottom: 1px solid transparent;
    margin: 0 1rem;
    height: 1px;
    position: relative;
    top: -5px;
}

.header-date-text {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 1.05rem;
    text-transform: uppercase;
    opacity: 0.9;
    white-space: nowrap;
    cursor: default;
    transition: opacity 0.2s;
}

@media (max-width: 640px) {
    .header-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .header-line {
        display: none;
    }
    .header-date-text {
        font-size: 0.85rem;
        align-self: flex-start;
    }
}

/* ==========================================================================
   Post Styles
   ========================================================================== */

.post-header {
    display: flex;
    align-items: baseline;
    width: 100%;
    margin-bottom: 1rem;
    font-family: "Times New Roman", Times, Georgia, serif;
}

.post-title-text {
    font-weight: 400;
    font-size: 1.75rem;
    color: #fff;
    white-space: nowrap;
}

.post-title-text a {
    text-decoration: none;
    color: #fff;
}

.post-title-text a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 640px) {
    .post-title-text {
        white-space: normal;
        font-size: 1.4rem;
    }
}

.post-line {
    flex-grow: 1;
    border-bottom: 1px solid #fff;
    margin: 0 1rem;
    height: 1px;
    position: relative;
    top: -6px;
    opacity: 0.5;
}

.post-date {
    font-weight: 400;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
}

/* Page Header (for static pages like About) */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-weight: 400;
    font-size: 2.5rem;
    color: #fff;
    margin: 0;
}

/* Prose Content */
.prose p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-size: 1.1rem;
}

.prose a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    color: #fff;
}

.prose img,
.post-image,
.kg-image {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #fff;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.prose blockquote {
    border-left: 3px solid #fff;
    padding-left: 1.5rem;
    margin-left: 0;
    opacity: 0.8;
    font-style: italic;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.prose code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.prose pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    padding-top: 2rem;
    font-family: "Times New Roman", Times, Georgia, serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.pagination-link {
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pagination-link:hover,
.pagination-link:active {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pagination-link.disabled {
    opacity: 0.3;
    cursor: default;
    text-decoration: none;
    pointer-events: none;
}

/* ==========================================================================
   Archive Styles
   ========================================================================== */

.archive-year-group {
    margin-bottom: 4rem;
}

.archive-year-title {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 3rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 2rem;
    line-height: 1;
}

.archive-month-group {
    margin-bottom: 2.5rem;
    padding-left: 0;
}

.archive-month-title {
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 1.25rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #fff;
    opacity: 1;
    font-weight: 400;
    display: block;
}

/* Archive post items use same .post-header styling but with reduced opacity */
.archive-month-group .post-line {
    opacity: 0.3;
}

.archive-month-group .post-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

.archive-month-group .post-title-text {
    font-size: 1.25rem;
}

@media (max-width: 640px) {
    .archive-month-group .post-title-text {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    border-top: 1px solid #fff;
    padding-top: 2rem;
    margin-top: 4rem;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 0.9rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: #fff;
    line-height: 1.4;
    min-height: 120px;
    width: 100%;
}

.footer-col {
    flex: 0 0 auto;
    z-index: 10;
    position: relative;
    background-color: #1b3b2a;
    padding-top: 0.5rem;
}

.footer-data-block {
    margin-bottom: 0.2rem;
    font-feature-settings: "tnum";
    white-space: nowrap;
}

.clean-symbol {
    color: transparent;
    text-shadow: 0 0 0 white;
}

.footer-image-container {
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0 1rem;
    position: relative;
    height: 100px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.footer-stretch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    filter: invert(1) grayscale(100%) brightness(1.5);
    mix-blend-mode: screen;
    opacity: 0.8;
    max-height: 120px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.min-h-screen {
    min-height: 100vh;
}

.pt-12 {
    padding-top: 3rem;
}

.pb-12 {
    padding-bottom: 3rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .md\:px-12 {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-20 {
    margin-bottom: 5rem;
}

.block {
    display: block;
}

.no-underline {
    text-decoration: none;
}

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

.text-right {
    text-align: right;
}

/* ==========================================================================
   Ghost-specific Styles
   ========================================================================== */

.kg-card {
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kg-gallery-row {
    display: flex;
    gap: 1rem;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-embed-card {
    margin-bottom: 1.5rem;
}

.kg-bookmark-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.kg-bookmark-title {
    color: #fff;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.kg-bookmark-description {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Ghost Content Width Classes */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* ==========================================================================
   Ghost Portal Customization
   ========================================================================== */

/* Hide sign-in options and links */
.gh-portal-signin-switch,
.gh-portal-login-button,
.gh-portal-signup-message,
[data-members-signin],
.gh-portal-powered {
    display: none !important;
}

/* Portal Background Overlay */
.gh-portal-backdrop {
    background: rgba(27, 59, 42, 0.95) !important;
}

/* Portal Container */
.gh-portal-popup-wrapper {
    background: #1b3b2a !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    font-family: "Times New Roman", Times, Georgia, serif !important;
}

/* Portal Header */
.gh-portal-popup-container header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 2rem !important;
}

/* Main Title - MAIL+ROMANTICS */
.gh-portal-signup-logo,
.gh-portal-signup-header h1,
.gh-portal-main-title {
    font-family: "Rock Salt", cursive !important;
    color: #fff !important;
    font-size: 2rem !important;
    transform: rotate(-2deg) !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
}

/* Override title text with custom content */
.gh-portal-signup-header::before {
    content: "MAIL+ROMANTICS";
    display: block;
    font-family: "Rock Salt", cursive !important;
    color: #fff !important;
    font-size: 2rem !important;
    transform: rotate(-2deg) !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
}

.gh-portal-signup-header h1,
.gh-portal-main-title {
    display: none !important;
}

/* Input Fields */
.gh-portal-input,
input[type="email"].gh-portal-input,
input[type="text"].gh-portal-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    font-family: "Times New Roman", Times, Georgia, serif !important;
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0 !important;
}

.gh-portal-input:focus {
    border-color: rgba(255, 255, 255, 0.6) !important;
    outline: none !important;
}

.gh-portal-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Labels */
.gh-portal-input-label,
label {
    color: #fff !important;
    font-family: "Times New Roman", Times, Georgia, serif !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0.5rem !important;
}

/* Subscribe Button */
.gh-portal-btn,
.gh-portal-signup-button,
button[type="submit"] {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    font-family: "Times New Roman", Times, Georgia, serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.9rem !important;
    padding: 0.75rem 2rem !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.gh-portal-btn:hover,
.gh-portal-signup-button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

/* Close Button */
.gh-portal-close-icon,
.gh-portal-closeicon-container {
    color: #fff !important;
    opacity: 0.7 !important;
}

.gh-portal-close-icon:hover {
    opacity: 1 !important;
}

/* Text Content */
.gh-portal-text-center,
.gh-portal-signup-message,
p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: "Times New Roman", Times, Georgia, serif !important;
}

/* Success/Error Messages */
.gh-portal-notification,
.gh-portal-notification-text {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ==========================================================================
   Custom Subscribe Popup
   ========================================================================== */

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Backdrop Overlay */
.subscribe-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 59, 42, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subscribe-popup-backdrop:not(.hidden) {
    opacity: 1;
}

/* Modal Container */
.subscribe-popup-modal {
    position: relative;
    background: #1b3b2a;
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 500px;
    width: 100%;
    padding: 3rem 2rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.subscribe-popup-backdrop:not(.hidden) .subscribe-popup-modal {
    transform: scale(1);
}

/* Close Button */
.subscribe-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
}

.subscribe-popup-close:hover {
    color: rgba(255, 255, 255, 1);
}

/* Title */
.subscribe-popup-title {
    font-family: "Rock Salt", cursive;
    color: #fff;
    font-size: 2rem;
    text-align: center;
    margin: 0 0 2rem;
    transform: rotate(-2deg);
}

/* Form */
.subscribe-popup-form {
    width: 100%;
}

/* Form Fields */
.subscribe-popup-field {
    margin-bottom: 1.5rem;
}

/* Labels */
.subscribe-popup-label {
    display: block;
    font-family: "Times New Roman", Times, Georgia, serif;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Input Fields */
.subscribe-popup-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0;
    transition: border-color 0.2s ease;
}

.subscribe-popup-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}

.subscribe-popup-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Submit Button */
.subscribe-popup-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-family: "Times New Roman", Times, Georgia, serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    padding: 0.75rem 2rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.subscribe-popup-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.subscribe-popup-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.subscribe-popup-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0;
    font-family: "Times New Roman", Times, Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

/* Success Message */
.subscribe-popup-success {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Error Message */
.subscribe-popup-error {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.5);
    color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
    .subscribe-popup-modal {
        padding: 2rem 1.5rem 1.5rem;
    }

    .subscribe-popup-title {
        font-size: 1.5rem;
    }

    .subscribe-popup-subtitle {
        font-size: 0.9rem;
    }
}
