/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for sections */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.companies-section,
.how-it-works-section,
.benefits-section {
    animation: slideInUp 0.8s ease-out;
}

/* Improved focus states for accessibility */
.btn-hero-primary:focus,
.btn-hero-secondary:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.carousel-btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Better text contrast */
.hero-content h1,
.hero-content h2,
.hero-content p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Improved company logo hover */
.company-logo {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.company-logo:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.company-placeholder:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(42, 163, 121, 0.3);
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    margin-top: -64px;
    padding-top: 64px;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    animation: fadeInUp 1s ease-out;
}

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

.min-vh-100 {
    min-height: 100vh;
}

.btn-hero-primary {
    background-color: transparent;
    border: none;
    color: #BEFEE8;
    padding: 8px 24px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-hero-primary:hover {
    background-color: rgba(190, 254, 232, 0.1);
    color: #BEFEE8;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-hero-secondary {
    background-color: #02140C;
    border: 1px solid #02140C;
    color: #BEFEE8;
    padding: 8px 24px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-hero-secondary:hover {
    background-color: rgba(2, 20, 12, 0.9);
    color: #BEFEE8;
    transform: translateY(-2px);
    text-decoration: none;
}

.shadow-glow {
    box-shadow: 0 4px 15px rgba(42, 163, 121, 0.3);
}

/* Companies Carousel Styles */
.companies-section {
    background-color: #0a3023;
    overflow: hidden;
}

.companies-carousel {
    position: relative;
    padding: 0 70px;
    margin: 0 -20px;
    overflow: hidden;
}

/* Swiper Custom Styles */
.companies-swiper {
    padding: 0.5rem 0;
}

.companies-swiper .swiper-slide {
    width: 200px !important;
    height: auto;
    flex-shrink: 0;
    box-sizing: border-box;
}

.companies-swiper .swiper-slide .company-item {
    text-align: center;
    padding: 12px 16px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 96px;
    min-height: 96px;
    max-height: 96px;
    background-color: #10513b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
}

.companies-swiper .swiper-slide .company-item span {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    flex-shrink: 0;
}

/* Mobile: permitir múltiples líneas de texto y mantener proporción */
@media (max-width: 768px) {
    .companies-swiper .swiper-slide .company-item {
        min-height: 96px;
        height: auto;
        justify-content: flex-start;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .companies-swiper .swiper-slide .company-item span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
        font-size: 0.875rem;
    }
}

/* Swiper Navigation Buttons Customization */
.companies-swiper .swiper-button-next,
.companies-swiper .swiper-button-prev {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(190, 254, 232, 0.9);
    color: #0a3023;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.companies-swiper .swiper-button-next:after,
.companies-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.companies-swiper .swiper-button-next:hover,
.companies-swiper .swiper-button-prev:hover {
    background-color: rgba(190, 254, 232, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.companies-swiper .swiper-button-next:active,
.companies-swiper .swiper-button-prev:active {
    transform: scale(0.95);
}

.companies-swiper .swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Profile Image Container */
.profile-image-container {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.profile-image-container.size-medium {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

/* Mobile: mantener proporción imagen-texto */
@media (max-width: 768px) {
    .companies-swiper .swiper-slide .company-item .profile-image-container.size-medium {
        width: 50px;
        height: 50px;
        margin-bottom: 6px;
    }
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.company-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.company-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(190, 254, 232, 0.3);
}

.company-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #BEFEE8;
}

.company-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--jungle-light), var(--jungle-primary));
    color: white;
    font-size: 2rem;
    border-radius: 8px;
}

.company-name {
    font-weight: 600;
    color: #BEFEE8;
    margin: 0;
}

/* Carousel controls removed - using horizontal scroll instead */

/* How it works Section Styles */
.how-it-works-section {
    background-color: #02140C;
}

.how-it-works-section .row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) * .8);
    padding-left: calc(var(--bs-gutter-x) * .8);
    margin-top: var(--bs-gutter-y);
}

.how-card {
    height: 100%;
    background-color: #0A3325;
    border: none !important;
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

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

.hover-lift:hover {
    transform: translateY(-8px);
}

.how-icon {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.how-title {
    color: var(--card-foreground);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.how-description {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Benefits Section Styles */
.benefits-section {
    background-color: #0a3023;
    padding: 5rem 0;
}

.benefits-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.3s ease;
    flex-direction: row;
}

.benefit-item:hover {
    transform: translateX(10px);
}

.benefit-icon-container {
    width: 64px;
    height: 64px;
    background-color: rgba(42, 163, 121, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.benefit-item:hover .benefit-icon-container {
    background-color: rgba(42, 163, 121, 0.2);
}

.benefit-lucide-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    stroke-width: 1.5;
}

.benefit-text h4 {
    color: #BEFEE8;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.benefit-text p {
    color: #BEFEE8;
    margin: 0;
}

.benefits-image img {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
footer {
    background-color: #0a3023;
    border-top: 0.5px solid var(--border);
    color: #BEFEE8;
}

footer img {
    height: 24px;
    width: 24px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .benefits-section .row {
        flex-direction: column-reverse;
    }
    
    .benefits-image {
        margin-bottom: 2rem;
    }
    
    /* Carousel padding adjustment for tablets */
    .companies-carousel {
        padding: 0 60px;
    }
    
    .companies-swiper .swiper-button-next,
    .companies-swiper .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.25rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .companies-swiper .swiper-slide {
        width: 180px !important;
        flex-shrink: 0;
    }
    
    .companies-swiper .swiper-slide .company-item {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 96px;
        height: auto;
        padding: 10px 12px;
        justify-content: flex-start;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .companies-swiper .swiper-slide .company-item span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
        font-size: 0.875rem;
    }
    
    .profile-image-container.size-medium {
        width: 50px;
        height: 50px;
        margin-bottom: 6px;
    }
    
    .company-logo {
        height: 100px;
    }
    
    .company-logo img {
        max-height: 60px;
        max-width: 120px;
    }
    
    /* Carousel controls removed */
    
    .how-card {
        margin-bottom: 2rem;
    }
    
    .benefit-item {
        margin-bottom: 2rem;
    }
    
    .how-it-works-section .row {
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content h2 {
        font-size: 1.1rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .hero-buttons .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .companies-swiper .swiper-slide {
        width: 160px !important;
        flex-shrink: 0;
    }
    
    .companies-swiper .swiper-slide .company-item {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 96px;
        height: auto;
        padding: 10px 12px;
    }
    
    .companies-swiper .swiper-slide .company-item {
        justify-content: flex-start;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .companies-swiper .swiper-slide .company-item span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
        font-size: 0.875rem;
    }
    
    .profile-image-container.size-medium {
        width: 45px;
        height: 45px;
        margin-bottom: 6px;
    }
    
    .how-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .how-title {
        font-size: 1.1rem;
    }
    
    .how-description {
        font-size: 0.9rem;
    }
    
    .benefit-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .benefit-text h4 {
        font-size: 1.1rem;
    }
    
    .benefit-text p {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Carousel padding adjustment for mobile */
    .companies-carousel {
        padding: 0 50px;
    }
    
    .companies-swiper .swiper-button-next,
    .companies-swiper .swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    
    .companies-swiper .swiper-button-next:after,
    .companies-swiper .swiper-button-prev:after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 1rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .hero-buttons .btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .company-item {
        min-width: 100px;
        height: 96px;
        padding: 8px 10px;
    }
    
    .profile-image-container.size-medium {
        width: 40px;
        height: 40px;
    }
    
    .how-card {
        padding: 1.5rem 0.5rem;
    }
    
    .how-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .how-title {
        font-size: 1rem;
    }
    
    .how-description {
        font-size: 0.85rem;
    }
    
    .benefit-item {
        flex-direction: row;
        text-align: center;
        gap: 0.5rem;
    }
    
    .benefit-icon {
        margin: 0 auto;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Carousel padding adjustment for tiny screens */
    .companies-carousel {
        padding: 0 45px;
    }
    
    .companies-swiper .swiper-button-next,
    .companies-swiper .swiper-button-prev {
        width: 32px;
        height: 32px;
    }
    
    .companies-swiper .swiper-button-next:after,
    .companies-swiper .swiper-button-prev:after {
        font-size: 12px;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .companies-swiper .swiper-slide {
        width: 180px !important;
        flex-shrink: 0;
    }
    
    .companies-swiper .swiper-slide .company-item {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 96px;
        min-height: 96px;
        max-height: 96px;
    }
    
    .how-card {
        padding: 2rem 1.5rem;
    }
    
    .benefit-item {
        margin-bottom: 2.5rem;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.25rem;
    }
    
    .companies-swiper .swiper-slide {
        width: 200px !important;
        flex-shrink: 0;
    }
    
    .companies-swiper .swiper-slide .company-item {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 96px;
        min-height: 96px;
        max-height: 96px;
    }
    
    .how-card {
        padding: 3rem 2rem;
    }
    
    .how-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .how-title {
        font-size: 1.5rem;
    }
    
    .how-description {
        font-size: 1.1rem;
    }
    
    .benefit-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .benefit-text h4 {
        font-size: 1.3rem;
    }
    
    .benefit-text p {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 4rem;
    }
    
    .stat-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content h1 {
        font-size: 4.5rem;
    }
    
    .hero-content h2 {
        font-size: 2.25rem;
    }
    
    .companies-swiper .swiper-slide {
        width: 200px !important;
        flex-shrink: 0;
    }
    
    .companies-swiper .swiper-slide .company-item {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 96px;
        min-height: 96px;
        max-height: 96px;
    }
}

/* How it works Section Styles - RESPONSIVE */
.how-it-works-section .row {
    display: flex;
    flex-wrap: wrap;
}

/* Para desktop: 4 cards en una fila */
@media (min-width: 992px) {
    .how-it-works-section .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Para tablet: 2 cards por fila */
@media (min-width: 768px) and (max-width: 991px) {
    .how-it-works-section .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Para mobile: 1 card por fila (columna) */
@media (max-width: 767px) {
    .how-it-works-section .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Asegurar que las cards tengan la misma altura */
.how-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
