/* ==========================================================================
   ShowMyAura Professional - Premium Frontend Styles
   Version: 5.0.0
   Features: 12 Layouts, Curtain Hover with Shine, Image Scroll on Hover, Page Load Animation
   ========================================================================== */

/* ==========================================================================
   1. CSS Variables & Theme System
   ========================================================================== */
@property --gradient-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

:root {
    --sma-primary: #6420aa;
    --sma-secondary: #ff3ea5;
    --sma-accent: #f59e0b;
    --sma-bg: #ffffff;
    --sma-bg-alt: #f1f5f9;
    --sma-text: #0f172a;
    --sma-text-secondary: #475569;
    --sma-text-muted: #64748b;
    --sma-border: #e2e8f0;
    --sma-radius: 12px;
    --sma-radius-lg: 20px;
    --sma-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    --sma-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient: linear-gradient(135deg, #6420aa 0%, #ff3ea5 100%);
    --hover-opacity-default: 0.4;
    --hover-opacity-hover: 0.1;
    --hover-speed: 0.6s;
    --image-scroll-speed: 0.5s;
}

.sma-gallery-wrap.theme-dark {
    --sma-bg: #0f172a;
    --sma-bg-alt: #1e293b;
    --sma-text: #f1f5f9;
    --sma-text-secondary: #cbd5e1;
    --sma-text-muted: #94a3b8;
    --sma-border: #334155;
}

/* ==========================================================================
   2. Base Gallery Container
   ========================================================================== */
.sma-gallery-wrap {
    width: 100%;
    position: relative;
    margin: 40px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--sma-text);
    background: var(--sma-bg);
    padding: 40px;
    border-radius: var(--sma-radius-lg);
    box-shadow: var(--sma-shadow);
}

.sma-gallery-wrap * {
    box-sizing: border-box;
}

/* ==========================================================================
   3. Theme Toggle Buttons
   ========================================================================== */
.sma-theme-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
}

.sma-theme-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--sma-bg-alt);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--sma-transition);
    color: var(--sma-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sma-theme-btn:hover,
.sma-theme-btn.active {
    background: var(--gradient);
    color: #fff;
    transform: scale(1.1);
}

/* ==========================================================================
   4. Category Filters
   ========================================================================== */
.sma-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

.sma-cat-btn {
    background: transparent;
    border: 2px solid var(--sma-border);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: var(--sma-transition);
    color: var(--sma-text);
}

.sma-cat-btn:hover {
    border-color: var(--sma-secondary);
    color: var(--sma-secondary);
    transform: translateY(-2px);
}

.sma-cat-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Carousel Categories (On Top) */
.sma-carousel-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.sma-carousel-cat-btn {
    background: var(--sma-bg-alt);
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: var(--sma-transition);
    color: var(--sma-text);
}

.sma-carousel-cat-btn:hover,
.sma-carousel-cat-btn.active {
    background: var(--gradient);
    color: #fff;
}

/* ==========================================================================
   5. Core Components - Media Box with Curtain Hover + Shine
   ========================================================================== */
.sma-media-box {
    position: relative;
    overflow: hidden;
    background: var(--sma-bg-alt);
    height: 100%;
    width: 100%;
    display: block;
}

.sma-media-box img,
.sma-media-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sma-audio-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: #fff;
    font-size: 40px;
    background: var(--gradient);
}

.sma-audio-placeholder span {
    font-size: 14px;
    margin-top: 10px;
}

/* ==========================================================================
   6. IMAGE HOVER SCROLL ANIMATION
   ========================================================================== */
.sma-image-scroll-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.sma-scroll-image {
    width: 100%;
    height: auto;
    transition: transform var(--image-scroll-speed) ease;
    transform: translateY(0);
    will-change: transform;
}

.sma-scroll-image img {
    width: 100%;
    height: auto;
    display: block;
    object-position: top; /* Start from top */
}

/* Hover effect for all card types */
.sma-card:hover .sma-scroll-image,
.sma-download-card:hover .sma-scroll-image,
.sma-cinema-card:hover .sma-scroll-image,
.sma-slider-card:hover .sma-scroll-image,
.sma-split-item:hover .sma-scroll-image,
.sma-split-hero:hover .sma-scroll-image {
    transform: translateY(var(--scroll-distance, -100px));
}

/* We'll set a custom property via JS for the exact scroll distance */
.sma-scroll-image.scrolling {
    transform: translateY(var(--scroll-distance));
}

/* ==========================================================================
   7. CURTAIN HOVER EFFECT WITH SHINE
   ========================================================================== */
.sma-curtain-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: var(--hover-opacity-default);
    transition: all var(--hover-speed) cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: right center;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* Shine effect - a glossy white sheen that moves across on hover */
.sma-curtain-overlay::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 40%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0.1) 80%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg) translateY(100%);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.sma-card:hover .sma-curtain-overlay::after,
.sma-cinema-card:hover .sma-curtain-overlay::after,
.sma-download-card:hover .sma-curtain-overlay::after,
.sma-slider-card:hover .sma-curtain-overlay::after {
    transform: rotate(25deg) translateY(-100%);
}

.sma-card:hover .sma-curtain-overlay,
.sma-cinema-card:hover .sma-curtain-overlay,
.sma-download-card:hover .sma-curtain-overlay,
.sma-slider-card:hover .sma-curtain-overlay {
    opacity: var(--hover-opacity-hover);
    transform: perspective(1000px) rotateY(-25deg) translateX(20px);
}

/* ==========================================================================
   8. PAGE LOAD ANIMATION (Staggered Fade & Slide)
   ========================================================================== */
@keyframes sma-fade-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply to all project items across layouts */
.layout-grid .sma-card,
.layout-masonry .sma-card,
.layout-slider .sma-slider-card,
.layout-zigzag .sma-card,
.layout-framed .sma-card,
.layout-museum .sma-card,
.layout-cinematic .sma-cinema-card,
.layout-download .sma-download-card,
.layout-bento .sma-card,
.layout-carousel .sma-card,
.layout-spotlight .sma-card,
.layout-split .sma-split-item {
    animation: sma-fade-up 0.6s ease forwards;
    opacity: 0; /* start hidden */
}

/* Staggered delays based on position */
.layout-grid .sma-card:nth-child(1),
.layout-masonry .sma-card:nth-child(1),
.layout-slider .sma-slider-card:nth-child(1),
.layout-zigzag .sma-card:nth-child(1),
.layout-framed .sma-card:nth-child(1),
.layout-museum .sma-card:nth-child(1),
.layout-cinematic .sma-cinema-card:nth-child(1),
.layout-download .sma-download-card:nth-child(1),
.layout-bento .sma-card:nth-child(1),
.layout-carousel .sma-card:nth-child(1),
.layout-spotlight .sma-card:nth-child(1),
.layout-split .sma-split-item:nth-child(1) {
    animation-delay: 0.1s;
}
.layout-grid .sma-card:nth-child(2),
.layout-masonry .sma-card:nth-child(2),
.layout-slider .sma-slider-card:nth-child(2),
.layout-zigzag .sma-card:nth-child(2),
.layout-framed .sma-card:nth-child(2),
.layout-museum .sma-card:nth-child(2),
.layout-cinematic .sma-cinema-card:nth-child(2),
.layout-download .sma-download-card:nth-child(2),
.layout-bento .sma-card:nth-child(2),
.layout-carousel .sma-card:nth-child(2),
.layout-spotlight .sma-card:nth-child(2),
.layout-split .sma-split-item:nth-child(2) {
    animation-delay: 0.2s;
}
.layout-grid .sma-card:nth-child(3),
.layout-masonry .sma-card:nth-child(3),
.layout-slider .sma-slider-card:nth-child(3),
.layout-zigzag .sma-card:nth-child(3),
.layout-framed .sma-card:nth-child(3),
.layout-museum .sma-card:nth-child(3),
.layout-cinematic .sma-cinema-card:nth-child(3),
.layout-download .sma-download-card:nth-child(3),
.layout-bento .sma-card:nth-child(3),
.layout-carousel .sma-card:nth-child(3),
.layout-spotlight .sma-card:nth-child(3),
.layout-split .sma-split-item:nth-child(3) {
    animation-delay: 0.3s;
}
.layout-grid .sma-card:nth-child(4),
.layout-masonry .sma-card:nth-child(4),
.layout-slider .sma-slider-card:nth-child(4),
.layout-zigzag .sma-card:nth-child(4),
.layout-framed .sma-card:nth-child(4),
.layout-museum .sma-card:nth-child(4),
.layout-cinematic .sma-cinema-card:nth-child(4),
.layout-download .sma-download-card:nth-child(4),
.layout-bento .sma-card:nth-child(4),
.layout-carousel .sma-card:nth-child(4),
.layout-spotlight .sma-card:nth-child(4),
.layout-split .sma-split-item:nth-child(4) {
    animation-delay: 0.4s;
}
/* Continue for more items if needed – this can be extended */
.layout-grid .sma-card:nth-child(5),
.layout-masonry .sma-card:nth-child(5) {
    animation-delay: 0.5s;
}
.layout-grid .sma-card:nth-child(6),
.layout-masonry .sma-card:nth-child(6) {
    animation-delay: 0.6s;
}
/* Add more as required, but default beyond 6 will have no delay (fade in together) */

/* ==========================================================================
   9. Overlay & Content
   ========================================================================== */
.sma-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    cursor: pointer;
    z-index: 5;
}

.sma-card:hover .sma-overlay,
.sma-download-card:hover .sma-overlay,
.sma-cinema-card:hover .sma-overlay,
.sma-slider-card:hover .sma-overlay {
    opacity: 1;
}

.sma-overlay-content h3 {
    color: #fff;
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.sma-overlay-content p {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin: 0;
}

.sma-btn-glass {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
    border: 1px solid rgba(255,255,255,0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sma-card:hover .sma-overlay-content h3,
.sma-card:hover .sma-btn-glass,
.sma-download-card:hover .sma-overlay-content h3,
.sma-download-card:hover .sma-btn-glass,
.sma-cinema-card:hover .sma-overlay-content h3,
.sma-cinema-card:hover .sma-btn-glass,
.sma-slider-card:hover .sma-overlay-content h3,
.sma-slider-card:hover .sma-btn-glass {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   10. LAYOUT 1: Modern Grid
   ========================================================================== */
.layout-grid .sma-items-container {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 28px;
}

.layout-grid .sma-card {
    border-radius: var(--sma-radius-lg);
    height: 380px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
}

.layout-grid .sma-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* ==========================================================================
   11. LAYOUT 2: Smart Masonry
   ========================================================================== */
.layout-masonry .sma-masonry-container {
    display: flex;
    gap: 25px;
}

.layout-masonry .sma-masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.layout-masonry .sma-card {
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    display: block;
    width: 100%;
    background: var(--sma-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.layout-masonry .sma-media-box {
    min-height: 250px;
    height: auto;
}

.layout-masonry .sma-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   12. LAYOUT 3: Swipe Slider (Beautifully Rebuilt)
   ========================================================================== */
.layout-slider .swiper {
    padding-bottom: 70px;
}

.layout-slider .sma-slider-card {
    display: flex;
    flex-direction: column;
    background: var(--sma-bg);
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    box-shadow: var(--sma-shadow);
    height: 100%;
    border: 1px solid var(--sma-border);
    transition: transform 0.3s ease;
}

.layout-slider .sma-slider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.layout-slider .sma-media-box {
    height: 280px;
}

.layout-slider .sma-slider-info {
    padding: 30px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--sma-bg);
}

.layout-slider h3 {
    font-size: 22px;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--sma-text);
}

.layout-slider .sma-desc-clamp {
    font-size: 14px;
    color: var(--sma-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.layout-slider .sma-view-btn {
    background: var(--gradient);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    align-self: center;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.layout-slider .sma-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Slider Navigation */
.swiper-button-prev,
.swiper-button-next {
    width: 44px !important;
    height: 44px !important;
    background: var(--sma-bg);
    border-radius: 50%;
    box-shadow: var(--sma-shadow);
    top: 45% !important;
    transition: all 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: var(--gradient);
    color: #fff;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    display: none !important;
}

.swiper-button-prev i,
.swiper-button-next i {
    color: var(--sma-text);
    font-size: 16px;
}

.swiper-pagination-bullet {
    background: var(--sma-border) !important;
}

.swiper-pagination-bullet-active {
    background: var(--sma-secondary) !important;
    width: 24px !important;
    border-radius: 4px !important;
}

/* ==========================================================================
   13. LAYOUT 4: Portfolio Case Study (Zigzag)
   ========================================================================== */
.layout-zigzag {
    background: var(--sma-bg-alt);
    border-radius: 0;
    padding: 80px 0;
    margin: 0;
}

.layout-zigzag .sma-items-container {
    display: flex;
    flex-direction: column;
    gap: 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.layout-zigzag .sma-card {
    display: flex;
    align-items: center;
    gap: 60px;
    background: transparent !important;
    box-shadow: none !important;
}

.layout-zigzag .sma-card:nth-child(even) {
    flex-direction: row-reverse;
}

.layout-zigzag .sma-media-box {
    flex: 1.2;
    height: 500px;
    border-radius: var(--sma-radius-lg);
    box-shadow: var(--sma-shadow);
}

.layout-zigzag .sma-zigzag-info {
    flex: 1;
    background: var(--sma-bg);
    padding: 40px;
    border-radius: var(--sma-radius-lg);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.layout-zigzag .sma-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.layout-zigzag h3 {
    font-size: 36px;
    margin: 0 0 15px;
    font-weight: 800;
    line-height: 1.2;
}

.layout-zigzag .sma-desc-clip {
    font-size: 16px;
    color: var(--sma-text-muted);
    line-height: 1.8;
    margin-bottom: 30px;
}

.layout-zigzag .sma-view-btn {
    background: transparent;
    border: 2px solid var(--sma-text);
    color: var(--sma-text);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.layout-zigzag .sma-view-btn:hover {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
}

/* ==========================================================================
   14. LAYOUT 5: Elegant Framed
   ========================================================================== */
.layout-framed {
    background: var(--sma-bg-alt);
    padding: 50px 40px;
    border-radius: var(--sma-radius-lg);
}

.layout-framed .sma-items-container {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 60px;
}

.layout-framed .sma-card {
    border: 20px solid var(--sma-bg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    background: var(--sma-bg);
    height: 500px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    overflow: visible;
}

.layout-framed .sma-card:hover {
    transform: translateY(-15px) rotate(1deg) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.layout-framed .sma-frame-caption {
    text-align: center;
    color: #333;
    font-family: 'Space Grotesk', sans-serif;
    padding: 15px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sma-bg);
}

.theme-dark .layout-framed .sma-frame-caption {
    color: var(--sma-text);
}

/* ==========================================================================
   15. LAYOUT 6: Museum Wall
   ========================================================================== */
.layout-museum .sma-items-container {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    padding: 2rem 0;
}

.layout-museum .sma-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: transparent;
    box-shadow: none;
}

.layout-museum .sma-card:nth-child(even) {
    direction: rtl;
}

.layout-museum .sma-card:nth-child(even) > * {
    direction: ltr;
}

.layout-museum .sma-media-box {
    height: 500px;
    border: 15px solid #1f1f23;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    background: #000;
    border-radius: 4px;
}

.theme-dark .layout-museum .sma-media-box {
    border-color: #2d2d35;
}

.layout-museum .sma-museum-content {
    padding: 2rem;
}

.layout-museum h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.layout-museum .sma-museum-desc {
    color: var(--sma-text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.layout-museum .sma-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--gradient);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ==========================================================================
   16. LAYOUT 7: Cinematic Reveal
   ========================================================================== */
.layout-cinematic .sma-items-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.layout-cinematic .sma-cinema-card {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.layout-cinematic .sma-cinema-card img,
.layout-cinematic .sma-cinema-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.layout-cinematic .sma-cinema-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 100%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 6;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 100%);
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.layout-cinematic .sma-cinema-card:hover .sma-cinema-content {
    opacity: 1;
    transform: translateX(0);
}

.layout-cinematic .sma-cinema-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--sma-accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.layout-cinematic .sma-cinema-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
}

.layout-cinematic .sma-cinema-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 500px;
}

/* ==========================================================================
   17. LAYOUT 8: Download Gallery
   ========================================================================== */
.layout-download .sma-items-container {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 30px;
}

.sma-download-card {
    background: var(--sma-bg-alt);
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    border: 1px solid var(--sma-border);
    transition: var(--sma-transition);
    position: relative;
}

.sma-download-card:hover {
    transform: translateY(-10px);
    border-color: var(--sma-accent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.sma-download-media {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.dl-card-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sma-download-card:hover .dl-card-actions {
    opacity: 1;
    transform: translateY(0);
}

.dl-card-actions h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: #fff;
}

.dl-btn-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.dl-btn {
    flex: none;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.dl-btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: scale(1.1);
}

.dl-btn.primary {
    background: var(--sma-accent);
    color: #000;
    border-color: var(--sma-accent);
}

.dl-btn.primary:hover {
    background: #fbbf24;
}

.dl-btn.liked {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* ==========================================================================
   18. LAYOUT 9: Bento Box
   ========================================================================== */
.layout-bento .sma-bento-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-rows: 250px;
}

.layout-bento .sma-card {
    border-radius: var(--sma-radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}

.layout-bento .sma-card:nth-child(4n+1) {
    grid-column: span 2;
    grid-row: span 2;
}

.layout-bento .sma-card:nth-child(4n+4) {
    grid-column: span 2;
}

.layout-bento .sma-card:hover {
    transform: scale(1.03);
    z-index: 2;
}

/* ==========================================================================
   19. LAYOUT 10: Fanned Deck Carousel (Fixed Overlap)
   ========================================================================== */
.layout-carousel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    padding: 60px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
}

.theme-dark .layout-carousel {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.layout-carousel .swiper {
    width: 320px;
    height: 450px;
    margin: 0 auto;
    overflow: visible;
}

/* Swiper cards effect - ensure slides overlap */
.layout-carousel .swiper-wrapper {
    display: flex;
    align-items: center;
}

.layout-carousel .swiper-slide {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: var(--sma-bg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

/* Adjustments for active and adjacent slides */
.layout-carousel .swiper-slide-active {
    transform: scale(1.05);
    z-index: 3;
}

.layout-carousel .swiper-slide-prev,
.layout-carousel .swiper-slide-next {
    transform: scale(0.95);
    opacity: 0.8;
    z-index: 2;
}

.layout-carousel .swiper-slide-prev {
    transform: translateX(-15px) scale(0.95);
}

.layout-carousel .swiper-slide-next {
    transform: translateX(15px) scale(0.95);
}

/* Inner card styling */
.layout-carousel .sma-card {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: var(--sma-bg);
    position: relative;
    display: flex;
    flex-direction: column;
}

.layout-carousel .sma-media-box {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.layout-carousel .sma-image-scroll-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.layout-carousel .sma-scroll-image {
    width: 100%;
    height: 100%;
}

.layout-carousel .sma-scroll-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Category badge on image */
.layout-carousel .sma-carousel-category {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: var(--gradient);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Overlay styling */
.layout-carousel .sma-overlay {
    border-radius: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    padding: 20px;
}

.layout-carousel .sma-overlay-content h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.layout-carousel .sma-carousel-cat-label {
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    margin: 0;
    font-weight: 500;
}

/* Border wrapper adjustments */
.layout-carousel .sma-border-wrap {
    height: 100%;
    width: 100%;
}

/* Ensure torch and curtain are positioned correctly */
.layout-carousel .sma-torch,
.layout-carousel .sma-curtain-overlay {
    border-radius: 24px;
}

/* ==========================================================================
   20. LAYOUT 11: Spotlight Focus
   ========================================================================== */
.layout-spotlight .sma-items-container {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 1rem;
}

.layout-spotlight .sma-card {
    aspect-ratio: 1;
    position: relative;
    border-radius: var(--sma-radius);
    overflow: hidden;
    cursor: pointer;
    transition: filter 0.4s ease, transform 0.3s ease;
}

.layout-spotlight .sma-items-container:has(.sma-card:hover) .sma-card:not(:hover) {
    filter: brightness(0.3);
    transform: scale(0.98);
}

/* ==========================================================================
   21. LAYOUT 12: Split View
   ========================================================================== */
.layout-split .sma-items-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    height: 70vh;
    min-height: 500px;
}

.layout-split .sma-split-hero {
    border-radius: var(--sma-radius-lg);
    overflow: hidden;
    position: relative;
    background: var(--sma-bg-alt);
}

.layout-split .sma-split-hero .sma-media-box {
    height: 100%;
}

.layout-split .sma-split-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.layout-split .sma-split-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--sma-bg-alt);
    border-radius: var(--sma-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.layout-split .sma-split-item.active {
    border-color: var(--sma-accent);
    background: var(--sma-bg);
}

.layout-split .sma-split-item:hover:not(.active) {
    border-color: var(--sma-border);
}

.layout-split .sma-split-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.layout-split .sma-split-info {
    flex: 1;
    min-width: 0;
}

.layout-split .sma-split-info h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-split .sma-split-info p {
    margin: 0;
    font-size: 12px;
    color: var(--sma-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   22. MODAL POPUP - PROFESSIONAL REDESIGN (FULLY RESPONSIVE)
   ========================================================================== */
.sma-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    padding: 20px;
}

.sma-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.sma-modal-bg {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.sma-modal-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    background: var(--sma-bg);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: sma-modal-in 0.3s ease;
}

@keyframes sma-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sma-modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--sma-bg);
    color: var(--sma-text);
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    border: 1px solid var(--sma-border);
}

.sma-modal-close-btn:hover {
    background: var(--sma-secondary);
    color: #fff;
    transform: rotate(90deg);
}

.sma-modal-inner {
    display: flex;
    height: 90vh;
    max-height: 90vh;
    overflow: hidden;
}

/* Left side - Image (scrollable) */
.sma-modal-image {
    flex: 1.2;
    background: #111;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sma-modal-image .sma-image-scroll-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--sma-secondary) var(--sma-bg-alt);
}

.sma-modal-image .sma-image-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.sma-modal-image .sma-image-scroll-container::-webkit-scrollbar-track {
    background: var(--sma-bg-alt);
}

.sma-modal-image .sma-image-scroll-container::-webkit-scrollbar-thumb {
    background: var(--sma-secondary);
    border-radius: 4px;
}

.sma-modal-image .sma-scroll-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
}

.sma-modal-image .sma-scroll-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Right side - Details (scrollable) */
.sma-modal-details {
    flex: 0.8;
    background: var(--sma-bg);
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--sma-border);
}

.sma-m-title {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--sma-primary), var(--sma-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
}

.sma-m-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--sma-border);
    font-size: 0.95rem;
    color: var(--sma-text-muted);
}

.sma-m-meta i {
    margin-right: 8px;
    color: var(--sma-secondary);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sma-m-meta b {
    color: var(--sma-text);
    font-weight: 600;
    margin-left: 4px;
}

.sma-m-tech {
    margin-bottom: 24px;
}

.sma-m-tech strong {
    display: block;
    margin-bottom: 12px;
    color: var(--sma-text);
    font-size: 1rem;
}

.sma-tech-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--sma-bg-alt);
    border-radius: 50px;
    font-size: 0.85rem;
    margin: 0 8px 8px 0;
    color: var(--sma-text);
    border: 1px solid var(--sma-border);
    transition: all 0.2s;
}

.sma-tech-tag:hover {
    border-color: var(--sma-secondary);
    background: var(--sma-bg);
}

.sma-m-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--sma-text-secondary);
    margin-bottom: 30px;
    flex: 1;
    word-break: break-word;
}

.sma-m-desc p {
    margin-bottom: 1em;
}

.sma-visit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--sma-primary), var(--sma-secondary));
    color: #fff;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 25px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 8px 20px rgba(var(--sma-primary-rgb), 0.3);
    width: 100%;
    text-align: center;
}

.sma-visit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(var(--sma-primary-rgb), 0.4);
}

/* ==========================================================================
   Modal Action Buttons (Premium) - Compact & Responsive
   ========================================================================== */
.sma-m-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    border-top: 2px solid var(--sma-border);
    padding-top: 20px;
    flex-wrap: wrap;
}

.sma-action-btn {
    flex: 1 1 auto;
    min-width: 100px;
    background: var(--sma-bg-alt);
    border: 1px solid var(--sma-border);
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--sma-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.2;
}

.sma-action-btn i {
    font-size: 1.2rem;
    color: var(--sma-secondary);
    transition: all 0.3s;
}

.sma-action-btn:hover {
    border-color: var(--sma-secondary);
    background: var(--sma-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(var(--sma-secondary-rgb), 0.15);
}

.sma-action-btn:hover i {
    color: var(--sma-primary);
    transform: scale(1.1);
}

.sma-action-btn .c {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sma-text);
    margin-left: 4px;
}

.sma-action-btn.liked i {
    color: #ef4444;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .sma-modal-inner {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }
    
    .sma-modal-image {
        flex: 0 0 50vh;
        min-height: 300px;
    }
    
    .sma-modal-details {
        padding: 25px;
    }
    
    .sma-m-title {
        font-size: 2rem;
    }
    
    .sma-m-actions {
        gap: 8px;
        padding-top: 15px;
    }
    
    .sma-action-btn {
        min-width: 80px;
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {
    .sma-modal-content {
        border-radius: 16px;
    }
    
    .sma-modal-image {
        flex: 0 0 40vh;
    }
    
    .sma-modal-details {
        padding: 20px;
    }
    
    .sma-m-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .sma-m-meta {
        gap: 16px;
        margin-bottom: 16px;
        padding-bottom: 16px;
        font-size: 0.85rem;
    }
    
    .sma-m-meta i {
        font-size: 1rem;
        width: 18px;
    }
    
    .sma-tech-tag {
        padding: 4px 12px;
        font-size: 0.8rem;
    }
    
    .sma-m-desc {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .sma-visit-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .sma-action-btn {
        min-width: 70px;
        padding: 8px 6px;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 4px;
    }
    
    .sma-action-btn i {
        font-size: 1.1rem;
    }
    
    .sma-action-btn .c {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .sma-modal-image {
        flex: 0 0 35vh;
    }
    
    .sma-m-actions {
        flex-wrap: wrap;
    }
    
    .sma-action-btn {
        flex: 1 1 calc(50% - 4px);
    }
    
    .sma-m-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==========================================================================
   Mobile Responsiveness Fixes for Specific Layouts
   ========================================================================== */

/* Portfolio Case Study (Zigzag) - Mobile */
@media (max-width: 768px) {
    .layout-zigzag .sma-card {
        flex-direction: column !important;
        gap: 20px;
        margin-bottom: 40px;
    }
    .layout-zigzag .sma-media-box {
        height: 250px;
        width: 100%;
    }
    .layout-zigzag .sma-zigzag-info {
        padding: 25px;
    }
    .layout-zigzag h3 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .layout-zigzag .sma-desc-clip {
        font-size: 14px;
        margin-bottom: 20px;
    }
    .layout-zigzag .sma-view-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Museum Wall - Mobile */
@media (max-width: 768px) {
    .layout-museum .sma-card {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .layout-museum .sma-card:nth-child(even) {
        direction: ltr;
    }
    .layout-museum .sma-media-box {
        height: 300px;
    }
    .layout-museum h3 {
        font-size: 28px;
    }
    .layout-museum .sma-museum-desc {
        font-size: 16px;
    }
    .layout-museum .sma-view-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Download Gallery - Mobile */
@media (max-width: 768px) {
    .layout-download .sma-items-container {
        grid-template-columns: 1fr !important;
    }
    .sma-download-media {
        height: 250px;
    }
    .dl-card-actions h3 {
        font-size: 16px;
    }
    .dl-btn {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* Fanned Deck Carousel - Fix for proper fan effect */
.layout-carousel .swiper {
    width: 280px;
    height: 400px;
}
.layout-carousel .swiper-slide {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}
.layout-carousel .swiper-slide-active {
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
}
.layout-carousel .swiper-slide-prev,
.layout-carousel .swiper-slide-next {
    opacity: 0.5;
    transform: scale(0.9);
}
.layout-carousel .swiper-slide-prev {
    transform: translateX(-20px) scale(0.9);
}
.layout-carousel .swiper-slide-next {
    transform: translateX(20px) scale(0.9);
}
/* Ensure cards effect is visible */
.layout-carousel .swiper-slide {
    background: var(--sma-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ==========================================================================
   23. Backlink
   ========================================================================== */
.sma-backlink {
    display: block;
    text-align: center;
    margin-top: 30px;
    font-size: 10px;
    color: #94a3b8;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.sma-backlink:hover {
    opacity: 1;
}

/* ==========================================================================
   24. Toast Notifications
   ========================================================================== */
.sma-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sma-bg);
    color: var(--sma-text);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 999999;
}

/* ==========================================================================
   25. View Button (Common)
   ========================================================================== */
.sma-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sma-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ==========================================================================
   26. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .layout-split .sma-items-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .layout-split .sma-split-hero {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .sma-gallery-wrap {
        padding: 20px;
    }
    
    .layout-grid .sma-items-container,
    .layout-framed .sma-items-container,
    .layout-spotlight .sma-items-container {
        grid-template-columns: 1fr;
    }
    
    .layout-masonry .sma-masonry-container {
        flex-direction: column;
    }
    
    .layout-zigzag .sma-card {
        flex-direction: column !important;
        gap: 30px;
    }
    
    .layout-zigzag .sma-media-box {
        height: 300px;
    }
    
    .layout-museum .sma-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .layout-museum .sma-card:nth-child(even) {
        direction: ltr;
    }
    
    .sma-modal-split {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }
    
    .sma-modal-media-wrap {
        max-height: 40vh;
    }
    
    .sma-modal-info {
        min-width: auto;
        padding: 25px;
    }
    
    .layout-bento .sma-bento-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .layout-bento .sma-card:nth-child(4n+1) {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .layout-download .sma-items-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   27. SHINE EFFECT ON HOVER (Horizontal sweep) - SUBDUED VERSION
   ========================================================================== */
.sma-card::after,
.sma-download-card::after,
.sma-cinema-card::after,
.sma-slider-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 40%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.3) 60%,
        rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 4;
    mix-blend-mode: soft-light;
}

.sma-card:hover::after,
.sma-download-card:hover::after,
.sma-cinema-card:hover::after,
.sma-slider-card:hover::after {
    left: 100%;
}

/* Ensure modal media area has a fixed height so image scroll works */
.sma-modal-media-wrap {
    overflow: hidden !important;
    height: 100%;
}

.sma-modal-media-wrap .sma-image-scroll-container {
    height: 100%;
    width: 100%;
}

/* ==========================================================================
   28. ANIMATED BORDERS - MODERN CSS-ONLY (THEME COLORS)
   ========================================================================== */

/* Base border wrapper */
.sma-border-wrap {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: visible;
    z-index: 1;
}

/* All borders use pseudo-elements */
.sma-border-wrap::before,
.sma-border-wrap::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

/* ===== FLUX CHASER (animated dashed line) ===== */
.sma-border-flux .sma-border-wrap::before {
    border: 3px dashed transparent;
    background: linear-gradient(90deg, var(--sma-primary), var(--sma-secondary), var(--sma-primary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: flux-move 4s linear infinite;
    background-size: 200% 100%;
}
@keyframes flux-move {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* ===== HOUDINI GRADIENT (rotating conic) ===== */
.sma-border-houdini .sma-border-wrap::before {
    background: conic-gradient(from var(--gradient-angle), var(--sma-primary), var(--sma-secondary), var(--sma-primary));
    border-radius: inherit;
    animation: houdini-rotate 4s linear infinite;
}
@keyframes houdini-rotate {
    from { --gradient-angle: 0deg; }
    to { --gradient-angle: 360deg; }
}
@property --gradient-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

/* ===== GLITCH DISTORTION (RGB split) ===== */
.sma-border-glitch .sma-border-wrap::before,
.sma-border-glitch .sma-border-wrap::after {
    inset: -2px;
    border: 2px solid var(--sma-primary);
    background: transparent;
    mix-blend-mode: screen;
    animation: glitch-shift 2s infinite alternate;
}
.sma-border-glitch .sma-border-wrap::after {
    border-color: var(--sma-secondary);
    animation-delay: -0.5s;
    inset: -4px;
}
@keyframes glitch-shift {
    0% { transform: translate(0); clip-path: inset(0 0 0 0); }
    20% { transform: translate(2px, -2px); clip-path: inset(10% 0 20% 0); }
    40% { transform: translate(-2px, 1px); clip-path: inset(30% 0 10% 0); }
    60% { transform: translate(1px, 2px); clip-path: inset(0 20% 0 10%); }
    80% { transform: translate(-1px, -1px); clip-path: inset(10% 10% 20% 20%); }
    100% { transform: translate(0); clip-path: inset(0 0 0 0); }
}

/* ===== DATA STREAM (flowing light streaks) ===== */
.sma-border-datastream .sma-border-wrap::before {
    border: 2px solid transparent;
    background: linear-gradient(90deg, transparent, var(--sma-primary), var(--sma-secondary), transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 200% 100%;
    animation: datastream-flow 3s linear infinite;
}
@keyframes datastream-flow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* ==========================================================================
   LAYOUT: Liquid Accordion (Refined)
   ========================================================================== */
.layout-liquid .sma-liquid-container {
    display: flex;
    height: 60vh;
    min-height: 500px;
    gap: 8px;
    background: var(--sma-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sma-shadow);
}

.layout-liquid .sma-liquid-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
    border-radius: 0;
}

.layout-liquid .sma-liquid-item .sma-media-box {
    width: 100%;
    height: 100%;
    position: relative;
}

.layout-liquid .sma-liquid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.layout-liquid .sma-liquid-item:hover {
    flex: 3;
}

.layout-liquid .sma-liquid-item:hover img {
    transform: scale(1.05);
}

.layout-liquid .sma-liquid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 5;
    pointer-events: none;
}

.layout-liquid .sma-liquid-item:hover .sma-liquid-overlay {
    opacity: 1;
    transform: translateY(0);
}

.layout-liquid .sma-liquid-overlay h3 {
    margin: 0 0 5px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.layout-liquid .sma-liquid-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
}

/* ==========================================================================
   LAYOUT: Wall of Frames (Refined)
   ========================================================================== */
.layout-frames .sma-frames-container {
    position: relative;
    height: 80vh;
    min-height: 600px;
    margin: 40px 0;
}

.layout-frames .sma-frame-item {
    position: absolute;
    width: 260px;
    background: var(--sma-bg);
    padding: 12px 12px 35px 12px;
    border-radius: 8px;
    box-shadow: 0 20px 30px rgba(0,0,0,0.2), 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    transform-origin: center;
}

.layout-frames .sma-frame-item .sma-media-box {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    aspect-ratio: 4/5;
}

.layout-frames .sma-frame-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.layout-frames .sma-frame-item:hover {
    transform: scale(1.08) rotate(0deg) !important;
    z-index: 100;
    box-shadow: 0 30px 50px rgba(0,0,0,0.3);
}

.layout-frames .sma-frame-item:hover img {
    transform: scale(1.03);
}

.layout-frames .sma-frame-item figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--sma-text-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s;
}

.layout-frames .sma-frame-item:hover figcaption {
    color: var(--sma-text);
}

/* Frame positions - refined for better visual balance */
.layout-frames .sma-frame-1 { top: 5%; left: 5%; transform: rotate(-4deg); }
.layout-frames .sma-frame-2 { top: 15%; left: 30%; transform: rotate(3deg); z-index: 2; width: 280px; }
.layout-frames .sma-frame-3 { bottom: 15%; left: 15%; transform: rotate(-6deg); width: 240px; }
.layout-frames .sma-frame-4 { top: 25%; right: 10%; transform: rotate(5deg); width: 270px; }
/* Add more if needed */

/* ==========================================================================
   LAYOUT: Focus Blur (Refined)
   ========================================================================== */
.layout-focus .sma-focus-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.layout-focus .sma-focus-item {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--sma-shadow);
    transition: all 0.3s ease;
}

.layout-focus .sma-focus-item .sma-media-box {
    width: 100%;
    height: 100%;
}

.layout-focus .sma-focus-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.layout-focus .sma-focus-list:hover .sma-focus-item {
    filter: brightness(0.6) blur(2px);
    transition: filter 0.4s ease;
}

.layout-focus .sma-focus-list:hover .sma-focus-item:hover {
    filter: brightness(1.1) blur(0px);
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.layout-focus .sma-focus-item:hover img {
    transform: scale(1.05);
}

.layout-focus .sma-focus-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.layout-focus .sma-focus-item:hover .sma-focus-content {
    opacity: 1;
    transform: translateY(0);
}

.layout-focus .sma-focus-content h3 {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.layout-focus .sma-focus-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    max-width: 70%;
}
/* ==========================================================================
   TORCH LIGHT EFFECT (CONICAL BEAM + CURSOR SPOTLIGHT)
   ========================================================================== */

/* Original torch lamp */
.sma-torch-structure {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99995;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sma-torch-on .sma-torch-structure {
    opacity: 1;
}

.sma-torch-wire {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #888);
}

.sma-torch-head {
    width: 120px;
    height: 40px;
    background: linear-gradient(180deg, #444, #222);
    border-radius: 100px 100px 0 0;
    border: 1px solid #666;
    border-bottom: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.sma-torch-bulb {
    width: 50px;
    height: 20px;
    background: #ffeedd;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 5px 15px #fff,
                0 10px 30px rgba(255, 200, 0, 0.6),
                0 20px 60px rgba(255, 100, 0, 0.4);
    animation: sma-flicker 4s infinite alternate;
}

@keyframes sma-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
    52% { opacity: 0.9; }
    54% { opacity: 1; }
}

/* Dimmer overlay – cuts holes for beam and cursor */
.sma-torch-dimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
     background-color: rgba(0, 0, 0, 0.7); 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99990;
    /* Beam origin at 50% horizontally, 6.5rem from top (aligns with bulb) */
    mask-image: 
        conic-gradient(from 155deg at 50% 6.5rem, 
            black 0deg 10deg,
            rgba(0,0,0,0.1) 30deg,
            transparent 45deg,
            transparent 55deg,
            rgba(0,0,0,0.1) 70deg,
            black 90deg 360deg),
        radial-gradient(circle 280px at var(--mouse-x, 50%) var(--mouse-y, 50%), 
            transparent 0%, black 100%);
    -webkit-mask-image: 
        conic-gradient(from 135deg at 50% 6.5rem, 
            black 0deg 10deg,
            rgba(0,0,0,0.1) 30deg,
            transparent 45deg,
            transparent 55deg,
            rgba(0,0,0,0.1) 70deg,
            black 90deg 360deg),
        radial-gradient(circle 280px at var(--mouse-x, 50%) var(--mouse-y, 50%), 
            transparent 0%, black 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.sma-torch-distance-fade {
    background: linear-gradient(to bottom, transparent 65%, rgba(1, 4, 9, 0.4) 100%);
}

.sma-torch-on .sma-torch-dimmer {
    opacity: 1;
}

/* Container for multiple beam layers – centered */
.sma-torch-beams {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99991;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Radial mask to soften edges, centered at same point */
    mask-image: radial-gradient(circle at 50% 6.5rem, black 10%, transparent 95%);
    -webkit-mask-image: radial-gradient(circle at 50% 6.5rem, black 10%, transparent 95%);
}

.sma-torch-on .sma-torch-beams {
    opacity: 1;
}

/* Base beam styling */
.sma-torch-beam-main,
.sma-torch-beam-ray1,
.sma-torch-beam-ray2 {
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
    filter: blur(15px);
    animation: sma-light-shimmer 6s infinite alternate ease-in-out;
}

/* Main beam – centered */
.sma-torch-beam-main {
    background: conic-gradient(from 140deg at 50% 6.5rem, 
        transparent 0deg, 
        rgba(255, 250, 200, 0.2) 25deg, 
        rgba(255, 255, 255, 0.4) 45deg, 
        rgba(255, 250, 200, 0.2) 65deg, 
        transparent 90deg);
}

/* Additional ray layers – centered */
.sma-torch-beam-ray1 {
    background: conic-gradient(from 135deg at 50% 6.5rem, 
        transparent 0deg, 
        rgba(255, 250, 200, 0.15) 25deg, 
        transparent 45deg);
    animation-delay: -2s;
}

.sma-torch-beam-ray2 {
    background: conic-gradient(from 180deg at 50% 6.5rem, 
        transparent 0deg, 
        rgba(255, 250, 200, 0.15) 30deg, 
        transparent 55deg);
    animation-delay: -4s;
}

@keyframes sma-light-shimmer {
    0% { opacity: 0.5; transform: scaleX(1); }
    100% { opacity: 0.8; transform: scaleX(1.1); }
}

/* Cursor glow – large radial that follows mouse */
.sma-torch-cursor-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                rgba(255, 255, 255, 0.12) 0%, transparent 100%);
    z-index: 99992;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sma-torch-on .sma-torch-cursor-glow {
    opacity: 1;
}

/* Cursor dot */
.sma-torch-cursor-dot {
    position: fixed;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    z-index: 99999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 25px #fff, 0 0 50px #fff9c4;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sma-torch-on .sma-torch-cursor-dot {
    opacity: 1;
}

/* Distance fade at bottom (optional) */
.sma-torch-distance-fade {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, transparent 65%, rgba(1, 4, 9, 0.8) 100%);
    z-index: 99989;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sma-torch-on .sma-torch-distance-fade {
    opacity: 1;
}

/* Ensure all torch elements are non-interactive */
.sma-torch-structure,
.sma-torch-dimmer,
.sma-torch-beams,
.sma-torch-cursor-glow,
.sma-torch-distance-fade {
    pointer-events: none;
}
/* ==========================================================================
   Torch Toggle Button – Enhanced Design
   ========================================================================== */
.sma-torch-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.sma-torch-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sma-bg);
    border: 2px solid var(--sma-border);
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--sma-text);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sma-torch-btn i {
    font-size: 18px;
    color: var(--sma-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.sma-torch-btn .sma-torch-label {
    transition: color 0.3s ease;
}

/* Hover effect */
.sma-torch-btn:hover {
    border-color: var(--sma-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--sma-secondary-rgb), 0.2);
}

.sma-torch-btn:hover i {
    color: var(--sma-primary);
    transform: scale(1.1);
}

/* Active state (torch on) */
.sma-torch-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.sma-torch-btn.active i {
    color: #fff;
}

/* Dark mode adjustments */
.theme-dark .sma-torch-btn {
    background: var(--sma-bg-alt);
    border-color: var(--sma-border);
    color: var(--sma-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-dark .sma-torch-btn.active {
    background: var(--gradient);
    color: #fff;
}

/* Optional: pulse animation when active */
@keyframes sma-torch-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.sma-torch-btn.active {
    animation: sma-torch-pulse 2s infinite;
}