/*
Theme Name: User Portal Theme
Theme URI: https://shahrefarang.live
Description: Custom theme for User Portal with Auth Core integration
Version: 1.0.0
Author: Shahre Farang
License: GPL v2 or later
Text Domain: user-portal
*/

@font-face {
    font-family: 'IRANYekanX';
    src: url('../../wp-fonts/IRANYekanX-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'IRANYekanX';
    src: url('../../wp-fonts/IRANYekanX-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'IRANYekanX';
    src: url('../../wp-fonts/IRANYekanX-DemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'IRANYekanX';
    src: url('../../wp-fonts/IRANYekanX-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IRANYekanX', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #2D2D2D;
}

.site-header {
    background: #000000;
    min-height: 44.72px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

.site-header .container,
.site-header .header-container {
    max-width: 1455px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 0 0 auto;
}

.header-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 0 0 12px;
    background: transparent;
    border: none;
    color: #fffefe;
    cursor: pointer;
}

.site-nav li.nav-item-mobile {
    display: none;
}

.header-menu-toggle .hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 22px;
    height: 18px;
}

.header-menu-toggle .hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.header-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.header-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.site-logo img {
    height: 30px;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.site-nav li {
    display: flex;
    align-items: center;
    position: relative;
}

.site-nav li:not(:last-child)::after {
    content: '';
    width: 1px;
    height: 14px;
    background-color: #fffefe;
    margin: 0 20px;
}

.site-nav a {
    text-decoration: none;
    color: #fffefe;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
    padding: 5px 0px 0 0;
}

.site-nav a:hover {
    opacity: 0.8;
}

.site-nav a.active {
    opacity: 1;
    color: #FCA310;
}

.header-right {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    color: #fffefe;
    vertical-align: middle;
}

.user-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

.site-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: calc(100vh - 200px);
}

.site-footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive header & nav */
@media (max-width: 768px) {
    .header-left {
        gap: 12px;
        flex: 1;
        min-width: 0;
        width: 100%;
    }

    .header-menu-toggle {
        display: flex;
        margin-left: auto;
        position: relative;
        z-index: 0;
    }

    [dir="rtl"] .header-menu-toggle {
        margin-left: 0;
        margin-right: auto;
    }

    .header-user-icon {
        display: none;
    }

    .site-nav li.nav-item-mobile {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #000;
        flex-direction: column;
        padding: 20px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s, opacity 0.3s, visibility 0.3s;
        z-index: 10000;
    }

    .site-nav.is-open {
        max-height: 320px;
        opacity: 1;
        visibility: visible;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
    }

    .site-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 254, 254, 0.15);
    }

    .site-nav li:last-child {
        border-bottom: none;
    }

    .site-nav li:not(:last-child)::after {
        display: none;
    }

    .site-nav a {
        display: block;
        width: 100%;
        padding: 14px 0;
        font-size: 16px;
        box-sizing: border-box;
    }
}

@media (min-width: 769px) {
    .site-nav li.nav-item-mobile {
        display: none;
    }

    /* No divider after Live TV (last visible item on desktop) */
    .site-nav li.nav-item-last-desktop::after {
        display: none;
    }

    .site-nav.is-open {
        max-height: none;
        opacity: 1;
        visibility: visible;
    }
}
