:root {
    --brand-blue: #20406b; 
    --brand-green: #8dc63f; 
    --text-dark: #1a2b3c;
    --site-bg: #cdd5af; 
    
    --glass-bg: rgba(255, 255, 255, 0.35);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --blur-amount: 12px;
}

body {
    margin: 0; padding: 0;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--text-dark);
    background-color: var(--site-bg);
    background-image: url('intropic.jpg'); 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow-x: hidden;
    direction: ltr;
    padding-bottom: 80px; 
}

a { text-decoration: none; color: inherit; }
* { box-sizing: border-box; }

/* --- Header --- */
.floating-header {
    position: fixed; top: 0; right: 0; left: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px;
    box-shadow: var(--glass-shadow);
    z-index: 1000;
}
.logo-img { height: 50px; width: auto; }
.coop-btn {
    display: flex; align-items: center;
    background-color: var(--brand-green);
    color: white;
    padding: 8px 15px; border-radius: 25px;
    transition: transform 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.coop-btn:hover { transform: scale(1.05); }
.coop-text { font-size: 0.9rem; font-weight: bold; margin-right: 10px; }
.coop-icon { height: 24px; width: auto; filter: brightness(0) invert(1); }

/* --- Hero Slogan Box --- */
.hero-title-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 60vh;
    display: flex; justify-content: center; align-items: center;
    z-index: 0; margin-top: 70px;
}

.hero-glass-title {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 20px 40px; 
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    
    position: relative;
    overflow: hidden;
    transition: max-height 0.5s ease;
    cursor: pointer;
}

.hero-glass-title.closed { max-height: 140px; }
.hero-glass-title.open { max-height: 55vh; overflow-y: auto; }

.hero-glass-title.closed .blur-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9));
}
.hero-glass-title.open .blur-overlay { display: none; }

.hero-glass-title h1 {
    margin: 0 0 20px 0; color: var(--brand-blue); font-size: 2rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}
.hero-glass-title p {
    text-align: justify; line-height: 1.6; font-size: 0.95rem; color: var(--text-dark);
}

/* --- Book Box --- */
.book-box {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; justify-content: center; align-items: center;
    padding: 40px 20px;
    background-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.book-box.first-box { margin-top: 85vh; }

.book-column { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; }
.book-image-container { width: 100%; margin-bottom: 15px; }
.book-pic { width: 100%; height: auto; display: block; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 16px rgba(0,0,0,0.15); }
.book-name {
    width: 100%; background: var(--glass-bg); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
    border: var(--glass-border); color: var(--brand-blue); text-align: center; padding: 15px 10px;
    box-shadow: var(--glass-shadow); margin-bottom: 15px; border-radius: 15px; position: relative; z-index: 2;
}
.book-name h2 { margin: 0; font-size: 1.2rem; line-height: 1.4; }
.book-sum {
    width: 100%; background: var(--glass-bg); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
    border: var(--glass-border); padding: 20px; border-radius: 15px; margin-bottom: 15px;
    cursor: pointer; line-height: 1.6; position: relative; overflow: hidden;
    transition: all 0.3s ease; text-align: left; box-shadow: var(--glass-shadow);
}
.book-sum.closed { max-height: 120px; }
.book-sum.closed .blur-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.8));
}
.book-sum.open .blur-overlay { display: none; }

.audio-icons { width: 100%; display: flex; gap: 10px; justify-content: space-between; }
.audio-btn {
    flex: 1; text-align: center; padding: 12px 0; border-radius: 15px; color: white; font-size: 0.9rem; font-weight: bold;
    cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: background 0.2s, transform 0.2s; user-select: none;
}
.audio-btn:hover { opacity: 0.9; transform: translateY(-3px); }
.en { background-color: var(--brand-blue); }
.ar { background-color: var(--text-dark); }
.fa { background-color: var(--brand-green); }

.get-book-box {
    width: 100%; margin-top: 15px; padding: 12px 0; display: flex; justify-content: center; align-items: center; gap: 10px;
    background: var(--glass-bg); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
    border: var(--glass-border); box-shadow: var(--glass-shadow); border-radius: 15px;
    color: var(--brand-blue); font-weight: bold; text-decoration: none; transition: all 0.3s ease;
}
.get-book-box:hover { background-color: rgba(255,255,255, 0.6); transform: translateY(-3px); color: var(--brand-blue); }
.get-book-box i { font-size: 1.2rem; }

/* --- Sections --- */
.quick-links-section, .gallery-section, .intro-text-section {
    position: relative; z-index: 1; padding: 40px 20px; background-color: transparent; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.intro-text-section { border-top: 1px solid rgba(255,255,255,0.3); }
.gallery-section { border-top: 1px solid rgba(255,255,255,0.3); }

.ai-intro-box, .intro-text {
    background: var(--glass-bg); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
    border: var(--glass-border); box-shadow: var(--glass-shadow); padding: 30px; border-radius: 20px;
    max-width: 800px; width: 100%; margin-bottom: 40px; text-align: center;
    position: relative; overflow: hidden; transition: max-height 0.5s ease; cursor: pointer;
}
.ai-intro-box.closed, .intro-text.closed { max-height: 220px; }
.ai-intro-box.open, .intro-text.open { max-height: 1200px; }
.blur-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 80px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9)); }
.open .blur-overlay { display: none; }
h3 { color: var(--brand-blue); margin-top: 0; margin-bottom: 15px; font-size: 1.4rem; }
p { text-align: justify; line-height: 1.6; color: var(--text-dark); margin-top: 0; }

.links-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; max-width: 800px; margin: 0 auto; }
.link-box {
    display: flex; flex-direction: column; align-items: center; justify-content: center; width: 140px; height: 130px;
    background: var(--glass-bg); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
    border: var(--glass-border); border-radius: 15px; color: var(--brand-blue); transition: all 0.3s ease; box-shadow: var(--glass-shadow); padding: 10px; text-align: center;
}
.link-box:hover { background-color: rgba(255,255,255, 0.6); color: var(--brand-blue); transform: translateY(-5px); box-shadow: 0 12px 24px rgba(31, 38, 135, 0.2); }
.link-icon { font-size: 2.2rem; margin-bottom: 8px; }
.link-title { font-weight: bold; font-size: 0.85rem; line-height: 1.2; }

/* --- Gallery Styles --- */
.gallery-title-box {
    background: var(--glass-bg); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
    border: var(--glass-border); box-shadow: var(--glass-shadow); padding: 15px 40px; border-radius: 15px; margin-bottom: 30px;
    text-align: center; color: var(--brand-blue); max-width: 300px; width: auto;
}
.gallery-container { width: 100%; display: flex; overflow-x: auto; gap: 15px; padding-bottom: 15px; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
.gallery-container::-webkit-scrollbar { display: none; }
.gallery-container img { height: 200px; width: auto; border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); flex-shrink: 0; transition: transform 0.3s; }
.gallery-container img:hover { transform: scale(1.03); }

/* --- Main Site & Footer --- */
.main-site-section {
    position: relative; z-index: 1; width: 100%; height: 300px;
    background-image: url('orginalsite.jpg'); background-size: cover; background-position: center;
    display: flex; justify-content: center; align-items: center; border-top: 4px solid var(--brand-green);
}
.main-site-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); }
.site-link-container { position: relative; z-index: 1; }
.site-link-btn {
    display: inline-block; padding: 15px 40px; background-color: rgba(141, 198, 63, 0.9); backdrop-filter: blur(5px);
    color: white; font-size: 1.2rem; font-weight: bold; border-radius: 50px; border: 1px solid rgba(255,255,255,0.5); 
    box-shadow: 0 0 20px rgba(0,0,0,0.5); transition: transform 0.3s, background 0.3s;
}
.site-link-btn:hover { transform: scale(1.1); background-color: var(--white); color: var(--brand-green); border-color: var(--brand-green); }

.mobile-footer {
    background: rgba(26, 26, 26, 0.75); backdrop-filter: blur(var(--blur-amount)); -webkit-backdrop-filter: blur(var(--blur-amount));
    color: #ccc;
    padding: 30px 20px 90px 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    border-top: 4px solid var(--brand-green); position: relative; z-index: 2;
}
.footer-logo { font-size: 2rem; color: var(--brand-green); margin-bottom: 10px; }
.contact-links { display: flex; flex-direction: column; align-items: center; width: 100%; }
.contact-links p { margin: 5px 0; direction: ltr; color: var(--brand-green); font-weight: bold; }
.socials { margin-top: 20px; width: 100%; display: flex; justify-content: center; gap: 20px; }
.socials a {
    color: var(--brand-green); margin: 0; font-size: 1.5rem; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05);
}
.socials a:hover { color: #fff; background: var(--brand-green); transform: translateY(-3px); }

.copyright-section {
    width: 100%; margin-top: 15px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem; color: #777; margin-bottom: -10px;
}

/* --- Music Player Styles --- */
.music-player {
    position: fixed; bottom: -150px; left: 0; width: 100%; z-index: 2000;
    background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 10px 20px; border-radius: 20px 20px 0 0;
}
.music-player.active { bottom: 0; }
.player-content { max-width: 800px; margin: 0 auto; position: relative; display: flex; flex-direction: column; gap: 10px; }
.close-player-btn { position: absolute; top: 0px; right: 0px; background: none; border: none; color: var(--text-dark); font-size: 1.2rem; cursor: pointer; padding: 5px; opacity: 0.6; transition: opacity 0.2s; }
.close-player-btn:hover { opacity: 1; color: red; }
.track-info { text-align: center; }
.track-info h4 { margin: 0; color: var(--brand-blue); font-size: 1rem; }
.track-info span { font-size: 0.8rem; color: #555; }
.player-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.control-btn { background: var(--brand-blue); color: white; border: none; border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: transform 0.2s; }
.control-btn:hover { transform: scale(1.1); background: var(--brand-green); }
.progress-container { flex-grow: 1; display: flex; align-items: center; gap: 10px; }
.progress-container span { font-size: 0.8rem; color: var(--text-dark); min-width: 40px; }
input[type="range"] { width: 100%; cursor: pointer; accent-color: var(--brand-green); }
.volume-container { display: flex; align-items: center; gap: 5px; width: 100px; }
.volume-container i { color: var(--text-dark); font-size: 0.9rem; }
#volume-slider { width: 100%; accent-color: var(--brand-blue); }
@media (max-width: 600px) {
    .player-controls-row { flex-wrap: wrap; justify-content: center; }
    .progress-container { width: 100%; order: 1; margin-bottom: 5px;}
    .volume-container { display: none; }
    .control-btn { order: 2; }
}

/* --- Google Form Modal Styles --- */
.coop-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    z-index: 3000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.coop-modal.active { opacity: 1; visibility: visible; }
.coop-modal-content {
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-radius: 20px; width: 90%; max-width: 700px; height: 85vh; position: relative; padding: 20px; display: flex; flex-direction: column;
}
.coop-modal-content h3 { text-align: center; color: var(--brand-blue); margin-top: 0; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--brand-green); }
.coop-modal-content iframe { flex-grow: 1; border-radius: 10px; background: transparent; }
.close-modal-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 1.5rem; color: var(--text-dark); cursor: pointer; transition: color 0.2s; z-index: 10; }
.close-modal-btn:hover { color: red; }