/* ===================================================================
   Components CSS - Colégio Batista Vida e Paz
   Description: Estilos para componentes específicos e reutilizáveis
=================================================================== */

/* ===================================================================
   LOADING SPINNER
=================================================================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================================================
   CUSTOM BUTTONS
=================================================================== */
.btn-whatsapp {
    background-color: var(--whatsapp-color);
    border-color: var(--whatsapp-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-whatsapp:hover {
    background-color: #1faa52;
    border-color: #1faa52;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-instagram {
    background: var(--instagram-gradient);
    border: none;
    color: white;
    box-shadow: var(--shadow);
}

.btn-instagram:hover {
    background: linear-gradient(45deg, #e08322 0%, #d5572b 25%, #cb1632 50%, #bb1255 75%, #ab0777 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-pix {
    background-color: #32bcad;
    border-color: #32bcad;
    color: white;
}

.btn-pix:hover {
    background-color: #2aa496;
    border-color: #2aa496;
    color: white;
    transform: translateY(-2px);
}

/* ===================================================================
   PROGRESS BAR
=================================================================== */
.custom-progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.custom-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: inherit;
    transition: width 0.6s ease;
    position: relative;
}

.custom-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* ===================================================================
   DONATION COUNTER
=================================================================== */
.donation-counter {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 2px solid var(--primary-color);
}

.donation-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-display);
}

.donation-goal {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.donation-percentage {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--success-color);
}

/* ===================================================================
   TESTIMONIALS
=================================================================== */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-color);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent-color);
    font-family: var(--font-display);
    line-height: 1;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.testimonial-info small {
    color: var(--secondary-color);
}

/* ===================================================================
   TIMELINE
=================================================================== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: white;
}

.timeline-marker {
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -10px;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ===================================================================
   STATS COUNTER
=================================================================== */
.stats-counter {
    text-align: center;
    padding: 2rem 1rem;
}

.stats-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-display);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 1rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ===================================================================
   FLOATING LABELS
=================================================================== */
.form-floating-custom {
    position: relative;
}

.form-floating-custom input,
.form-floating-custom textarea {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: transparent;
}

.form-floating-custom input:focus,
.form-floating-custom textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
    outline: none;
}

.form-floating-custom label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--secondary-color);
    transition: var(--transition);
    pointer-events: none;
    background: white;
    padding: 0 0.25rem;
}

.form-floating-custom input:focus + label,
.form-floating-custom input:not(:placeholder-shown) + label,
.form-floating-custom textarea:focus + label,
.form-floating-custom textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* ===================================================================
   ACCORDION CUSTOM
=================================================================== */
.accordion-custom .accordion-item {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-custom .accordion-header button {
    background: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    transition: var(--transition);
}

.accordion-custom .accordion-header button:hover {
    background: var(--light-color);
}

.accordion-custom .accordion-header button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.accordion-custom .accordion-body {
    padding: 1.5rem;
    background: #f8f9fa;
}

/* ===================================================================
   MODAL CUSTOM
=================================================================== */
.modal-custom .modal-dialog {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-custom .modal-header {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
    padding: 2rem;
}

.modal-custom .modal-header .btn-close {
    filter: invert(1);
}

.modal-custom .modal-body {
    padding: 2rem;
}

.modal-custom .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
}

/* ===================================================================
   BREADCRUMB CUSTOM
=================================================================== */
.breadcrumb-custom {
    background: none;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.breadcrumb-custom .breadcrumb-item {
    color: var(--secondary-color);
}

.breadcrumb-custom .breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: var(--secondary-color);
    margin: 0 0.5rem;
}

/* ===================================================================
   RESPONSIVE TIMELINE
=================================================================== */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100% !important;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 0 !important;
    }
    
    .timeline-content::before {
        left: -20px !important;
        border-right-color: white !important;
        border-left-color: transparent !important;
    }
    
    .timeline-marker {
        left: -10px !important;
        right: auto !important;
    }
}

/* ===================================================================
   ACCESSIBILITY ENHANCEMENTS
=================================================================== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    transition: var(--transition);
}

.skip-link:focus {
    top: 0;
}

/* Focus indicators */
.focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-outline-light {
        border-color: #ffffff;
        color: #ffffff;
    }
    
    .testimonial-card {
        border: 2px solid #000000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .custom-progress-bar::after {
        animation: none;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: var(--primary-color);
    }
}