/* ============================================
   VARIÁVEIS GLOBAIS & RESET
   ============================================ */

:root {
    /* Cores Principais */
    --primary: #4f98f2;
    --primary-dark: #082347;
    --primary-light: #4a6cf7;
    --secondary: #6c757d;
    --secondary-color: #4a6cf7;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --white: #ffffff;
    
    /* Tons de Cinza */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-800: #343a40;
    
    /* Efeitos Visuais */
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-light: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   ANIMAÇÕES & KEYFRAMES
   ============================================ */

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* ============================================
   FEEDBACK VISUAL & INTERAÇÕES
   ============================================ */

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4a6cf7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Botões com Estado */
.btn-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
}

.btn-error {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.click-feedback:active {
    transform: scale(0.98);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 25px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-left: 4px solid var(--primary-light);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

/* ============================================
   ESTRUTURA BASE & LAYOUT
   ============================================ */

.smooth-scroll {
    scroll-behavior: smooth;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container Principal */
.index-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .index-container {
        padding: 30px;
    }
}

/* Grid System */
.index-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.index-grid-layout {
    display: grid;
    gap: 25px;
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .index-grid {
        flex-direction: row;
        gap: 0;
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* Cards Base */
.index-card {
    background: var(--white);
    padding: 30px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.index-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    pointer-events: none;
    will-change: transform;
}

.index-card:hover::before {
    transform: translateX(100%);
}

.index-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .index-card {
        padding: 25px 20px;
    }
}

@media (min-width: 1024px) {
    .index-card {
        border-radius: var(--border-radius) 0 0 var(--border-radius);
        padding: 40px 35px;
    }
}

/* ============================================
   COMPONENTES DE INTERFACE
   ============================================ */

/* Botões */
.btn-index {
    padding: 16px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    margin: 5px;
}

.btn-index-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
}

.btn-index-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 47, 93, 0.25);
}

.btn-index-secondary {
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    color: var(--dark);
}

.btn-index-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-spacing {
    margin-right: 30px;
}

@media (max-width: 768px) {
    .btn-index {
        width: 100%;
        max-width: 300px;
        min-height: 44px;
    }
}

/* Hero Section */
.index-hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8faff 0%, #e8f2ff 100%);
    display: flex;
    align-items: center;
    padding: 20px;
}

.hero-section {
    position: relative;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 75vh;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(74, 108, 247, 0.3)),
                url('../../assets/images/header/banner-1.webp') no-repeat center center;
    background-size: cover;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.8) 0%, rgba(74, 108, 247, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 950px;
    padding: 40px 20px;
}

.hero-content h1 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--white);
    text-align: center;
}

.hero-content p {
    font-size: 1rem;
    margin-bottom: 25px;
    opacity: 0.95;
    color: var(--white);
    text-align: center;
}

.hero-cta {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 15px;
    padding: 18px 25px;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.3);
    text-align: center;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.hero-cta:hover::before {
    left: 100%;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(22, 89, 170, 0.45);
}

@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        background-position: top center;
        min-height: 60vh;
        padding: 30px 20px;
    }
    
    .hero-content {
        top: 0;
        padding: 30px 20px;
    }
    
    .hero-cta {
        display: block;
        width: 100%;
        max-width: 300px;
        margin-bottom: 15px;
    }
    
    .hero-cta + .hero-cta {
        margin-right: 0;
    }
}

@media (min-width: 768px) {
    .hero-section {
        background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(74, 108, 247, 0.3)),
                    url('../../assets/images/header/banner-1.webp') no-repeat center center;
        background-size: cover;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .hero-cta {
        display: inline-flex;
        width: auto;
        margin: 0 10px 15px;
    }
}

@media (min-width: 1024px) {
    .hero-section {
        background-attachment: fixed;
        min-height: 114vh;
    }
}

/* Step Cards */
.step-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}
.step-card {
    flex: 1 1 180px;
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-icon {
    color: #ff6600; /* cor chamativa */
    margin-bottom: 15px;
}

.step-card:hover .step-icon {
    transform: scale(1.1);
    color: var(--primary-light);
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-description {
    font-size: 0.95rem;
    color: #555;
}

@media (min-width: 481px) and (max-width: 768px) {
    .step-cards-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .step-card {
        max-width: 200px;
    }
}

@media (min-width: 768px) {
    .step-cards-container {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .step-card {
        max-width: 180px;
    }
}

/* Testimonials Carousel */
.testimonials-container {
    position: relative;
    overflow: hidden;
    padding: 20px 60px !important;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials-track {
    display: flex;
    gap: 25px;
    transition: transform 0.5s ease;
}

.testimonial-item {
    flex: 0 0 calc(33.333% - 17px);
    min-width: 0;
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-light);
    border: 1px solid #e0eafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: #0a2f5d;
    border: 2px solid #0a2f5d;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.carousel-arrow.left {
    left: 15px;
}

.carousel-arrow.right {
    right: 15px;
}

.carousel-arrow:hover:not(:disabled) {
    background: #0a2f5d;
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.speech-bubble {
    position: relative;
    background: var(--gray-100);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 35px;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.1);
    transition: all 0.3s ease;
}

.testimonial-item:hover .speech-bubble {
    background: var(--white);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.2);
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
    border: 3px solid var(--white);
    transition: all 0.3s ease;
}

.testimonial-item:hover .user-avatar {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.4);
}

@media (max-width: 768px) {
    .testimonials-container {
        padding: 20px 50px !important;
    }
    
    .testimonial-item {
        flex: 0 0 calc(100% - 20px) !important;
        min-width: 280px !important;
    }
    
    .carousel-arrow {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    
    .carousel-arrow.left {
        left: 5px !important;
    }
    
    .carousel-arrow.right {
        right: 5px !important;
    }
    
    .carousel-arrow.hidden {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .testimonials-container {
        padding: 20px 40px !important;
    }
    
    .testimonial-item {
        flex: 0 0 100% !important;
        min-width: 250px !important;
        padding: 20px !important;
    }
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.benefit-item:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.benefit-item:hover .benefit-icon {
    transform: scale(1.1);
    background: var(--primary-light);
}

.benefit-icon i {
    color: var(--white);
    font-size: 1.2rem;
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 30px 0;
    }
}

/* Feature Cards */
.feature-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 40px 0;
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    cursor: pointer;
}

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

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    color: var(--primary-light);
}

@media (max-width: 768px) {
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 30px 0;
    }
    
    .feature-card {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Brands Strip */
.brands-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 30px 0;
    background: var(--white);
    border-radius: var(--border-radius);
    margin: 40px 0;
}

.brand-logo {
    height: 40px;
    filter: grayscale(1) brightness(0.5);
    opacity: 0.6;
    transition: var(--transition);
    cursor: pointer;
    clip-path: circle(60% at center);
}

.brand-logo:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
    transform: scale(1.1);
}

.brand-logo.hover-lift:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

@media (max-width: 768px) {
    .brands-strip {
        gap: 20px;
        padding: 20px;
    }
    
    .brand-logo {
        height: 30px;
    }
}

/* ============================================
   COMPONENTES ESPECÍFICOS
   ============================================ */

/* Trust Badges */
.trust-badges-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-badge-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    color: var(--white);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .trust-badges-footer {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .trust-badge-item {
        flex: 0 1 auto;
    }
}

/* Mobile Banner */
.mobile-banner {
    background: linear-gradient(rgba(135, 115, 44, 0.9), rgba(119, 106, 28, 0.7)),
                url('assets/images/header/index.webp') no-repeat center center;
    background-size: cover;
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    margin: 30px 0;
    border-radius: 10px;
}

.mobile-banner h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.mobile-banner p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.banner-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px 20px;
    margin: 0 auto;
    max-width: 400px;
}

@media (min-width: 768px) {
    .mobile-banner {
        padding: 80px 40px;
    }
    
    .mobile-banner h2 {
        font-size: 2.5rem;
    }
}

/* Splide.js Carousel Customization */
.banner-full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 500px;
    overflow: hidden;
    position: relative;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    text-align: center;
    font-family: 'Poppins', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.splide__arrow {
    background: var(--primary);
    opacity: 0.8;
    width: 45px;
    height: 45px;
}

.splide__arrow:hover {
    background: var(--primary-dark);
    opacity: 1;
}

.splide__arrow svg {
    fill: var(--white);
}

.splide__pagination__page {
    background: var(--gray-300);
    width: 12px;
    height: 12px;
    margin: 0 5px;
}

.splide__pagination__page.is-active {
    background: var(--primary-light);
    transform: scale(1.2);
}

.splide__slide {
    height: auto;
}

.splide__slide .feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--gray-200);
}

.splide__slide:hover .feature-card {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.splide__track {
    padding-top: 10px;
    padding-bottom: 10px;
    margin: -10px 0;
}

.splide__slide .feature-card h3 {
    flex-grow: 1;
    min-height: 48px;
}

/* ============================================
   CLASSES UTILITÁRIAS
   ============================================ */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

/* Otimizações para Touch Devices */
@media (max-width: 768px) {
    .btn-index, 
    .step-card,
    .feature-card {
        min-height: 44px;
    }
}