/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Header Styles */
header h1 {
    font-weight: 700;
    font-size: 1.8rem;
}

/* Navigation Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,0.1);
}

/* Card Styles */
.card {
    border-radius: 16px !important;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* news.php için hover efektini devre dışı bırak */
.news-detail .card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.news-detail .card.hover-shadow:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* news.php için card-body padding düzenlemesi */
.news-detail .card-body {
    padding: 0 !important;
}

/* news.php için col-lg-8 padding düzenlemesi */
.news-detail .col-lg-8 {
    padding: 0 !important;
}

@media (max-width: 991.98px) {
    .news-detail .col-lg-8 {
        padding: 0 !important;
    }
    
    /* Mobil görünümde üst boşlukları kaldır */
    .news-detail main.py-4 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .news-detail .container {
        padding: 0 !important;
    }
    
    .news-detail .card {
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .news-detail .bg-light {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .news-detail .mobile-meta-wrapper {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .news-detail .meta-section {
        border-radius: 0 !important;
        padding: 4px !important;
        margin: 0 !important;
    }

    .news-detail .col-lg-4 .card {
        border-radius: 12px !important;
        margin: 0 0.25rem !important;
        transform: scale(1.02);
    }

    .news-detail .col-lg-4 {
        margin-top: 2rem !important;
        padding: 0 0.5rem !important;
    }
}

.card-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-text {
    color: #6c757d;
    font-size: 0.9rem;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Featured News Section */
.featured-news .card {
    margin-bottom: 1.5rem;
}

/* Latest News Section */
.latest-news img {
    height: 150px;
    object-fit: cover;
}

/* Footer Styles */
footer {
    margin-top: 2rem;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Siteyi Aç butonu için özel hover efekti */
.btn-primary:hover {
    background-color: #66d9ff !important;
    border-color: #66d9ff !important;
    color: #ffffff !important;
    transform: translateX(3px);
    transition: all 0.3s ease;
}

.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover i {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-img-top {
        height: 150px;
    }
    
    .latest-news img {
        height: 120px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}

/* Haber kartları için hover efekti */
.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    /* transform and box-shadow removed */
}

/* Kartların içindeki linklerin hover rengini kaldır */
.card a:hover {
    color: inherit !important;
}

/* Kartların içindeki resimlerin düzgün görünmesi için */
.card-img-top {
    height: 200px;
    object-fit: cover;
}

.object-fit-cover {
    object-fit: cover;
}

/* Haber içeriğindeki tablolar için stil */
.news-content-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
}

.news-content {
    padding: 0;
    width: 100%;
}

.news-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* İframe ve video container */
.news-content iframe,
.news-content video {
    aspect-ratio: 16/9;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0.25rem 0 !important;
    display: block !important;
}

/* Responsive iframe container */
.news-content .video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0.5rem auto;
    padding-bottom: 56.25%; /* 16:9 oranı */
    height: 0;
    overflow: hidden;
}

.news-content .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border: none !important;
}

/* YouTube özel container */
.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 oranı */
    height: 0;
    overflow: hidden;
    margin: 0;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media screen and (max-width: 768px) {
    .youtube-container {
        margin: 0;
    }
}

/* Tablo stilleri */
.news-content table {
    width: 100% !important;
    margin: 0.25rem 0 !important;
    border-collapse: collapse;
}

.news-content table td,
.news-content table th {
    padding: 0.25rem !important;
}

/* Görsel stilleri */
.news-content img {
    max-width: 100% !important;
    height: auto !important;
    margin: 0.25rem 0 !important;
}

/* Paragraf stilleri */
.news-content p {
    margin: 0.25rem 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

/* Mobil cihazlar için ayarlar */
@media screen and (max-width: 768px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }

    .container, 
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .col, [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    main.py-4 {
        padding: 0 !important;
        margin: 0 !important;
    }

    .card-body {
        padding: 0.25rem !important;
    }

    .news-content-wrapper {
        margin: 0;
        width: 100%;
    }

    .news-content {
        padding: 0;
    }

    .news-content table {
        font-size: 12px !important;
        width: 100% !important;
        margin: 0.25rem 0 !important;
        max-width: none !important;
    }
    
    .news-content table td,
    .news-content table th {
        padding: 3px !important;
    }
    
    .news-content iframe,
    .news-content video,
    .news-content .video-container {
        max-width: none !important;
        width: 100% !important;
        margin: 0.25rem 0 !important;
    }

    .news-content img {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .news-content p {
        padding: 0 !important;
        margin: 0.15rem 0 !important;
    }

    /* Video container mobil optimizasyonu */
    .news-content .video-container {
        width: 100% !important;
        margin: 0.25rem 0 !important;
        padding-bottom: 56.25% !important;
    }
}

/* Tablet cihazlar için ayarlar */
@media screen and (min-width: 769px) and (max-width: 991px) {
    .card-body {
        padding: 0.5rem !important;
    }

    .news-content {
        padding: 0 0.25rem;
    }

    .news-content table,
    .news-content iframe,
    .news-content video,
    .news-content .video-container {
        max-width: 100% !important;
        margin: 0.5rem 0 !important;
    }
}

/* Meta section styles */
.meta-section {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.25rem 0;
}

.meta-section .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-section .interaction-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.meta-section .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Mobil görünüm için meta section düzenlemesi */
@media screen and (max-width: 768px) {
    .meta-section {
        padding: 0.25rem;
        margin: 0.15rem 0;
    }

    .mobile-meta-wrapper {
        padding: 0 !important;
    }

    .bg-light {
        padding-top: 0 !important;
    }

    .meta-section .user-info {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        padding-left: 8px;
    }

    .meta-section .interaction-buttons {
        width: 100%;
        gap: 4px;
        justify-content: flex-start;
        padding-left: 8px;
    }

    .meta-section .btn {
        padding: 0.15rem 0.35rem;
        font-size: 0.8125rem;
        margin-left: 0;
    }
}

/* Kart içindeki görsel kapsayıcısı */
.card .image-container {
    width: 100%;
    padding-top: 56.25%; /* 16:9 oranı */
    position: relative;
    overflow: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* Kart içindeki görseller */
.card .image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Kart içindeki video kapsayıcısı */
.card .video-container {
    width: 100%;
    padding-top: 56.25%; /* 16:9 oranı */
    position: relative;
    overflow: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* Kart içindeki videolar */
.card .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Kart gövdesi */
.card-body {
    padding: 1rem;
}

/* Kart alt kısmı */
.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
}

/* Kart içindeki küçük metinler */
.card .text-muted {
    font-size: 0.875rem;
}

/* Kart içindeki ikonlar */
.card .fas {
    margin-right: 0.25rem;
}

/* Kart içindeki butonlar */
.card .btn {
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
}

/* Kart içindeki avatar */
.card .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Kart hover efekti */
.card.hover-shadow:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.py-4 {
    padding-top: 0 !important;
}

.news-detail footer {
    display: none !important;
}

/* News Content */
.news-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.news-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* İframe ve video container */
.news-content iframe,
.news-content video {
    aspect-ratio: 16/9;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
}

/* YouTube özel container */
.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 oranı */
    height: 0;
    overflow: hidden;
    margin: 0;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Haber detay sayfası için özel stiller */
.news-detail .card {
    border: none;
    border-radius: 0;
}

.news-detail .card-body {
    padding: 0;
}

.news-detail .meta-section {
    margin: 0;
    border-radius: 0;
}

.news-detail .news-content-wrapper {
    margin: 0;
    padding: 0;
}

.news-detail .news-image-wrapper {
    margin: 0 !important;
}

.news-detail .news-video-wrapper {
    margin: 0 !important;
}

.news-detail .p-2 {
    padding: 0 !important;
}

.news-detail .container {
    padding: 0;
    max-width: 100%;
}

@media screen and (max-width: 768px) {
    .news-detail .container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .news-detail .row {
        margin: 0 !important;
    }

    .news-detail .col-lg-8 {
        padding: 0 !important;
    }

    .news-detail .card {
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .news-detail .news-content-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    .news-detail .news-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .news-detail .news-image-wrapper,
    .news-detail .news-video-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    .news-detail .youtube-container {
        margin: 0 !important;
    }

    .news-detail .py-4 {
        padding: 0 !important;
    }
}

/* Video container için özel stil */
.youtube-container {
    margin: 0 !important;
    padding-bottom: 56.25% !important;
}

.news-detail .bg-light {
    padding: 0 !important;
    margin: 0 !important;
}

.news-detail .px-2 {
    padding: 0 !important;
}

.news-detail .pb-2 {
    padding: 0 !important;
}

.news-detail .card-body h1.h2 {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

.news-detail .news-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.news-detail .news-content p {
    padding-left: 0.375rem !important;
    padding-right: 0.375rem !important;
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
}

.news-detail .news-video-wrapper,
.news-detail .news-image-wrapper,
.news-detail .youtube-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Video container mb-3 sınıfı için 16:9 oranı */
.video-container.mb-3 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 oranı */
    height: 0;
    overflow: hidden;
    margin-bottom: 1rem !important;
}

.video-container.mb-3 video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Video.w-100 sınıfı için 16:9 oranı */
video.w-100 {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
}

/* Mesajlaşma stilleri */
.chat-container {
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.chat-messages {
    padding: 1rem;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-input {
    padding: 1rem;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    margin-top: auto;
}

/* Tab pane mesaj için özel stil */
#messages .card {
    height: calc(100vh - 100px) !important;
}

#messages .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#chatInterface {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-message {
    display: flex;
    margin-bottom: 0.5rem;
}

.chat-message.incoming {
    justify-content: flex-start;
}

.chat-message.outgoing {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-message.incoming .message-bubble {
    background-color: #f1f0f0;
    border-top-left-radius: 0.25rem;
    color: #303030;
}

.chat-message.outgoing .message-bubble {
    background-color: #25D366;
    border-top-right-radius: 0.25rem;
    color: #fff;
}

.chat-message.outgoing .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message-time {
    display: block;
    font-size: 0.7rem;
    color: #666;
    text-align: right;
    margin-top: 0.25rem;
}

.conversation-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.conversation-item:hover {
    background-color: #f8f9fa;
}

.conversation-item.active {
    background-color: #e9ecef;
}

.chat-date-separator {
    margin: 1rem 0;
    text-align: center;
}

.chat-date-separator .badge {
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: normal;
}