/* Variáveis de cores e design system */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;

    /* Gradientes modernos */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a5f 0%, #0d6efd 50%, #4dabf7 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    /* Gradientes para page headers */
    --gradient-header-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-header-info: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-header-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-header-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-header-secondary: linear-gradient(135deg, #64748b 0%, #475569 100%);

    /* Sombras suaves */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);

    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
}

/* ===== BASE STYLES ===== */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f5f7fa;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===== UTILITY CLASSES ===== */

/* Hover effects */
.shadow-hover {
    transition: box-shadow 0.3s ease-in-out;
}

.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Font sizes */
.fs-hero {
    font-size: 15rem;
}

/* Resize utilities */
.resize-none {
    resize: none;
}

/* Object position */
.object-top {
    object-position: top;
}

/* Error pages */
.error-code {
    font-size: 10rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.error-container {
    padding: 60px 15px;
}

.error-traceback {
    max-height: 400px;
}

/* Theme selection cards */
.tema-card-btn {
    transition: all 0.3s;
    outline: 1px solid var(--secondary-color);
    outline-offset: -1px;
}

.tema-card-btn:hover:not(.tema-selected) {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tema-card-btn.tema-selected {
    outline: 6px solid var(--primary-color);
}

/* Preview image size */
.preview-120 {
    width: 120px;
    height: 120px;
    overflow: hidden;
}

/* Text truncation utilities */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 4.5em; /* 3 lines * 1.5 line-height */
}

/* ===== BTN-GROUP RESPONSIVO ===== */
/* Vertical por padrão, horizontal em telas >= sm (576px) */

.btn-group-responsive {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.btn-group-responsive > .btn,
.btn-group-responsive > .btn-check + .btn {
    border-radius: 0;
}

.btn-group-responsive > .btn:first-of-type,
.btn-group-responsive > .btn-check:first-of-type + .btn {
    border-top-left-radius: var(--bs-btn-border-radius);
    border-top-right-radius: var(--bs-btn-border-radius);
}

.btn-group-responsive > .btn:last-of-type,
.btn-group-responsive > .btn-check:last-of-type + .btn {
    border-bottom-left-radius: var(--bs-btn-border-radius);
    border-bottom-right-radius: var(--bs-btn-border-radius);
}

@media (min-width: 576px) {
    .btn-group-responsive {
        flex-direction: row;
    }

    .btn-group-responsive > .btn,
    .btn-group-responsive > .btn-check + .btn {
        border-radius: 0;
        flex: 1;
    }

    .btn-group-responsive > .btn:first-of-type,
    .btn-group-responsive > .btn-check:first-of-type + .btn {
        border-top-left-radius: var(--bs-btn-border-radius);
        border-bottom-left-radius: var(--bs-btn-border-radius);
        border-top-right-radius: 0;
    }

    .btn-group-responsive > .btn:last-of-type,
    .btn-group-responsive > .btn-check:last-of-type + .btn {
        border-top-right-radius: var(--bs-btn-border-radius);
        border-bottom-right-radius: var(--bs-btn-border-radius);
        border-bottom-left-radius: 0;
    }
}

/* ===== HERO SECTION STYLES ===== */
.hero-gradient {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* ===== CARD STYLES ===== */
.card-modern {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    overflow: hidden;
}

.card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== FEATURE CARDS ===== */
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* ===== STEP INDICATOR ===== */
.step-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.step-circle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid currentColor;
    opacity: 0.2;
    transform: scale(1.2);
}

.step-card:hover .step-circle {
    transform: scale(1.1);
}

/* ===== STAT CARDS ===== */
.stat-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: white;
    text-align: center;
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* ===== TEAM MEMBER CARDS ===== */
.team-card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.team-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.team-card .card-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    opacity: 0;
    transition: var(--transition-normal);
}

.team-card:hover .card-img-wrapper::after {
    opacity: 1;
}

/* ===== JOB CARDS ===== */
.job-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border-left: 4px solid transparent;
}

.job-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-left-color: var(--primary-color);
}

.job-card .badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

.floating-delay-1 {
    animation-delay: 0.5s;
}

.floating-delay-2 {
    animation-delay: 1s;
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== GRADIENT TEXT ===== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SECTION DIVIDERS ===== */
.section-divider {
    position: relative;
    padding: 3rem 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ===== CTA SECTION ===== */
.cta-gradient {
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.cta-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

/* ===== BUTTONS ===== */
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    transition: var(--transition-normal);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ===== FAQ ACCORDION ===== */
.accordion-modern .accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-modern .accordion-button {
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    background: white;
}

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

.accordion-modern .accordion-button:focus {
    box-shadow: none;
}

.accordion-modern .accordion-body {
    padding: 1.5rem;
    background: white;
}

/* ===== NAVBAR IMPROVEMENTS ===== */
.navbar-modern {
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.navbar-modern.scrolled {
    box-shadow: var(--shadow-md);
}

/* ===== FOOTER ===== */
.footer-modern {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

/* ===== FORM STYLES ===== */
.form-modern .form-control,
.form-modern .form-select {
    border-radius: var(--radius-sm);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.form-modern .form-control:focus,
.form-modern .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* ===== LOGIN/REGISTER CARDS ===== */
.auth-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-card .card-body {
    padding: 2.5rem;
}

/* ===== PAGE HEADER SECTION ===== */
.page-header {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.page-header h1,
.page-header h2,
.page-header p {
    position: relative;
    z-index: 1;
}

.page-header .btn,
.page-header .text-end {
    position: relative;
    z-index: 2;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
    z-index: 0;
}

.page-header.header-info {
    background: var(--gradient-header-info);
}

.page-header.header-success {
    background: var(--gradient-header-success);
}

.page-header.header-warning {
    background: var(--gradient-header-warning);
}

.page-header.header-danger {
    background: var(--gradient-header-danger);
}

.page-header.header-secondary {
    background: var(--gradient-header-secondary);
}

/* ===== DASHBOARD CARDS IMPROVEMENTS ===== */
.card-modern {
    transition: all var(--transition-normal);
}

.card-modern:hover {
    border-color: transparent !important;
}

.card-modern .feature-icon {
    transition: var(--transition-normal);
}

.card-modern:hover .feature-icon {
    transform: translateY(-4px);
}

/* Badge improvements */
.badge {
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-subtle {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* Card border variants */
.border-start {
    border-left: 0.25rem solid;
}

.border-5 {
    border-width: 0.5rem !important;
}

/* ===== NAVBAR IMPROVEMENTS FOR PRIVATE AREA ===== */
.navbar-modern {
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.navbar-modern.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-modern .navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===== FOOTER IMPROVEMENTS ===== */
.footer-modern {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    transition: var(--transition-normal);
}

.footer-modern hr {
    opacity: 0.3;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 767.98px) {
    .hero-gradient {
        padding: 2rem !important;
    }

    .stat-number {
        font-size: 2rem;
    }

    .step-circle {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

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

    .card-modern .feature-icon {
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
    }
}
