/* ========================================================================
   phpLD 2.2.0 - "Clean & Green" Fixed-Width Theme (Corrected)
   ======================================================================== */

body {
    background-color: #E8F0EA;
    background-image: url(./images/peakpx3.jpg);
    background-repeat: repeat;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Segoe UI', 'Open Sans', Verdana, Tahoma, sans-serif;
    font-size: 13px;
    color: #333333;
    margin: 0;
    padding: 0;
}

a {
    color: #1E5631; /* Deep Green */
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #ED5E10; /* Orange Accent */
    text-decoration: none;
}

.clear { clear: both; }
table { width: 100%; }
p { margin: 0; padding: 0; }

/* CRITICAL FIX: Keeps forms inline so they don't break the Path/Breadcrumb bar */
form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* --- Header --- */
#top {
    width: 980px;
    height: 140px;
    margin: 0 auto;
    text-align: left;
}

#top .left {    
    float: left;
    height: 108px;
    width: 16px;
    margin-left: -1px;
}

#logo {
    float: left;
    margin-top: 53px;
}

#logo img {
    border: 0;
    float: left;
    border-radius: 4px;
}

#toplinks {
    height: 34px;
    font-weight: bold;
    float: right;
    margin-top: 60px; /* FIXED: Aligned with the logo */
}

#toplinks a {    
    color: #ED5E10;
    display: block;
    float: left;
    font-weight: bold;
    padding: 8px 15px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    margin-left: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#toplinks a:hover {
    background: #1E5631;
    color: #FFFFFF;
}

/* --- Search --- */
#search {
    float: right;
    height: 80px;
    margin-right: 20px;
    margin-top: 40px;
    width: 590px;
}

#search a { color: #FFFFFF; text-decoration: none; }
#search .images { float: right; display: none; }

#search .text {
    float: right;
    background-color: #FFFFFF;
    height: 30px;
    width: 220px;
    padding: 0 10px;
    border: 1px solid #A9C2B1;
    border-radius: 4px;
    color: #262626;
    font-size: 14px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

#search .text:focus {
    border-color: #1E5631;
    outline: none;
}

/* FIXED: Restored the original image for the search button */
#search .btn {
    float: right;
    background-image: url(./images/go.png);
    background-repeat: no-repeat;
    background-color: transparent;
    height: 30px;
    width: 40px;
    margin: 0px 0 0 10px;
    padding: 0;
    border: 0;
    cursor: pointer;
}

/* --- Main Layout --- */
#wrapper {
    width: 960px;
    margin: 0 auto;
    padding: 10px;
    margin-top: 20px;    
}

#center { width: 100%; }

/* --- Left Sidebar --- */
#leftbody {
    width: 294px;
    float: left;
    background: #fff;
    border-radius: 6px 6px 0px 0px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

#leftbody .top {
    background: linear-gradient(to bottom, #F4F8F5, #E5EFE8);
    border: 1px solid #C5D8CC;
    color: #000000;
    font-size: 14px;
    font-weight: bold;
    height: 24px;
    padding: 8px 0 0 12px;
    margin: 0;
    text-align: left;
    width: 280px;    
    border-radius: 6px 6px 0px 0px;
    text-transform: uppercase;
}

#leftbody .links {
    width: 292px;
    border-bottom: 1px solid #C5D8CC;
    border-left: 1px solid #C5D8CC;
    border-right: 1px solid #C5D8CC;
    margin-bottom: 15px;
    background: #FFFFFF;
}

#leftbody .nrm {
    width: 250px;
    margin: 0 auto;
    padding: 9px 7px;
    border-bottom: 1px solid #F0F0F0;
    font-weight: bold;
    color: #444;
}

#leftbody .links a {
    display: block;
    width: 250px;
    margin: 0 auto;
    padding: 9px 7px;
    border-bottom: 1px solid #F0F0F0;
    font-weight: 600;
    color: #333;
}

#leftbody .links a:hover {
    color: #1E5631;
    background-color: #F9FCFA;
    border-bottom: 1px solid #E0E0E0;
    padding-left: 12px;
}

#leftbody .linkfooter {
    width: 292px;    
    height: 2px;
    clear: both;
}

/* --- Right Content Area --- */
#rightbody {
    width: 632px;
    float: right;
    margin-right: 3px;
    background: #fff;
    border-radius: 6px 6px 0px 0px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

#rightbody .content {
    width: 632px;
    margin-bottom: 15px;    
}

#rightbody .contentfooter {
    width: 608px;
    padding: 15px 12px 20px 10px;
    text-align: left;
    border-bottom: 1px solid #C5D8CC;
    border-left: 1px solid #C5D8CC;
    border-right: 1px solid #C5D8CC;
    background: #FFFFFF;
}

/* --- Breadcrumbs --- */
#path {
    background: linear-gradient(to right, #1E5631, #2A7A45);   
    height: 32px;
    line-height: 32px;
    text-align: left;    
    border: 1px solid #174226;
    color: #fff;
    border-radius: 6px 6px 0px 0px;
    overflow: hidden; /* Prevents forms from breaking out */
}

#path .left, #path .right { height: 32px; }

#path .txt {
    margin: 0 0 0 12px;
    font-size: 13px;
    font-weight: bold;
    float: left;
}

#path .txt a {
    color: #E8F0EA;
    text-decoration: none;
}

#path .submit a {
    color: #E8F0EA;
    text-decoration: none;
}

#path .txt a:hover { color: #FFFFFF; text-decoration: underline; }

/* --- Featured Links Area (#homex) --- */
#homex .top {
    background: linear-gradient(to bottom, #F4F8F5, #E5EFE8);
    height: 35px;
    text-align: left;
    color: #000000;
    border: 1px solid #C5D8CC;
    text-transform: uppercase;
}

#homex .topleft, #homex .topright { height: 37px; }

#homex .toptxt {
    margin: 8px 0 0 12px;
    font-size: 14px;
    font-weight: bold;
    float: left;
}

#homex .block {
    width: 110px;
    height: 135px;
    float: left;
    border: 1px solid #E0E0E0;
    background: #FAFAFA;
    text-align: center;
    margin: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#homex .block:hover {
    border-color: #A9C2B1;
    background: #FFFFFF;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

#homex img.url-img {
    height: 75px;
    width: 100px;
    padding: 0;
    margin-top: 4px;
    border: 1px solid #DDD;
    border-radius: 2px;
}

#homex .l a {
    display: block;
    padding: 4px 2px;
    font-size: 10px;
    font-weight: bold;
    margin: 2px;
    color: #333;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* --- Headings & Typography --- */
h1 { font-size: 16pt; margin: 5px 0 10px 0; color: #1E5631; }
h2 { font-size: 14px; margin: 0 0 4px 0; padding: 0; }
h2 a { color: #222; }

h3 {
    color: #000000;
    background: linear-gradient(to bottom, #F4F8F5, #E5EFE8);    
    padding: 8px 15px;
    font-size: 12px;
    border-bottom: 2px solid #1E5631;
    border-top: 1px solid #C5D8CC;
    border-left: 1px solid #C5D8CC;
    border-right: 1px solid #C5D8CC;
    margin-top: 20px;
    border-radius: 4px 4px 0 0;
    text-transform: uppercase;
}

/* --- Directory Layout Elements --- */
.c { float: left; }
.cr { clear: left; }
td { vertical-align: top; padding: 5px; }

#descr { padding: 0px; margin: 0 0 10px 0; line-height: 1.6; }

.count { color: #888; font-size: 11px; font-weight: normal; }
#links a { font-size: 14px; font-weight: bold; }
#links p { margin: 4px 0 12px 0; line-height: 1.5; color: #444; }
.url { color: #777; font-size: 11px; }

/* --- Forms & Inputs --- */
.text, .btn, select, textarea.text {
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    border: 1px solid #A9C2B1;
    border-radius: 3px;
    padding: 4px;
}

input.text:focus, textarea.text:focus { border-color: #1E5631; }

.btn {
    font-weight: bold;
    background-color: #E5EFE8;
    color: #1E5631;
    cursor: pointer;
    padding: 4px 10px;
    height: auto;
}
.btn:hover { background-color: #C5D8CC; }

/* --- Footer --- */
div.footer {
    bottom: 0;
    clear: both;
    width: 980px;
    text-align: center;
    padding: 20px 0;
    margin: 20px 0 0 -10px;
    border-top: 3px solid #1E5631;
    background: rgba(255,255,255,0.8);
    border-radius: 0 0 6px 6px;
    font-weight: bold;
}
div.footer a { color: #1E5631; }

/* --- Tree & Pagerank --- */
div.pr {
    font-size: 10px;
    color: #000000;
    margin-top: 4px;
    padding: 3px 10px;
    border: 1px solid #C5D8CC; 
    background: #F9FCFA;
    border-radius: 3px;
}
div.prg {
    width: 80px;
    border: 1px solid #A9C2B1;
    height: 4px;
    font-size: 1px;
    float: right;
    margin-top: 3px;
    background: #E8F0EA;
}
div.prb {
    background: #ED5E10;
    height: 4px;
    font-size: 1px;
}


/* ========================================================================
   MOBILE RESPONSIVE OVERRIDES
   ======================================================================== */
@media screen and (max-width: 980px) {
    /* 1. Fluid Wrappers */
    body { padding: 0; }
    #top, #wrapper, div.footer {
        width: 100% !important;
        max-width: 100%;
        padding: 10px;
        margin: 0;
        box-sizing: border-box;
        height: auto !important;
    }

    /* 2. Stack Left and Right Columns */
    #leftbody, #rightbody, #rightbody .content, #rightbody .contentfooter, #leftbody .top, #leftbody .links, #leftbody .linkfooter {
        width: 100% !important;
        float: none !important;
        margin: 0 0 15px 0 !important;
        box-sizing: border-box;
    }
    
    /* 3. Reformat Header (Logo, Search, Links) */
    #logo {
        float: none;
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }
    
    #toplinks {
        float: none;
        margin-top: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        height: auto;
    }
    
    #toplinks a {
        float: none;
        margin: 0;
    }

    #search {
        width: 100% !important;
        margin: 20px 0;
        float: none;
        display: flex;
        justify-content: center;
        height: auto;
    }

    #search .text {
        width: 60%;
    }

    /* 4. Force Tables to Stack (Category Layout) */
    .categories table, .categories tbody, .categories tr, .categories td {
        display: block;
        width: 100% !important;
    }
    .categories td {
        padding: 0 0 20px 0;
    }

    /* 5. Center Featured Links */
    #homex .contentfooter {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    #homex .block {
        float: none;
    }
}


/* Hide the redundant secondary search box in the green bar */
#path form {
    display: none !important;
}

/* Ensure the category titles take up the full width again */
#path .right {
    display: none !important;
}