/* ==========================================================================
   THE MEDIUM BLOG - PREMIUM FOOTER SYSTEM
   ========================================================================== */

/* --- Global Footer Styling --- */
.glass-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 0 0; 
    margin-top: 100px;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
}

/* --- Brand Section (Logo Font Sync) --- */
.footer-logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
}

.footer-logo span {
    font-family: 'Dancing Script', cursive;
    color: var(--accent-color);
    font-size: 2.1rem;
    margin-left: 2px;
    font-weight: 600;
}

.brand-bio {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- Navigation & Animated Underline Effect --- */
.footer-nav {
    display: flex;
    justify-content: space-between;
}

.nav-col h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.8rem;
    color: #1a1a1a;
}

.nav-col a {
    display: table; 
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-col a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
}

.nav-col a:hover {
    color: #1a1a1a;
}

.nav-col a:hover::after {
    width: 100%;
}

/* --- Newsletter Styling --- */
.footer-newsletter h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
    color: #1a1a1a;
}

.footer-newsletter p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    border-color: var(--accent-color);
}

.newsletter-form button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.2);
    filter: brightness(1.1);
}

/* --- Footer Bottom & Reader Counter (VISIBILITY FIX) --- */
.footer-bottom {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reader-counter {
    display: flex;
    align-items: center;
    gap: 15px;
    /* High contrast background for visibility */
    background: #f1f5f9; 
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.counter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.counter-divider {
    width: 1px;
    height: 15px;
    background: rgba(0, 0, 0, 0.1);
}

.counter-text {
    font-size: 0.75rem;
    color: #475569; /* Slate gray for readability */
    letter-spacing: 0.3px;
}

.counter-text strong {
    color: #0f172a; /* Near black text - VISIBLE ON WHITE/GRAY */
    font-weight: 800;
}

/* --- Live Dot Animation --- */
.live-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    position: relative;
}

.live-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* --- Floating Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-black);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: #fff;
    color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.progress-ring {
    position: absolute;
    top: -1px;
    left: -1px;
}

.progress-circle {
    fill: transparent;
    stroke: var(--accent-color);
    stroke-width: 2;
    stroke-dasharray: 138.23;
    stroke-dashoffset: 138.23;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

/* --- Feature Discovery Modal --- */
.feature-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feature-modal-content {
    background: #fff;
    max-width: 450px;
    width: 100%;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalSlideUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.feature-list {
    text-align: left;
    margin: 30px 0;
}

.feature-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-icon {
    font-size: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.feature-text strong {
    display: block;
    font-size: 1rem;
    color: #1e293b;
}

.feature-text p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

/* --- Premium Button --- */
.btn-premium-v2 {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-premium-v2:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* --- Responsive Layout --- */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    .footer-logo, .social-links, .nav-col a {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-nav {
        flex-direction: column;
        gap: 40px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .back-to-top { 
        bottom: 20px; 
        left: 20px; 
    }

    #backToTop {
        /* Increase this value to move it higher from the bottom */
        bottom: 100px !important; 
        /* Optional: move it slightly more to the right if needed */
        right: 20px;
    }
}

.footer-disclaimer{
    font-size: 0.85rem;
    opacity: 0.8;
    max-width: 600px;
}

.publisher-info{
    font-weight: 500;
}