/* الأنماط الأساسية */
html {
    font-family: 'Rubik', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Rubik', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #333333;
    --gray-color: #666666;
    --footer-color: #444444;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
    --blue-color: #4285f4;
}

/* تأكد أن الحقول والأزرار ترث نفس إعدادات الخط */
input, textarea, select, button {
    -webkit-font-feature-settings: inherit;
    -moz-font-feature-settings: inherit;
    font-feature-settings: inherit;
    font-variant-ligatures: inherit;
}

/* تنسيق النافبار */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* للسماح بإظهار القائمة المنسدلة أسفل النافبار */
}

/* شعار الموقع (صورة + نص) */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 40px; /* يحافظ على مقاس مناسب للنافبار */
    width: auto;
    display: block;
}

.logo h1 {
    color: var(--secondary-color);
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
}

/* Ensure logo layout is left-to-right so image appears to the right of the text */
.logo {
    direction: ltr;
}
.logo h1 { order: 1; }
.logo img { order: 2; }

/* القواعد القديمة للقائمة الأفقية تم حذفها - الآن نستخدم فقط .nav-dropdown-menu */

/* زر تسجيل الدخول */
.login-btn {
    margin-right: 2rem;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-login i {
    font-size: 1.1rem;
    color: #ffffff;
}

/* زر إظهار/إخفاء القائمة (الهامبرغر) */
.menu-toggle {
    display: none; /* لم نعد نستخدمه بعد تحويل القائمة إلى منسدلة موحدة */
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s ease, opacity 0.2s ease;
}
.menu-toggle:hover { background: rgba(255,255,255,0.08); opacity: 0.95; }

/* تنسيق القائمة المنسدلة */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-color);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content li {
    margin: 0 !important;
}

.dropdown-content a {
    padding: 12px 16px;
    display: block;
}

/* القائمة المنسدلة (سلوك الشاشات الصغيرة) */
@media (max-width: 992px) {
    .navbar .container {
        align-items: flex-start;
        gap: 10px;
    }

    /* على الشاشات الصغيرة اجعلها تأخذ تقريباً كامل العرض */
    .nav-dropdown-menu {
        position: fixed;
        top: 68px;
        right: 12px;
        left: 12px;
        width: auto;
        min-width: 0;
    }
}

@keyframes dropdown-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* قائمة منسدلة موحدة للنافبار */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.16);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.nav-dropdown-trigger:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.24); }
.nav-dropdown-trigger .caret { transition: transform 0.18s ease; }
.nav-dropdown.open .nav-dropdown-trigger .caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: fixed;              /* ثابتة لظهور واضح دائماً */
    top: 76px;                    /* أسفل النافبار (تقريباً) */
    left: 16px;                   /* محاذاة لليسار كما طلبت */
    right: auto;
    background: var(--primary-color);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    width: 280px;                 /* عرض مريح لعرض النص */
    min-width: 280px;
    padding: 8px 0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.24);
    z-index: 1200;
    animation: dropdown-fade 160ms ease;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li { list-style: none; }
.nav-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.nav-dropdown-menu li a:hover { background: rgba(255,255,255,0.06); }

/* تنسيق السلايد شو */
.slideshow {
    margin-top: 80px;
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* عرض الصور بالألوان الأصلية */
    filter: none;
}

.slide-content {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    text-align: right;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.slide-content p {
    font-size: 1.2rem;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    padding: 1rem;
    cursor: pointer;
    border: none;
    font-size: 1.5rem;
}

.prev {
    right: 20px;
}

.next {
    left: 20px;
}

/* انيميشن السلايد شو */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* ======= Footer styles (enhanced) ======= */
footer {
    background: linear-gradient(180deg, #111111 0%, #1f1f1f 100%);
    color: #e6e6e6;
    padding: 3.5rem 0 0.5rem;
    margin-top: 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.footer-about p {
    color: #cfcfcf;
    line-height: 1.8;
}

.footer-logo img {
    height: 44px;
    margin-bottom: 0.8rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 25px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #d7d7d7;
    text-decoration: none;
    display: block;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-contact .info-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: #d7d7d7;
    margin-bottom: 0.75rem;
}

.footer-contact .info-item i {
    background: rgba(255,255,255,0.06);
    padding: 10px;
    border-radius: 8px;
    color: var(--accent-color);
}

.newsletter p { color: #d0d0d0; margin-bottom: 0.5rem; }
.newsletter-form { display:flex; gap:0.5rem; }
.newsletter-form input[type="email"]{ flex:1; padding:0.8rem 1rem; border-radius:8px; border:1px solid rgba(255,255,255,0.06); background:#fff; }
.btn-subscribe{ background:var(--accent-color); color:#fff; border:none; padding:0.8rem 1rem; border-radius:8px; cursor:pointer; }
.btn-subscribe:hover{ background:#2a6f9a; }

.footer-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-top:1px solid rgba(255,255,255,0.04);
    padding-top:1rem;
}

.footer-social { display:flex; gap:0.6rem; }
.footer-social .social-icon{
    display:inline-flex; align-items:center; justify-content:center;
    width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,0.03); color:#fff; text-decoration:none; transition:all 0.25s ease;
}
.footer-social .social-icon i{ font-size:16px; }
.footer-social .social-icon:hover{ transform:translateY(-4px); box-shadow:0 8px 20px rgba(0,0,0,0.4); background: linear-gradient(135deg, #3498db, #2980b9); }

/* Auth / login page styles */
.auth-section {
    padding: 100px 0 60px;
    background: linear-gradient(180deg, rgba(0,0,0,0.02), transparent);
}
.auth-container {
    max-width: 420px;
    margin: 0 auto;
}
.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 6px 30px rgba(15,15,15,0.08);
}
.auth-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
}
.muted { color: #666; font-size: 14px; }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.alert-error { background: #fdecea; color: #b71c1c; }
.alert-success { background: #e8f6ef; color: #1b5e20; }
.auth-form .form-group { margin-bottom: 12px; }
.auth-form label { display:block; margin-bottom:6px; color:#222; }
.auth-form input[type="text"],
.auth-form input[type="email"], 
.auth-form input[type="password"] {
    width:100%; padding:10px 12px; border:1px solid #e2e2e2; border-radius:8px; font-size:15px;
}
.form-row.between { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.checkbox-inline input { margin-left:6px; }
.btn.primary { background:#3498db; color:#fff; border:none; padding:10px 18px; border-radius:8px; cursor:pointer; }
.btn.primary:hover { filter:brightness(0.95); }

/* Enhanced form visuals: icons inside inputs, nicer focus states */
.auth-card {
    position: relative;
    overflow: visible;
}
.auth-card .brand-badge{
    position: absolute;
    left: 18px; /* in RTL the badge sits visually on the left side of the card */
    top: -26px;
    background: linear-gradient(135deg,#111,#333);
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    font-weight:700;
}
.input-with-icon{ position: relative; }
.input-with-icon i{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 12px; /* icons on the left so they don't collide with RTL text on the right */
    color: #999;
    font-size: 14px;
    pointer-events: none;
}
.input-with-icon input{
    width: 100%;
    padding-left: 40px; /* space for icon */
    padding-right: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
    background: linear-gradient(180deg,#fff,#fbfbfb);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    font-size: 15px;
}
.input-with-icon input:focus{
    outline: none;
    border-color: #3aa0e6;
    box-shadow: 0 6px 20px rgba(52,152,219,0.12);
    transform: translateY(-1px);
}
.auth-form .btn.primary{
    width:100%; padding:12px; font-size:16px; border-radius:10px;
    box-shadow: 0 8px 30px rgba(41,128,185,0.12);
}
.auth-footer{ margin-top:14px; text-align:center; font-size:14px; color:#666 }

/* small screens */
@media (max-width:480px){
    .auth-container{ padding:0 16px; }
    .brand-badge{ left: 12px; top: -22px; }
    .input-with-icon i{ left:10px; }
    .input-with-icon input{ padding-left: 38px; }
}

/* signup link in footer of auth card */
 .signup-link{ color: #3498db; font-weight:700; text-decoration:none; }
.signup-link:hover{ text-decoration:underline; }

.audio-head {
    text-align: center;
    margin-bottom: 3rem;
}

.audio-kicker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #4285f4;
}

.mic-ico {
    width: 24px;
    height: 24px;
    color: #4285f4;
}

.kicker-text {
    color: #4285f4;
    font-weight: 600;
    font-size: 1rem;
}

.audio-title {
    font-size: 2.5rem;
    margin: 1rem 0;
    font-weight: 700;
    color: #1a1a1a;
}

.audio-sub {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.work-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    opacity: 0;
    animation: fadeIn 0.6s forwards;
    animation-delay: var(--delay, 0s);
}

.work-card:hover {
    transform: translateY(-5px);
}

.card-media {
    background: #f8f9fe;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s ease;
}

.work-card:hover .play-circle {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-tag {
    display: inline-block;
    color: #4285f4;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.duration {
    color: #666;
    font-size: 0.875rem;
}

.btn-listen {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4285f4;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-listen:hover {
    opacity: 0.8;
}

.btn-listen i {
    font-size: 0.75rem;
}

.btn-listen:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Video works section styles */
.video-section {
    padding: 5rem 0;
    background-color: #fff;
}

.video-head {
    text-align: center;
    margin-bottom: 3rem;
}

.video-kicker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #4285f4;
}

.video-ico {
    width: 24px;
    height: 24px;
    color: #4285f4;
}

.video-title {
    font-size: 2.5rem;
    margin: 1rem 0;
    font-weight: 700;
    color: #1a1a1a;
}

.video-sub {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

/* Use the same card styles as audio section but with video-specific modifications */
.video-section .card-media {
    position: relative;
    overflow: hidden;
    background: #f8f9fe;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-section .card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: transform 0.3s ease;
}

.video-section .play-circle {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s ease;
}

.video-section .work-card:hover .card-media img {
    transform: scale(1.05);
}

.video-section .work-card:hover .play-circle {
    transform: translate(-50%, -50%) scale(1.1);
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4285f4;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-watch:hover {
    opacity: 0.8;
}

.btn-watch i {
    font-size: 0.75rem;
}

@media (max-width: 900px){
    .footer-top{ grid-template-columns: 1fr; }
    .footer-bottom{ flex-direction:column; gap:0.8rem; text-align:center; }
}

/* Modal (YouTube) styles for homepage */
.modal {
    display: none; /* مخفي افتراضياً لمنع أي فراغ أسفل الصفحة */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000; /* فوق كل العناصر */
    overflow: hidden;
}

.modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(900px, 92vw);
    background: transparent;
    border: none;
}

#youtube-frame {
    width: 100%;
    height: min(70vh, 56.25vw); /* نسبة 16:9 تقريبية */
    border: 0;
    border-radius: 8px;
    background: #000;
}

.close-modal {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.75);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    user-select: none;
}

.close-modal:hover {
    background: rgba(0,0,0,0.9);
}

/* Audio waves animation */
.audio-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
}

.audio-waves .wave {
    width: 4px;
    height: 10px;
    background: #4285f4;
    border-radius: 2px;
    animation: wave-animation 1s ease-in-out infinite;
}

.audio-waves .wave:nth-child(1) {
    animation-delay: 0s;
}

.audio-waves .wave:nth-child(2) {
    animation-delay: 0.1s;
}

.audio-waves .wave:nth-child(3) {
    animation-delay: 0.2s;
}

.audio-waves .wave:nth-child(4) {
    animation-delay: 0.3s;
}

.audio-waves .wave:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes wave-animation {
    0%, 100% {
        height: 10px;
    }
    50% {
        height: 35px;
    }
}

/* Playing state */
.work-card.playing .play-circle {
    display: none;
}

.work-card.playing .audio-waves {
    display: flex;
}

.work-card.playing .btn-listen i:before {
    content: "\f04c"; /* FontAwesome pause icon */
}

.work-card.playing .card-media {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.play-circle {
    cursor: pointer;
    z-index: 2;
}

/* Video player in card */
.video-media {
    position: relative;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10;
}

.video-iframe {
    width: 100%;
    height: 100%;
}

.close-video {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    transition: background 0.3s ease;
}

.close-video:hover {
    background: rgba(0, 0, 0, 0.9);
}

.close-video i {
    font-size: 18px;
}

.video-card.playing .video-thumbnail {
    opacity: 0;
}

.video-card.playing .play-circle {
    display: none;
}

/* Features section styles */
.features-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.features-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    color: #1a1a1a;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.feature-box {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4285f4 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease;
}

.feature-box:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon i {
    font-size: 2rem;
    color: #fff;
}

.feature-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
}

.feature-box p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-section .section-title {
        font-size: 2rem;
    }
}
