/* Features Plugin Frontend Styles - Advanced Kiosks Brand */

.features-plugin-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

/* Filter Buttons - Orange Theme */
.features-filter {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 15px;
}

.filter-btn {
    background: #f4f4f4;
    border: 2px solid #ddd;
    color: #333;
    padding: 6px 12px;
    margin: 5px 2px;
    cursor: pointer;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.filter-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

.filter-btn.active:hover {
    background: #e55a00;
    border-color: #e55a00;
}

/* Grid Layout */
.features-grid {
    display: grid;
    grid-template-columns: repeat(var(--items-per-row, 3), 1fr);
    gap: 30px;
    padding: 0 15px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.features-grid.loading {
    opacity: 0.5;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .features-filter {
        margin-bottom: 20px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 12px;
        margin: 3px;
        border-radius: 12px;
    }
}

/* Feature Items */
.feature-item {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    transform: translateY(0);
    opacity: 1;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255, 102, 0, 0.15);
}

.feature-item.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.feature-item.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Feature Image */
.feature-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.feature-item:hover .feature-image img {
    transform: scale(1.05);
}

.feature-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #ff6600 0%, #e55a00 100%);
    color: white;
    font-weight: 600;
    font-size: 16px;
}

/* Feature Content */
.feature-content {
    padding: 20px;
}

.feature-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.feature-item:hover .feature-title {
    color: #ff6600;
}

.feature-intro {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Modal Styles - Wide Layout with High Z-Index */
.features-modal {
    display: none;
    position: fixed;
    z-index: 9999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* Only affect z-index when modal is active */
body.features-modal-open .et_pb_column {
    z-index: unset !important;
}






.modal-content {
    background-color: #fff;
    margin: 5vh auto !important;          /* Reduced top/bottom margin for smaller screens */
    padding: 0;
    border-radius: 15px;
    width: 90% !important;                /* More responsive */
    max-width: 1000px !important;         /* Keeps it sleek and not overly wide */
    max-height: 90vh;                     /* Ensures it stays inside the viewport */
    overflow-y: auto;                     /* Allows internal scroll if content is too long */
    position: relative;
    box-shadow: unset !important;
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Large Red X Close Button */
.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 36px;
    font-weight: bold;
    color: #ff6600;
    cursor: pointer;
    z-index: 1000001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.close:hover {
    color: #e55a00;
    background: rgba(255,255,255,1);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Modal Body - Single Column Layout */
.modal-body {
    padding: 40px;
}

.modal-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.modal-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Content Styles */
.modal-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 25px 0;
    padding-right: 70px;
    line-height: 1.2;
}

.modal-media {
    margin: 0 0 25px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: unset !important;
    text-align:center;
}

.modal-media img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-media iframe,
.modal-media video {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 15px;
}

.modal-text {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
}

.modal-text p {
    margin-bottom: 0px;
}

.modal-text h1, .modal-text h2, .modal-text h3, .modal-text h4, .modal-text h5, .modal-text h6 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
}

.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-link {
    display: inline-block;
    padding: 12px 24px;
    background: #ff6600;
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #ff6600;
}

.modal-link:hover {
    background: #e55a00;
    border-color: #e55a00;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        margin: 5%;
        width: 90%;
        max-height: calc(100vh - 10%);
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 24px;
        padding-right: 60px;
    }
    
    .close {
        right: 15px;
        top: 15px;
        font-size: 30px;
        width: 45px;
        height: 45px;
    }
    
    .modal-media iframe,
    .modal-media video {
        height: 250px;
    }
    
    .modal-links {
        flex-direction: column;
    }
    
    .modal-link {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2%;
        width: 96%;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-media iframe,
    .modal-media video {
        height: 200px;
    }
}

/* Smooth scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #e55a00;
}
/* Add these styles to your features-plugin.css file */

/* YouTube Embed Container with Play Button */
.youtube-embed-container {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.youtube-thumbnail:hover {
    transform: scale(1.02);
}

.youtube-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.youtube-thumbnail:hover::before {
    background: rgba(0, 0, 0, 0.2);
}

.youtube-play-button {
    position: relative;
    z-index: 2;
    width: 68px;
    height: 48px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.youtube-play-button:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.youtube-play-button svg {
    width: 100%;
    height: 100%;
}

.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* Loading state for YouTube */
.youtube-embed-container.loading .youtube-thumbnail {
    opacity: 0.7;
}

.youtube-embed-container.loading .youtube-play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .youtube-embed-container {
        height: 250px;
    }
    
    .youtube-play-button {
        width: 54px;
        height: 38px;
    }
}

@media (max-width: 480px) {
    .youtube-embed-container {
        height: 200px;
    }
    
    .youtube-play-button {
        width: 48px;
        height: 34px;
    }
}




.video-thumbnail {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

.video-thumbnail img {
  width: 100%;
  border-radius: 12px;
}

.video-thumbnail .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  padding: 10px 20px;
}



/* Responsive wrapper maintaining 16:9 aspect ratio */
.responsive-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 560px;         /* Max width constraint */
    aspect-ratio: 16 / 9;     /* Modern way to maintain aspect ratio */
    margin: 0 auto;           /* Center horizontally */
    background: #000;
    overflow: hidden;
    border-radius: 15px;
}

/* Full iframe within the wrapper */
.responsive-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}



