/*
 * ====================================================================
 * bs5_newsfeed.css - Bootstrap 5 NewsFeed Template Styles
 * ====================================================================
 */

/* Content Container */
.newsfeed-container {
    padding-top: 2rem; /* Angepasster Abstand zum Hero Image */
}

@media (max-width: 767px) {
    .newsfeed-container {
        padding-top: 1.5rem; /* Weniger Abstand auf Mobile */
    }
}

/* Feed Card Styles */
.feed-card {
    border: 1px solid var(--fm-border-light);
    border-radius: var(--fm-border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--fm-white);
}

.feed-card:hover {
    box-shadow: var(--fm-card-shadow-medium);
    transform: translateY(-2px);
}

.feed-card .card-header {
    background: var(--fm-white);
    border-bottom: 1px solid var(--fm-border-light);
    padding: 1rem;
}

.feed-card .card-body {
    padding: 1.25rem;
}

/* News Type Icon */
.news-type-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--fm-gold-gradient);
    color: var(--fm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Team Logos */
.team-logos {
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Card Image Container */
.card-img-container {
    position: relative;
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Image Source */
.image-source {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: var(--fm-white);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-style: italic;
}

.image-source a {
    color: var(--fm-white);
    text-decoration: none;
}

.image-source a:hover {
    color: var(--fm-gold);
    text-decoration: underline;
}

/* Carousel Customization */
.carousel {
    position: relative;
}

.carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 3px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--fm-white);
}

.carousel-indicators .active {
    background-color: var(--fm-gold);
    border-color: var(--fm-gold);
}

/* Penalty Card Specific */
.penalty-card-image {
    min-height: 280px;
    position: relative;
}

.penalty-team-logo {
    width: 60px;
    height: auto;
    margin-bottom: -10%;
}

.penalty-no-image {
    background: var(--fm-bg-light);
    border-top: 1px solid var(--fm-border-light);
    border-bottom: 1px solid var(--fm-border-light);
}

.penalty-logo-large {
    width: 120px;
    height: auto;
}

.penalty-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--fm-gold);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Sticky Submit Button */
.sticky-submit-button {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--fm-dark);
    padding: 0.5rem;
    z-index: 1030;
    border-top: 1px solid var(--fm-gold);
}

.sticky-submit-button .btn {
    font-size: 1.25rem;
    letter-spacing: -1px;
    padding: 0.75rem;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid var(--fm-gold);
    color: var(--fm-white);
}

.sticky-submit-button .btn:hover {
    background: var(--fm-gold);
    color: var(--fm-dark);
}

/* Modal Customization */
#newsSubmitModal .modal-content {
    border: none;
    border-radius: var(--fm-border-radius-lg);
}

#newsSubmitModal .modal-header {
    background: var(--fm-bg-light);
    border-bottom: 1px solid var(--fm-border-light);
}

#newsSubmitModal .modal-title {
    font-size: 1.25rem;
    letter-spacing: -1px;
}

#newsSubmitModal .form-control,
#newsSubmitModal .form-select {
    border: 1px solid var(--fm-dark-gray);
    font-size: 0.9rem;
}

#newsSubmitModal .form-control:focus,
#newsSubmitModal .form-select:focus {
    border-color: var(--fm-gold);
    box-shadow: 0 0 0 0.2rem rgba(182, 139, 71, 0.25);
}

#newsSubmitModal textarea {
    min-height: 120px;
    resize: vertical;
}

/* Form Switch Customization */
.form-check-input:checked {
    background-color: var(--fm-gold);
    border-color: var(--fm-gold);
}

.form-check-input:focus {
    border-color: var(--fm-gold);
    box-shadow: 0 0 0 0.25rem rgba(182, 139, 71, 0.25);
}

/* Gallery Trigger Hover Effect */
.news-gallery-trigger,
.penalty-gallery-trigger {
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.news-gallery-trigger:hover,
.penalty-gallery-trigger:hover {
    opacity: 0.9;
}

/* Alert Customization */
.alert {
    border-radius: var(--fm-border-radius-md);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    /* Mobile optimizations */
    .feed-card .card-header {
        padding: 0.75rem;
    }
    
    .feed-card .card-body {
        padding: 1rem;
    }
    
    .news-type-icon {
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
    }
    
    .team-logo {
        height: 28px;
    }
    
    .sticky-submit-button .btn {
        font-size: 1rem;
        padding: 0.5rem;
    }
    
    /* Add bottom padding to body for sticky button */
    body {
        padding-bottom: 60px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    /* Tablet optimizations */
    .feed-card {
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 992px) {
    /* Desktop optimizations */
    .feed-card {
        margin-bottom: 2rem;
    }
    
    /* Hide sticky button on desktop */
    .sticky-submit-button {
        display: none;
    }
    
    /* Remove body padding on desktop */
    body {
        padding-bottom: 0;
    }
}

/* Card Text Formatting */
.card-text p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.card-text strong {
    color: var(--fm-dark);
}

.card-text a {
    color: var(--fm-gold);
    text-decoration: none;
}

.card-text a:hover {
    color: var(--fm-accent-gold-dark);
    text-decoration: underline;
}

/* Button Styles */
.btn-primary {
    background-color: var(--fm-gold);
    border-color: var(--fm-gold);
    color: var(--fm-white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: var(--fm-accent-gold-dark);
    border-color: var(--fm-accent-gold-dark);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--fm-gold);
    color: var(--fm-gold);
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: var(--fm-gold);
    border-color: var(--fm-gold);
    color: var(--fm-white);
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--fm-white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* File Input Styling */
.form-control[type="file"] {
    cursor: pointer;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: var(--fm-gold);
    border: none;
    color: var(--fm-white);
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    cursor: pointer;
    border-radius: var(--fm-border-radius-sm);
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background: var(--fm-accent-gold-dark);
}

/* Link Styles within Cards */
.feed-card a {
    color: var(--fm-dark);
}

.feed-card a:hover {
    color: var(--fm-gold);
    text-decoration: none;
}

/* Small Text Styles */
.feed-card small {
    color: var(--fm-text-secondary);
    font-size: 0.85rem;
}

.feed-card small a {
    color: var(--fm-text-secondary);
}

.feed-card small a:hover {
    color: var(--fm-gold);
}