/* ============================================
   SOS Minas Gerais - Custom Styles
   ============================================ */

:root {
    --primary-color: #dc3545;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --success-color: #198754;
    --warning-color: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(220, 53, 69, 0.5) 100%);
    z-index: 2;
}

.hero-title {
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -1px;
}

.hero-subtitle {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   Progress Section
   ============================================ */

.progress-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.progress-bar {
    background: linear-gradient(90deg, #dc3545 0%, #ff6b6b 100%);
    transition: width 0.5s ease;
}

/* ============================================
   Cards
   ============================================ */

.card {
    transition: all 0.3s ease;
    border-radius: 15px;
}

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

/* ============================================
   Gallery
   ============================================ */

.gallery-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.3);
}

.btn-outline-danger {
    border-width: 2px;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-light {
    background-color: #fff;
    color: #dc3545;
    font-weight: 600;
}

.btn-light:hover {
    background-color: #f8f9fa;
    color: #c82333;
}

/* ============================================
   Form Elements
   ============================================ */

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    font-weight: 600;
}

/* ============================================
   Donation Section
   ============================================ */

.amount-btn {
    border-radius: 12px;
    font-size: 1.1rem;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.amount-btn.active {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.amount-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
}

#qrCodeContainer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
}

#qrCodeContainer canvas {
    max-width: 100%;
    height: auto;
}

/* ============================================
   News Section
   ============================================ */

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background: white;
    border-left: 5px solid #dc3545;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: slideInLeft 0.5s ease-out forwards;
}

.news-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.news-item.new {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
}

.news-timestamp {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-source {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 10px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================
   Accordion
   ============================================ */

.accordion-button {
    border-radius: 10px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: #fff5f5;
    border-color: #dc3545;
    color: #dc3545;
}

.accordion-button:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.accordion-body {
    background-color: #fff;
    border-radius: 0 0 10px 10px;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* ============================================
   Footer
   ============================================ */

footer {
    background: linear-gradient(135deg, #212529 0%, #1a1e23 100%);
    margin-top: 50px;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #dc3545 !important;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .gallery-item {
        height: 200px;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .sticky-top {
        position: relative !important;
        top: auto !important;
    }

    .amount-btn {
        font-size: 1rem;
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .display-4 {
        font-size: 1.75rem;
    }

    .fs-5 {
        font-size: 0.95rem !important;
    }

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

    .btn {
        font-size: 0.9rem;
    }
}

/* ============================================
   Utilities
   ============================================ */

.z-3 {
    z-index: 3;
}

.opacity-50 {
    opacity: 0.5;
}

.text-danger {
    color: #dc3545 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.shadow-lg {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.rounded-3 {
    border-radius: 15px !important;
}

/* ============================================
   Loading Animation
   ============================================ */

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.spinner-border-sm {
    width: 1.5rem;
    height: 1.5rem;
}

/* ============================================
   Alert Styles
   ============================================ */

.alert {
    border-radius: 10px;
    border: none;
    animation: slideInLeft 0.5s ease-out;
}

.alert-info {
    background-color: #cfe2ff;
    color: #084298;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* ============================================
   Badge Styles
   ============================================ */

.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-success {
    background-color: #198754;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-info {
    background-color: #0dcaf0;
}


/* ============================================
   QR Code Display - Professional Styling (2026)
   ============================================ */

.qr-code-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2rem 1rem;
    animation: fadeIn 0.5s ease-out;
}

.qr-code-image {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.qr-code-image:hover {
    filter: brightness(1.05);
}

/* Enhanced button styling for QR Code section */
.qr-code-wrapper .btn-danger {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.qr-code-wrapper .btn-danger:hover {
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.35);
}

.qr-code-wrapper .btn-danger:active {
    transform: translateY(1px);
}

/* Responsive QR Code sizing */
@media (max-width: 768px) {
    .qr-code-wrapper {
        padding: 1.5rem 0.75rem;
    }
    
    .qr-code-image {
        width: 240px !important;
        height: 240px !important;
    }
}

@media (max-width: 576px) {
    .qr-code-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .qr-code-image {
        width: 200px !important;
        height: 200px !important;
    }
    
    .qr-code-wrapper .btn-danger {
        font-size: 0.95rem;
        padding: 0.65rem 1.25rem;
    }
}
