/* Blog Page Specific Styles */

/* Main Blog Layout */
.blog-main {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
    background-color: #ffffff;
    position: relative;
}

.blog-container {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    height: 1180px;
    overflow: hidden;
}

/* Sidebar Styles */
.blog-sidebar {
    position: absolute;
    left: 227px;
    top: 90px;
    width: 171px;
    z-index: 10;
}

/* Back Button */
.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    border: 1px solid #b59b6f;
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-button:hover {
    background-color: #473318;
}

.back-button:hover .back-text {
    color: #ffffff;
}

.back-text {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 16px;
    color: #473318;
    text-align: center;
    transition: color 0.3s ease;
}

/* Date Filter Buttons */
.date-filters {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.date-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 39px;
    padding: 11px 24px;
    border-radius: 19.5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    white-space: nowrap;
}

.date-button.selected {
    background-color: #473318;
    color: #ffffff;
}

.date-button:not(.selected) {
    background-color: #e3d7c1;
    color: #473318;
}

.date-button:not(.selected):hover {
    background-color: #d5c8ab;
    transform: scale(1.02);
}

/* Content Area */
.blog-content {
    position: absolute;
    left: calc(50% + 100px);
    top: 90px;
    transform: translateX(-50%);
    width: 784px;
    height: 1000px;
    background-color: #fcf8f1;
    border-radius: 30px;
    box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.blog-article {
    width: 100%;
    height: 100%;
    padding: 0;
}

/* Body Text Container */
.body-text {
    position: absolute;
    left: 33px;
    top: 29px;
    width: 664px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #2c3e50;
    text-align: left;
}

/* Typography Styles */
.header-h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 24px;
    color: #2c3e50;
    margin: 0;
    line-height: normal;
    width: 100%;
}

.header-h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
    line-height: normal;
    width: 100%;
}

.header-h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
    line-height: normal;
    width: 100%;
}

.body-paragraph {
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
    line-height: normal;
    width: 100%;
}

.multi-paragraph {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.multi-paragraph p {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-size: 16px;
    color: #2c3e50;
    line-height: normal;
}

/* Footer */
.blog-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #544432;
    padding: 17px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.blog-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 485px;
}

.blog-footer-content p {
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    margin: 0;
    line-height: normal;
}

/* Responsive Design */
@media (max-width: 1440px) {
    .blog-container {
        max-width: 100vw;
        padding: 0 20px;
    }
    
    .blog-content {
        left: 50%;
        transform: translateX(-50%);
        width: min(784px, calc(100vw - 240px));
    }
    
    .blog-sidebar {
        left: 20px;
    }
}

@media (max-width: 1024px) {
    .blog-container {
        height: auto;
        min-height: calc(100vh - 160px);
        padding-bottom: 80px;
    }
    
    .blog-sidebar {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        margin-bottom: 20px;
        padding: 0 20px;
    }
    
    .date-filters {
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .date-button {
        flex: 1;
        min-width: 150px;
    }
    
    .blog-content {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        height: auto;
        min-height: 600px;
    }
    
    .body-text {
        position: relative;
        left: auto;
        top: auto;
        width: calc(100% - 66px);
        margin: 29px 33px;
    }
    
    .blog-footer {
        position: relative;
        margin-top: 40px;
    }
    
    .blog-footer-content {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .blog-main {
        padding-top: 80px;
    }
    
    .blog-sidebar {
        padding: 0 15px;
    }
    
    .back-button {
        padding: 8px;
    }
    
    .back-text {
        font-size: 14px;
    }
    
    .date-filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-button {
        width: 100%;
        min-width: auto;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .blog-content {
        border-radius: 20px;
        margin: 0 15px;
        width: calc(100% - 30px);
    }
    
    .body-text {
        width: calc(100% - 40px);
        margin: 20px 20px;
        gap: 12px;
    }
    
    .header-h1 {
        font-size: 20px;
    }
    
    .header-h2 {
        font-size: 16px;
    }
    
    .body-paragraph {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .multi-paragraph p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .blog-footer-content {
        padding: 0 15px;
    }
    
    .blog-footer-content p {
        font-size: 14px;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-main {
        padding-top: 70px;
    }
    
    .blog-content {
        border-radius: 15px;
        margin: 0 10px;
        width: calc(100% - 20px);
    }
    
    .body-text {
        width: calc(100% - 30px);
        margin: 15px 15px;
        gap: 10px;
    }
    
    .header-h1 {
        font-size: 18px;
    }
    
    .header-h2 {
        font-size: 15px;
    }
    
    .body-paragraph {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .multi-paragraph p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .back-button {
        padding: 6px;
        border-radius: 6px;
    }
    
    .back-text {
        font-size: 13px;
    }
    
    .date-button {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 15px;
        height: 32px;
    }
    
    .blog-footer-content p {
        font-size: 12px;
    }
}

/* Animation Enhancements */
.blog-content {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    animation: slideIn 0.6s ease forwards;
    animation-delay: 0.2s;
}

.blog-sidebar {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.6s ease forwards;
    animation-delay: 0.1s;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover Effects */
.back-button,
.date-button {
    position: relative;
    overflow: hidden;
}

.back-button::before,
.date-button:not(.selected)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.back-button:hover::before,
.date-button:not(.selected):hover::before {
    left: 100%;
}

/* Focus States for Accessibility */
.back-button:focus,
.date-button:focus {
    outline: 2px solid #473318;
    outline-offset: 2px;
}

/* Loading States */
.blog-content.loading {
    opacity: 0.7;
}

.blog-content.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #473318;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}