Description
/* Basic styles */ body { font-family: ‘Roboto’, Arial, sans-serif; margin: 0; padding: 15px; background-color: white; line-height: 1.4; } /* Main container */ .demo-container { max-width: 1200px; margin: 0 auto; background-color: white; } /* Section spacing – optimized for collapsed state */ .section { margin-bottom: 25px; transition: margin-bottom 0.4s ease; } /* Remove bottom margin when collapsed */ .section:has(.section-toggle:checke) { margin-bottom: 5px; } /* Video section */ .video-section { background-color: white; margin-bottom: 0; } /* Common header styles for both sections */ .section-header { font-size: 20px; font-weight: bold; margin-bottom: 15px; text-align: left; color: #333; background-color: #f8f9fa; padding: 12px 20px; margin: 0 0 15px 0; transition: margin-bottom 0.4s ease; position: relative; border-left: 5px solid #007bff; } /* Video section color indicator */ .video-section .section-header { border-left-color: #28a745; } /* Remove header bottom margin when collapsed */ .section-toggle:checked + .section-label.section-header { margin-bottom: 0; } /* Collapsible functionality using CSS only – for both sections */ .section-toggle { display: none; } .section-label { cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: color 0.3s ease; user-select: none; } .section-label:hover { color: #666; } .collapse-icon { font-size: 16px; transition: transform 0.3s ease; margin-left: auto; } /* Rotate icon for collapsed state */ .section-toggle:not(:checked) + .section-label .collapse-icon { transform: rotate(-90deg); } .section-toggle:checked + .section-label .collapse-icon { transform: rotate(0deg); } /* Video wrapper with clean rounded rectangle styling */ .video-wrapper { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; /* 16:9 aspect ratio */ overflow: hidden; opacity: 1; transition: max-height 0.4s ease, opacity 0.3s ease, padding-bottom 0.4s ease, margin-bottom 0.4s ease; max-height: 500px; margin-bottom: 0; background-color: #000; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); } .section-toggle:checked ~ .video-wrapper { max-height: 0; opacity: 0; padding-bottom: 0; overflow: hidden; margin-bottom: 0; } .video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 9px; object-fit: cover; } /* Alternative approach for better video fitting */ @media (min-width: 769px) { .video-wrapper { max-width: 100%; padding-bottom: 56.25%; } } /* Responsive design */ @media (max-width: 768px) { body { padding: 10px; } .section { margin-bottom: 20px; } .section:has(.section-toggle:checked) { margin-bottom: 3px; } .section-header { font-size: 18px; margin-bottom: 8px; padding: 10px 15px; } /* Mobile video optimization without border */ .video-wrapper { padding-bottom: 56.25%; max-height: 300px; background-color: transparent; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); } .video-wrapper iframe { border-radius: 5px; width: 100%; height: 100%; } } @media (max-width: 480px) { .section { margin-bottom: 15px; } .section:has(.section-toggle:checked) { margin-bottom: 2px; } .section-header { font-size: 16px; margin-bottom: 6px; padding: 8px 10px; } /* Small mobile video optimization without border */ .video-wrapper { padding-bottom: 56.25%; max-height: 250px; margin-bottom: 10px; background-color: transparent; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); } .video-wrapper iframe { border-radius: 3px; width: 100%; height: 100%; } }
Explore more from our collection.



















Reviews
There are no reviews yet.