/* Landing Page Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: verdana, arial, sans-serif;
    background-color: #f0f2f5;
}

/* if the global header accidentally appears due to rewrite quirks, hide it */
body.page-landing header.header-container,
body.register-page header.header-container {
    display: none !important;
}

/* Global Utility Classes */
.w-75 {
    width: 75%;
    float: left;
}

.w-50 {
    width: 50%;
    float: left;
}

.w-40 {
    width: 40%;
    float: left;
}

.w-25 {
    width: 25%;
    float: left;
}

.w-20 {
    width: 20%;
    float: left;
}

/* ==================== HEADER SECTION ==================== */
.header-section {
    background-color: #f5f5f5;
    padding: 12px 0 8px 0;
    border-bottom: 1.5px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-section .header-container {
    width: 90%;
    margin: auto;
    overflow: hidden;
}

.header-section .logo-area {
    /* Use inline-flex to align logo image and site name */
    margin: 0 0 0 25px;
}

.header-section .logo-area .logo-landing {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #5a9a3c;
    text-decoration: none;
    font-size: 30px; /* slightly larger per request */
    font-weight: 900;
    letter-spacing: -1px;
}

.header-section .logo-area .logo-landing .site-logo {
    height: 26px; /* larger logo to match text */
    width: auto;
    display: inline-block;
    /* Nudge up slightly to better align with site name */
    transform: translateY(2px);
}

.header-section .login-section {
    float: right;
}

.header-section .login-section label {
    display: block;
    color: #666666;
    font-size: 13px;
    font-family: arial;
    margin-bottom: 4px;
    font-weight: 600;
}

.header-section .login-section input[type="text"],
.header-section .login-section input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    outline: none;
    border: 1px solid #3a6a2c;
    background-color: #d0e5c8;
    font-size: 12px;
}

.header-section .login-section input[type="text"]:focus,
.header-section .login-section input[type="password"]:focus {
    border: 1px solid #a6d89a;
    background-color: #ffffff;
}

.header-section .login-section .spece {
    padding-right: 12px;
    box-sizing: border-box;
}

.header-section .login-section a {
    display: inline-block;
    text-decoration: none;
    color: #5a9a3c;
    margin: 3px 0 0 2px;
    font-size: 11px;
}}

.header-section .login-section a:hover {
    text-decoration: underline;
}

.header-section .login-section input[type="submit"] {
    width: 100%;
    box-sizing: border-box;
    background-color: #2e7d32;
    border: 2px solid #2d5a1a;
    color: #ffffff;
    font-weight: bold;
    margin-top: 16px;
    font-size: 13px;
    padding: 6px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.header-section .login-section input[type="submit"]:hover {
    background-color: #3a7a1c;
    border: 2px solid #1d3a0c;
}

.login-section.w-75 {
    width: 65%;
}

/* ==================== CONTENT SECTION ==================== */
.content-section {
    background: linear-gradient(#ffffff, #e8f0e8);
    padding: 30px 0;
}

.content-section .help-heading {
    margin: 10px;
}

.content-section .help-heading h2 {
    color: #1a3a1a;
    font-size: 24px;
    font-family: arial;
    margin: 0;
    margin-left: 35px;
    font-weight: 700;
}

.content-container {
    overflow: hidden;
    width: 90%;
    margin: auto;
}

.registration-section {
    padding-left: 20px;
}

.content-item {
    width: 50%;
    float: left;
    box-sizing: border-box;
}

.posts-section {
    padding-right: 20px;
}

.posts-feed {
    background: #f0f2f5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    max-height: 450px;
    overflow-y: auto;
}

.post-feed-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-left: 4px solid #5a9a3c;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.post-feed-item:hover {
    box-shadow: 0 4px 12px rgba(90,154,60,0.15);
    border-left-color: #2e7d32;
    transform: translateY(-2px);
}

.post-feed-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}

.post-feed-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #5a9a3c 0%, #2e7d32 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(90,154,60,0.2);
}

.post-feed-username {
    font-weight: 600;
    color: #1a3a1a;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-feed-username:hover {
    color: #5a9a3c;
    text-decoration: underline;
}

.post-feed-content {
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word;
}

.post-feed-meta {
    font-size: 11px;
    color: #666;
    display: flex;
    gap: 14px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
}

.content-section .main-heading h1 {
    font-family: arial;
    font-size: 38px;
    color: #1a3a1a;
    margin: 0;
    font-weight: 900;
}

.content-section .main-heading h3 {
    font-family: arial;
    font-size: 19px;
    color: #3a5a3a;
    margin: 0;
    margin: 8px 0 0 0;
    font-weight: 500;
}

.content-container .form-section {
    overflow: hidden;
    margin-top: 16px;
    width: 100%;
}

.content-container .form-section .i-spece-one {
    width: 100%;
    float: none;
    box-sizing: border-box;
    padding-right: 0;
    margin-bottom: 16px;
}

.content-container .form-section .i-spece-two {
    width: 100%;
    float: none;
    box-sizing: border-box;
    padding-right: 0;
    margin-bottom: 16px;
}

.content-container .form-section input[type="text"],
.content-container .form-section input[type="email"],
.content-container .form-section input[type="password"] {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border-radius: 6px;
    border: 2px solid #c8e0c0;
    outline: none;
    font-family: arial;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.content-container .form-section input[type="text"]::placeholder,
.content-container .form-section input[type="email"]::placeholder,
.content-container .form-section input[type="password"]::placeholder {
    color: #999;
}

.content-container .form-section input[type="text"]:focus,
.content-container .form-section input[type="email"]:focus,
.content-container .form-section input[type="password"]:focus {
    border: 2px solid #66bb6a;
}

.content-container .form-section .bd {
    color: #7a7d85;
    font-weight: bold;
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
}

.content-container .form-section .checkbox-group {
    margin: 16px 0 12px 0;
}

.content-container .form-section .checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #3a5a3a;
    margin-bottom: 12px;
}

.content-container .form-section .checkbox-item input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
}

.content-container .form-section .checkbox-item a {
    text-decoration: none;
    color: #5a9a3c;
    font-weight: 600;
    transition: color 0.2s;
}

.content-container .form-section .checkbox-item a:hover {
    color: #2e7d32;
    text-decoration: underline;
}

.content-container .form-section .submit input {
    background: linear-gradient(#5a9a3c, #2e7d32);
    font-size: 16px;
    padding: 8px 40px;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 12px 0 12px 0;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.content-container .form-section .submit input:hover {
    background: linear-gradient(#66bb6a, #5a9a3c);
}

.content-container .form-section .submit input:focus {
    outline: none;
}

.content-container .form-section .captcha-container {
    margin: 16px 0 16px 0;
    padding: 12px 0;
}

.form-alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.4;
}

.form-alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.form-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

/* ==================== FOOTER SECTION ==================== */
.footer-section {
    background-color: #ffffff;
    border-top: 1px solid #ddd;
}

.footer-section .footer-container {
    width: 90%;
    margin: auto;
    overflow: hidden;
    box-sizing: border-box;
    padding: 12px 0;
}

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

.footer-section .other-pages-link {
    margin-left: 50px;
    padding-right: 50px;
    box-sizing: border-box;
}

.footer-section .other-pages-link .line {
    border-top: 1px solid #dddfe2;
    width: 100%;
    margin: 8px 0 4px 0;
}

.footer-section .other-pages-link li {
    display: inline;
    font-size: 11px;
    font-family: arial;
    margin-right: 12px;
}

.footer-section .other-pages-link li > a {
    text-decoration: none;
    color: #8a8d91;
}

.footer-section .other-pages-link li > a:hover {
    text-decoration: underline;
}

.footer-section .copywrite {
    font-size: 11px;
    color: #737373;
    margin: 0;
    margin-left: 50px;
    font-family: arial;
    margin-top: 12px;
    margin-bottom: 12px;
}

/* ==================== RESPONSIVE ==================== */
@media only screen and (max-width: 768px) {
    .header-section .logo-area {
        font-size: 22px;
        margin: 8px 0 0 15px;
    }

    .header-section .login-section .spece {
        padding-right: 8px;
    }

    .header-section .login-section input[type="submit"] {
        margin-top: 10px;
        font-size: 12px;
        padding: 5px;
    }

    .header-section .login-section label {
        font-size: 12px;
    }

    .content-section .help-heading h2 {
        font-size: 20px;
    }

    .content-section .main-heading h1 {
        font-size: 28px;
    }

    .content-section .main-heading h3 {
        font-size: 16px;
    }

    .content-container .form-section input {
        font-size: 14px;
        padding: 7px;
    }

    .post-feed-item {
        margin-bottom: 8px;
        padding: 10px;
    }
}

@media only screen and (max-width: 425px) {
    body {
        margin: 0;
        padding: 0;
    }

    .header-section {
        padding: 0 0 8px 0;
    }

    .header-section .w-25 {
        width: 100%;
        float: none;
    }

    .header-section .logo-area {
        font-size: 18px;
        margin: 6px 0 0 0;
        text-align: center;
    }

    .header-section .w-75 {
        width: 100%;
        float: none;
    }

    .header-section .w-75 .login-section .w-40 {
        width: 100%;
        float: none;
    }

    .header-section .w-75 .login-section .w-20 {
        width: 100%;
        float: none;
    }

    .header-section .login-section label {
        font-size: 11px;
    }

    .header-section .login-section input[type="submit"] {
        font-size: 12px;
        padding: 5px 0;
        margin-top: 8px;
    }

    .content-section {
        padding: 12px 0;
    }

    .content-section .w-50 {
        width: 100%;
        float: none;
    }

    .content-section .help-heading h2 {
        font-size: 16px;
        margin-left: 10px;
    }

    .content-section .main-heading h1 {
        font-size: 22px;
    }

    .content-section .main-heading h3 {
        font-size: 14px;
    }

    .content-container .form-section {
        margin-top: 6px;
    }

    .content-container .form-section .i-spece-one,
    .content-container .form-section .i-spece-two {
        padding-right: 12px;
        margin-bottom: 2px;
    }

    .content-container .form-section input {
        font-size: 14px;
        padding: 6px;
    }

    .content-container .form-section .bd {
        margin-top: 8px;
        font-size: 12px;
    }

    .content-container .form-section .submit input {
        font-size: 14px;
        padding: 5px 20px;
        margin: 3px 0 6px 0;
    }

    .footer-section .other-pages-link {
        margin-left: 10px;
        padding: 0;
    }

    .footer-section .copywrite {
        margin-left: 10px;
        font-size: 10px;
    }

    .post-feed-item {
        margin-bottom: 6px;
        padding: 8px;
        font-size: 11px;
    }
}

/* Ensure registration shows first on narrow phones and prevent horizontal overflow */
@media only screen and (max-width: 480px) {
    .registration-section {
        order: 1;
        width: 100%;
    }

    .posts-section {
        order: 2;
        width: 100%;
    }

    .posts-feed,
    .post-feed-item {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Catch any stray images or wide elements */
    .posts-feed img,
    .post-feed-item img {
        max-width: 100%;
        height: auto;
        display: block;
    }
}

/* Additional responsive tweaks to stack columns and improve header on small screens */
@media only screen and (max-width: 960px) {
    .content-container {
        width: 95%;
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .content-item {
        width: 100%;
        float: none;
        padding: 0;
        box-sizing: border-box;
    }

    /* keep default source order here; specific mobile ordering handled at <=480px */

    .header-section .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-section .logo-area {
        margin-left: 0;
    }

    .header-section .login-section {
        width: 100%;
        max-width: 520px;
    }
}

@media only screen and (max-width: 480px) {
    .header-section .logo-area {
        text-align: center;
        width: 100%;
        font-size: 18px;
    }

    .header-section .login-section input[type="text"],
    .header-section .login-section input[type="password"],
    .content-container .form-section input {
        font-size: 15px;
        padding: 10px;
    }

    .posts-feed {
        max-height: none;
        padding: 14px;
    }
}

/* Align header/menu and content gutters on small screens so posts line up */
@media only screen and (max-width: 480px) {
    .header-section .header-container,
    .content-container {
        width: 100%;
        padding: 0 12px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .content-item,
    .posts-feed,
    .registration-section {
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
        width: 100%;
    }

    /* Reduce inner feed padding so feed aligns with header controls */
    .posts-feed {
        padding-left: 6px;
        padding-right: 6px;
    }
}
