/* ==========================================================================
   Features Showcase Widget - CSS
   ========================================================================== */

/* CSS Variables */
:root {
    --fs-bg: #ffffff;
    --fs-card-bg: #f9f9f9;
    --fs-card-border: rgba(0, 0, 0, 0.08);
    --fs-text-primary: #1a1a1a;
    --fs-text-secondary: #666666;
    --fs-accent: #153ec2;
    --fs-button-from: #33a3ff;
    --fs-button-to: #1a4bed;
    --fs-shadow: 
        0 0.78px 0.78px rgba(0,0,0,0.04),
        0 1.92px 1.92px rgba(0,0,0,0.04),
        0 3.64px 3.64px rgba(0,0,0,0.04),
        0 6.35px 6.35px rgba(0,0,0,0.04),
        0 11.05px 11.05px rgba(0,0,0,0.04),
        0 20.24px 20.24px rgba(0,0,0,0.03),
        0 40px 40px rgba(0,0,0,0.02);
}

/* ==========================================================================
   Section
   ========================================================================== */
.fs-section {
    background-color: var(--fs-bg);
    padding: 80px 20px;
}

.fs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.fs-wrapper {
    display: flex;
    gap: 48px;
}

/* Header Layout: Left */
[data-header-layout="left"] .fs-wrapper {
    flex-direction: row;
    align-items: flex-start;
}

[data-header-layout="left"] .fs-header {
    width: 40%;
    flex: 0 0 40%;
    position: sticky;
    top: 100px;
}

[data-header-layout="left"] .fs-grid {
    flex: 1;
}

/* Header Layout: Top */
[data-header-layout="top"] .fs-wrapper {
    flex-direction: column;
}

[data-header-layout="top"] .fs-header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

[data-header-layout="top"] .fs-header-content {
    max-width: 600px;
    margin: 0 auto;
}

[data-header-layout="top"] .fs-grid {
    width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */
.fs-decoration {
    width: 120px;
    height: 8px;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #9b59b6);
    border-radius: 4px;
    margin-bottom: 24px;
    opacity: 0.8;
}

[data-header-layout="top"] .fs-decoration {
    margin: 0 auto 24px;
}

.fs-title {
    color: var(--fs-text-primary);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.fs-description {
    color: var(--fs-text-secondary);
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.6;
    margin: 0 0 24px;
}

/* ==========================================================================
   Button
   ========================================================================== */
.fs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: radial-gradient(ellipse at 50% 100%, var(--fs-button-from) 0%, var(--fs-button-to) 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 100px;
    box-shadow: var(--fs-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fs-button::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: rgba(43, 128, 255, 0.13);
    border-radius: inherit;
    pointer-events: none;
}

.fs-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(26, 75, 237, 0.3);
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.fs-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 2), 1fr);
    gap: 24px;
}

/* ==========================================================================
   Feature Card
   ========================================================================== */
.fs-card {
    border: 1px solid var(--fs-card-border);
    border-radius: 32px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fs-card.fs-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation */
.fs-card:nth-child(1) { transition-delay: 0.1s; }
.fs-card:nth-child(2) { transition-delay: 0.2s; }
.fs-card:nth-child(3) { transition-delay: 0.3s; }
.fs-card:nth-child(4) { transition-delay: 0.4s; }

.fs-card-inner {
    background-color: var(--fs-card-bg);
    border: 4px solid #ffffff;
    border-radius: 24px;
    box-shadow: var(--fs-shadow);
    overflow: hidden;
}

.fs-card-content {
    position: relative;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

/* Card Background */
.fs-card-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.fs-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Text Content
   ========================================================================== */
.fs-text-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fs-feature-info {
    margin-bottom: 20px;
}

.fs-feature-title {
    color: var(--fs-text-primary);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.fs-feature-desc {
    color: var(--fs-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   Checklist
   ========================================================================== */
.fs-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.fs-checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fs-check-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--fs-accent);
    border-radius: 8px;
    color: #ffffff;
}

.fs-check-icon svg {
    width: 16px;
    height: 16px;
}

.fs-checklist-text {
    color: #2a2a2a;
    font-size: 14px;
    line-height: 1.4;
}

/* ==========================================================================
   Phone Mockup
   ========================================================================== */
.fs-phone-area {
    position: absolute;
    right: -20px;
    bottom: -40px;
    width: 50%;
    height: 100%;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.fs-phone-wrapper {
    position: relative;
    max-width: 280px;
    transform: rotate(var(--phone-rotation, -23deg));
    transform-origin: center bottom;
}

.fs-phone-frame {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
}

.fs-screen-content {
    position: absolute;
    top: 2.5%;
    left: 5%;
    right: 5%;
    bottom: 2.5%;
    border-radius: 28px;
    overflow: hidden;
    z-index: 1;
    box-shadow: -10px 11px 20px rgba(112, 112, 112, 0.5);
}

.fs-screen-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .fs-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    [data-header-layout="left"] .fs-header {
        width: 100%;
        flex: none;
        position: static;
        text-align: center;
    }
    
    [data-header-layout="left"] .fs-header-content {
        max-width: 600px;
        margin: 0 auto;
    }
    
    [data-header-layout="left"] .fs-decoration {
        margin: 0 auto 24px;
    }
    
    .fs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fs-card-content {
        min-height: 380px;
    }
    
    .fs-phone-wrapper {
        max-width: 220px;
    }
}

@media (max-width: 768px) {
    .fs-section {
        padding: 60px 16px;
    }
    
    .fs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fs-card-content {
        min-height: auto;
        padding-bottom: 200px;
    }
    
    .fs-text-content {
        padding: 24px;
    }
    
    .fs-feature-title {
        font-size: 20px;
    }
    
    .fs-phone-area {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 60%;
        height: auto;
    }
    
    .fs-phone-wrapper {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .fs-title {
        font-size: 24px;
    }
    
    .fs-description {
        font-size: 14px;
    }
    
    .fs-text-content {
        padding: 20px;
    }
    
    .fs-feature-title {
        font-size: 18px;
    }
    
    .fs-feature-desc {
        font-size: 14px;
    }
    
    .fs-checklist-text {
        font-size: 13px;
    }
    
    .fs-phone-wrapper {
        max-width: 160px;
    }
    
    .fs-card-content {
        padding-bottom: 180px;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .fs-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .fs-button {
        transition: none;
    }
}

/* ==========================================================================
   Elementor Editor
   ========================================================================== */
.elementor-editor-active .fs-card {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Dark Theme
   ========================================================================== */
.fs-section[data-theme="dark"] {
    --fs-bg: #0f0f0f;
    --fs-card-bg: #1a1a1a;
    --fs-card-border: rgba(255, 255, 255, 0.1);
    --fs-text-primary: #f5f5f5;
    --fs-text-secondary: #a0a0a0;
}

.fs-section[data-theme="dark"] .fs-card-inner {
    border-color: #2a2a2a;
}

.fs-section[data-theme="dark"] .fs-checklist-text {
    color: #d0d0d0;
}

/* ==========================================================================
   Hover Effects
   ========================================================================== */
.fs-card:hover .fs-card-inner {
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.06),
        0 8px 16px rgba(0,0,0,0.06),
        0 16px 32px rgba(0,0,0,0.06);
}

.fs-card:hover .fs-phone-wrapper {
    transform: rotate(var(--phone-rotation, -23deg)) translateY(-8px);
    transition: transform 0.4s ease;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .fs-section {
        padding: 20px 0;
    }
    
    .fs-grid {
        display: block;
    }
    
    .fs-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .fs-phone-area {
        display: none;
    }
}
