/* Carruseles Dinámicos Styles */

:root {
    --cd-primary-color: #ff6600;
    /* Based on the image orange */
    --cd-bg-dark: #2c3e50;
    /* Based on the logo background */
    --cd-text-color: #333;
    --cd-font-family: 'Inter', sans-serif;
}

.cd-container {
    font-family: var(--cd-font-family);
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

/* 1. Header */
.cd-header {
    height: 80px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-right: 40px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.cd-title {
    font-size: 60px;
    font-weight: 900;
    color: var(--cd-bg-dark);
    margin: 0;
    text-transform: uppercase;
    line-height: 1;
}

.cd-title-underline {
    width: 180px;
    height: 12px;
    background: var(--cd-primary-color);
    border-radius: 10px;
    margin-top: 5px;
}

/* Layout Grid - 2x2 Structure */
.cd-content-grid {
    display: grid;
    grid-template-columns: 45% 55%;
    grid-template-rows: auto auto;
    gap: 20px;
    grid-template-areas:
        "portada cards"
        "logo carousel";
}

/* Style 2: Inverted Layout */
.cd-style-2 .cd-content-grid {
    grid-template-columns: 55% 45%;
    grid-template-areas:
        "cards portada"
        "carousel logo";
}

/* Grid Area Assignments */
.cd-portada {
    grid-area: portada;
}

.cd-logo {
    grid-area: logo;
}

.cd-bullet-cards {
    grid-area: cards;
}

.cd-infinite-carousel {
    grid-area: carousel;
}

/* Grid Item Styles */
.cd-portada {
    width: 100%;
    height: 300px;
    /* Slightly taller for better balance */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cd-portada img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-logo {
    width: 100%;
    height: 180px;
    /* Matched to carousel height */
    background: var(--cd-bg-dark);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.cd-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* Right Section Items - Adjusting padding for alignment */
.cd-bullet-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.cd-bullet-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    cursor: default;
}

.cd-bullet-card:hover {
    transform: translateX(10px) scale(1.02);
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.05) 0%, rgba(255, 153, 51, 0.1) 100%);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.1);
}

.cd-bullet-icon {
    width: 50px;
    height: 50px;
    background: var(--cd-primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.2);
}

.cd-bullet-card:hover .cd-bullet-icon {
    transform: rotate(5deg) scale(1.1);
    background: linear-gradient(135deg, #ff6600 0%, #ff9933 100%);
}

.cd-bullet-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.cd-bullet-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--cd-bg-dark);
    line-height: 1.2;
    transition: color 0.3s ease;
}

.cd-bullet-card:hover .cd-bullet-text {
    color: var(--cd-primary-color);
}

/* Infinite Carousel */
.cd-infinite-carousel {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: white;
    border-radius: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.cd-carousel-track {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
    align-items: center;
    height: 100%;
    padding: 10px 0;
}

.cd-carousel-item {
    width: 140px;
    height: 120px;
    margin: 0 15px;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cd-carousel-item:hover {
    transform: translateY(-10px) scale(1.15);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    z-index: 10;
}

.cd-carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.cd-carousel-item:hover::after {
    opacity: 1;
}

.cd-carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.cd-carousel-item:hover img {
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cd-content-grid {
        grid-template-columns: 100%;
    }

    .cd-header {
        align-items: center;
        padding-right: 0;
        height: auto;
    }

    .cd-title {
        font-size: 40px;
    }
}