
@import url("assets/css/brand-tokens.css?v=20260910-02");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --primary-color: var(--brand-primary);
    --primary-hover: var(--brand-primary-hover);
    --secondary-color: #1e272e;  
    --accent-color: #f7d7da;     
    --bg-light: #fafafa;         
    --card-bg: #ffffff;
    --text-main: #1e272e;
    --text-muted: #57606f;
    --border-color: rgba(214, 48, 49, 0.04);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body.dark-mode {
    --bg-light: #111827;
    --card-bg: #1f2937;
    --secondary-color: #f3f4f6;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #374151;
}

body {
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.35s ease, color 0.35s ease;
}

header, .hero, .aboutMe, .works, .contentContainer, .card-link, .contact-box, .navigation ul li a, .card-link span {
    transition: var(--transition-smooth);
}

header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 998;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    padding: 12px 0;
}

body.dark-mode header {
    background: rgba(17, 24, 39, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

header .logo {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    transition: var(--transition-smooth);
}

header .logo:hover {
    transform: rotate(360deg) scale(1.1); 
}

.navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.navigation ul li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 5px 0;
}

.navigation ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.navigation ul li a:hover::after {
    width: 100%;
}

.navigation ul li a:hover {
    color: var(--primary-color);
}

body.dark-mode .navigation ul li a:hover {
    color: #ff6b6b;
}

.theme-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 30px;
    cursor:pointer;
    font-size: 18px;
    background: var(--primary-color);
    color: #fff;
    transition: var(--transition-smooth);
}

.theme-btn:hover {
    transform: scale(1.08);
    background-color: var(--primary-hover);
}

.hero {
    min-height: calc(100vh - 84px);
    display: flex;
    align-items: center;
    padding: 50px 20px;
    background: radial-gradient(circle at 80% 20%, #fff3f4 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

body.dark-mode .hero {
    background: radial-gradient(circle at 80% 20%, #1f2937 0%, #111827 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 40px;
}

.heroSub {
    flex: 1;
    position: relative;
}

.arrow {
    position: absolute;
    top: -50px;
    left: -30px;
    width: 60px;
    animation: bounce 2s infinite; 
}

.heroSub .name {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -1px;
    color: var(--text-main);
}

.heroSub .name span {
    color: var(--primary-color);
}

.heroSub .title {
    font-size: 1.7rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    font-weight: 400;
}

.heroBtns .hireMe {
    display: inline-block;
    padding: 14px 38px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(214, 48, 49, 0.25);
    transition: var(--transition-smooth);
}

.heroBtns .hireMe:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(214, 48, 49, 0.4);
    background-color: var(--primary-hover);
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.heroimg {
    max-width: 100%;
    height: auto;
    max-height: 460px;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.08));
    animation: float 4.5s ease-in-out infinite; 
}

.aboutMe {
    padding: 110px 20px;
    background-color: var(--card-bg);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.aboutMeImg {
    max-width: 100%;
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.06);
    transition: var(--transition-smooth);
}

body.dark-mode .aboutMeImg {
    box-shadow: 0 20px 45px rgba(0,0,0,0.3);
}

.aboutMeImg:hover {
    transform: scale(1.02);
}

.textContainer {
    flex: 1.2;
}

.textTitle {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.aboutName {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.aboutTitle {
    color: var(--primary-color);
}

.light {
    width: 32px;
    animation: pulse 1.5s infinite alternate;
}

.aboutMePar {
    font-size: 1.15rem;
    color: var(--text-muted);
    text-align: justify;
}

.dream-text {
    display: inline-block;
    margin-top: 18px;
    font-weight: 600;
    color: var(--primary-color);
    background: #fff3f4;
    padding: 6px 18px;
    border-radius: 30px; 
}

body.dark-mode .dream-text {
    background: #374151;
    color: #ffd166;
}

.works {
    padding: 110px 20px;
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--bg-light) 100%);
}

.worksContainer {
    max-width: 1200px;
    margin: 0 auto;
}

.projectTitle {
    text-align: center;
    margin-bottom: 55px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); 
    gap: 35px;
    list-style: none;
}

.card-link {
    display: block;
    background: var(--card-bg);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.card-link img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
}

.card-link span {
    display: block;
    padding: 18px;
    text-align: center;
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--card-bg);
    font-size: 1.1rem;
    border-top: 1px solid var(--border-color);
}

.card-link:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(214, 48, 49, 0.15);
}

.card-link:hover img {
    transform: scale(1.06);
}

.card-link:hover span {
    color: var(--primary-color);
    background-color: rgba(214, 48, 49, 0.02);
}

body.dark-mode .card-link:hover span {
    color: #ff6b6b;
    background-color: #111827;
}

.contentContainer {
    padding: 110px 20px;
    background-color: var(--bg-light);
    text-align: center;
}

.contactTitle {
    margin-bottom: 45px;
}

.contact-box {
    max-width: 620px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 45px;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 35px;
}

.emailAndPhone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.emailAndPhone img {
    width: 24px;
    height: 24px;
}

.emailAndPhone h3 {
    color: var(--text-main);
}

.emailAndPhone a {
    text-decoration: none;
    color: var(--text-main);
}

.emailAndPhone a:hover {
    color: var(--primary-color);
}

body.dark-mode .emailAndPhone a:hover {
    color: #ff6b6b;
}

.socialMedia {
    display: flex;
    justify-content: center;
    gap: 22px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--bg-light);
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.social-icon img {
    width: 22px;
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.05);
    background-color: var(--primary-color);
    box-shadow: 0 10px 22px rgba(214, 48, 49, 0.25);
}

.social-icon:hover img {
    filter: brightness(0) invert(1); 
}

footer {
    background-color: #0d121a;
    color: #a4b0be;
    text-align: center;
    padding: 35px 20px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

footer .author {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.85; }
    to { transform: scale(1.08); opacity: 1; }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    .navigation ul {
        gap: 20px;
    }
    .hero {
        padding: 40px 20px;
    }
    .hero-container, .about-container {
        flex-direction: column;
        text-align: center;
        gap: 35px;
    }
    .heroSub .name {
        font-size: 2.8rem;
    }
    .heroSub .title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    .aboutName {
        font-size: 2.4rem;
    }
    .textTitle {
        justify-content: center;
    }
    .aboutMePar {
        text-align: center;
    }
    .arrow {
        display: none; 
    }
    .contact-box {
        padding: 35px 20px;
    }
}

.courses{
    padding:100px 8%;
}

.coursesContainer{
    max-width:1200px;
    margin:auto;
}

.courses-subtitle{
    text-align:center;
    color:var(--text-color);
    margin-top:15px;
    margin-bottom:50px;
    font-size:18px;
    opacity:.8;
}

.cards-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:30px;
}

.course-card{

    background:var(--card-bg);

    border:1px solid rgba(255,255,255,.08);

    border-radius:22px;

    padding:35px;

    transition:.35s ease;

    position:relative;

    overflow:hidden;

}

.course-card:hover{

    transform:translateY(-10px);

    box-shadow:0 20px 40px rgba(0,0,0,.15);

}

.course-level{

    display:inline-block;

    background:#ff4d6d;

    color:#fff;

    padding:8px 18px;

    border-radius:30px;

    font-size:14px;

    font-weight:600;

    margin-bottom:20px;

}

.course-card h2{

    margin-bottom:15px;

    font-size:28px;

    color:var(--title-color);

}

.course-card p{

    color:var(--text-color);

    line-height:1.8;

    margin-bottom:25px;

}

.course-info{

    display:flex;

    flex-direction:column;

    gap:12px;

    margin-bottom:30px;

}

.course-info span{

    color:var(--text-color);

    font-size:15px;

}

.course-btn{

    display:inline-block;

    background:#ff4d6d;

    color:white;

    text-decoration:none;

    padding:14px 28px;

    border-radius:50px;

    font-weight:600;

    transition:.3s;

}

.course-btn:hover{

    background:#e6395f;

    transform:scale(1.05);

}

.premium-card{

    background:linear-gradient(135deg,#ff4d6d,#ff7f50);

    color:white;

}

.premium-card h2,
.premium-card p,
.premium-card span{

    color:white;

}

.premium-card .course-level{

    background:white;

    color:#ff4d6d;

}

.premium-card .course-btn{

    background:white;

    color:#ff4d6d;

}

.premium-card .course-btn:hover{

    background:#f3f3f3;

}



@media(max-width:768px){

.cards-grid{

grid-template-columns:1fr;

}

.course-card{

padding:28px;

}

.course-card h2{

font-size:24px;

}

}

.courses-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:30px;
}

/*==========================
      Interactive Classroom
==========================*/

.classroom{
    padding:100px 8%;
    background-color:var(--bg-light);
}

.classroomContainer{
    max-width:1200px;
    margin:auto;
}

.classroom-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:30px;
}

.classroom-card{
    background:var(--card-bg);
    border:1px solid rgba(214,48,49,.12);
    border-radius:22px;
    padding:35px;
    transition:var(--transition-smooth);
    position:relative;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.classroom-card::before{
    content:'';
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:4px;
    background:linear-gradient(90deg,var(--primary-color),#ff7f50);
    transform:scaleX(0);
    transform-origin:left;
    transition:var(--transition-smooth);
}

.classroom-card:hover{
    transform:translateY(-10px);
    box-shadow:0 20px 45px rgba(214,48,49,.15);
}

.classroom-card:hover::before{
    transform:scaleX(1);
}

.classroom-card-img{
    border-radius:18px;
    overflow:hidden;
    margin-bottom:25px;
    aspect-ratio:3/2;
    background:var(--bg-light);
    flex-shrink:0;
}

.classroom-card-img img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.classroom-price{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px 12px;
    font-size:2rem;
    font-weight:700;
    color:var(--primary-color);
    margin-bottom:20px;
}

.classroom-price span{
    font-size:1rem;
    font-weight:400;
    color:var(--text-muted);
}

.classroom-price .price-discount-badge{
    display:inline-block;
    background:#27ae60;
    color:#ffffff;
    padding:4px 14px;
    border-radius:30px;
    font-size:0.8rem;
    font-weight:700;
    letter-spacing:0.5px;
    box-shadow:0 4px 12px rgba(39,174,96,0.3);
}

.classroom-price .price-old{
    font-size:1.3rem;
    font-weight:400;
    color:var(--text-muted);
    text-decoration:line-through;
    opacity:0.75;
}

.classroom-price .price-new{
    flex-basis:100%;
    font-size:2.2rem;
    font-weight:800;
    color:var(--primary-color);
}

.classroom-price .price-new span{
    font-size:1rem;
    font-weight:400;
    color:var(--text-muted);
}

.classroom-card .course-info span{
    color:var(--text-muted);
}

.classroom-card .course-btn{
    margin-top:auto;
    align-self:flex-start;
}

@media(max-width:768px){

    .classroom-grid{
        grid-template-columns:1fr;
    }

    .classroom-card{
        padding:28px;
    }

}


.app-box{
    width: 90%;
    max-width: 900px;
    margin: 80px auto;
    padding: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: var(--transition-smooth);
}


.app-box h2{
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-main);
}



.app-box p{
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 35px;
}


.course-btn{
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 25px rgba(214,48,49,0.25);
}

.course-btn:hover{
    background: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(214,48,49,0.40);
}


body.dark-mode .app-box{
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
}

body.dark-mode .app-box h2{
    color: var(--text-main);
}

body.dark-mode .app-box p{
    color: var(--text-muted);
}



@media (max-width:768px){

    .app-box{
        padding:35px 25px;
    }

    .app-card h2{
        font-size:1.7rem;
    }

    .app-card p{
        font-size:16px;
    }

    .course-btn{
        width:100%;
        text-align:center;
    }

}



/*==========================
      Coming Soon
==========================*/

.coming-soon{

    min-height:80vh;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    padding:20px;

}

.coming-soon h1{

    font-size:4rem;

    color:var(--primary-color);

    margin-bottom:20px;

}

.coming-soon p{

    font-size:1.2rem;

    color:var(--text-muted);

    margin-bottom:40px;

    max-width:600px;

}

.coming-soon .course-btn{

    padding:15px 35px;

}

/* ================================================================
   User Account & Dropdown Menu Styles
   ================================================================ */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    background: rgba(214, 48, 49, 0.08);
    border: 1px solid rgba(214, 48, 49, 0.25);
    color: var(--primary-color, #d63031);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    font-family: inherit;
    outline: none;
}

.user-dropdown-btn:hover, 
.user-dropdown-container.open .user-dropdown-btn {
    background: var(--primary-color, #d63031);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(214, 48, 49, 0.3);
}

.user-dropdown-btn .arrow-icon {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
    display: inline-block;
}

.user-dropdown-container.open .user-dropdown-btn .arrow-icon {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, rgba(0,0,0,0.1));
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1200;
    direction: rtl;
    text-align: right;
}

body.dark-mode .user-dropdown-menu {
    background: var(--card-bg, #1f2937);
    border-color: var(--border-color, #374151);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.user-dropdown-container.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-header {
    padding: 8px 10px 12px 10px;
    border-bottom: 1px solid var(--border-color, rgba(0,0,0,0.08));
    margin-bottom: 6px;
}

.user-dropdown-header .user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main, #1e272e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-header .user-email {
    font-size: 0.8rem;
    color: var(--text-muted, #57606f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-main, #1e272e);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-align: right;
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: rgba(214, 48, 49, 0.08);
    color: var(--primary-color, #d63031);
}

.user-dropdown-item.logout-btn {
    color: #e74c3c;
}

.user-dropdown-item.logout-btn:hover {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

/*==========================
      Mobile Sidebar Menu
==========================*/

.hamburger-btn {
    display: none;
}

.sidebar,
.sidebar-overlay {
    display: none;
}

@media (max-width: 768px) {

    /* ---- Header ---- */
    .hamburger-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 12px;
        background: var(--primary-color);
        color: #ffffff;
        font-size: 22px;
        cursor: pointer;
        transition: var(--transition-smooth);
        flex-shrink: 0;
    }

    .hamburger-btn:hover {
        background: var(--primary-hover);
        transform: scale(1.06);
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 0 15px;
    }

    .navigation {
        display: none;
    }

    /* ---- Overlay (high priority z-[999]) ---- */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* ---- Side Drawer (high-end dark glassmorphism, z-[999]) ---- */
    .sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        inset-inline-start: 0;
        inset-inline-end: auto;
        width: 280px;
        max-width: 85vw;
        padding: 24px;
        background: rgba(10, 12, 24, 0.95);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35);
        z-index: 999;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.3s ease-in-out, visibility 0s linear 0.3s;
        overflow-y: auto;
    }

    html[dir="rtl"] .sidebar {
        transform: translateX(100%);
    }

    /* عند الفتح — أولوية أعلى لتجاوز قاعدة RTL في الاتجاهين */
    html[dir="rtl"] .sidebar.open,
    .sidebar.open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.3s ease-in-out, visibility 0s;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 0 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: #f3f4f6;
    }

    .sidebar-close {
        background: none;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 20px;
        color: #f3f4f6;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .sidebar-close:hover {
        background: rgba(255, 77, 109, 0.15);
        color: #ff4d6d;
        transform: rotate(90deg);
    }

    .sidebar-nav {
        padding: 16px 0 0;
        flex: 1;
    }

    .sidebar-nav ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .sidebar-nav ul li a {
        display: block;
        padding: 12px 16px;
        border-radius: 12px;
        color: #d1d5db;
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .sidebar-nav ul li a:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #ff4d6d;
    }

    body.dark-mode .sidebar-nav ul li a:hover {
        color: #ff6b6b;
    }

    .sidebar-controls {
        padding: 16px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .sidebar-auth-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: var(--primary-color);
        color: #ffffff;
        text-decoration: none;
        padding: 12px 16px;
        border-radius: 30px;
        font-weight: 600;
        font-size: 0.95rem;
        text-align: center;
        overflow: hidden;
        word-break: break-all;
        transition: var(--transition-smooth);
    }

    .sidebar-auth-link:hover {
        background: var(--primary-hover);
    }

    .sidebar-controls-row {
        display: flex;
        gap: 10px;
    }

.sidebar-controls-row .lang-btn,
        .sidebar-controls-row .theme-btn {
            flex: 1;
            height: 40px;
            padding: 0 16px;
            border-radius: 9999px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

    /*==========================
          Contact Card (Email)
    ==========================*/
    .contact-box {
        padding: 35px 20px;
        overflow: hidden;
    }

    .emailAndPhone {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .emailAndPhone a {
        max-width: 100%;
        text-align: center;
    }

    .emailAndPhone h3 {
        font-size: 0.9rem;
        word-break: break-all;
        overflow-wrap: anywhere;
    }
}

/* ================================================================
   Theme Toggle — Glassmorphic SVG sun/moon toggle
   ================================================================ */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fcd34d;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.5s ease-in-out;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-toggle .icon-hidden {
    display: none;
}

.theme-toggle:hover {
    transform: scale(1.05) rotate(12deg);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.theme-toggle.spin-once {
    animation: themeSpin 0.5s ease-in-out;
}

@keyframes themeSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(180deg); }
}

/* ================================================================
   Language Switcher — Glass pill + circular flag dropdown
   ================================================================ */
.lang-switcher {
    position: relative;
    display: inline-block;
    z-index: 1300;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f3f4f6;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-pill:hover {
    border-color: rgba(236, 72, 153, 0.5);
    transform: translateY(-1px);
}

.lang-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    flex-shrink: 0;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 175px;
    background: rgba(15, 18, 38, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1300;
}

.lang-switcher:hover .lang-menu,
.lang-switcher.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 9px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-option.active {
    background: rgba(236, 72, 153, 0.12);
    color: #f9a8d4;
    box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.45), 0 0 12px rgba(236, 72, 153, 0.25);
}

html[dir="rtl"] .lang-menu {
    left: auto;
    right: 0;
}

.sidebar-controls-row .lang-switcher {
    flex: 1;
}

.sidebar-controls-row .lang-switcher .lang-pill {
    width: 100%;
}

.sidebar-controls-row .lang-menu {
    left: 0;
    right: 0;
}
