/* ========================================
   Paleta de Cores - Bandeira da Bolívia
   ======================================== */
:root {
    /* Cores da bandeira boliviana */
    --cor-vermelho: #D52B1E;
    --cor-amarelo: #FFD700;
    --cor-verde: #007A33;
    
    /* Variações */
    --vermelho-hover: #B82419;
    --amarelo-hover: #E6C200;
    --verde-hover: #005A25;
    
    /* Gradientes */
    --gradient-hero: linear-gradient(135deg, var(--cor-vermelho) 0%, var(--cor-amarelo) 50%, var(--cor-verde) 100%);
    --gradient-overlay: linear-gradient(to right, rgba(213, 43, 30, 0.9), rgba(0, 122, 51, 0.9));
}

/* ========================================
   Reset e Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

p, .text-muted, .card-text {
    font-size: 1.2rem;
}

.lead {
    font-size: 1.44rem !important;
}

.small, small {
    font-size: 1rem;
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   Bootstrap Overrides
   ======================================== */
.btn-primary {
    background-color: var(--cor-vermelho);
    border-color: var(--cor-vermelho);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--vermelho-hover);
    border-color: var(--vermelho-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(213, 43, 30, 0.3);
}

.btn-outline-primary {
    color: var(--cor-vermelho);
    border-color: var(--cor-vermelho);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--cor-vermelho);
    border-color: var(--cor-vermelho);
    transform: translateY(-2px);
}

.text-primary {
    color: var(--cor-vermelho) !important;
}

.bg-primary {
    background-color: var(--cor-vermelho) !important;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    color: var(--cor-vermelho) !important;
    font-size: 1.2rem;
}

.nav-link {
    font-weight: 500;
    color: #333 !important;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-hero);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--cor-vermelho) !important;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    background: 
        linear-gradient(135deg, rgba(213, 43, 30, 0.05) 0%, rgba(255, 215, 0, 0.05) 50%, rgba(0, 122, 51, 0.05) 100%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(213, 43, 30, 0.02) 10px, rgba(213, 43, 30, 0.02) 20px),
        #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 122, 51, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

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

.hero-section h1 {
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    animation: fadeInUp 1.2s ease;
}

.hero-section .btn {
    animation: fadeInUp 1.4s ease;
}

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

/* ========================================
   Cards de Serviços
   ======================================== */
.service-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .card-img-top {
    transform: scale(1.05);
}

/* ========================================
   Accordion (FAQ)
   ======================================== */
.accordion-button:not(.collapsed) {
    background-color: var(--cor-verde);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 122, 51, 0.25);
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

/* ========================================
   Formulário de Contato
   ======================================== */
.form-control:focus {
    border-color: var(--cor-verde);
    box-shadow: 0 0 0 0.25rem rgba(0, 122, 51, 0.25);
}

.form-label {
    font-weight: 600;
    color: #555;
}

/* ========================================
   Seções Alternadas
   ======================================== */
section:nth-child(even) {
    /* background-color: #f8f9fa; */
}

/* Destaque com cores bolivianas */
.bg-light {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%) !important;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

footer a:hover {
    color: var(--cor-amarelo) !important;
    transition: color 0.3s ease;
}

/* ========================================
   Utilidades
   ======================================== */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

/* Bordas arredondadas */
.rounded-4 {
    border-radius: 1rem !important;
}

/* ========================================
   Animações de Scroll
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb-item a {
    color: var(--cor-verde);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--verde-hover);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ========================================
   Alertas
   ======================================== */
.alert-info {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: var(--cor-amarelo);
    color: #856404;
}

.alert-success {
    background-color: rgba(0, 122, 51, 0.1);
    border-color: var(--cor-verde);
}

.alert-danger {
    background-color: rgba(213, 43, 30, 0.1);
    border-color: var(--cor-vermelho);
}

/* ========================================
   Responsividade
   ======================================== */
@media (max-width: 991px) {
    .hero-carousel-fullwidth {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-carousel-fullwidth .carousel-item img {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-mobile-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-badge-fullwidth {
        bottom: 80px;
        right: 20px;
        padding: 1rem 1.2rem;
    }
    
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
}

@media (max-width: 767px) {
    .hero-mobile {
        min-height: 100vh;
    }
    
    .hero-mobile img {
        height: 100vh;
    }
    
    .hero-mobile-content h1 {
        font-size: 2rem;
    }
    
    .hero-mobile-content .lead {
        font-size: 1.1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

/* ========================================
   Estados de Loading
   ======================================== */
.btn.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* ========================================
   Hero Carousel Full Width - Texto Fixo
   ======================================== */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero-carousel-fullwidth {
    position: relative;
    height: 100vh;
    min-height: 600px;
}

.hero-carousel-fullwidth .carousel-inner {
    height: 100%;
    position: relative;
}

.hero-carousel-fullwidth .carousel-item {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.hero-carousel-fullwidth.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
}

.hero-carousel-fullwidth.carousel-fade .carousel-item.active,
.hero-carousel-fullwidth.carousel-fade .carousel-item-next.carousel-item-start,
.hero-carousel-fullwidth.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
    transition: opacity 2.5s ease-in-out;
}

.hero-carousel-fullwidth.carousel-fade .carousel-item-next:not(.carousel-item-start),
.hero-carousel-fullwidth.carousel-fade .carousel-item-prev:not(.carousel-item-end) {
    opacity: 0;
}

.hero-carousel-fullwidth .carousel-item img {
    height: 100vh;
    min-height: 600px;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(213, 43, 30, 0.7) 0%,
        rgba(0, 122, 51, 0.6) 100%
    );
    z-index: 1;
}

/* Conteúdo FIXO sobre carousel */
.hero-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.hero-content * {
    pointer-events: auto;
}

.hero-content h1 {
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1s ease;
}

.hero-content .lead {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1.2s ease;
}

.hero-content .btn {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1.4s ease;
}

/* Controles */
.hero-carousel-fullwidth .carousel-control-prev,
.hero-carousel-fullwidth .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(213, 43, 30, 0.8);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 11;
}

.hero-carousel-fullwidth:hover .carousel-control-prev,
.hero-carousel-fullwidth:hover .carousel-control-next {
    opacity: 1;
}

.hero-carousel-fullwidth .carousel-control-prev {
    left: 30px;
}

.hero-carousel-fullwidth .carousel-control-next {
    right: 30px;
}

/* Indicadores */
.hero-carousel-fullwidth .carousel-indicators {
    bottom: 30px;
    z-index: 11;
}

.hero-carousel-fullwidth .carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255, 215, 0, 0.5);
    border: 2px solid #fff;
    opacity: 1;
}

.hero-carousel-fullwidth .carousel-indicators button.active {
    background-color: var(--cor-vermelho);
    transform: scale(1.2);
}

/* Badge FIXO */
.hero-badge-fullwidth {
    position: absolute;
    bottom: 100px;
    right: 50px;
    background: linear-gradient(135deg, var(--cor-verde) 0%, var(--verde-hover) 100%);
    padding: 1.5rem 2rem;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 122, 51, 0.5);
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
}

/* Mobile Hero */
.hero-mobile {
    position: relative;
    min-height: 100vh;
}

.hero-mobile img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center;
}

.hero-mobile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(213, 43, 30, 0.75) 0%,
        rgba(0, 122, 51, 0.65) 100%
    );
}

.hero-mobile-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 2rem 1rem;
}

.hero-mobile-content h1 {
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9);
}

.hero-mobile-content .lead {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

@media (max-width: 991px) {
    .hero-carousel-fullwidth {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-carousel-fullwidth .carousel-item img {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-mobile-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-badge-fullwidth {
        bottom: 80px;
        right: 20px;
        padding: 1rem 1.2rem;
    }
}

@media (max-width: 767px) {
    .hero-mobile {
        min-height: 100vh;
    }
    
    .hero-mobile img {
        height: 100vh;
    }
    
    .hero-mobile-content h1 {
        font-size: 2rem;
    }
    
    .hero-mobile-content .lead {
        font-size: 1.1rem;
    }
}

/* ========================================
   Botão Flutuante WhatsApp
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: #25D366;
    color: white;
    border-radius: 50px;
    padding: 12px 20px 12px 12px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    overflow: hidden;
    max-width: 60px;
}

.whatsapp-float:hover {
    background: #128C7E;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
    max-width: 280px;
}

.whatsapp-float-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.whatsapp-float-text {
    white-space: nowrap;
    margin-left: 10px;
    opacity: 0;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.whatsapp-float:hover .whatsapp-float-text {
    opacity: 1;
}

/* Animação de pulso */
@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

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

.whatsapp-float:hover {
    animation: none;
}

/* Responsivo */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px 10px 10px;
        max-width: 50px;
    }
    
    .whatsapp-float-icon {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .whatsapp-float:hover {
        max-width: 240px;
    }
    
    .whatsapp-float-text {
        font-size: 0.85rem;
        margin-left: 8px;
    }
}
