/* modules/demos/demos.css */

.module-header {
    text-align: center; 
    margin-bottom: 3rem; 
}

.module-title { 
    font-size: 2.5rem; color: 
    var(--primary-color); 
}

.module-subtitle { 
    font-size: 1.2rem; color: 
    var(--secondary-color); 
}

.demo-section-title { 
    font-size: 1.8rem; 
    color: var(--primary-color); 
    text-align: center; 
    margin-top: 4rem; 
    margin-bottom: 2rem; 
    border-bottom: 2px solid #444; 
    padding-bottom: 1rem; 
}

.demos-grid { 
    display: grid; grid-template-columns: 
    repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.demo-card { background: var(--module-bg-color); border: 1px solid #333; border-radius: 8px; padding: 1.5rem; transition: all 0.3s ease; }
.demo-card:hover { transform: translateY(-5px); border-color: var(--primary-color); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #444; }
.demo-icon { font-size: 1.5rem; color: var(--primary-color); width: 25px; text-align: center; }
.card-header h4 { font-size: 1.1rem; color: var(--text-color); margin: 0; }
.card-content { min-height: 140px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1rem; }
.demo-input { width: 100%; padding: 0.5rem; background: #111; border: 1px solid #555; border-radius: 4px; color: var(--text-color); font-family: var(--font-family); }
.demo-message { font-size: 0.85rem; color: var(--secondary-color); text-align: center; }
.demo-message.valid { color: #28a745; }
.demo-message.invalid { color: #dc3545; }
.demo-btn { width: 80%; }

/* DEMO 1: Acordeón */
.faq-container { width: 100%; }
.faq-item { border-bottom: 1px solid #444; }
.faq-question { padding: 0.8rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--primary-color); transition: transform 0.3s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; padding: 0 0.8rem; }
.faq-item.active .faq-answer { max-height: 100px; padding: 0 0.8rem 0.8rem 0.8rem; }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.api-output { width: 100%; min-height: 90px; background-color: #111; padding: 0.5rem; border: 1px solid #333; font-size: 0.8rem; }
.api-output pre { white-space: pre-wrap; word-wrap: break-word; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; display: flex; justify-content: center; align-items: center; visibility: hidden; opacity: 0; transition: all 0.3s; }
.modal-overlay.is-visible { visibility: visible; opacity: 1; }
.modal-content { background: var(--module-bg-color); padding: 2rem; border-radius: 8px; max-width: 500px; width: 90%; position: relative; }
.modal-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 2rem; color: var(--text-color); cursor: pointer; }
.filter-list { list-style: none; width: 100%; text-align: left; padding: 0; }
.flip-card-container { perspective: 1000px; width: 250px; height: 100px; }
.flip-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.8s; }
.flip-card-container:hover .flip-card { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 2px solid var(--primary-color); }
.flip-card-front { background: #3a3a3a; }
.flip-card-back { background: var(--primary-color); color: var(--background-color); transform: rotateY(180deg); }
.cta-button { background: linear-gradient(45deg, var(--primary-color), #00c749); background-size: 200% auto; transition: background-position 0.5s; color: white; border: none; }
.cta-button:hover { background-position: right center; }
.psx-loader { width: 150px; height: 10px; background-color: rgba(0, 255, 0, 0.2); border: 1px solid var(--primary-color); overflow: hidden; }
.loading-bar { width: 30%; height: 100%; background: var(--primary-color); animation: loading-progress 1.5s ease-in-out infinite; }
@keyframes loading-progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(450%); } }
.clipped-text { font-size: 3rem; font-weight: bold; background: url(https://images.unsplash.com/photo-1554034483-04fda0d3507b?q=80&w=2070) center/cover; -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabs-container { width: 100%; }
.tabs-container input[type="radio"] { display: none; }
.tabs-container label { padding: 0.5rem 1rem; border: 1px solid #555; cursor: pointer; background: #333; }
.tabs-container input[type="radio"]:checked + label { background: var(--primary-color); color: #111; border-bottom: 1px solid var(--primary-color); }
.tab-content { display: none; padding: 1rem; border: 1px solid #555; border-top: none; }
#tab1:checked ~ .content1, #tab2:checked ~ .content2 { display: block; }
.gallery-container { display: flex; gap: 0.5rem; }
.gallery-item { width: 80px; height: 80px; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.2); }