body {
    background-color: #fff;
    font-family: 'Markazi Text', serif;
    overflow: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.row {
    flex-grow: 1;
    overflow: hidden;
}

.posts {
    height: 100%;
    overflow-y: auto;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.save-section,
.portfolio-section,
.history-section {
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.save-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.save-section li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

.save-section li:last-child {
    border-bottom: none;
}

.save-section li strong {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    white-space: nowrap;
}

.green {
    color: #28a745;
}

.red {
    color: #E30000;
}

.portfolio-section .card-title,
.history-section .card-title {
    text-align: center;
}

.portfolio-table td {
    vertical-align: middle;
}

.posts .card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    border: none;
}

.posts .card img {
    width: 100px;
    height: 100px;
    margin-right: 1rem;
    border-radius: 5px;
    background-color: #d6d6d6;
    flex-shrink: 0;
}

.posts .card-body {
    padding: 0;
    flex: 1;
    position: relative;
    min-width: 0; /* Flexbox overflow fix */
}

.posts .card-title {
    font-weight: bold;
    margin-bottom: 5px;
    position: absolute;
    top: 0;
    left: 0;
    right: 80px; /* Tarihe yer açmak için */
    line-height: 1.3;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.posts .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 30px;
    line-height: 1.4;
}

.posts .card .text-muted {
    font-size: 0.8rem;
    position: absolute;
    top: 0;
    right: 0;
    white-space: nowrap;
    background-color: #fff;
    padding-left: 5px;
}

.history-section {
    text-align: center;
    font-size: 1rem;
    color: #6c757d;
    max-height: calc(100vh - 350px);
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 25px;
}

header h1 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

header .nav-link {
    color: #000;
    font-size: 1.2rem;
    text-decoration: none;
}

a {
    color: #000;
    text-decoration: none;
}

header a {
    color: #000;
    text-decoration: none;
}

.history-section footer {
    text-align: center;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    position: sticky;
    bottom: 0;
}

.history-table {
    width: 100%;
    font-size: 0.9rem;
}

.history-table th,
.history-table td {
    padding: 8px;
    text-align: left;
}

.history-table thead th {
    border-bottom: 2px solid #ddd;
}

.history-table tbody {
    display: block;
    max-height: calc(100vh - 450px);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.history-table tbody::-webkit-scrollbar {
    display: none;
}

.history-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-bottom: 1px solid #eee;
}

.history-table thead,
.history-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.post {
    height: 100%;
    overflow-y: auto;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #343a40;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 5px;
}

.post footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

.policy footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

/* TABLET VE BÜYÜK MOBIL CIHAZLAR (768px - 991px) */
@media (max-width: 991px) and (min-width: 769px) {
    .posts .card-title {
        font-size: 1.1rem;
        right: 90px; /* Daha geniş tarih alanı */
    }
    
    .posts .card img {
        width: 80px;
        height: 80px;
    }
}

/* MOBIL CIHAZLAR (768px ve altı) */
@media (max-width: 768px) {
    header {
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: #fff;
        padding: 10px 0;
    }

    body {
        overflow: auto;
    }

    .container {
        display: block;
        height: auto;
        overflow: visible;
    }

    .save-section,
    .portfolio-section,
    .history-section {
        position: relative;
        overflow: visible;
    }

    .row {
        height: auto;
        overflow: visible;
    }

    .posts {
        overflow: auto;
        height: auto;
    }
    
    .post {
        overflow: auto;
        height: auto;
    }

    .history-section {
        max-height: none;
        overflow-y: auto;
    }

    .portfolio-table,
    .history-table {
        overflow-x: auto;
    }

    /* Mobilde card düzenini değiştir */
    .posts .card {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        margin-bottom: 20px !important;
        border: 1px solid #e9ecef;
        border-radius: 8px;
    }

    .posts .card img {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
        object-fit: cover;
    }

    .posts .card-body {
        position: static;
        padding: 0;
    }

    .posts .card-title {
        position: static;
        margin-bottom: 8px;
        font-size: 1.1rem;
        line-height: 1.4;
        white-space: normal;
        word-wrap: break-word;
        overflow: visible;
        text-overflow: unset;
        right: auto;
    }

    .posts .card-text {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .posts .card .text-muted {
        position: static;
        font-size: 0.85rem;
        text-align: right;
        margin-top: 5px;
        background-color: transparent;
        padding-left: 0;
    }
}

/* KÜÇÜK MOBIL CIHAZLAR (576px ve altı) */
@media (max-width: 576px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    header {
        gap: 15px;
        flex-wrap: wrap;
    }

    .posts .card {
        padding: 12px;
        margin-bottom: 15px !important;
    }

    .posts .card img {
        height: 180px;
        margin-bottom: 12px;
    }

    .posts .card-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .posts .card-text {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .posts .card .text-muted {
        font-size: 0.8rem;
    }
}