/* CIBSE Accredited CPDs Widget Styles */
.cibse-cpds-container {
    width: 100%;
    background: #ffffff;
    padding: 60px 40px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 60px;
}

.main-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2927E2;
    margin: 0 0 40px 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.description-text {
    max-width: 900px;
    margin: 0 auto;
}

.description-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2927e2;
    margin: 0 0 25px 0;
}

.description-text p:last-child {
    margin-bottom: 0;
}

/* CPD Cards Section */
.cpd-cards-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.navigation-arrow {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.navigation-arrow:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: #ffffff;
    transform: scale(1.1);
}

.navigation-arrow i {
    font-size: 20px;
    color: #6b7280;
    transition: color 0.3s ease;
}

.navigation-arrow:hover i {
    color: #ffffff;
}

.navigation-prev {
    order: 1;
}

.navigation-next {
    order: 3;
}

/* CPD Cards Container */
.cpd-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    flex: 1;
    order: 2;
    overflow: hidden;
}

/* Individual CPD Card */
.cpd-card {
    border-radius: 0px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
    visibility: visible;
    position: relative;
    overflow: hidden;
}

/* Cards WITHOUT background images - show default color */
.cpd-card:not(.has-background-image) {
    background-color: #E1EBEB !important;
}

/* Cards WITH background images */
.cpd-card.has-background-image {
    background-color: transparent !important;
}

.cpd-card.has-background-image .card-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.cpd-card .card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cpd-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cpd-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 25px 0;
    line-height: 1.4;
    flex-grow: 0;
    text-align: left;
}

.cpd-card-image {
    margin-bottom: 25px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpd-card-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    max-height: 200px;
}

.cpd-button {
    display: inline-block;
    background: #1e3a8a;
    color: #ffffff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 0px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid #1e3a8a;
    flex-grow: 0;
    margin-top: auto;
    width: fit-content;
}

.cpd-button:hover {
    background: #ffffff;
    color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.cpd-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.3);
}

/* Layout variations */
.cpd-card.layout-header-top .card-content {
    /* Default layout - title, image, button */
}

.cpd-card.layout-image-top .card-content {
    /* Image first, then title, then button */
}

.cpd-card.layout-image-top .cpd-card-image {
    order: -1;
    margin-bottom: 20px;
}

.cpd-card.layout-image-top .cpd-card-title {
    margin-bottom: 20px;
}

/* Individual card styling support */
.cpd-card[data-card="1"] .cpd-card-title,
.cpd-card[data-card="2"] .cpd-card-title,
.cpd-card[data-card="3"] .cpd-card-title,
.cpd-card[data-card="4"] .cpd-card-title,
.cpd-card[data-card="5"] .cpd-card-title,
.cpd-card[data-card="6"] .cpd-card-title,
.cpd-card[data-card="7"] .cpd-card-title,
.cpd-card[data-card="8"] .cpd-card-title,
.cpd-card[data-card="9"] .cpd-card-title,
.cpd-card[data-card="10"] .cpd-card-title {
    /* Individual title colors will be applied via Elementor controls */
}

.cpd-card[data-card="1"] .cpd-button,
.cpd-card[data-card="2"] .cpd-button,
.cpd-card[data-card="3"] .cpd-button,
.cpd-card[data-card="4"] .cpd-button,
.cpd-card[data-card="5"] .cpd-button,
.cpd-card[data-card="6"] .cpd-button,
.cpd-card[data-card="7"] .cpd-button,
.cpd-card[data-card="8"] .cpd-button,
.cpd-card[data-card="9"] .cpd-button,
.cpd-card[data-card="10"] .cpd-button {
    /* Individual button colors will be applied via Elementor controls */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cibse-cpds-container {
        padding: 50px 30px;
        max-width: 1000px;
    }
    
    .main-heading {
        font-size: 2.2rem;
        margin-bottom: 35px;
    }
    
    .description-text p {
        font-size: 1rem;
    }
    
    .cpd-cards-container {
        gap: 25px;
    }
    
    .cpd-card {
        padding: 25px;
    }
    
    .cpd-card-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .cibse-cpds-container {
        padding: 40px 20px;
    }
    
    .main-heading {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .header-section {
        margin-bottom: 50px;
    }
    
    .cpd-cards-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .navigation-arrow {
        width: 45px;
        height: 45px;
    }
    
    .navigation-arrow i {
        font-size: 18px;
    }
    
    .cpd-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
        order: 1;
    }
    
    .navigation-prev {
        order: 2;
        align-self: flex-start;
    }
    
    .navigation-next {
        order: 3;
        align-self: flex-end;
    }
    
    .cpd-card {
        padding: 20px;
    }
    
    .cpd-card-title {
        font-size: 1.1rem;
        margin-bottom: 18px;
    }
    
    .cpd-card-image {
        margin-bottom: 20px;
    }
    
    .cpd-button {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cibse-cpds-container {
        padding: 30px 15px;
    }
    
    .main-heading {
        font-size: 1.5rem;
        margin-bottom: 25px;
        letter-spacing: 0.5px;
    }
    
    .header-section {
        margin-bottom: 40px;
    }
    
    .description-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .navigation-arrow {
        width: 40px;
        height: 40px;
    }
    
    .navigation-arrow i {
        font-size: 16px;
    }
    
    .cpd-cards-container {
        gap: 15px;
    }
    
    .cpd-card {
        padding: 18px;
    }
    
    .cpd-card-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .cpd-card-image {
        margin-bottom: 18px;
    }
    
    .cpd-button {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}

/* Animation */
@keyframes cibseCPDsFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cibse-cpds-container {
    animation: cibseCPDsFadeIn 0.6s ease-out;
}

.cpd-card {
    animation: cibseCPDsFadeIn 0.4s ease-out;
}

.cpd-card:nth-child(1) {
    animation-delay: 0.1s;
}

.cpd-card:nth-child(2) {
    animation-delay: 0.2s;
}

.cpd-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Focus states for accessibility */
.navigation-arrow:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

.cpd-button:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cpd-card {
        border: 2px solid #000;
    }
    
    .navigation-arrow {
        border-width: 3px;
    }
    
    .main-heading,
    .cpd-card-title {
        text-shadow: 1px 1px 0 #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cibse-cpds-container,
    .cpd-card {
        animation: none;
    }
    
    .navigation-arrow,
    .cpd-button,
    .cpd-card {
        transition: none;
    }
    
    .cpd-card:hover {
        transform: none;
    }
    
    .cpd-button:hover {
        transform: none;
    }
} 