/**
 * Unfold Content Widget Styles
 * File: assets/css/unfold-content-widget.css
 */

.unfold-content-wrapper {
    position: relative;
    overflow: hidden;
}

/* Card Style Design */
.unfold-content-wrapper.card-style {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.unfold-content-wrapper.card-style:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.unfold-title {
    margin: 0 0 20px 0;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.2;
}

/* Enhanced title for card style */
.unfold-content-wrapper.card-style .unfold-title {
    margin-bottom: 24px;
    color: #1a202c;
}

/* Title underline styles - only when has-underline class is present */
.unfold-title.has-underline {
    position: relative;
    display: block;
    width: 100%;
}

.unfold-title.has-underline::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: #f7fafc;
    margin-top: 12px;
}

.unfold-content-container {
    position: relative;
}

.unfold-content {
    line-height: 1.7;
    margin-bottom: 0;
    color: #4a5568;
    font-size: 16px;
}

/* Enhanced content for card style */
.unfold-content-wrapper.card-style .unfold-content {
    color: #2d3748;
    font-size: 16px;
    line-height: 1.8;
}

.unfold-content.preview-content {
    display: block;
}

.unfold-content.full-content {
    display: none;
}

/* Preview wrapper for gradient overlay */
.unfold-preview-wrapper {
    position: relative;
}

/* Gradient fade effect */
.unfold-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent 0%, #ffffff 100%);
    pointer-events: none;
    z-index: 1;
}

/* Ensure button appears above gradient */
.unfold-button-wrapper {
    position: relative;
    z-index: 2;
    margin-top: 15px;
}

.unfold-button-wrapper.inline {
    display: inline;
    margin-top: 0;
    margin-left: 5px;
}

.unfold-button {
    /* Colors managed by Elementor controls */
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    /* Default shadow - can be overridden by Elementor */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.unfold-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.unfold-button:hover::before {
    left: 100%;
}

.unfold-button:hover {
    /* Keep hover effects but let Elementor manage colors */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.unfold-button:active {
    transform: translateY(0);
}

.unfold-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.unfold-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Remove CSS transitions - GSAP will handle animations */
.unfold-content {
    /* No transitions - GSAP controls animations */
}

/* Responsive design */
@media (max-width: 768px) {
    .unfold-button {
        padding: 10px 18px;
        font-size: 16px;
    }
    
    .unfold-title {
        font-size: 1.2em;
    }
}

/* Accessibility improvements */
.unfold-button[aria-expanded="true"] {
    background: #005a87;
}

/* Animation classes - simplified */
.unfold-content-wrapper {
    overflow: visible;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unfold-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .unfold-button,
    .unfold-content {
        transition: none;
    }
}