/* ============================================
   FOOTER & MASTER LAYOUT THEME CSS
   ============================================ */

/* Base Body Responsive */
.responsive-body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
}

/* Prevent horizontal scroll */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.journal-footer {
    background: var(--grad-main);
    color: #eef3ff;
    margin-top: 60px;
    width: 100%;
    overflow-x: hidden;
}

.footer-container {
    max-width: 1400px;
    margin: auto;
    padding: 50px 25px 35px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 35px;
}

.footer-section h3,
.footer-section h4 {
    color: #ffe27a;
    margin-bottom: 14px;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.7;
    font-size: 14px;
    color: #e6ecff;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 10px;
    font-size: 14px;
    color: #eef2ff;
}

.footer-list i {
    margin-right: 8px;
    color: #ffd700;
}

/* Stats box */
.footer-stat-box {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}

.footer-stat-box .stat-number {
    font-size: 34px;
    font-weight: 800;
    color: #ffd700;
}

.footer-stat-box .stat-label {
    font-size: 13px;
    margin-top: 6px;
    letter-spacing: 0.5px;
    color: #eaf0ff;
}

/* Journal Reach: display only, not clickable */
.footer-stats .footer-stat-box {
    cursor: default;
}

/* Bottom bar - blends with footer gradient, no solid box */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 25px;
    font-size: 13px;
    background: transparent;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: left;
    overflow: hidden;
    position: relative;
}

.footer-bottom-left {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.footer-bottom-right {
    flex-shrink: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.footer-bottom .footer-copyright,
.footer-bottom .footer-license {
    margin: 4px 0;
    color: #e6ecff;
}

.footer-bottom .footer-license {
    font-size: 12px;
    opacity: 0.95;
}

#clockbox {
    font-size: 13px;
    color: #e6ecff;
    white-space: nowrap;
}

.footer-link {
    color: #e6ecff;
    text-decoration: none;
}

.footer-link:hover {
    color: #ffd700;
    text-decoration: underline;
}

/* ============================================
   COMPREHENSIVE RESPONSIVE FOOTER STYLES
   ============================================ */

/* Extra Small Devices (Portrait Phones) - Less than 576px */
@media (max-width: 575.98px) {
    .journal-footer {
        margin-top: 40px;
    }
    
    .footer-container {
        max-width: 100% !important;
        padding: 30px 15px 25px !important;
        grid-template-columns: 1fr !important;
        gap: 25px;
        text-align: center;
    }
    
    .footer-section {
        width: 100%;
    }
    
    .footer-section h3 {
        font-size: 18px !important;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .footer-section h4 {
        font-size: 16px !important;
        margin-bottom: 12px;
    }
    
    .footer-section p {
        font-size: 13px !important;
        line-height: 1.6;
    }
    
    .footer-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .footer-list li {
        font-size: 13px !important;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        word-break: break-word;
    }
    
    .footer-list i {
        margin-right: 6px;
        font-size: 14px;
    }
    
    .footer-stat-box {
        padding: 15px !important;
        margin: 0 auto;
        max-width: 200px;
    }
    
    .footer-stat-box .stat-number {
        font-size: 28px !important;
    }
    
    .footer-stat-box .stat-label {
        font-size: 12px !important;
        margin-top: 5px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 15px 12px !important;
        font-size: 12px !important;
    }
    
    .footer-bottom-left {
        order: 1;
    }
    
    .footer-bottom-right {
        order: 2;
    }
    
    .footer-bottom .footer-copyright,
    .footer-bottom .footer-license {
        margin: 4px 0;
        font-size: 12px;
        line-height: 1.5;
    }
    
    .footer-bottom .footer-license {
        font-size: 11px !important;
    }
    
    #clockbox {
        margin-top: 8px;
        font-size: 11px !important;
    }
}

/* Small Devices (Landscape Phones) - 576px to 767.98px */
@media (min-width: 576px) and (max-width: 767.98px) {
    .journal-footer {
        margin-top: 45px;
    }
    
    .footer-container {
        padding: 35px 20px 30px !important;
        grid-template-columns: 1fr !important;
        gap: 28px;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 20px !important;
    }
    
    .footer-section h4 {
        font-size: 17px !important;
    }
    
    .footer-section p {
        font-size: 13px !important;
    }
    
    .footer-list li {
        font-size: 13px !important;
        justify-content: center;
    }
    
    .footer-stat-box {
        padding: 18px;
        max-width: 220px;
        margin: 0 auto;
    }
    
    .footer-stat-box .stat-number {
        font-size: 30px !important;
    }
    
    .footer-stat-box .stat-label {
        font-size: 12px !important;
    }
    
    .footer-bottom {
        padding: 16px 15px;
        font-size: 12px !important;
    }
    
    #clockbox {
        font-size: 11px !important;
    }
}

/* Medium Devices (Tablets) - 768px to 991.98px */
@media (min-width: 768px) and (max-width: 991.98px) {
    .journal-footer {
        margin-top: 50px;
    }
    
    .footer-container {
        padding: 40px 20px 30px !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px;
    }
    
    .footer-section h3 {
        font-size: 20px !important;
    }
    
    .footer-section h4 {
        font-size: 17px !important;
    }
    
    .footer-section p {
        font-size: 14px;
    }
    
    .footer-list li {
        font-size: 14px;
        justify-content: flex-start;
    }
    
    .footer-stat-box {
        padding: 18px;
    }
    
    .footer-stat-box .stat-number {
        font-size: 32px !important;
    }
    
    .footer-bottom {
        padding: 17px 20px;
    }
}

/* Large Devices (Desktops) - 992px to 1199.98px */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .footer-container {
        padding: 45px 25px 32px;
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    
    .footer-section h3 {
        font-size: 20px;
    }
    
    .footer-section h4 {
        font-size: 17px;
    }
}

/* Extra Large Devices - 1200px and up */
@media (min-width: 1200px) {
    .footer-container {
        padding: 50px 25px 35px;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 35px;
    }
}

/* Responsive - Original 768px breakpoint */
@media (max-width: 768px) {
    .footer-container {
        text-align: center;
        grid-template-columns: 1fr !important;
    }
    
    .footer-list li {
        justify-content: center;
        display: flex;
        align-items: center;
    }
    
    .footer-section {
        text-align: center;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .journal-footer {
        margin-top: 30px;
    }
    
    .footer-container {
        padding: 25px 20px 20px !important;
    }
    
    .footer-section h3 {
        font-size: 18px !important;
    }
    
    .footer-section h4 {
        font-size: 16px !important;
    }
    
    .footer-bottom {
        padding: 12px 15px;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    .footer-list li {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    .journal-footer {
        margin-top: 20px;
        background: white !important;
        color: black !important;
    }
    
    .footer-container {
        grid-template-columns: 1fr !important;
        padding: 20px;
    }
    
    .footer-section h3,
    .footer-section h4 {
        color: black !important;
    }
    
    .footer-list li {
        color: black !important;
    }
    
    .footer-bottom {
        background: #f5f5f5 !important;
        color: black !important;
    }
    
    #clockbox {
        display: none;
    }
}
