/* =========================================
   1. Global Resets & Variables - The Foundation of Luxury
   ========================================= */
:root {
    /* Color Palette - Dark & Gold Theme */
    --color-bg-main: #121212; /* Very dark charcoal */
    --color-bg-secondary: #1a1a1a; /* Contrast dark */
    --color-text-primary: #f0f0f0; /* Off-white */
    --color-text-secondary: #b3b3b3; /* Muted gray */
    --color-gold-accent: #D4AF37; /* Antique Gold */
    --color-gold-hover: #F2C94C; /* Brighter gold */
    --color-dark-overlay: rgba(0, 0, 0, 0.6);

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-bold: 700;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --box-shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography Standards */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.05em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; color: var(--color-gold-accent); margin-bottom: 1rem; }
p { margin-bottom: 1.5rem; font-weight: var(--font-weight-light); color: var(--color-text-secondary); }
a { text-decoration: none; color: inherit; transition: var(--transition-smooth); }
ul { list-style: none; }

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-gold-accent);
    margin-bottom: 4rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.dark-bg {
    background-color: var(--color-bg-secondary);
}

/* =========================================
   2. Navigation Bar
   ========================================= */
.navbar {
    display: flex;
    justify-content: flex-start; /* Items start from left */
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background-color: rgba(18, 18, 18, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    padding: 1rem 5%;
}

.logo a {
    display: flex;
    flex-direction: column;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.1em;
    color: var(--color-gold-accent);
    line-height: 1.2;
}

/* New Subtitle with Dynamic Animation */
.logo-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem; /* Smaller font */
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-top: 5px;
    
    /* Dynamic Gradient Effect */
    background: linear-gradient(110deg, #b88a4d 20%, #ffebcd 40%, #b88a4d 60%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: goldShimmer 4s linear infinite;
}

@keyframes goldShimmer {
    to {
        background-position: 200% center;
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
    /* This pushes the links to the right, and the Lang switch follows them */
    margin-left: auto; 
    margin-right: 2rem;
}

.nav-links li a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--color-gold-accent);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    /* On desktop it's naturally on the right now due to HTML structure */
}

.lang-btn {
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition-smooth);
    font-weight: var(--font-weight-bold);
}

.lang-btn:hover, .lang-btn.active {
    opacity: 1;
    color: var(--color-gold-accent);
}

.separator { margin: 0 5px; opacity: 0.3; }
.hamburger { display: none; color: var(--color-text-primary); font-size: 1.5rem; cursor: pointer; }

/* =========================================
   3. Hero Section (Updated for Safari Fix & Luxury)
   ========================================= */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* Background Image Setup */
    background-image: url('https://shivanaartcenter.com/wp-content/uploads/2022/12/photo_2022-12-12_18-24-06.jpg');
    background-size: cover;
    background-position: center;
    
    /* Default: Fixed for Desktop Parallax */
    background-attachment: fixed;
}

/* SAFARI / MOBILE FIX: Disable fixed background on mobile to prevent missing image */
@media (max-width: 1024px) {
    .hero {
        background-attachment: scroll;
    }
}
/* Specific fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .hero {
        background-attachment: scroll;
    }
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Darker overlay to make the gold text pop */
    background: linear-gradient(to bottom, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px; /* Wider to fit big text */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Main Title: The Soul of Sound */
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic; /* Makes it look more "Soulful" */
    font-size: 5.5rem; /* Very Large */
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    
    /* Gold Text Gradient Effect */
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    
    /* Text Shadow/Glow */
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    
    /* Animation */
    animation: shine 5s linear infinite, heroTextUp 1.2s ease-out forwards;
    opacity: 0; /* Starts invisible */
}

/* Subtitle: Handcrafted... */
.hero p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 300;
    color: #f0f0f0;
    
    /* تغییر مهم: فاصله پایین به 0 یا عددی بسیار کوچک تغییر کرد */
    margin-bottom: 0; 
    
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: heroTextUp 1.2s ease-out 0.5s forwards;
    opacity: 0;
}

/* --- استایل‌های جدید برای لوگوی SVG با افکت طلایی --- */
.hero-logo-wrapper {
    width: 280px;
    height: 280px;
    
    /* تغییر مهم: مارجین بالا 0 شد */
    /* ترتیب: بالا(0) - راست(auto) - پایین(2rem برای فاصله تا دکمه) - چپ(auto) */
    margin: 0 auto 2rem auto; 
    
    animation: heroTextUp 1.2s ease-out 0.8s forwards;
    opacity: 0;
}


@media (max-width: 768px) {
    .hero-logo-wrapper {
        width: 180px;
        height: 180px;
        /* فاصله پایین در موبایل کمی کمتر */
        margin: 0 auto 1.5rem auto; 
    }
}

.hero-logo-mask {
    width: 100%;
    height: 100%;
    
    /* ایجاد رنگ طلایی متحرک (دقیقا مشابه متن) */
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    background-size: 200% auto;
    animation: shine 5s linear infinite;
    
    /* اعمال لوگو به عنوان ماسک */
    -webkit-mask-image: url('https://shivanaartcenter.com/logo.svg');
    mask-image: url('https://shivanaartcenter.com/logo.svg');
    
    -webkit-mask-size: contain;
    mask-size: contain;
    
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    
    -webkit-mask-position: center;
    mask-position: center;
}

/* Button Animation */
.hero .cta-btn {
    animation: heroTextUp 1.2s ease-out 1.1s forwards; /* 1.1s delay */
    opacity: 0;
}

/* Button Styling */
.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: transparent;
    border: 2px solid var(--color-gold-accent);
    color: var(--color-gold-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.9rem;
    font-weight: var(--font-weight-bold);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: var(--transition-smooth);
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background-color: var(--color-gold-accent);
    transition: var(--transition-smooth);
    z-index: -1;
}

.cta-btn:hover {
    color: var(--color-bg-main);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.cta-btn:hover::before {
    width: 100%;
}

/* Animation Keyframes */
@keyframes heroTextUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5rem; /* Smaller on mobile but still big */
    }
    .hero p {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    /* تنظیم سایز و فاصله لوگو در موبایل */
    .hero-logo-wrapper {
        width: 180px; /* افزایش سایز موبایل */
        height: 180px;
        margin-bottom: 1rem; /* کاهش فاصله در موبایل */
    }
}

/* =========================================
   4. About Section
   ========================================= */
.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 1;
    height: 500px;
    position: relative;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 20px; left: 20px;
    width: 100%; height: 100%;
    border: 2px solid var(--color-gold-accent);
    z-index: 0;
    opacity: 0.3;
}

.about-text { flex: 1; }
.about-text h2 { font-size: 2.5rem; }

/* =========================================
   5. Gallery Section
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

@media (min-width: 768px) {
    .large-item {
        grid-column: span 2;
        grid-row: span 2;
    }
    .large-item .gallery-img-box {
        height: 100%;
        min-height: 500px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--box-shadow-soft);
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
}

.gallery-item:hover {
    border-bottom-color: var(--color-gold-accent);
    transform: translateY(-5px);
}

.gallery-img-box {
    height: 400px;
    overflow: hidden;
}

.gallery-info {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.6), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
}

@media (min-width: 769px) {
    .gallery-item:hover .gallery-info {
        transform: translateY(0);
        opacity: 1;
    }
}

.gallery-info h3 { margin-bottom: 0.2rem; color: var(--color-text-primary); }
.gallery-info p { color: var(--color-gold-accent); margin: 0; font-size: 0.9rem; }

/* =========================================
   6. Video Section
   ========================================= */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    box-shadow: var(--box-shadow-soft);
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* =========================================
   7. Contact Section
   ========================================= */
.contact-wrapper {
    display: flex;
    gap: 4rem;
}

.contact-info, .contact-form { flex: 1; }

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.info-item i {
    color: var(--color-gold-accent);
    font-size: 1.5rem;
    margin-right: 1.5rem;
    width: 30px; text-align: center;
}

.social-links { margin-top: 2rem; }
.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px; height: 50px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    margin-right: 1rem;
    color: var(--color-gold-accent);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background-color: var(--color-gold-accent);
    color: var(--color-bg-main);
    transform: scale(1.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    resize: none;
    transition: var(--transition-smooth);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-bottom-color: var(--color-gold-accent);
}

.submit-btn {
    padding: 1rem 2rem;
    background-color: var(--color-gold-accent);
    color: var(--color-bg-main);
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
    align-self: flex-start;
}

.submit-btn:hover {
    background-color: var(--color-gold-hover);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

/* =========================================
   8. Footer & Cookie
   ========================================= */
footer {
    background-color: #0a0a0a;
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.footer-links a:hover {
    color: var(--color-gold-accent);
    border-bottom-color: var(--color-gold-accent);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.98);
    border-top: 1px solid var(--color-gold-accent);
    padding: 1.5rem;
    z-index: 2000;
    transform: translateY(0);
    transition: transform 0.5s ease-in-out;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
}

.cookie-btn {
    background-color: var(--color-gold-accent);
    color: var(--color-bg-main);
    border: none;
    padding: 0.5rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cookie-btn:hover {
    background-color: #fff;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   9. Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .about-container, .contact-wrapper {
        flex-direction: column;
        gap: 3rem;
    }
    .about-image, .about-text, .contact-info, .contact-form { flex: auto; width: 100%; }
    .about-image { height: 400px; }
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    /* Navigation Adjustments for Mobile */
    .nav-links { display: none; }
    .hamburger { display: block; margin-left: auto; } /* Ensure hamburger is on right */
    
    .lang-switch {
        display: flex;
        margin-right: 1.5rem;
        /* Force position on mobile row */
        order: -1; /* Keep it left of hamburger if you want, or handle with margin */
        margin-left: auto; /* Push it to right next to hamburger */
    }
    
    /* When Menu is Active (The Fix for sticking to top) */
    .navbar.mobile-active {
        background-color: var(--color-bg-main);
        flex-direction: column;
        align-items: center;
        /* Padding top ensures content doesn't hit the very top edge */
        padding: 80px 2rem 2rem 2rem; 
        height: auto;
        justify-content: flex-start;
    }
    
    /* Re-structuring for open menu */
    .navbar.mobile-active .logo { 
        display: block; 
        text-align: center;
        margin-bottom: 30px;
        margin-top: 10px;
    }
    
    .navbar.mobile-active .nav-links {
        display: flex; flex-direction: column; align-items: center; gap: 1.5rem; margin: 0;
    }
    
    /* Positioning the Controls absolutely when menu is open so they don't scroll away */
    .navbar.mobile-active .hamburger {
        position: absolute;
        top: 25px;
        right: 5%;
    }
    
    /* Keep Lang switch accessible at top too */
    .navbar.mobile-active .lang-switch {
        position: absolute;
        top: 30px;
        right: 60px; /* Left of the hamburger */
        margin: 0;
    }

    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1rem; letter-spacing: 1px; }
    .section-title { font-size: 2.5rem; }
    
    .video-grid { grid-template-columns: 1fr; }
    .video-wrapper { padding-bottom: 75%; }

    .gallery-info {
        opacity: 1 !important;
        transform: translateY(0) !important;
        background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.5));
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
}

/* =========================================
   10. Image Loading Effects (Skeleton & Fade)
   ========================================= */

/* استایل باکس نگهدارنده عکس */
.gallery-img-box {
    position: relative;
    background-color: #1a1a1a; /* رنگ زمینه تیره */
    overflow: hidden;
    /* انیمیشن لودینگ (Shimmer Effect) */
    background: linear-gradient(
        90deg, 
        #1a1a1a 0%, 
        #2a2a2a 50%, 
        #1a1a1a 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite linear;
}

/* تعریف حرکت انیمیشن */
@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* استایل خود عکس‌ها */
.gallery-img-box img {
    opacity: 0; /* در ابتدا نامرئی */
    transition: opacity 0.8s ease-in-out; /* افکت نرم برای ظاهر شدن */
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* کلاسی که جاوااسکریپت اضافه می‌کند تا عکس دیده شود */
.gallery-img-box img.loaded {
    opacity: 1;
    animation: none; /* توقف انیمیشن پس‌زمینه (اختیاری) */
}