/*
 * Haravy BDS Review - Custom Styles
 */

/* === General & Typography === */
body.post-type-archive, body.single-post {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    background-color: #f8f9fa; /* Very light gray background */
    line-height: 1.6;
}

.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .content-area {
        padding: 15px;
    }
}

.content-area a {
    color: #007bff; /* Primary blue for links */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.content-area a:hover {
    color: #0056b3;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: #212529;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.page-title {
    font-size: 2.5rem;
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
}

/* === Archive Pages - Card Layout === */
.projects-archive-container,
.subdivisions-archive-container,
.investors-archive-container,
.distributors-archive-container,
.agents-archive-container,
.groups-archive-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Slightly smaller min-width for more columns */
    gap: 25px;
    padding: 0;
}

.archive article.post {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08); /* Softer, more prominent shadow */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.archive article.post:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.archive article.post .post-thumbnail {
    margin: 0;
    float: none;
    height: 200px;
    overflow: hidden;
}

.archive article.post .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.archive article.post .entry-header,
.archive article.post .entry-summary {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.archive article.post .entry-title {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.archive article.post .entry-title a {
    color: #343a40;
    transition: color 0.2s ease-in-out;
}

.archive article.post .entry-title a:hover {
    color: #007bff;
}

.archive article.post .entry-summary p {
    margin: 0;
    font-size: 0.95rem;
    color: #6c757d;
    flex-grow: 1; /* Allow excerpt to take available space */
}

/* === Single Post Pages === */
.single article.post {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .single article.post {
        padding: 20px;
    }
}

.single .entry-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .single .entry-title {
        font-size: 2rem;
    }
}

.single .post-thumbnail {
    margin-bottom: 30px;
    text-align: center;
}

.single .post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.single .entry-content {
    font-size: 1.1rem;
    color: #495057;
}

.project-meta-data h2,
.related-projects h2,
.related-content h2,
.agent-introduction h2,
.related-projects-agent h2,
.group-meta-data h2 {
    font-size: 2rem;
    color: #343a40;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 25px;
}

.meta-item, .related-content > div {
    margin-bottom: 25px;
}

.meta-item h3, .related-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #495057;
}

.meta-item p, .meta-item ul {
    font-size: 1rem;
    color: #6c757d;
}

.meta-item ul, .related-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.meta-item ul li, .related-content ul li {
    background: #f8f9fa;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.meta-item ul li a, .related-content ul li a {
    font-weight: bold;
}

/* === Specific Template Styles === */

/* Single Phân Khu Breadcrumb */
.breadcrumb {
    background: #e9ecef;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: #6c757d;
}
.breadcrumb a {
    color: #007bff;
}
.breadcrumb span {
    font-weight: bold;
    color: #495057;
}

/* Single Chuyên Viên Profile */
.agent-profile-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 30px;
}
.agent-avatar {
    flex: 0 0 250px;
    text-align: center;
}
.agent-avatar img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 5px solid #e9ecef;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.agent-info {
    flex: 1;
    min-width: 300px;
}
.agent-info h2 {
    margin-top: 0;
    font-size: 1.8rem;
    border-bottom: none;
    padding-bottom: 0;
}
.agent-info p {
    margin-bottom: 8px;
    font-size: 1rem;
}
.social-channels ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin-top: 15px;
}
.social-channels ul li a {
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}
.social-channels ul li a:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* Group Search Form */
.group-search-form-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.group-search-form-container form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}
.group-search-form-container label {
    flex: 1 1 200px; /* Adjusted base width for better wrapping */
}
.group-search-form-container .search-field,
.group-search-form-container select {
    flex: 1 1 150px; /* Allow shrinking, but give a minimum width */
    max-width: 300px; /* Prevent them from becoming too wide */
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    color: #495057;
}
.group-search-form-container .search-submit {
    padding: 12px 25px;
    border: none;
    background-color: #28a745;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
    flex-shrink: 0; /* Prevent shrinking */
}
.group-search-form-container a {
    color: #dc3545;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Responsive adjustments for search form */
@media (max-width: 768px) {
    .group-search-form-container form {
        flex-direction: column;
        align-items: stretch;
    }
    .group-search-form-container label,
    .group-search-form-container .search-submit,
    .group-search-form-container a {
        width: 100%;
        text-align: center;
    }
    .group-search-form-container .search-field,
    .group-search-form-container select {
        max-width: none; /* Remove max-width on small screens */
    }
}

/* Pagination */
.navigation.pagination {
    margin-top: 40px;
    text-align: center;
}
.nav-links {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
}
.page-numbers {
    display: block;
    padding: 8px 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    color: #007bff;
    text-decoration: none;
}
.page-numbers.current {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
.page-numbers:hover:not(.current) {
    background-color: #e9ecef;
}

/* === Auth Links Shortcode === */
.chuyen-vien-auth-links {
    font-size: 0.9rem;
}
.chuyen-vien-auth-links,
.chuyen-vien-auth-links a {
    color: #ffffff; /* White color */
}

.chuyen-vien-auth-links a:hover {
    color: #dddddd; /* A slightly off-white for hover effect */
    text-decoration: underline;
}
.acf-url i {
    top: 10px !important;
}
#header .header-main .header-button > .button:not(.is-outline) {
    background-color: #DD3333 !important;
}
.mfp-content {
    background: linear-gradient(90deg, rgba(221, 51, 51, 1) 0%, rgba(235, 54, 54, 1) 55%, rgba(181, 24, 24, 1) 100%);
}
.off-canvas:not(.off-canvas-center) .nav-vertical li>a {
    padding-left: 20px;
    color: white;
}
