/* ============================================
   HTTPLOCALHOST.INFO - RESPONSIVE CSS
   Max Width: 1080px | Sidebar: 250px
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif; 
    line-height: 1.6; 
    color: #333; 
    background: #f8f9fa; 
    overflow-x: hidden;
    min-height: 100vh;
}
a { color: #007bff; text-decoration: none; word-break: break-word; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* === CONTAINER === */
.container { 
    max-width: 1080px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%; 
}

/* === CODE & PRE === */
code { 
    background: #e9ecef; 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-family: "SF Mono", Monaco, "Consolas", monospace; 
    font-size: 0.88em; 
    word-break: break-all; 
}
pre { 
    background: #282c34; 
    color: #abb2bf; 
    padding: 15px; 
    border-radius: 6px; 
    overflow-x: auto; 
    margin: 15px 0; 
    font-size: 0.85em; 
    white-space: pre-wrap; 
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}
pre code { 
    background: none; 
    color: inherit; 
    padding: 0; 
    font-size: inherit;
}

/* === HEADER === */
.header { 
    background: #fff; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}
.nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 0; 
}
.logo { 
    font-size: 1.15em; 
    font-weight: 700; 
    color: #333; 
    white-space: nowrap; 
}
.logo span { color: #007bff; }
.logo:hover { text-decoration: none; }
.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 4px; 
}
.nav-links a { 
    padding: 8px 12px; 
    color: #555; 
    font-size: 0.88em; 
    border-radius: 6px; 
    transition: all 0.2s; 
    white-space: nowrap; 
}
.nav-links a:hover { 
    background: #e9ecef; 
    color: #007bff; 
    text-decoration: none; 
}
.nav-toggle { 
    display: none; 
    background: none; 
    border: none; 
    font-size: 1.5em; 
    cursor: pointer; 
    padding: 5px; 
    line-height: 1;
}

/* === MAIN === */
.main { 
    padding: 25px 0 40px; 
    min-height: calc(100vh - 200px); 
}
.breadcrumb { 
    font-size: 0.88em; 
    color: #666; 
    margin-bottom: 18px; 
    word-break: break-word; 
}
.breadcrumb a { color: #007bff; }

/* === LAYOUT (Content + Sidebar) === */
.layout { 
    display: grid; 
    grid-template-columns: 1fr 280px; 
    gap: 20px; 
}

/* === CONTENT === */
.content { 
    background: #fff; 
    padding: 28px; 
    border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    overflow: hidden;
    word-wrap: break-word; 
    overflow-wrap: break-word;
    min-width: 0;
}
.content h1 { 
    font-size: 1.6em; 
    margin-bottom: 18px; 
    color: #212529; 
    word-break: break-word;
    line-height: 1.3;
}
.content h2 { 
    font-size: 1.3em; 
    margin: 28px 0 14px; 
    color: #212529; 
    border-bottom: 2px solid #e9ecef; 
    padding-bottom: 8px; 
}
.content h3 { 
    font-size: 1.1em; 
    margin: 20px 0 10px; 
    color: #333; 
}
.content p { 
    margin-bottom: 14px; 
    color: #495057; 
}
.content ul, .content ol { 
    margin: 14px 0 18px 22px; 
}
.content li { 
    margin-bottom: 8px; 
}

/* === TABLES === */
.table-wrap { 
    overflow-x: auto; 
    margin: 18px 0; 
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}
table { 
    width: 100%; 
    border-collapse: collapse;
    min-width: 100%;
}
th, td { 
    padding: 12px 14px; 
    text-align: left; 
    border-bottom: 1px solid #e9ecef; 
    font-size: 0.9em;
}
th { 
    background: #f8f9fa; 
    font-weight: 600; 
    color: #333;
    white-space: nowrap;
}
td { 
    white-space: nowrap; 
}
td:last-child { 
    white-space: normal; 
}
tr:hover { 
    background: #f8f9fa; 
}
tr:last-child td {
    border-bottom: none;
}

/* === ACCESS BOX === */
.access-box { 
    background: linear-gradient(135deg, #e8f4fd 0%, #e0f0ff 100%); 
    border: 1px solid #b8daff; 
    border-radius: 8px; 
    padding: 20px; 
    margin: 22px 0; 
}
.access-line { 
    display: flex; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 12px; 
}
.access-label { 
    font-weight: 600; 
    color: #004085; 
    font-size: 0.95em; 
}
.access-btn { 
    display: inline-block; 
    background: #007bff; 
    color: #fff; 
    padding: 10px 18px; 
    border-radius: 6px; 
    font-weight: 500; 
    transition: all 0.2s; 
    font-size: 0.92em; 
}
.access-btn:hover { 
    background: #0056b3; 
    text-decoration: none; 
}
.alt-links { 
    margin-top: 12px; 
    font-size: 0.88em; 
    color: #666; 
    word-break: break-all; 
}

/* === NOTE BOX === */
.note { 
    background: #fff3cd; 
    border: 1px solid #ffc107; 
    border-radius: 6px; 
    padding: 14px; 
    margin: 18px 0; 
    font-size: 0.92em; 
}
.note strong { 
    color: #856404; 
}

/* === SIDEBAR === */
.sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 20px;
    min-width: 0;
}
.sidebar-widget { 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}
.sidebar-widget h3 { 
    font-size: 0.98em; 
    margin-bottom: 14px; 
    color: #333; 
    border-bottom: 2px solid #007bff; 
    padding-bottom: 8px; 
}
.sidebar-widget ul { 
    list-style: none; 
}
.sidebar-widget li { 
    margin-bottom: 10px; 
}
.sidebar-widget a { 
    color: #495057; 
    font-size: 0.9em; 
}
.sidebar-widget a:hover { 
    color: #007bff; 
}

/* === LINK GRID (Hub Pages) === */
.link-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); 
    gap: 12px; 
    margin: 18px 0 28px; 
}
.link-card { 
    display: block; 
    padding: 14px 16px; 
    background: #f8f9fa; 
    border: 1px solid #e9ecef; 
    border-radius: 8px; 
    text-decoration: none; 
    transition: all 0.2s ease; 
}
.link-card:hover { 
    background: #e9ecef; 
    border-color: #007bff; 
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.link-card strong { 
    display: block; 
    color: #007bff; 
    font-size: 0.98em; 
    margin-bottom: 4px; 
}
.link-card span { 
    display: block; 
    color: #666; 
    font-size: 0.82em; 
    line-height: 1.4; 
}

/* === FOOTER === */
.footer { 
    background: #212529; 
    color: #adb5bd; 
    padding: 40px 0 20px; 
    margin-top: 50px; 
}
.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px; 
    margin-bottom: 28px; 
}
.footer-col h4 { 
    color: #fff; 
    font-size: 0.95em; 
    margin-bottom: 14px; 
}
.footer-col ul { 
    list-style: none; 
}
.footer-col li { 
    margin-bottom: 8px; 
}
.footer-col a { 
    color: #adb5bd; 
    font-size: 0.85em; 
}
.footer-col a:hover { 
    color: #fff; 
}
.footer-bottom { 
    border-top: 1px solid #343a40; 
    padding-top: 20px; 
    text-align: center; 
    font-size: 0.82em; 
}
.disclaimer-mini { 
    margin-top: 8px; 
    font-size: 0.75em; 
    color: #6c757d; 
}

/* === AD BOX === */
.adbox { 
    background: #f8f9fa; 
    border: 1px dashed #dee2e6; 
    border-radius: 8px; 
    padding: 30px; 
    text-align: center; 
    color: #6c757d; 
    min-height: 200px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* === TABLET (max 900px) === */
@media (max-width: 900px) {
    .layout { 
        grid-template-columns: 1fr; 
        gap: 25px; 
    }
    .sidebar {
        order: 2;
    }
}

/* === MOBILE LANDSCAPE / TABLET (max 768px) === */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .nav-toggle { 
        display: block; 
    }
    .nav-links { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        background: #fff; 
        flex-direction: column; 
        padding: 10px 15px; 
        box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
        z-index: 1000; 
    }
    .nav-links.active { 
        display: flex; 
    }
    .nav-links li { 
        width: 100%; 
    }
    .nav-links a { 
        display: block; 
        padding: 12px 15px; 
        border-bottom: 1px solid #f1f1f1; 
        border-radius: 0;
    }
    .nav-links li:last-child a {
        border-bottom: none;
    }
    .nav { 
        position: relative; 
    }
    .logo { 
        font-size: 1.05em; 
    }
    
    /* Footer */
    .footer-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px; 
    }
    .footer { 
        padding: 30px 0 18px; 
    }
}

/* === MOBILE (max 600px) === */
@media (max-width: 600px) {
    /* Content */
    .content { 
        padding: 20px 16px; 
    }
    .content h1 { 
        font-size: 1.35em; 
    }
    .content h2 { 
        font-size: 1.18em;
        margin: 22px 0 12px;
    }
    .content h3 {
        font-size: 1.05em;
    }
    
    /* Pre/Code */
    pre { 
        padding: 12px; 
        font-size: 0.82em; 
    }
    
    /* Tables */
    th, td { 
        padding: 10px; 
        font-size: 0.85em; 
    }
    
    /* Access Box */
    .access-box { 
        padding: 16px; 
    }
    .access-line { 
        flex-direction: column; 
        align-items: stretch; 
    }
    .access-btn { 
        width: 100%; 
        text-align: center; 
    }
    
    /* Float images */
    img[style*="float"] {
        float: none !important;
        display: block !important;
        margin: 15px auto !important;
        max-width: 200px !important;
    }
    
    /* Sidebar */
    .sidebar-widget {
        padding: 16px;
    }
}

/* === SMALL MOBILE (max 480px) === */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    /* Link Grid */
    .link-grid { 
        grid-template-columns: 1fr; 
        gap: 10px; 
    }
    .link-card { 
        padding: 12px 14px; 
    }
    
    /* Footer */
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 22px; 
    }
    
    /* Content */
    .content {
        padding: 16px 14px;
    }
    .content h1 {
        font-size: 1.25em;
    }
    
    /* Main */
    .main {
        padding: 20px 0 30px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.82em;
    }
}

/* === VERY SMALL MOBILE (max 360px) === */
@media (max-width: 360px) {
    .logo {
        font-size: 0.95em;
    }
    .content h1 {
        font-size: 1.15em;
    }
    .content {
        padding: 14px 12px;
    }
    th, td {
        padding: 8px;
        font-size: 0.8em;
    }
}
