:root {
    --eca-header-bg: #ffffff;
    --eca-header-text: #333333;
    --eca-content-bg: #f5f5f5;
    --eca-content-text: #333333;
    --eca-button-bg: #68705E;
    --eca-button-text: #ffffff;
    --eca-button-hover-bg: #4a4d42;
    --eca-subtitle-color: #666666;
    --eca-heading-font: Cormorant, serif;
    --eca-content-font: Nunito Sans, sans-serif;
    --eca-heading-font-size: inherit;
    --eca-content-font-size: inherit;
    --eca-border-radius: 20px;
    --eca-tab-overlap: 20px;
    --eca-transition-time: 0.3s;
    --eca-content-width: 800px;
    --eca-content-padding: clamp(1rem, 5vw, 3rem);
}

/* Remove focus outline */
a:focus,
button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove empty paragraphs */
.eca-tab-header p:empty,
.eca-tab-header br,
.eca-tab-content p:empty,
.eca-tab-content > br {
    display: none;
}

.eca-accordion {
    width: 100%;
    margin: 0 auto;
    position: relative;
    font-family: var(--eca-content-font);
}

/* Tab Structure */
.eca-tab {
    border-radius: 0 0 var(--eca-border-radius) var(--eca-border-radius) !important;
    overflow: visible;
    position: relative;
    transition: all var(--eca-transition-time) ease;
    background: #ffffff;
    margin-top: calc(var(--eca-tab-overlap) * -1px);
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    height: 160px;
}

.eca-tab:first-child {
    margin-top: 0;
}

.eca-tab.active {
    height: auto;
    margin-bottom: 0;
}

.eca-tab:hover,
.eca-tab.active {
    background: #f5f5f5;
}

.eca-tab-header {
    background: transparent;
}

/* Ensure border radius is maintained */
.eca-tab,
.eca-tab:hover,
.eca-tab.active,
.eca-tab:first-child,
.eca-tab:last-child {
    border-radius: 0 0 var(--eca-border-radius) var(--eca-border-radius) !important;
}

/* Tab Header */
.eca-tab-header {
    width: 100%;
    /*max-width: var(--eca-content-width);*/
    margin: 0 auto;
    padding: 0;
    border: none;
    text-align: left;
    transition: all var(--eca-transition-time) ease;
    position: relative;
    z-index: 2;
    background: var(--eca-header-bg);
    color: var(--eca-header-text);
    height: 160px;
}

.eca-header-content {
    height: 100%;
    padding: 2rem var(--eca-content-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eca-tab-header .eca-subtitle {
    display: block;
    font-size: 12px;
    font-weight: 300;
    text-transform: capitalize;
    letter-spacing: 0.12px;
    color: var(--eca-subtitle-color);
    font-family: var(--eca-content-font);
    margin: 0 0 0.25rem 0;
}

.eca-tab-header .eca-heading {
    display: block;
    font-size: var(--eca-heading-font-size);
    line-height: 1.2;
    font-weight: 400;
    font-family: var(--eca-heading-font);
    text-transform: capitalize;
    letter-spacing: -0.02em;
    color: var(--eca-header-text);
    margin: 0;
}

/* Tab Content */
.eca-tab-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--eca-transition-time) ease;
    background: var(--eca-content-bg);
}

.eca-tab.active .eca-tab-content {
    max-height: none;
}

/* Content wrapper */
.eca-content-wrapper {
    background: #ffffff;
    padding: 2rem var(--eca-content-padding);
    max-width: var(--eca-content-width);
    margin: 0 auto;
}

/* Content Elements */
.eca-video-embed,
.eca-description,
.eca-full-content {
    margin-bottom: 2rem;
}

.eca-video-embed:last-child,
.eca-description:last-child,
.eca-full-content:last-child {
    margin-bottom: 0;
}

/* Close Button */
.eca-close-button {
    position: fixed;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--eca-button-bg);
    color: var(--eca-button-text);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    transition: all var(--eca-transition-time) ease;
    z-index: 10000;
}

.eca-tab.active .eca-close-button {
    opacity: 1;
    visibility: visible;
}

.eca-close-button:hover {
    background: var(--eca-button-hover-bg);
}

/* Mobile styles */
@media (max-width: 782px) {
    .eca-close-button {
        top: 4.5rem;
        bottom: auto;
    }

    .admin-bar .eca-close-button {
        top: calc(4.5rem + 46px);
    }
}

/* Ensure tab header maintains border radius */
.eca-tab-header {
    border-radius: 0 0 var(--eca-border-radius) var(--eca-border-radius);
}

/* Desktop styles */
@media (min-width: 783px) {
    .eca-close-button {
        top: auto;
        bottom: 2rem;
    }

    .admin-bar .eca-close-button {
        bottom: 2rem;
    }
}

/* Enroll Button */
.eca-enroll-button {
    display: inline-block;
    padding: 8px 16px;
    background: var(--eca-button-bg);
    color: var(--eca-button-text);
    text-decoration: none;
    border-radius: 9999px;
    transition: all var(--eca-transition-time) ease;
    margin-top: 2rem;
}

.eca-enroll-button:hover {
    background: var(--eca-button-hover-bg);
}

/* Shadow styles */
.eca-accordion[data-shadow="light"] .eca-tab {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eca-accordion[data-shadow="medium"] .eca-tab {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.eca-accordion[data-shadow="dark"] .eca-tab {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* Ensure proper layering */
.eca-accordion .eca-tab:nth-child(1) { z-index: 10; }
.eca-accordion .eca-tab:nth-child(2) { z-index: 9; }
.eca-accordion .eca-tab:nth-child(3) { z-index: 8; }
.eca-accordion .eca-tab:nth-child(4) { z-index: 7; }
.eca-accordion .eca-tab:nth-child(5) { z-index: 6; }

/* Content Styling */
.eca-tab-content p {
    margin-bottom: 1em;
    line-height: 1.6;
}

.eca-tab-content ul,
.eca-tab-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.eca-tab-content li {
    margin-bottom: 0.5em;
}

.eca-tab-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}

/* Ensure headings in content are visible */
.eca-tab-content h1,
.eca-tab-content h2,
.eca-tab-content h3,
.eca-tab-content h4,
.eca-tab-content h5,
.eca-tab-content h6 {
    color: var(--eca-header-text);
}

/* Responsive Video Embeds */
.eca-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.eca-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
