@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');

:root {
  --bg-color: #f4f5f7;
  --text-color: #172b4d;
  --panel-bg: #fff;
  --header-bg: #0747a6;
  --header-text: #fff;
  --primary-color: #0747a6;
  --subtle-text: #42526e;
  --hero-overlay: rgba(7, 71, 166, 0.6);
  --platform-card-bg: #f7fafc;
  --plyr-video-background: #000;
  --icon-bg: #fff;
}

body.dark-mode {
  --bg-color: #091E42;
  --text-color: #DEEBFF;
  --panel-bg: #162B4C;
  --header-bg: #091E42;
  --header-text: #DEEBFF;
  --primary-color: #579DFF;
  --subtle-text: #B0C4DE;
  --hero-overlay: rgba(0, 0, 0, 0.7);
  --platform-card-bg: #0E203B;
  --plyr-video-background: #000;
  --icon-bg: #0E203B;
}

body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: var(--bg-color);
  margin: 0;
  direction: rtl;
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px; /* Offset for fixed header */
}

#page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Remove default AUI padding */
.aui-header .aui-header-inner {
    padding: 0 20px;
}

header.aui-header {
  background: var(--header-bg);
  box-shadow: 0 2px 8px rgba(7,71,166,0.15);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(9, 30, 66, 0.3);
  height: 70px;
}

.aui-header .aui-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-logo-image {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.header-logo-image:hover {
    transform: scale(1.1);
}

/* Dark mode logo styling */
body.dark-mode .header-logo-image {
    filter: brightness(0) invert(1) hue-rotate(180deg) saturate(0.8);
    opacity: 0.9;
}

.aui-header-primary {
    flex-shrink: 0; /* Prevents the logo from shrinking */
}

/* Hide default AUI nav styles that we override */
.aui-nav {
    margin: 0;
}

/* Force remove Atlassian's default list styling */
header#header .aui-nav,
header#header .aui-nav li {
    list-style-type: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.aui-header .aui-nav,
.aui-header .aui-nav > li {
    display: flex;
    list-style: none !important; /* Force remove bullets */
    background: none !important;
    padding: 0;
    margin: 0;
}

.aui-header .aui-nav > li > a {
    color: var(--header-text);
    font-weight: 600;
    font-size: 1rem;
    padding: 0 20px;
    transition: all 0.2s ease;
    height: 70px; /* Match header height */
    display: flex;
    align-items: center;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aui-header .aui-nav > li > a:hover {
    color: var(--header-text);
    background-color: rgba(9, 30, 66, 0.4);
}

.aui-header-logo-device {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--header-text) !important;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.hero-section {
  position: relative;
  height: 400px;
  background-image: url('../images/voxel-background.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--header-text);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-overlay); /* Blue overlay */
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 20px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.25rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

section#content {
  flex: 1;
  padding: 32px 0 0 0;
}

.aui-page-panel {
  background: var(--panel-bg);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(9,30,66,0.10);
  margin-bottom: 32px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.aui-page-panel:hover {
  box-shadow: 0 4px 24px rgba(7,71,166,0.13);
}
.aui-page-panel-content {
  padding: 32px 24px 24px 24px;
}
.aui-page-panel-content h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 700;
}
.aui-page-panel-content p {
  color: var(--subtle-text);
  margin-bottom: 24px;
}

.video-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.platform-video {
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 300px;
  background: var(--platform-card-bg);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(9,30,66,0.06);
  padding: 18px 12px 12px 12px;
  margin-bottom: 18px;
  text-align: center;
}

.platform-video .video-container {
  position: relative;
  display: block;
  gap: 0;
}

.platform-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

/* Download links styling */
.aui-page-panel-content ul, .aui-page-panel-content ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.aui-page-panel-content a {
  display: inline-block;
  background: var(--primary-color);
  color: var(--header-text);
  padding: 10px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 12px;
  margin-left: 8px;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 1px 4px rgba(9,30,66,0.08);
}

.aui-page-panel-content a:hover {
  background: #ffab00;
  color: var(--text-color);
}

/* Footer styling */
footer#footer {
  background: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  padding: 24px 0 12px 0;
  font-size: 1rem;
  margin-top: 32px;
}
footer#footer ul {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0;
  margin: 0 0 12px 0;
  list-style: none;
}
footer#footer a {
  color: #ffab00;
  text-decoration: none;
  font-weight: 500;
}
footer#footer a:hover {
  color: var(--header-text);
  text-decoration: underline;
}
#footer-logo {
  margin-top: 8px;
  font-size: 0.95rem;
}
#footer-logo a {
  color: var(--header-text);
  opacity: 0.7;
  transition: opacity 0.2s;
}
#footer-logo a:hover {
  opacity: 1;
}

/* Mobile Styles */
@media (max-width: 768px) {
    header.aui-header {
        height: 60px;
    }
    html {
        scroll-padding-top: 60px;
    }
    .aui-header .aui-header-inner {
        justify-content: space-between;
        height: 100%;
        align-items: center;
    }
    
    .header-nav-container {
        display: none; /* Hide nav container by default on mobile */
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: rgba(9, 30, 66, 0.98);
        backdrop-filter: blur(8px);
        z-index: 1000;
        padding-top: 60px;
        flex-direction: column;
        align-items: center;
    }

    .header-nav-container.is-open {
        display: flex; /* Show it when the menu is open */
        transform: translateX(0); /* Ensure it's on screen */
    }

    .aui-header .aui-nav {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .aui-header .aui-nav > li {
        width: 100%;
        text-align: center;
    }

    .aui-header .aui-nav > li > a {
        font-size: 1.6rem;
        font-weight: 700;
        padding: 24px;
        justify-content: center;
        width: 100%;
        height: auto;
        text-shadow: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    /* Animate hamburger to an 'X' */
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon {
        background-color: transparent;
    }
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon::before {
        transform: rotate(45deg);
        top: 0;
    }
    .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon::after {
        transform: rotate(-45deg);
        top: 0;
    }
}

/* Desktop-only styles */
@media (min-width: 769px) {
    .mobile-nav-toggle {
        display: none;
    }
    .header-nav-container {
        display: flex !important; /* Ensure it's visible */
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.platform-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Above header content */
}

.hamburger-icon {
    width: 28px;
    height: 3px;
    background-color: var(--header-text);
    border-radius: 5px;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    width: 28px;
    height: 3px;
    background-color: var(--header-text);
    border-radius: 5px;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

@media (max-width: 700px) {
  .hero-section {
    height: 300px;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  section#content {
    padding: 16px 0 0 0;
  }
  .aui-page-panel-content {
    padding: 18px 8px 16px 8px;
  }
  .aui-page-panel {
    margin-bottom: 18px;
  }
  .video-container {
    flex-direction: column;
    gap: 12px;
  }
  .platform-video {
    max-width: 100%;
    min-width: 0;
  }
  .aui-header-logo-device {
    font-size: 1.3rem;
  }
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switcher {
    position: relative;
    background: rgba(9, 30, 66, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    height: 32px;
    width: 60px;
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.theme-switcher .sun-icon,
.theme-switcher .moon-icon {
    font-size: 16px;
    transition: opacity 0.3s, transform 0.3s;
}

/* Light mode styles */
body:not(.dark-mode) .moon-icon { opacity: 0; transform: translateX(10px); }
body:not(.dark-mode) .sun-icon { opacity: 1; transform: translateX(0); }

/* Dark mode styles */
body.dark-mode .sun-icon { opacity: 0; transform: translateX(-10px); }
body.dark-mode .moon-icon { opacity: 1; transform: translateX(0); }

.theme-switcher::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    height: 24px;
    width: 24px;
    background: var(--header-text);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

body.dark-mode .theme-switcher::before {
    transform: translateX(26px);
} 