* { box-sizing: border-box; }

.rescue-detail-page {
    background: linear-gradient(135deg, #96e568 0%, #ffffff 100%);
    min-height: 100vh;
    position: relative;
}

.hero-section {
    padding: 60px 0 40px;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

.rescue-detail-section {
    padding-bottom: 60px;
}

.rescue-detail-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.status-badge-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge.rescued {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.status-badge.urgent {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.btn-share {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.btn-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.image-container {
    position: relative;
    margin: 0;
}

.rescue-detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.zoom-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.zoom-btn:hover {
    transform: scale(1.1);
}

.rescue-placeholder {
    height: 300px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.rescue-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
}

.rescue-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
}

.info-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.info-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.location-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.btn-directions {
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    background: #28a745;
    color: white;
}

.btn-directions:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.description-section {
    padding: 0 30px 30px;
}

.description-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description-text {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin: 0;
    line-height: 1.6;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 90%;
    max-width: 700px;
    margin: 5% auto;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 5% auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.image-modal-content .close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.9);
    color: #333;
}

.comments-section {
    padding: 20px;
    background: #f8f9fa;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.comments-header h3 {
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-count {
    background: #46ac0b;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-comment-btn {
    background: #dc3545;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.delete-comment-btn:hover {
    transform: scale(1.1);
}

.delete-comment-form {
    display: inline;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.comment-text {
    margin: 0;
    line-height: 1.5;
    color: #495057;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.no-comments i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.comment-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.comment-input {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s ease;
    margin-bottom: 15px;
}

.comment-input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    background: linear-gradient(135deg, #46ac0b, #46ac0b);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-top: 10px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

@media (max-width: 767px) {
    .hero-title { font-size: 2rem; }
    .rescue-detail-image, .rescue-placeholder { height: 250px; }
    .rescue-info-grid { grid-template-columns: 1fr; padding: 20px; }
    .modal-content { margin: 10% auto; width: 95%; }
    .comment-item { flex-direction: column; gap: 10px; }
    .comments-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .status-badge-container { flex-direction: column; align-items: flex-end; gap: 8px; }
}















.comment-image-container {
    position: relative;
    margin-top: 10px;
    max-width: 200px;
}
.comment-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.badge-reported {
    background-color: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 5px;
    font-size: 0.8em;
}
.btn-download {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: none;
    cursor: pointer;
}
.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* New styles for action container */
.action-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
    justify-content: center;
    align-items: center;
}

.action-container .status-badge {
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-container .btn-share,
.action-container .btn-download {
    margin: 0;
}

@media (max-width: 768px) {
    .image-container .rescue-detail-image {
        width: 100%;
        height: auto;
        max-height: 300px; /* Ensure image scales well on mobile */
        object-fit: cover;
    }
    .action-container {
        flex-direction: column;
        gap: 8px;
    }
    .action-container .status-badge,
    .action-container .btn-share,
    .action-container .btn-download {
        width: 100%;
        text-align: center;
    }
}