@charset "utf-8";

/* -----------------------------
   Global Styles
----------------------------- */
body {
    font-family: "Kanit", Arial, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    box-sizing: border-box;
}

/* -----------------------------
   Header Styles
----------------------------- */
header {
    background: linear-gradient(180deg, #3B5998, #4CAF50);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    flex-shrink: 0;
    width: auto;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.header-text {
    flex: 1;
    min-width: 0;
}

.header-text h1 {
    margin: 0;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: left;
}

.header-text .aaa1 {
    margin: 5px 0 0;
    font-size: 1.2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: left;
    text-decoration: overline;
}

/* -----------------------------
   Navigation Styles
----------------------------- */
nav {
    background-color: #f9f9f9;
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
}

/* -----------------------------
   Button Styles
----------------------------- */
.btn, nav a {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border: 2px solid #4CAF50;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1em;
    color: #4CAF50;
    background-color: white;
}

.btn:hover, nav a:hover {
    background-color: #4CAF50;
    color: white;
}

.btn-green {
    background-color: #4CAF50;
    color: white;
}

.btn-green:hover {
    background-color: white;
    color: #4CAF50;
}

.login-btn {
    background-color: #FFFFFF;
    color: #3B5998;
    border: 2px solid #3B5998;
}

.login-btn:hover {
    background-color: #3B5998;
    color: #FFFFFF;
}

/* -----------------------------
   Main Content Styles
----------------------------- */
main {
    padding: 20px;
}

main h1 {
    margin-bottom: 20px;
}

/* -----------------------------
   Form Styles
----------------------------- */
form {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
}

input[type="text"], 
select, 
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 1em;
    box-sizing: border-box;
}

/* -----------------------------
   Post Styles
----------------------------- */
.post {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 0;
    margin-bottom: 5px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.post h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 1.2em;
}

.post p {
    margin: 12px 0;
}

/* -----------------------------
   Profile Section Styles
----------------------------- */
.profile-section {
    align-items: center;
    background: linear-gradient(360deg, #3B5998, #4CAF50);
    padding: 20px;
    border-radius: 0 0 15px 15px;
    margin-bottom: 8px;
    color: white;
}

.profile-section h2 {
    color: white;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
}

.profile-pic-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* -----------------------------
   Footer Styles
----------------------------- */
footer {
    background: linear-gradient(360deg, #3B5998, #4CAF50);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 0 0 15px 15px;
    margin-top: 0;
}

/* -----------------------------
   Media Preview Styles
----------------------------- */
.media-preview {
    width: 85%;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.media-preview img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.media-preview iframe {
    width: 100%;
    height: 400px;
    border: none;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-error {
    width: 100%;
    padding: 20px;
    text-align: center;
    background: #f8f8f8;
    border: 1px dashed #ddd;
    color: #666;
    border-radius: 8px;
    font-style: italic;
    margin: 10px 0;
    font-size: 0.95em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* -----------------------------
   Utility Classes
----------------------------- */
.text { font-size: 1.2em; }
.text2 { 
    font-size: 1.1em;
    font-weight: 500;
    padding: 0 10px;
}
.text3 {
    font-size: 1.5em;
    color: #3B5998;
    font-weight: 600;
}
.text4 {
    background: linear-gradient(180deg, #f0f0f0, #f0f0f0);
    border-radius: 0;
    padding: 15px;
    margin-top: -16px;
    font-size: 1.3em;
    color: #3B5998;
    font-weight: 800;
    text-indent: 20px;
}
.text5 {
    background: linear-gradient(180deg, #3B5998, #3B5998);
    border-radius: 15px 15px 0 0;
    padding: 15px;
    margin-top: 0;
    margin-bottom: -5px;
    font-size: 1.2em;
    color: #FFFFFF;
    font-weight: 800;
    text-indent: 20px;
}

/* -----------------------------
   Content Wrapper Styles
----------------------------- */
.content-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.content-wrapper.collapsed {
    max-height: 100px;
}

.read-more-link {
    text-align: center;
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin-top: 10px;
}

.fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background-image: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

/* -----------------------------
   Pagination Styles
----------------------------- */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a, 
.pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #4CAF50;
    color: #4CAF50;
    text-decoration: none;
    border-radius: 5px;
}

.pagination .current {
    background-color: #4CAF50;
    color: white;
}

/* -----------------------------
   Search Options
----------------------------- */
.search-options {
    display: none;
    margin-bottom: 15px;
}

/* -----------------------------
   Responsive Design
----------------------------- */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
        width: 95%;
    }

    header, main, footer {
        padding: 15px;
    }

    .btn, nav a {
        padding: 8px 15px;
        margin: 3px;
        font-size: 0.9em;
    }

    .post {
        padding: 15px;
    }

    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-pic {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .header-logo {
        height: 60px;
    }
    
    .header-text h1 {
        font-size: 1.5em;
    }
    
    .header-text .aaa1 {
        font-size: 1em;
    }

    .media-preview {
        width: 90%;
    }
    
    .media-preview iframe {
        height: 300px;
    }
    
    .media-preview img {
        max-height: 400px;
    }

    .preview-error {
        padding: 15px;
        font-size: 0.9em;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        width: 100%;
        padding: 10px;
    }

    header {
        padding: 10px;
    }

    .header-container {
        gap: 0.5rem;
    }

    .header-logo {
        height: 45px;
    }
    
    .header-text h1 {
        font-size: 1.0rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .header-text .aaa1 {
        font-size: 0.8rem;
    }

    .btn, nav a {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        flex: 1 1 40%;
        margin: 2px;
    }

    .text3 {
        font-size: 1.3em;
    }

    .text4, .text5 {
        font-size: 1.1em;
        padding: 10px;
    }

    .post h3 {
        font-size: 1.1em;
    }

    input[type="text"], 
    select, 
    textarea {
        font-size: 0.9em;
    }

    .media-preview {
        width: 95%;
        margin: 15px auto;
    }
    
    .media-preview iframe {
        height: 200px;
    }
    
    .media-preview img {
        max-height: 300px;
    }

    .preview-error {
        padding: 12px;
        font-size: 0.85em;
    }
}

@media screen and (max-width: 320px) {
    header h1 {
        font-size: 1.0em;
    }
}