/* ============================================================
   Accordion Tabs Widget for Elementor — Styles
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.atw-wrapper {
    font-family: inherit;
    box-sizing: border-box;
}
.atw-wrapper *,
.atw-wrapper *::before,
.atw-wrapper *::after {
    box-sizing: border-box;
}

/* ============================================================
   MODO PESTAÑAS (TABS)
   ============================================================ */
.atw-mode-tabs .atw-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

.atw-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    position: relative;
    bottom: -2px;
    outline: none;
    line-height: 1.4;
}

.atw-tab-btn:hover {
    background: #e6e6e6;
    color: #222;
}

.atw-tab-btn.atw-active {
    background: #fff;
    color: #0073aa;
    border-color: #e0e0e0;
    border-bottom-color: #fff;
    z-index: 1;
}

/* Panels */
.atw-tabs-content {
    border: 1px solid #e0e0e0;
    border-top: none;
    background: #fff;
}

.atw-tab-panel {
    display: none;
    padding: 24px;
    animation: atw-fade-in 0.25s ease;
}

.atw-tab-panel.atw-active {
    display: block;
}

/* ============================================================
   MODO ACORDEÓN
   ============================================================ */
.atw-accordion {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.atw-accordion-item {
    border-bottom: 1px solid #e0e0e0;
}
.atw-accordion-item:last-child {
    border-bottom: none;
}

.atw-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    background: #f7f7f7;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: left;
    transition: background 0.2s, color 0.2s;
    outline: none;
}

.atw-accordion-header:hover {
    background: #eaeaea;
}

.atw-accordion-header.atw-active {
    background: #fff;
    color: #0073aa;
    border-bottom: 1px solid #e0e0e0;
}

.atw-accordion-title {
    flex: 1;
}

.atw-accordion-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    color: #888;
}

.atw-accordion-header.atw-active .atw-accordion-icon {
    transform: rotate(180deg);
    color: #0073aa;
}

.atw-accordion-body {
    overflow: hidden;
    background: #fff;
}

.atw-accordion-inner {
    padding: 20px 24px;
}

/* ============================================================
   TARJETAS DE CURSOS
   ============================================================ */
.atw-courses-grid {
    display: grid;
    gap: 20px;
}

.atw-cols-1 { grid-template-columns: 1fr; }
.atw-cols-2 { grid-template-columns: repeat(2, 1fr); }
.atw-cols-3 { grid-template-columns: repeat(3, 1fr); }
.atw-cols-4 { grid-template-columns: repeat(4, 1fr); }

.atw-course-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f0f0f0;
}

.atw-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 22px rgba(0,0,0,.13);
    text-decoration: none;
    color: inherit;
}

.atw-course-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    overflow: hidden;
    background: #eee;
}

.atw-course-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.atw-course-card:hover .atw-course-thumb img {
    transform: scale(1.05);
}

.atw-course-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #0073aa;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.atw-course-info {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atw-course-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
}

.atw-course-desc {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes atw-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .atw-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .atw-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .atw-tabs-nav {
        gap: 2px;
    }
    .atw-tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    .atw-cols-2,
    .atw-cols-3,
    .atw-cols-4 {
        grid-template-columns: 1fr;
    }
    .atw-tab-panel {
        padding: 16px;
    }
    .atw-accordion-inner {
        padding: 16px;
    }
}
