/* Color Palette - Matching the painting */
:root {
    --golden-brown: #8B6F47;
    --dark-golden: #6B5B3D;
    --light-gold: #D4AF37;
    --pale-gold: #F4E4BC;
    --red-primary: #C41E3A;
    --dark-red: #8B0000;
    --dark-green: #2D5016;
    --forest-green: #1A3D0E;
    --light-blue-green: #7FB3B3;
    --teal-green: #5A9A9A;
    --olive-green: #6B7E4A;
    --pink-diamond: #E8C4C4;
    --beige: #F5E6D3;
    --pattern-gray: #D3D3D3;
    --text-dark: #2C2416;
    --text-light: #5A4A3A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: linear-gradient(135deg, var(--pale-gold) 0%, var(--beige) 50%, var(--pale-gold) 100%);
    color: var(--text-dark);
    line-height: 1.8;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Pattern */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(139, 111, 71, 0.03) 35px, rgba(139, 111, 71, 0.03) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(196, 30, 58, 0.02) 35px, rgba(196, 30, 58, 0.02) 70px);
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    position: relative;
}

.header::before,
.header::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--golden-brown), transparent);
}

.header::before {
    top: 0;
}

.header::after {
    bottom: 0;
}

.site-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--dark-red);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.site-title::before,
.site-title::after {
    content: '✦';
    color: var(--light-gold);
    font-size: 2rem;
    margin: 0 1rem;
    opacity: 0.7;
}

.site-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 300;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Main Content */
.main-content {
    margin: 3rem 0;
}

.featured-artwork {
    background: linear-gradient(135deg, var(--beige) 0%, #FFF8F0 100%);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.featured-artwork::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Artwork Frame */
.artwork-frame {
    position: relative;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--golden-brown) 0%, var(--dark-golden) 100%);
    border-radius: 15px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(212, 175, 55, 0.2);
}

.frame-decoration {
    height: 30px;
    background: repeating-linear-gradient(
        90deg,
        var(--light-gold) 0px,
        var(--light-gold) 10px,
        var(--golden-brown) 10px,
        var(--golden-brown) 20px
    );
    border-radius: 5px;
    margin: 0 -1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.frame-decoration.bottom {
    margin-top: 1rem;
}

.artwork-image-wrapper {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    background: var(--dark-golden);
    padding: 10px;
}

.artwork-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    transition: transform 0.5s ease;
}

.artwork-image:hover {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(139, 111, 71, 0.1) 0%,
        transparent 20%,
        transparent 80%,
        rgba(139, 111, 71, 0.1) 100%
    );
    pointer-events: none;
}

/* Description */
.artwork-description {
    margin: 3rem 0;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    border-right: 4px solid var(--red-primary);
    position: relative;
    backdrop-filter: blur(10px);
}

.artwork-description::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(196, 30, 58, 0.1) 0%, transparent 70%);
    border-radius: 0 15px 0 100%;
}

.description-content {
    position: relative;
    z-index: 1;
}

.description-text {
    font-size: 1.1rem;
    line-height: 2.2;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: justify;
    font-weight: 400;
}

.description-text:last-child {
    margin-bottom: 0;
}

/* CTA Button */
.cta-section {
    text-align: center;
    margin-top: 3rem;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--red-primary) 0%, var(--dark-red) 100%);
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 
        0 8px 25px rgba(196, 30, 58, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.show-more-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.show-more-btn:hover::before {
    width: 300px;
    height: 300px;
}

.show-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(196, 30, 58, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-decoration {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    color: var(--light-gold);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Gallery Page */
.back-link {
    display: inline-block;
    color: var(--red-primary);
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-link:hover {
    color: var(--dark-red);
    transform: translateX(-5px);
}

.gallery-main {
    margin: 3rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    background: linear-gradient(135deg, var(--beige) 0%, #FFF8F0 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 3px solid transparent;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--golden-brown), var(--red-primary));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: var(--light-gold);
}

.gallery-item:hover::before {
    opacity: 0.1;
}

.gallery-item-image-wrapper {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--golden-brown) 0%, var(--dark-golden) 100%);
    overflow: hidden;
}

.gallery-item-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 2;
}

.gallery-item:hover .gallery-item-image {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.overlay-icon {
    color: white;
    font-size: 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    touch-action: none;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 10px 80px;
    box-sizing: border-box;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
    margin: auto;
    transition: opacity 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10001;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-close:active {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
    z-index: 10001;
    box-sizing: border-box;
}

.lightbox-btn {
    pointer-events: all;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-btn:hover,
.lightbox-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.15);
}

.lightbox-btn.prev {
    right: 10px;
}

.lightbox-btn.next {
    left: 10px;
}

/* Footer */
.footer {
    margin-top: 5rem;
    padding: 2rem 0;
    text-align: center;
    position: relative;
}

.footer-pattern {
    height: 40px;
    background: repeating-linear-gradient(
        90deg,
        var(--red-primary) 0px,
        var(--red-primary) 20px,
        var(--pink-diamond) 20px,
        var(--pink-diamond) 40px,
        var(--pattern-gray) 40px,
        var(--pattern-gray) 60px
    );
    border-radius: 5px;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.footer-text {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

/* Instagram Button */
.instagram-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #E1306C 0%, #C13584 50%, #833AB4 100%);
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    box-shadow: 
        0 6px 20px rgba(225, 48, 108, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 1rem;
}

.instagram-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.instagram-btn:hover::before {
    width: 300px;
    height: 300px;
}

.instagram-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(225, 48, 108, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.instagram-icon {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.instagram-btn:hover .instagram-icon {
    transform: scale(1.1) rotate(5deg);
}

.instagram-text {
    position: relative;
    z-index: 1;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .site-subtitle {
        font-size: 1rem;
    }

    .featured-artwork {
        padding: 1.5rem;
    }

    .artwork-description {
        padding: 1.5rem;
    }

    .description-text {
        font-size: 1rem;
        line-height: 2;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-item-image {
        height: 300px;
    }

    .show-more-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .lightbox {
        height: 100dvh;
    }

    .lightbox-content {
        padding: 50px 5px 70px;
    }

    .lightbox-image {
        max-width: 95%;
        max-height: calc(100dvh - 120px);
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }

    .lightbox-nav {
        padding: 0 5px;
    }

    .lightbox-btn {
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }

    .lightbox-btn.prev {
        right: 5px;
    }

    .lightbox-btn.next {
        left: 5px;
    }

    .instagram-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .instagram-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 2rem;
    }

    .site-title::before,
    .site-title::after {
        font-size: 1.5rem;
        margin: 0 0.5rem;
    }

    .featured-artwork {
        padding: 1rem;
    }

    .artwork-frame {
        padding: 1rem;
    }

    .lightbox {
        height: 100dvh;
    }

    .lightbox-content {
        padding: 40px 5px 60px;
    }

    .lightbox-image {
        max-width: 98%;
        max-height: calc(100dvh - 100px);
    }

    .lightbox-close {
        top: 5px;
        right: 5px;
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }

    .instagram-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .instagram-icon {
        width: 18px;
        height: 18px;
    }
}


