/* Import Google Fonts for a more professional look */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap');

/* General Body Styles */
body {
    font-family: 'Cairo', sans-serif; /* Modern Arabic font */
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Light gray background */
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    direction: rtl; /* Right-to-left for Arabic */
    text-align: right;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    color: #222;
    margin-top: 0;
    margin-bottom: 15px;
}

h1 { font-size: 2.2em; font-weight: 700; }
h2 { font-size: 1.8em; font-weight: 600; }
h3 { font-size: 1.4em; font-weight: 600; }
p { font-size: 1em; margin-bottom: 10px; }

/* Header Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 45px; /* Slightly larger logo */
    margin-left: 15px; /* Space between logo and office name */
    border-radius: 4px; /* Slightly rounded corners for logo */
}

.office-name-header {
    font-family: 'Roboto', sans-serif; /* Different font for office name */
    font-size: 1em;
    color: #666;
    font-weight: 500;
}

.app-title {
    margin: 0;
    color: #007bff; /* Primary accent color */
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.upload-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px; /* Pill-shaped button */
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none; /* For anchor tag */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upload-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

/* Main Content Styles */
.app-main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    padding: 25px;
}

.video-feed {
    display: flex;
    gap: 30px; /* Increased gap */
    max-width: 1300px; /* Wider content area */
    width: 100%;
}

.main-video-player {
    flex: 3; /* Takes more space */
    background-color: #ffffff;
    border-radius: 12px; /* More rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softer, larger shadow */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px; /* Ensure it has some height even when empty */
}

.next-videos-sidebar {
    flex: 1; /* Takes less space */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Increased gap */
}

/* Placeholder content styling */
.main-video-player p, .next-videos-sidebar p, .page-content p {
    font-size: 1.1em;
    color: #888;
    text-align: center;
    padding: 20px;
}

/* Page content for other pages */
.page-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto; /* Center the content */
    text-align: right; /* Ensure text aligns right for RTL */
}

/* Footer/Bottom Navigation Styles */
.app-footer {
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    position: sticky;
    bottom: 0;
    z-index: 1000;
    border-top: 1px solid #eee;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    max-width: 700px; /* Wider navigation area */
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #777;
    font-size: 0.85em;
    padding: 8px 10px;
    border-radius: 8px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    color: #007bff;
    background-color: #eef7ff; /* Light background on hover/active */
}

.nav-item i {
    font-size: 1.6em; /* Slightly larger icons */
    margin-bottom: 5px;
}

/* Basic Icon Placeholders (replace with actual icon library like FontAwesome later) */
/* Consider using a proper icon library like Font Awesome for production */
.icon-heart::before { content: '❤️'; }
.icon-comment::before { content: '💬'; }
.icon-share::before { content: '📤'; }
.icon-home::before { content: '🏠'; }
.icon-search::before { content: '🔍'; }
.icon-add::before { content: '➕'; }
.icon-messages::before { content: '✉️'; }
.icon-profile::before { content: '👤'; }

/* Responsive Design */
@media (max-width: 992px) {
    .video-feed {
        flex-direction: column;
        gap: 20px;
    }

    .next-videos-sidebar {
        width: 100%;
        order: 1; /* Place sidebar above main video on small screens */
    }

    .main-video-player {
        order: 2; /* Place main video below sidebar on small screens */
    }

    .app-header {
        flex-direction: column;
        text-align: center;
        padding: 15px 15px;
    }

    .header-left, .header-right, .header-center {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .header-logo {
        margin-left: 10px;
        margin-right: 10px;
    }

    .office-name-header {
        font-size: 0.9em;
    }

    .app-title {
        font-size: 1.8em;
    }

    .upload-button {
        width: 80%;
        margin-top: 10px;
    }

    .bottom-nav {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .app-main {
        padding: 15px;
    }
    .page-content {
        padding: 20px;
    }
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    h3 { font-size: 1.2em; }
    p { font-size: 0.95em; }

    .header-logo {
        height: 35px;
    }
    .office-name-header {
        display: none; /* Hide office name on smaller screens */
    }
    .app-title {
        font-size: 1.6em;
    }
    .upload-button {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .nav-item {
        font-size: 0.75em;
        padding: 6px 8px;
    }
    .nav-item i {
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 10px;
    }
    .app-main {
        padding: 10px;
    }
    .page-content {
        padding: 15px;
    }
    .upload-button {
        width: 90%;
    }
    .bottom-nav {
        padding: 0 5px;
    }
    .nav-item {
        font-size: 0.7em;
        padding: 5px;
    }
    .nav-item i {
        font-size: 1.2em;
    }
}