/* ============================================
   PREMIUM FEATURES SECTION - B2B SaaS Design
   ============================================ */

/* Mac Window Mockup Frame */
.mac-window {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 
        0 50px 100px -20px rgba(50, 50, 93, 0.25),
        0 30px 60px -30px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.mac-window:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 60px 120px -20px rgba(50, 50, 93, 0.35),
        0 40px 80px -30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Mac Window Top Bar */
.mac-window::before {
    content: '';
    display: block;
    height: 40px;
    background: linear-gradient(180deg, #f5f5f7 0%, #e8e8ea 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Mac Window Dots */
.mac-window::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: #ff5f57;
    border-radius: 50%;
    box-shadow: 
        20px 0 0 #febc2e,
        40px 0 0 #28c840,
        0 0 0 0.5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Screenshot Container */
.mac-window-content {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fafafa;
}

.mac-window-content img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Tablet Frame Mockup */
.tablet-frame {
    position: relative;
    background: #1a1a1a;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 30px 60px -30px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tablet-frame:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 60px 120px -20px rgba(0, 0, 0, 0.6),
        0 40px 80px -30px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.tablet-frame-content {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.tablet-frame-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* Browser Window Mockup */
.browser-window {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 50px 100px -20px rgba(50, 50, 93, 0.25),
        0 30px 60px -30px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.browser-window:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 70px 140px -20px rgba(50, 50, 93, 0.35),
        0 50px 100px -30px rgba(0, 0, 0, 0.4);
}

/* Browser Top Bar */
.browser-window-header {
    height: 48px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.browser-dots {
    display: flex;
    gap: 8px;
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
}

.browser-dot:nth-child(1) { background: #ff5f57; }
.browser-dot:nth-child(2) { background: #febc2e; }
.browser-dot:nth-child(3) { background: #28c840; }

.browser-address-bar {
    flex: 1;
    height: 28px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.browser-window-content {
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

.browser-window-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   ZIG-ZAG LAYOUT (Hero Features)
   ============================================ */

.features-hero-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
    padding: 120px 0;
}

.feature-zigzag {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 160px;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease forwards;
}

.feature-row:nth-child(even) {
    direction: rtl;
}

.feature-row:nth-child(even) > * {
    direction: ltr;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-content {
    padding: 40px 0;
}

.feature-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.feature-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 24px;
    font-family: 'Crimson Text', serif;
}

.feature-description {
    font-size: 20px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 32px;
    font-weight: 400;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.feature-list li {
    font-size: 17px;
    color: #334155;
    padding: 12px 0;
    padding-left: 32px;
    position: relative;
    line-height: 1.6;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #14b8a6;
    font-weight: 700;
    font-size: 20px;
}

.feature-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(20, 184, 166, 0.3);
}

.feature-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(20, 184, 166, 0.4);
    color: white;
}

.feature-mockup {
    position: relative;
}

/* ============================================
   GRID LAYOUT (Secondary Features)
   ============================================ */

.features-grid-section {
    background: #ffffff;
    padding: 120px 0;
}

.features-grid-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.features-grid-title {
    font-size: 56px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
    font-family: 'Crimson Text', serif;
}

.features-grid-subtitle {
    font-size: 22px;
    color: #64748b;
    line-height: 1.6;
}

.features-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
}

.feature-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    border-color: rgba(20, 184, 166, 0.2);
}

.feature-card-mockup {
    padding: 24px 24px 0;
    background: linear-gradient(180deg, #f8fafb 0%, #ffffff 100%);
}

.feature-card-content {
    padding: 32px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-card-content {
    background: #f8f9fa;
}

.feature-card-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.feature-card-description {
    font-size: 16px;
    line-height: 1.6;
    color: #475569;
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
    font-weight: 300;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Clickable cursor for images */
.mac-window-content img,
.browser-window-content img,
.tablet-frame-content img {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.mac-window-content img:hover,
.browser-window-content img:hover,
.tablet-frame-content img:hover {
    opacity: 0.9;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .feature-row {
        gap: 60px;
        margin-bottom: 120px;
    }
    
    .feature-title {
        font-size: 40px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 40px;
    }
}

@media (max-width: 968px) {
    .feature-row {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 80px;
    }
    
    .feature-row:nth-child(even) {
        direction: ltr;
    }
    
    .feature-title {
        font-size: 36px;
    }
    
    .feature-description {
        font-size: 18px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .features-hero-section,
    .features-grid-section {
        padding: 80px 0;
    }
}

@media (max-width: 640px) {
    .feature-zigzag,
    .features-grid {
        padding: 0 20px;
    }
    
    .feature-title {
        font-size: 32px;
    }
    
    .feature-description {
        font-size: 16px;
    }
    
    .features-grid-title {
        font-size: 40px;
    }
    
    .mac-window::before {
        height: 32px;
    }
    
    .mac-window::after {
        top: 10px;
        left: 12px;
        width: 10px;
        height: 10px;
        box-shadow: 
            16px 0 0 #febc2e,
            32px 0 0 #28c840;
    }
    
    .browser-window-header {
        height: 40px;
    }
    
    .tablet-frame {
        padding: 12px;
        border-radius: 20px;
    }
}

/* ============================================
   PREMIUM TOUCHES
   ============================================ */

/* Subtle background pattern */
.features-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(20, 184, 166, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(20, 184, 166, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Smooth scroll reveal */
.feature-row {
    animation-delay: calc(var(--index) * 0.1s);
}

/* Loading skeleton (optional) */
.feature-card.loading .feature-card-mockup {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Glassmorphism variant (optional) */
.mac-window.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .features-hero-section {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }
    
    .feature-title {
        color: #f1f5f9;
    }
    
    .feature-description {
        color: #cbd5e1;
    }
    
    .feature-card {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
    }
}
