/* Custom styles for CreditoFi */

:root {
    --primary-color: #2d6a4f; /* Verde institucional */
    --primary-light: #a3d977; /* Verde claro */
    --primary-dark: #1b4332;  /* Verde oscuro */
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #198754;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #444;
    overflow-x: hidden;
}

/* Navbar (Encabezado) */
.navbar {
    transition: all 0.3s ease;
    padding: 10px 0;
    background-color: var(--primary-dark) !important;
}

.navbar .navbar-brand, 
.navbar .nav-link {
    color: var(--white) !important;
}

.navbar .navbar-brand img.logo-img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.navbar .navbar-brand img.logo-img:hover {
    transform: scale(1.05);
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0 15px !important;
    opacity: 0.9;
}

.navbar .nav-link:hover {
    opacity: 1;
    color: var(--primary-light) !important;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.1);
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Hero Slider & Carousel */
.hero-slider {
    overflow: hidden;
    position: relative;
}

.hero-slider .carousel-item {
    min-height: 100vh;
}

.carousel-fade .carousel-item {
    transition-duration: 0.8s;
}

.bg-slide-2 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.bg-slide-3 {
    background: linear-gradient(135deg, #1b4332 0%, #081c15 100%) !important;
}

/* Custom Carousel Controls */
.carousel-control-prev, .carousel-control-next {
    width: 5%;
    z-index: 10;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: var(--white);
    opacity: 0.5;
}

.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}

/* Animations for Carousel Content */
.carousel-item.active h1 {
    animation: fadeInUp 0.8s ease forwards;
}

.carousel-item.active p {
    animation: fadeInUp 1.0s ease forwards;
}

.carousel-item.active .d-flex {
    animation: fadeInUp 1.2s ease forwards;
}

.hero-img-anim {
    animation: float 6s ease-in-out infinite;
}

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Hero Section (Fondo Principal) */
.hero-section {
    position: relative;
    min-height: 100vh;
    padding-top: 120px;
    background: var(--primary-light);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    color: var(--white);
    z-index: 1;
}

/* Formas diagonales de fondo */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, rgba(255,255,255,0.1) 50%, transparent 50%);
    z-index: -1;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 40%);
    z-index: -1;
}

.hero-section h1 span {
    color: var(--white) !important;
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
}

/* Secciones con fondo blanco */
section {
    background-color: var(--white);
}

.bg-light {
    background-color: var(--light-color) !important;
}

/* Botones con verde institucional */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-primary:hover {
    background-color: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
}

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

.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
}

.bg-primary-light { background-color: rgba(45, 106, 79, 0.1); }
.text-primary { color: var(--primary-color) !important; }

/* Simulator Section */
#simulador {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%) !important;
}

.result-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: #fff;
}

/* Icon Box Small */
.icon-box-small {
    width: 40px;
    height: 40px;
    background: rgba(45, 106, 79, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Forms */
.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: #111 !important;
}

/* Testimonial Carousel Controls */
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    background-size: 50%;
}

#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: 5%;
}

@media (max-width: 768px) {
    #testimonialCarousel .row > div {
        margin-bottom: 20px;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .hero-section {
        text-align: center;
        padding-top: 150px;
        min-height: auto;
        padding-bottom: 80px;
    }
    .hero-section .d-flex {
        justify-content: center;
    }
}
