/* =====================================================
   COMPONENTS.CSS - ABRITEC
   Componentes reutilizáveis e sistemas modulares
   ===================================================== */

/* =====================================================
   SEÇÕES E CONTAINERS
   ===================================================== */

.section {
    padding: 5rem 0;
}

.section-alt {
    padding: 4rem 0;
}

.section-small {
    padding: 3rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =====================================================
   TÍTULOS DE SEÇÃO
   ===================================================== */

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-title h3 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-title.left {
    text-align: left;
}

.section-title.left h2,
.section-title.left h3,
.section-title.left p {
    margin-left: 0;
}

/* =====================================================
   SISTEMA DE GRID
   ===================================================== */

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Grid responsivo específico */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* =====================================================
   CARDS DO SISTEMA
   ===================================================== */

.card {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem 2rem 0;
}

.card-body {
    padding: 1.5rem 2rem;
}

.card-footer {
    padding: 0 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
    padding-top: 1.5rem;
}

/* Card de serviço específico */
.service-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
}

/* =====================================================
   BOTÕES E AÇÕES
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* =====================================================
   BADGES E TAGS
   ===================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1;
}

.badge-primary {
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

.badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary-color);
}

/* =====================================================
   ALERTS E MENSAGENS
   ===================================================== */

.alert {
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid;
    position: relative;
}

.alert h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.alert p {
    margin: 0;
    line-height: 1.5;
}

.alert ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-left-color: var(--accent-color);
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-left-color: var(--secondary-color);
    color: #1e40af;
}

/* =====================================================
   LISTAS ESTILIZADAS
   ===================================================== */

.list-styled {
    list-style: none;
    padding: 0;
}

.list-styled li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.list-styled li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.list-checkmark li::before {
    content: '✓';
    color: var(--success-color);
}

.list-arrow li::before {
    content: '→';
    color: var(--primary-color);
}

.list-bullet li::before {
    content: '•';
    color: var(--accent-color);
}

/* =====================================================
   SEPARADORES E DIVISORES
   ===================================================== */

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

.divider-thick {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 3rem 0;
}

.divider-dashed {
    height: 1px;
    background: transparent;
    border-top: 1px dashed var(--border-color);
    margin: 2rem 0;
}

/* =====================================================
   LOADING E ESTADOS
   ===================================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.loading-large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-skeleton 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   ELEMENTOS DE DESTAQUE
   ===================================================== */

.highlight {
    background: linear-gradient(120deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.emphasis {
    color: var(--primary-color);
    font-weight: 600;
}

.muted {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* =====================================================
   ANIMAÇÕES DE COMPONENTES
   ===================================================== */

.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease forwards;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.6s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =====================================================
   UTILITÁRIOS DE COMPONENTES
   ===================================================== */

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }
.text-success { color: var(--success-color); }
.text-muted { color: var(--text-medium); }
.text-light { color: var(--text-light); }

.bg-primary { background: var(--primary-color); }
.bg-secondary { background: var(--bg-secondary); }
.bg-light { background: var(--bg-primary); }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-none { box-shadow: none; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }
.rounded-none { border-radius: 0; }

.border { border: 1px solid var(--border-color); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.border-none { border: none; }

/* =====================================================
   RESPONSIVIDADE DE COMPONENTES
   ===================================================== */

@media (max-width: 1024px) {
    .section {
        padding: 4rem 0;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .card-body {
        padding: 1rem 1.5rem;
    }
    
    .btn-large {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container,
    .container-narrow {
        padding: 0 0.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .alert {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* =====================================================
   ESTADOS ESPECIAIS
   ===================================================== */

.disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.invisible {
    visibility: hidden;
}

/* =====================================================
   ACESSIBILIDADE DE COMPONENTES
   ===================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .slide-up,
    .slide-in-left,
    .slide-in-right {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .service-card:hover .service-icon {
        transform: none;
    }
}

/* =====================================================
   FIM DO COMPONENTS.CSS
   ===================================================== */