/* Timeline styling for the about page */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-future {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    left: 50%;
    margin-left: -2px;
}

.timeline-future:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: green;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
}

.timeline-future-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-future-item:nth-child(odd) {
    left: 0;
}

.timeline-future-item:nth-child(even) {
    left: 50%;
}

.timeline-item:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -14px;
    background-color: white;
    border: 4px solid var(--primary-color);
    top: 5px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-future-item:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -14px;
    background-color: white;
    border: 4px solid green;
    top: 5px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even):after {
    left: -14px;
}

.timeline-future-item:nth-child(even):after {
    left: -14px;
}

.timeline-date {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-future-date {
    font-weight: bold;
    color: green;
    margin-bottom: 10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Add animation for timeline elements */
.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.timeline-item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive timeline for small screens */
@media screen and (max-width: 768px) {
    .timeline:before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:after {
        left: 12px;
        top: 20px;
    }
    
    .timeline-item:nth-child(odd):after {
        left: 12px;
    }
}

/* Styling for code blocks in blog posts */
pre {
    background-color: #f5f5f5;
    border-radius: var(--radius);
    padding: 15px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Blog post image placeholder with gradient */
.blog-post .post-image {
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius);
}

/* Project image placeholders with gradient */
.project-image-item {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: auto;
}

.modal-content, #caption {
    animation: zoom 0.6s;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

/* Make images clickable */
.modal-image {
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-image:hover {
    opacity: 0.8;
}

/* Project image items with images */
.project-image-item {
    overflow: hidden;
    border-radius: var(--radius);
}

/* Form status styling */
.form-status {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    font-size: 16px;
    transition: all 0.3s ease;
}

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

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

.form-status.loading {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}

.form-status.hidden {
    display: none;
}

/* Responsive adjustments */
@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}

/* Add this to your existing CSS file */

.blog-stats {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

.visitor-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.visitor-count i {
    color: #3498db;
}

/* Burger menu animation */
.burger {
    cursor: pointer;
}

.burger.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger.toggle .line2 {
    opacity: 0;
}

.burger.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Improve image modal for mobile */
@media screen and (max-width: 768px) {
    .modal {
        padding-top: 20px;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    #caption {
        width: 95%;
        font-size: 14px;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .full-width-image {
        position: relative;
    }
    
    .full-width-image::after {
        content: "Tap image to enlarge";
        position: absolute;
        bottom: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        color: white;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        opacity: 0.8;
    }
}

/* Improve caption visibility */
#caption {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    color: white;
    font-size: 16px;
}

/* Caption box styling for blog posts */
.caption-box {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.95em;
    margin: 15px 0;
    color: #666;
    border-left: 3px solid #ddd;
}

.caption-box p {
    margin-bottom: 0;  /* Remove the bottom margin from paragraphs in caption box */
}

/* If there are multiple paragraphs, only remove margin from the last one */
.caption-box p:last-child {
    margin-bottom: 0;
}

/* Section divider styling for blog posts */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, rgba(230, 230, 230, 0), rgba(230, 230, 230, 125), rgba(230, 230, 230, 0));
    margin: 40px 0;
    border: none;
    width: 100%;
}
