/**
 * DEA Theme - Custom Styles
 * Additional styles that extend the main style.css
 */

/* ========================================
   Back to Top Button
======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--dea-red);
    color: var(--dea-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--dea-yellow);
    color: var(--dea-dark);
}

/* ========================================
   Mobile Overlay
======================================== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 998;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* ========================================
   Menu Toggle Animation
======================================== */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   Form Styles
======================================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--radius-sm);
    display: none;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   Project Sidebar
======================================== */
.project-sidebar {
    position: sticky;
    top: 100px;
}

.project-info-box {
    background-color: var(--dea-gray-light);
    padding: 30px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.project-info-box h3 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--dea-red);
}

.project-details-list {
    list-style: none;
}

.project-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.project-details-list li:last-child {
    border-bottom: none;
}

.project-details-list .label {
    color: var(--dea-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-details-list .label i {
    color: var(--dea-red);
}

.project-details-list .value {
    font-weight: 500;
    color: var(--dea-dark);
}

.status-completed {
    color: var(--dea-green) !important;
}

.status-ongoing {
    color: var(--dea-yellow-dark) !important;
}

/* Related Projects */
.related-projects {
    background-color: var(--dea-white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.related-projects h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.related-list {
    list-style: none;
}

.related-list li {
    margin-bottom: 15px;
}

.related-list li:last-child {
    margin-bottom: 0;
}

.related-list a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--dea-dark);
}

.related-list a:hover {
    color: var(--dea-red);
}

.related-list img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* ========================================
   Post Navigation
======================================== */
.post-navigation,
.project-navigation {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.post-navigation .nav-links,
.project-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next,
.project-navigation .nav-previous,
.project-navigation .nav-next {
    flex: 1;
    max-width: 45%;
}

.post-navigation .nav-next,
.project-navigation .nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--dea-gray);
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-weight: 500;
    color: var(--dea-dark);
    transition: color var(--transition-fast);
}

.nav-title:hover {
    color: var(--dea-red);
}

/* ========================================
   Author Box
======================================== */
.author-box {
    display: flex;
    gap: 25px;
    padding: 30px;
    background-color: var(--dea-gray-light);
    border-radius: var(--radius-md);
    margin-top: 40px;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.author-name {
    margin-bottom: 10px;
}

.author-bio {
    color: var(--dea-gray);
    margin: 0;
}

@media (max-width: 576px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar img {
        margin: 0 auto;
    }
}

/* ========================================
   Share Buttons
======================================== */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.share-label {
    font-weight: 500;
}

.share-buttons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dea-gray-light);
    color: var(--dea-dark);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.share-buttons a:hover {
    color: var(--dea-white);
}

.share-facebook:hover {
    background-color: #1877f2;
}

.share-twitter:hover {
    background-color: #000;
}

.share-linkedin:hover {
    background-color: #0a66c2;
}

.share-whatsapp:hover {
    background-color: #25d366;
}

/* ========================================
   Post Tags
======================================== */
.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.post-tags i {
    color: var(--dea-red);
}

.post-tags a {
    padding: 5px 15px;
    background-color: var(--dea-gray-light);
    color: var(--dea-dark);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.post-tags a:hover {
    background-color: var(--dea-red);
    color: var(--dea-white);
}

/* ========================================
   Single Post Meta
======================================== */
.single-post .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dea-gray);
    font-size: 0.9rem;
}

.post-meta i {
    color: var(--dea-red);
}

/* ========================================
   Project Gallery
======================================== */
.project-gallery {
    margin-top: 40px;
}

.project-gallery h3 {
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery-item {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Projects Archive Pagination
======================================== */
.projects-pagination {
    text-align: center;
    margin-top: 50px;
}

.projects-footer {
    text-align: center;
    margin-top: 50px;
}

/* ========================================
   News Footer
======================================== */
.news-footer {
    text-align: center;
    margin-top: 50px;
}

/* ========================================
   References Footer
======================================== */
.references-footer {
    text-align: center;
    margin-top: 40px;
}

/* ========================================
   Service Link
======================================== */
.service-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
    font-weight: 500;
    color: var(--dea-red);
}

.service-link:hover {
    color: var(--dea-red-dark);
}

/* ========================================
   Featured Image
======================================== */
.project-featured-image {
    margin-bottom: 30px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.project-featured-image img {
    width: 100%;
    height: auto;
}

/* ========================================
   Comments
======================================== */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.comments-title {
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-body {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: var(--dea-gray-light);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.comment-author-name {
    font-weight: 500;
}

.comment-date {
    color: var(--dea-gray);
}

.comment-reply-link {
    font-size: 0.85rem;
    font-weight: 500;
}

.comment-respond {
    margin-top: 40px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--dea-red);
}

.comment-form .submit {
    background-color: var(--dea-red);
    color: var(--dea-white);
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.comment-form .submit:hover {
    background-color: var(--dea-red-dark);
}

/* ========================================
   Pagination
======================================== */
.pagination {
    margin-top: 40px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .page-numbers li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: var(--dea-gray-light);
    color: var(--dea-dark);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.pagination a:hover,
.pagination .current {
    background-color: var(--dea-red);
    color: var(--dea-white);
}

/* ========================================
   Widget Styles
======================================== */
.sidebar .widget {
    margin-bottom: 30px;
    padding: 25px;
    background-color: var(--dea-gray-light);
    border-radius: var(--radius-md);
}

.sidebar .widget-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--dea-red);
}

.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar .widget ul li:last-child {
    border-bottom: none;
}

.sidebar .widget ul li a {
    color: var(--dea-dark);
    transition: color var(--transition-fast);
}

.sidebar .widget ul li a:hover {
    color: var(--dea-red);
}

/* ========================================
   No Posts/Projects Message
======================================== */
.no-posts,
.no-projects {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--dea-gray-light);
    border-radius: var(--radius-md);
}

.no-posts p,
.no-projects p {
    color: var(--dea-gray);
    margin: 0;
}
