/* =================================================================
   ANA DUYURU POP-UP STİLLERİ
   ================================================================= */

/* Ana duyuru pop-up */
.main-announcement-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.main-announcement-popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    width: auto;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.main-announcement-popup.show .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    color: #333;
}

.popup-header {
    padding: 25px 25px 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
    flex-shrink: 0;
}

.popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.popup-badge i {
    font-size: 16px;
}

.popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #343a40;
    margin: 0;
    line-height: 1.3;
}

.popup-body {
    padding: 0 25px 25px;
    flex: 1;
    overflow-y: auto;
}

.popup-image {
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    position: relative;
    max-height: 60vh;
}

.popup-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 15px;
    transition: opacity 0.3s ease;
}

.popup-image img.loading {
    opacity: 0;
}

.popup-image img.loaded {
    opacity: 1;
}

.popup-image .image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #007bff;
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.popup-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.popup-date,
.popup-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
}

.popup-date i,
.popup-location i {
    font-size: 16px;
}

.popup-description {
    margin-bottom: 25px;
}

.popup-description p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
}

.popup-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.popup-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.popup-btn.primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.popup-btn.primary:hover {
    background: linear-gradient(135deg, #0056b3, #003d82);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.popup-btn.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.popup-btn.secondary:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    min-width: 300px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-success .toast-content i {
    color: #28a745;
}

.toast-error .toast-content i {
    color: #dc3545;
}

.toast-info .toast-content i {
    color: #17a2b8;
}

/* Duyuru Detayları Pop-up */
.announcement-details-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.announcement-details-popup.show {
    opacity: 1;
    visibility: visible;
}

.announcement-details-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.announcement-details-popup .popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    width: auto;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.announcement-details-popup.show .popup-content {
    transform: scale(1);
}

/* Carousel navigation */
.announcements-carousel .owl-nav {
    margin-top: 20px;
    text-align: center;
}

.announcements-carousel .owl-nav button {
    background: #007bff !important;
    color: white !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
    margin: 0 10px !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.announcements-carousel .owl-nav button:hover {
    background: #0056b3 !important;
    transform: scale(1.1) !important;
}

.announcements-carousel .owl-dots {
    text-align: center;
    margin-top: 15px;
}

.announcements-carousel .owl-dots .owl-dot {
    display: inline-block;
    margin: 0 5px;
}

.announcements-carousel .owl-dots .owl-dot span {
    width: 12px;
    height: 12px;
    background: #dee2e6;
    border-radius: 50%;
    display: block;
    transition: all 0.3s ease;
}

.announcements-carousel .owl-dots .owl-dot.active span,
.announcements-carousel .owl-dots .owl-dot:hover span {
    background: #007bff;
    transform: scale(1.2);
}

/* Dinamik boyutlandırma için ek kurallar */
.popup-content.image-loaded {
    width: auto;
    max-width: min(90vw, 800px);
}

.popup-content.no-image {
    width: auto;
    max-width: 600px;
}

.popup-content.wide-image {
    max-width: min(90vw, 900px);
}

.popup-content.tall-image {
    max-width: min(90vw, 700px);
}

/* Görsel yükleme durumları */
.popup-image.has-image {
    min-height: 200px;
}

.popup-image.no-image {
    display: none;
}

/* Popup içeriği düzenlemesi */
.popup-content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.popup-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Görsel boyutuna göre otomatik ayarlama */
.popup-image img[data-aspect="landscape"] {
    max-width: 100%;
    height: auto;
}

.popup-image img[data-aspect="portrait"] {
    max-height: 60vh;
    width: auto;
}

.popup-image img[data-aspect="square"] {
    max-width: 100%;
    max-height: 50vh;
    width: auto;
    height: auto;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        max-width: 95vw;
        max-height: 90vh;
        min-width: 280px;
    }
    
    .popup-title {
        font-size: 20px;
    }
    
    .popup-image {
        max-height: 50vh;
    }
    
    .popup-image img {
        max-height: 50vh;
    }
    
    .popup-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .popup-header {
        padding: 20px 20px 15px;
    }
    
    .popup-body {
        padding: 0 20px 20px;
    }
    
    .popup-title {
        font-size: 18px;
    }
    
    .popup-image {
        max-height: 40vh;
    }
    
    .popup-image img {
        max-height: 40vh;
    }
    
    .popup-description p {
        font-size: 14px;
    }
    
    .popup-content {
        min-width: 250px;
    }
}
