/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fdf6f3; 
}

.container {
    width: 90%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Main Site Header (Public Facing) - New Design */
header { /* This is the main public site header */
    background: #E87A59; 
    color: #fff;
    padding: 0.5rem 0; 
    z-index: 1000; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
/* Desktop: Main header is fixed */
@media (min-width: 768px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }
    main.container { /* Add padding for fixed header on desktop */
        padding-top: 70px; 
    }
    body.author-section-active { /* Add padding for fixed header on desktop when in author section */
         padding-top: 50px !important; /* Height of main public fixed header */
    }
}


header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; 
    height: 50px; 
}

.menu-toggle {
    background: rgba(255,255,255,0.15); 
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 1.2rem; 
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 10px; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    line-height: 1;
    z-index: 1002; 
}
.menu-toggle:hover {
    background: rgba(255,255,255,0.25);
}

header .logo { 
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1001;
}

header .logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem; 
    font-weight: 600; 
}

.header-icons {
    display: flex;
    align-items: center;
    z-index: 1002; 
}
.header-icons .profile-toggle { 
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 1.2rem; 
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 10px; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    line-height: 1;
}
.header-icons .profile-toggle:hover {
    background: rgba(255,255,255,0.25);
}
.header-icons .profile-toggle img { 
    height: 18px; 
    width: auto;
    vertical-align: middle;
}


/* Sidebar Menu - New Design */
.sidebar-menu { 
    position: fixed;
    top: 0;
    left: -280px; 
    width: 280px;
    height: 100%;
    background: #E87A59; 
    color: #fff;
    padding-top: 0; 
    transition: left 0.3s ease-in-out;
    z-index: 1010; 
    box-shadow: 3px 0 6px rgba(0,0,0,0.15);
    display: flex; 
    flex-direction: column;
}
.sidebar-menu.active {
    left: 0;
}
.close-menu-toggle { 
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem; 
    cursor: pointer;
    padding: 0.6rem 1rem; 
    align-self: flex-end;
    line-height: 1;
    margin: 5px 5px 0 0; 
}
.close-menu-toggle:hover {
    background-color: rgba(255,255,255,0.1); 
}
.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    flex-grow: 1; 
    overflow-y: auto; 
}
.sidebar-menu ul li a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #fdfdfd; 
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    font-size: 0.9rem; 
    transition: background-color 0.2s ease;
}
.sidebar-menu ul li a:hover,
.sidebar-menu ul li a.active-category,
.sidebar-menu ul li a.active { 
    background: rgba(255,255,255,0.1); 
}
.sidebar-menu .sidebar-section-header,
.sidebar-menu .sidebar-auth-links-header {
    padding: 0.8rem 1.2rem 0.4rem 1.2rem; 
    font-size: 0.7rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65); 
    font-weight: 600;
    margin-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-menu .sidebar-section-header:first-of-type,
.sidebar-menu .sidebar-auth-links-header:first-of-type {
    margin-top: 0;
    border-top: none;
}

/* Main Navigation (Desktop - in header) - New Design */
.main-nav {
    display: none; 
    margin-left: auto; 
}
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}
.main-nav ul li {
    margin-left: 6px; 
}
.main-nav ul li a {
    color: #fff; 
    text-decoration: none;
    padding: 0.35rem 0.65rem; 
    border-radius: 8px; 
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.85rem; 
    line-height: 1.5;
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
    background-color: rgba(255,255,255,0.15); 
    color: #ffffff;
}

/* News Grid Styles - New Design */
.news-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
}
.news-card { 
    background: #fff; 
    border-radius: 20px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.07); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.1);
}
.news-card-image-link { display: block; }
.news-card-image { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
}
.news-card-content { 
    padding: 1rem 1.2rem; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}
.news-card-category { 
    font-size: 0.65rem; 
    color: #E87A59; 
    text-decoration: none; 
    display: inline-block; 
    margin-bottom: 0.4rem; 
    text-transform: uppercase; 
    font-weight: 700; 
}
.news-card-title { 
    font-size: 1.1rem; 
    margin: 0 0 0.5rem 0; 
    line-height: 1.3; 
    font-weight: 600;
}
.news-card-title a { text-decoration: none; color: #2c3e50; } 
.news-card-title a:hover { color: #E87A59; }
.news-card-excerpt { 
    font-size: 0.8rem; 
    color: #555; 
    flex-grow: 1; 
    margin-bottom: 0.8rem; 
    line-height:1.5; 
}
.news-card-meta { 
    font-size: 0.7rem; 
    color: #777; 
    border-top: 1px solid #f0f0f0; 
    padding-top: 0.6rem; 
    margin-top: auto; 
    display: flex; 
    align-items: center; 
    flex-wrap: wrap; 
}
.news-card-meta .author { 
    margin-right: 8px; 
    display: flex; 
    align-items: center; 
}
.author-profile-pic-small { 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    margin-right: 6px; 
    object-fit: cover; 
    border: 1px solid #eee; 
    vertical-align: middle; 
}
.news-card-meta .date { 
    margin-left: auto;
}

.news-card-video-thumb { 
    position: relative;
    background-color: #000; 
}
.news-card-video-thumb video {
    display: block;
    width: 100%;
    height: 180px; 
    object-fit: cover;
}
.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none; 
}

.news-card-additional-media {
    display: flex;
    gap: 5px; 
    padding: 0 1.2rem 0.5rem 1.2rem; 
    flex-wrap: wrap; 
}
.additional-media-thumb {
    width: calc(25% - 4px); 
    height: 50px; 
    overflow: hidden;
    border-radius: 4px;
    background-color: #f0f0f0; 
}
.additional-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    color: white;
    font-size: 0.7rem;
    text-align: center;
    position: relative;
}
.play-icon-small {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.7);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* Single Post Page */
.single-post-container { 
    background: #fff;
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    margin-top: 20px; 
}
.single-post-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.post-meta-info { 
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1rem;
}
.post-meta-info .author-meta-info { display: flex; align-items: center; }
.author-profile-pic-meta { 
    width: 35px; 
    height: 35px; 
    border-radius: 50%; 
    margin-right: 8px; 
    object-fit: cover; 
    border: 1px solid #ddd; 
}
.post-meta-info .category-meta-info a { color: #E87A59; text-decoration: none; font-weight: 500;}

/* Featured Image Styling - Responsive */
.single-post-featured-image { 
    width: 100%; /* Take full width of its container (.single-post-container content box) */
    max-height: 450px; /* Adjust as needed, prevents overly tall images */
    margin: 0 auto 1.5rem auto; /* Centering if parent is wider, and bottom margin */
    border-radius: 15px; 
    overflow: hidden; 
    background-color: #f0f0f0; /* Fallback */
    line-height: 0; /* Remove space below image if it's an inline-block internally */
}
.single-post-featured-image img { 
    display: block; 
    width: 100%; 
    height: 100%; /* Fill the container's height (up to max-height) */
    object-fit: cover; /* Cover the area, cropping if aspect ratios differ */
    object-position: center; /* Center the image within the crop */
    border-radius: 15px; /* Match container or remove if overflow:hidden is enough */
    cursor: pointer; 
}

.post-content { 
    line-height: 1.7;
    color: #343a40;
    font-size: 0.95rem;
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
    line-height: 1.4;
}
.post-content p { margin-bottom: 1.2rem; }
.post-content ul, .post-content ol { margin-bottom: 1.2rem; padding-left: 25px; }
.post-content img { 
    max-width: 100%;
    height: auto;
    border-radius: 10px; 
    margin: 0.5rem 0;
    cursor: pointer; 
}
.post-additional-media-section { margin-top: 25px; padding-top:15px; border-top:1px solid #eee;}
.post-additional-media-section h3 { font-size: 1.3rem; margin-bottom: 15px; color: #333; }
.post-media-grid {
    gap: 10px; 
    padding-bottom: 10px;
}
.post-media-grid .media-item {
    width: 100%; /* Make it responsive */
    max-width: 320px; /* But not larger than this */
    height: 180px; /* Maintain height, or use aspect-ratio if preferred */
    border:1px solid #ddd;
    padding:0;
    border-radius:8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f0f0f0;
    margin-bottom: 10px;
    margin-left: auto; /* Center if grid is wider */
    margin-right: auto; /* Center if grid is wider */
}
.post-media-grid .media-item:last-child {
    margin-bottom: 0;
}
.post-media-grid .media-item img,
.post-media-grid .media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px; 
    cursor: pointer; 
}
.post-media-grid .media-item video {
    background-color: #000; 
    cursor: default; 
}


.related-posts-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid #f0f0f0;}
.related-posts-section h2 { font-size: 1.5rem; margin-bottom: 15px; color: #333;}

.share-buttons { margin-top: 20px; padding-top: 15px; border-top: 1px solid #f0f0f0; }
.share-buttons h3 { font-size: 1.1rem; margin-bottom: 10px; }
.whatsapp-share-button {
    display: inline-flex; 
    align-items: center;
    background-color: #25D366;
    color: white !important; 
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.2; 
}
.whatsapp-share-button img, .whatsapp-share-button svg { 
    width: 18px;
    height: 18px;
    margin-right: 8px;
}
.whatsapp-share-button:hover {
    background-color: #1DA851;
    color: white !important;
}


/* Pagination Styles */
.pagination { text-align:center; margin-top:30px; padding-bottom: 20px; }
.pagination a, .pagination span { 
    margin: 0 4px; 
    padding: 0.4rem 0.8rem; 
    text-decoration: none; 
    border: 1px solid #E87A59; 
    color: #E87A59; 
    border-radius: 8px; 
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
}
.pagination a:hover { background-color: #E87A59; color: #fff; }
.pagination .current-page { 
    background-color: #E87A59; 
    color: white; 
    border-color: #E87A59; 
    font-weight: bold;
}

/* Main Site Footer - New Design */
footer {
    background: #BF5E46; 
    color: #f0e5e1; 
    text-align: center;
    padding: 2rem 0;
    margin-top: 30px; 
}
footer .footer-links { margin-bottom: 1rem;}
footer .footer-links a {
    color: #f0e5e1; text-decoration: none; margin: 0 10px; font-size: 0.85rem;
}
footer .footer-links a:hover { color: #fff; text-decoration: underline;}
footer .social-media { margin-bottom: 1rem; }
footer .social-media a {
    color: #f0e5e1; text-decoration: none; margin: 0 8px; font-size: 1.2rem;
}
footer .social-media a:hover { color: #fff; }
footer .copyright { margin-top: 1rem; font-size: 0.8rem; color: #f0e5e1; }

/* === Author Area Styles (Themed and Fixed) === */
.author-area-header {
    background-color: #E87A59; 
    color: #ffffff; 
    padding: 0; 
    border-bottom: 1px solid #d16a49; 
    z-index: 1020; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.author-area-header .container { 
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    padding: 0; 
}
.author-header-top { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.8rem 15px; 
}
.author-area-title a {
    font-size: 1.5rem; 
    color: #ffffff; 
    text-decoration: none;
    font-weight: 600; 
}
.author-area-title a:hover { color: #f0e5e1; } 
.author-user-info { font-size: 0.85rem; color: #f0e5e1; } 
.author-user-info strong { font-weight: 500; }
.author-user-info .logout-link {
    margin-left: 10px; 
    color: #fff0b3; 
    text-decoration: none;
    font-weight: 500;
}
.author-user-info .logout-link:hover { color: #ffffff; text-decoration: underline; }

.author-nav { 
    width: 100%; 
    background-color: rgba(0,0,0,0.05); 
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative; 
}
.author-nav .container { 
    padding: 0.5rem 15px;
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.author-menu-toggle { 
    display: none; 
    background: #fff; 
    color: #E87A59; 
    border: 1px solid #E87A59;
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}
.author-nav-links { 
    list-style: none; padding: 0; margin: 0; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 5px 10px; 
}
.author-nav-links li a {
    text-decoration: none; color: #ffffff; padding: 0.4rem 0.8rem; 
    border-radius: 0.25rem; transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 400; 
    border-bottom: 2px solid transparent; 
}
.author-nav-links li a:hover {
    background-color: rgba(255,255,255,0.1); 
    color: #ffffff;
    border-bottom-color: rgba(255,255,255,0.3); 
}
.author-nav-links li a.active { 
    background-color: rgba(255,255,255,0.2); 
    color: #4f2b1e !important; 
    font-weight: 600; border-bottom-color: #fff0b3; 
}
.button-whatsapp-join {
    background-color: #25D366; 
    color: white !important;
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #1DA851;
    transition: background-color 0.2s ease;
    margin-left: auto; 
}
.button-whatsapp-join:hover {
    background-color: #1DA851;
    color: white !important;
}

.author-page-title-container {
    background-color: #ffffff; padding: 1.5rem 0; 
    border-bottom: 1px solid #dee2e6; box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    margin-bottom: 25px; 
}
.author-page-title { margin: 0; font-size: 2rem; color: #343a40; font-weight: 600; }

.author-area-container {
    background-color: #f8f9fa; padding: 20px 0; 
    min-height: calc(100vh - 150px); 
}
.author-area-container .container { max-width: 960px; margin-left: auto; margin-right: auto; }
.author-area-container h2, .author-area-container h3 {
    color: #343a40; margin-bottom: 1rem; 
}
.author-area-container h2 { font-size: 1.75rem; font-weight: 500; }
.author-area-container h3 { font-size: 1.4rem; font-weight: 500; }

.stats-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; margin-bottom: 30px;
}
.stat-card {
    background: #ffffff; border: 1px solid #e0e0e0; 
    border-radius: 0.375rem; padding: 20px; text-align: center; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); 
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,0.08); }
.stat-card h3 { 
    font-size: 0.9rem; color: #6c757d; margin-bottom: 0.75rem;
    text-transform: uppercase; font-weight: 500;
}
.stat-card .value { font-size: 2.25rem; color: #E87A59; font-weight: 600; } 
.stat-card small { font-size: 0.8rem; color: #6c757d; display: block; margin-top: 5px; }

.author-area-container .data-table {
    width: 100%; background-color: #ffffff; border: 1px solid #dee2e6;
    border-radius: 0.375rem; box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-collapse: separate; border-spacing: 0; margin-bottom: 20px;
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; 
}
.author-area-container .data-table th,
.author-area-container .data-table td {
    padding: 0.9rem 1rem; line-height: 1.5; vertical-align: middle;
    border-bottom: 1px solid #dee2e6; 
}
.author-area-container .data-table th {
    background-color: #f8f9fa; color: #495057; font-weight: 600; 
    text-align: left; white-space: normal; 
}
.author-area-container .data-table td {
     white-space: normal; 
}
.author-area-container .data-table tr:last-child td { border-bottom: none; }
.author-area-container .data-table tr:hover td { background-color: #f1f3f5; }
.author-area-container .data-table .actions a,
.author-area-container .data-table .actions button {
    margin-right: 6px; padding: 0.3rem 0.6rem; font-size: 0.8rem;
}

.author-area-container .form-container,
.author-area-container .profile-form-container,
.author-area-container .filter-form {
    background-color: #ffffff; padding: 20px 25px; 
    border-radius: 0.375rem; border: 1px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); margin-bottom: 25px;
}
.author-area-container .filter-form { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; }
.author-area-container .form-group { margin-bottom: 1.25rem; }
.author-area-container .form-group label { color: #495057; font-weight: 500; margin-bottom: 0.3rem; }
.author-area-container .form-group input[type="text"],
.author-area-container .form-group input[type="email"],
.author-area-container .form-group input[type="tel"],
.author-area-container .form-group input[type="url"], /* Added type="url" */
.author-area-container .form-group input[type="date"],
.author-area-container .form-group input[type="password"],
.author-area-container .form-group input[type="number"],
.author-area-container .form-group input[type="datetime-local"],
.author-area-container .form-group select,
.author-area-container .form-group textarea {
    display: block; width: 100%; padding: 0.6rem 0.75rem;
    font-size: 0.95rem; line-height: 1.5; color: #495057;
    background-color: #fff; background-clip: padding-box;
    border: 1px solid #ced4da; border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.author-area-container .form-group input:focus,
.author-area-container .form-group select:focus,
.author-area-container .form-group textarea:focus {
    color: #495057; background-color: #fff; border-color: #E87A59; 
    outline: 0; box-shadow: 0 0 0 0.2rem rgba(232, 122, 89, 0.25); 
}
.author-area-container .form-group small { font-size: 0.8rem; color: #6c757d; margin-top: 0.25rem; }

.author-area-container .button,
.author-area-container button { 
    border-radius: 0.25rem; padding: 0.6rem 1.2rem; 
    font-size: 0.95rem; font-weight: 500;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer; text-align: center; vertical-align: middle;
    user-select: none; border: 1px solid transparent;
}
.author-area-container .button-primary { background-color: #E87A59; border-color: #E87A59; color:white; }
.author-area-container .button-primary:hover { background-color: #d16a49; border-color: #bf5e46; }
.author-area-container .button-secondary { background-color: #6c757d; border-color: #6c757d; color:white; }
.author-area-container .button-secondary:hover { background-color: #5a6268; border-color: #545b62; }
.author-area-container .button-danger { background-color: #dc3545; border-color: #dc3545; color:white; }
.author-area-container .button-danger:hover { background-color: #c82333; border-color: #bd2130; }

/* Responsive Overrides for Author Area */
@media (max-width: 767px) {
    header, /* Main public header */
    .author-area-header { /* Author area header */
        position: static !important; 
        top: auto !important; 
    }
    main.container, /* Main content for public pages */
    .author-area-container { /* Main content for author pages */
        padding-top: 20px !important; /* Basic spacing from top of viewport */
    }
    body.author-section-active {
        padding-top: 0 !important; /* Remove padding if main header is also static */
    }

    .author-header-top { 
        flex-direction: column; 
        align-items: flex-start; 
        margin-bottom: 0; 
    }
    .author-area-title a { font-size: 1.5rem; } 
    .author-user-info { margin-top: 0.5rem; width: 100%; display: flex; justify-content: space-between; font-size: 0.85rem; }
    
    .author-nav .container {
        /* justify-content: flex-start; */
    }
    .author-menu-toggle { display: block; width: auto; margin-top: 0.5rem; margin-bottom: 0.5rem; }
    
    .author-nav-links { 
        display: none; 
    }
    .author-nav-links.active { 
        display: flex !important; 
        flex-direction: column; 
        width: 100%; 
        background-color: #d16a49; 
        border-top: 1px solid #bf5e46; 
        box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
        position: absolute; 
        top: 100%; 
        left: 0; 
        z-index: 1021; 
    }
    .author-nav-links.active li { width: 100%; }
    .author-nav-links.active li a { 
        display: block; padding: 0.9rem 1rem; 
        border-bottom: 1px solid #bf5e46; 
        border-radius: 0; 
        color: #ffffff !important; 
    }
    .author-nav-links.active li a.active, 
    .author-nav-links.active li a:hover { 
        background-color: #bf5e46; 
        border-bottom-color: #bf5e46; 
        color: #ffffff !important;
    }
    .author-nav-links.active li:last-child a { border-bottom: none; }
    
    .stats-grid { grid-template-columns: 1fr; } 
    .author-area-container .filter-form { flex-direction: column; gap: 10px; }
    .author-area-container .filter-form input,
    .author-area-container .filter-form select,
    .author-area-container .filter-form button { width: 100%; }
    .author-page-title { font-size: 1.6rem; }
}

/* General site responsiveness */
@media (min-width: 768px) {
    header .logo { 
        position: static; 
        transform: none;
        margin-right: auto; 
    }
    .menu-toggle { display: none; } 
    .sidebar-menu { display: none !important; } 
    .main-nav { display: flex; align-items: center; } 
    .header-icons { display: flex; align-items: center; }

    .author-menu-toggle { display: none !important; } 
    .author-nav-links { display: flex !important; }
    .author-area-header { 
        position: sticky;
        top: 50px; 
    }
    .author-area-container {
        padding-top: 20px; 
    }
}
@media (min-width: 1024px) {
    .container { 
        width: 85%;
        max-width: 1200px;
    }
     .author-area-container .container { 
        max-width: 1024px; 
    }
}

/* body.author-section-active padding-top is handled by the media queries now */


.whatsapp-float {
    z-index: 1030; 
}

.ad-placeholder-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 1px dashed #ccc;
    border-radius: 20px; 
    min-height: 200px; 
}
.ad-placeholder {
     padding: 20px; 
     text-align: center; 
     color: #999; 
}

.static-page-content { 
    padding: 25px 30px; 
    background: #fff; 
    border-radius: 20px; 
    margin-top: 20px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.07); 
}
.static-page-content h1 { 
    margin-bottom: 1.5rem; font-size: 1.8rem; color: #2c3e50; 
}
.static-page-content h2 { 
    margin-top: 1.8rem; margin-bottom: 0.8rem; font-size: 1.4rem; color: #E87A59; 
}
.static-page-content h3 { 
    margin-top: 1.5rem; margin-bottom: 0.6rem; font-size: 1.1rem; color: #333; 
}
.static-page-content p { margin-bottom: 1rem; line-height: 1.7; color: #444; }
.static-page-content ul, .static-page-content ol { margin-bottom: 1rem; margin-left: 20px; }
.static-page-content li { margin-bottom: 0.5rem; }
.static-page-content a { color: #E87A59; text-decoration: none; }
.static-page-content a:hover { text-decoration: underline; }

.contact-info p { margin-bottom: 0.5rem; }
.contact-form { margin-top: 2rem; }
.static-page-content .form-group label { display: block; margin-bottom: .3rem; font-weight: 500; color: #333; }
.static-page-content .form-group input[type="text"],
.static-page-content .form-group input[type="email"],
.static-page-content .form-group textarea {
    width: 100%; padding: 0.7rem; border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.9rem; background-color: #fdfdfd;
}
.static-page-content .form-group input[type="text"]:focus,
.static-page-content .form-group input[type="email"]:focus,
.static-page-content .form-group textarea:focus {
    border-color: #E87A59;
    box-shadow: 0 0 0 0.15rem rgba(232, 122, 89, 0.25);
}
.static-page-content .form-group textarea { min-height: 120px; resize: vertical; }
.static-page-content .button-submit { background-color: #E87A59; color: white; padding: 0.7rem 1.4rem; border:none; border-radius: 8px; cursor:pointer; font-size: 0.95rem; font-weight: 500; }
.static-page-content .button-submit:hover { background-color: #d16a49; } 
.form-message { padding: 10px 15px; margin-bottom:15px; border-radius:8px; color: #28a745; background-color: #e9f7ef; border: 1px solid #d1e7dd;}
.form-error { padding: 10px 15px; margin-bottom:15px; border-radius:8px; color: #dc3545; background-color: #f8d7da; border: 1px solid #f5c6cb;}

/* Lightbox Styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.lightbox-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-image-container img {
    display: block;
    max-width: 100%;
    max-height: 90vh; 
    border-radius: 5px;
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;    /* Adjusted */
    right: 25px;   /* Adjusted */
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.5rem;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.lightbox-close:hover {
    background: #eee;
}
/* Form Image Preview Styles (Author Side) */
.form-image-preview {
    display: block; 
    max-width: 200px; /* Default for featured image previews */
    max-height: 150px; 
    width: auto;
    height: auto;
    object-fit: cover; 
    border: 1px solid #ddd;
    padding: 3px;
    margin-top: 10px;
    border-radius: 4px; 
    background-color: #f8f9fa;
    cursor: default; /* Default cursor, lightbox trigger will override if class is present */
}

/* Specific for the current profile picture preview on author_profile.php */
.profile-picture-current img.form-image-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%; /* Circular */
    border: 2px solid #eee;
    object-fit: cover;
    cursor: pointer; /* Since it's also a lightbox trigger */
}

/* For existing media gallery in author post edit - slightly different styling if needed */
.author-area-container .existing-media-gallery img {
    max-width:100px; 
    max-height:100px; 
    object-fit:cover;
    border: 1px solid #ccc;
    padding: 2px;
    border-radius: 3px;
}
.author-area-container .existing-media-gallery video {
    max-width:100px; 
    max-height:100px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
/* Author Help FAB */
#author-help-fab-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1030; 
}

#author-help-fab-link {
    display: flex;
    align-items: center;
    background-color: #25D366; /* WhatsApp green */
    color: white !important; /* Ensure text is white */
    padding: 10px 15px;
    border-radius: 25px; 
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    overflow: hidden; /* To help with text hide animation */
}

#author-help-fab-link:hover {
    background-color: #1DA851; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

#author-help-fab-icon {
    width: 24px;
    height: 24px;
    /* margin-right will be handled by text span's margin when visible */
}

#author-help-fab-text {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.3s ease-out, max-width 0.4s ease-in-out, margin-left 0.4s ease-in-out, padding-right 0.4s ease-in-out;
    opacity: 1;
    max-width: 200px; 
    margin-left: 8px; /* Space between icon and text */
    padding-right: 5px; /* Some padding so text doesn't touch edge of bubble */
    overflow: hidden;
    display: inline-block; /* Needed for max-width transition */
}

#author-help-fab-text.hidden {
    opacity: 0;
    max-width: 0;
    margin-left: 0;
    padding-right: 0;
}
/* PWA Install Button Styles */
#install-pwa-button {
    position: fixed;
    bottom: 25px; /* New: 25px from bottom */
    left: 10px;   /* New: 10px from left */
    padding: 10px 20px;
    background-color: #007bff; /* Example: Bootstrap primary blue */
    color: white;
    border: none;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    z-index: 1050; /* Ensure it's above most other elements */
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#install-pwa-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px);
}

/* Initially hidden, will be shown by JS */
/* The style="display: none;" is already on the button itself,
   but this can be a fallback or for more complex show/hide logic if needed.
   For now, the inline style is sufficient.
*/