@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f0f0;
    --bg-cards: #ffffff;
    --bg-projects: #000016;
    --text-primary: #000016;
    --text-secondary: #333;
    --accent: #3a6cf4;
    --accent-hover: #601cfc;
    --card-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    --header-bg: #f0f0f0;
}

body.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-cards: #21262d;
    --bg-projects: #010409;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --card-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
    --header-bg: #161b22;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Language switch transition effect */
[data-i18n] {
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.lang-switching [data-i18n] {
    opacity: 0;
    transform: translateY(-10px);
}

*{
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth; 
}

/* ========== قائمة متطلبات التطبيق - تصميم عصري ========== */
.app-requirements {
    position: absolute;
    margin-top: 40px;
    max-width: 480px;
    margin-bottom: 80px;
}

.requirements-title {
    color: #fff;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.requirements-title i {
    color: #4e9eff;
    font-size: 1.2em;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.requirement-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(78, 158, 255, 0.4);
}

.req-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(78, 158, 255, 0.4) 0%, rgba(102, 126, 234, 0.4) 100%);
    border-radius: 12px;
    color: #4e9eff;
    font-size: 1.2em;
}

.requirement-item:nth-child(2) .req-icon { background: linear-gradient(135deg, rgba(79, 172, 254, 0.4) 0%, rgba(0, 242, 254, 0.4) 100%); color: #00f2fe; }
.requirement-item:nth-child(3) .req-icon { background: linear-gradient(135deg, rgba(240, 147, 251, 0.4) 0%, rgba(245, 87, 108, 0.4) 100%); color: #f093fb; }
.requirement-item:nth-child(4) .req-icon { background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%); color: #a78bfa; }

.req-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.req-label {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.req-value {
    font-size: 1em;
    color: #fff;
    font-weight: 600;
}

/* LTR overrides for English */
body[dir="ltr"] .requirement-item {
    text-align: left;
}

body[dir="ltr"] .req-content {
    align-items: flex-start;
}
/* ========== Language Toggle Button ========== */
.lang-toggle-wrap {
    margin-left: 20px;
    margin-right: 20px;
    padding-left: 20px;
    padding-right: 0;
    border-left: 1px solid rgba(58, 108, 244, 0.25);
    flex-shrink: 0;
}

body.dark-mode .lang-toggle-wrap {
    border-left-color: rgba(88, 166, 255, 0.25);
}

.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(58, 108, 244, 0.15) 0%, rgba(96, 28, 252, 0.15) 100%);
    border: 1px solid rgba(58, 108, 244, 0.35);
    border-radius: 12px;
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-toggle:hover {
    background: linear-gradient(135deg, rgba(58, 108, 244, 0.25) 0%, rgba(96, 28, 252, 0.25) 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(58, 108, 244, 0.25);
}

.lang-toggle .lang-icon {
    font-size: 1.1em;
    opacity: 0.9;
}

.lang-toggle .lang-text {
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

body.dark-mode .lang-toggle {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.12) 0%, rgba(121, 192, 255, 0.12) 100%);
    border-color: rgba(88, 166, 255, 0.3);
}

body.dark-mode .lang-toggle:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.22) 0%, rgba(121, 192, 255, 0.22) 100%);
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.2);
}

/* ========== Theme Toggle Button ========== */
.theme-toggle-wrap {
    margin-right: 15px;
    margin-left: 25px;
    padding-left: 25px;
    border-left: 1px solid rgba(58, 108, 244, 0.3);
    flex-shrink: 0;
}

body.dark-mode .theme-toggle-wrap {
    border-left-color: rgba(88, 166, 255, 0.3);
}

.theme-toggle {
    position: relative;
    width: 68px;
    height: 34px;
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 17px;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.45);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.55);
}

.theme-toggle span {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .icon-sun {
    right: 10px;
    opacity: 1;
}

.theme-toggle .icon-moon {
    left: 10px;
    opacity: 0.35;
}

body.dark-mode .theme-toggle {
    background: linear-gradient(145deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.45);
}

body.dark-mode .theme-toggle:hover {
    box-shadow: 0 6px 25px rgba(245, 87, 108, 0.55);
}

body.dark-mode .theme-toggle .icon-sun {
    right: 10px;
    opacity: 0.35;
}

body.dark-mode .theme-toggle .icon-moon {
    left: 10px;
    opacity: 1;
}

header {
    background-color: var(--header-bg);
    width: 100%;
    position: fixed;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 200px;
    transition: background-color 0.4s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.dark-mode header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo{
    text-decoration: none;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.8em;
    transition: color 0.4s ease;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.navigation a{
    color: var(--accent);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    padding-inline-start: 30px;
    transition: color 0.4s ease;
    white-space: nowrap;
}

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

section {
    padding: 100px 200px;
}

.main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url(images/back.jpg) no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding-bottom: 180px;
}

.main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.8));
    z-index: 0;
}

.main > * {
    position: relative;
    z-index: 1;
}



.main h2 {
    color: #fff;
    font-size: 1.4em;
    font-weight: 500;
}

.main h2 span {
    display: inline-block;
    margin-top: 10px;
    color: #4e9eff;
    font-size: 3em;
    font-weight: 600;
    
}

.main h3 {
    color: #fff;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.button {
    width: 200px;
    margin: 150px auto;
}

.button a {
    display: block;
    height: 50px;
    width: 200px;
    color: white;
    font: 17px/50px sans-serif,Helvetica;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    background: #355C7D; 
}

.button p {
    background: #6C5B7B;
    display: block;
    height: 40px;
    width: 180px;
    margin: -50px 0 0 10px;
    text-align: center;
    font: 14px/45px sans-serif,Helvetica;
    color: #eee;
    position: absolute;
    z-index: -1;
    -webkit-transition: margin 0.7s cubic-bezier(0.6, -0.28, 0.74, 0.05);
    -moz-transition: margin 0.7s cubic-bezier(0.6, -0.28, 0.74, 0.05);
    -o-transition: margin 0.7s cubic-bezier(0.6, -0.28, 0.74, 0.05);
    -ms-transition: margin 0.7s cubic-bezier(0.6, -0.28, 0.74, 0.05);
    transition: margin 0.7s cubic-bezier(0.6, -0.28, 0.74, 0.05);
}


.button a, p {
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 13px;
    -webkit-box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    -moz-box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.button:hover .bottom { 
  margin: -10px 0 0 10px 
}

.button:hover .top {
    margin: -80px 0 0 10px;
    line-height: 35px;
}

.social-icons a {
    color: #fff;
    font-size: 1.7em;
    padding-right: 30px;
}

.title {
    display: flex;
    justify-content: center;
    color: var(--accent);
    font-size: 2.2em;
    font-weight: 800;
    margin-bottom: 30px;
    transition: color 0.4s ease;
}

.content {
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
}

.card {
    background-color: var(--bg-cards);
    width: 21.25em;
    box-shadow: var(--card-shadow);
    border-radius: 16px;
    padding: 25px;
    margin: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

body.dark-mode .card {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(58, 108, 244, 0.2);
}

body.dark-mode .card:hover {
    box-shadow: 0 15px 40px rgba(58, 108, 244, 0.15);
}

/* ========== Modern Card Icons ========== */
.card .icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    font-size: 2.5em;
    color: #fff !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.card:nth-child(2) .icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
}

.card:nth-child(3) .icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4);
}

.info {
    text-align: center;
}

.info p {
    color: var(--text-secondary) !important;
    transition: color 0.4s ease;
}

.info h3{
    color: var(--accent);
    font-size: 1.2em;
    font-weight: 700;
    margin: 10px;
    transition: color 0.4s ease;
}

.projects {
    background-color: var(--bg-projects);
    transition: background-color 0.4s ease;
}

.projects .content{
    margin-top: 30px;
}

.project-card {
    background-color: var(--bg-cards);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 14em;
    width: 23em;
    overflow: hidden;
    border-radius: 16px;
    margin: 20px;
    transition: all 0.4s ease;
}

body.dark-mode .project-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card:hover {
   transform: scale(1.1);
}

.project-card:hover .project-image {
    opacity: 0.9;
 }

.project-image img{
    width: 100%
}

.project-info {
    padding: 1em;
}

.project-category {
    font-size: 0.8em;
    color: var(--text-primary);
    transition: color 0.4s ease;
}

.project-title {
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    font-weight: 800;
    margin-top: 10px;
}

.more-details {
    text-decoration: none;
    color: var(--accent);
    transition: color 0.4s ease;
}

.more-details:hover {
    color: var(--accent-hover);
}

.contact .card .icon {
    width: 120px;
    height: 120px;
    font-size: 3em;
}

.contact .contact-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.contact .icon{
    font-size: 3em;
}

.contact .info h3 {
    color: var(--text-primary);
    transition: color 0.4s ease;
}

.contact .info p {
    font-size: 1em;
}

.footer {
    background-color: var(--bg-projects);
    color: #fff;
    padding: 2em;
    display: flex;
    justify-content: space-between;
    transition: background-color 0.4s ease;
}

.footer-title {
    font-size: 1.3em;
    font-weight: 600;
}

.footer-title span {
    color: var(--accent);
    transition: color 0.4s ease;
}

.footer .social-icons a{
    font-size: 1.3em;
    padding: 0 12px 0 0;
}

@media (max-width:1023px){
    header{
        padding: 12px 20px;
    }

    .navigation{
        flex-wrap: wrap;
        gap: 6px;
    }

    .navigation a{
        padding-inline-start: 12px;
    }

    .lang-toggle-wrap {
        margin: 0 8px;
        padding-inline-start: 12px;
    }

    .lang-toggle {
        padding: 6px 10px;
        font-size: 0.85em;
    }

    .theme-toggle-wrap {
        margin-inline-start: 8px;
        padding-inline-start: 12px;
    }

    section{
        padding: 80px 20px;
    }

    .main{
        min-height: auto;
        padding: 100px 20px 80px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }

    .main > div{
        width: 100%;
        max-width: 480px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main h2 span{
        font-size: 2.2em;
    }

    .main h3{
        font-size: 1.5em;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .app-requirements {
        position: relative;
        max-width: 100%;
        width: 100%;
        margin-top: 30px;
        margin-bottom: 0;
    }

    .requirement-item{
        padding: 14px 16px;
        gap: 12px;
    }

    .req-icon{
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.1em;
    }

    .requirements-title{
        font-size: 1.1em;
        margin-bottom: 14px;
    }

    .title{
        font-size: 1.8em;
    }

    .content{
        flex-direction: column;
        align-items: center;
    }

    .card{
        width: 100%;
        max-width: 21.25em;
    }

    .project-card{
        width: 100%;
        max-width: 23em;
    }
}

@media (max-width:641px){
    body{
        font-size: 12px;
    }

    header{
        padding: 10px 15px;
    }

    .navigation{
        gap: 4px;
    }

    .navigation a{
        padding-inline-start: 8px;
        font-size: 0.95em;
    }

    .lang-toggle-wrap {
        margin: 0 6px;
        padding-inline-start: 10px;
    }

    .lang-toggle {
        padding: 6px 8px;
        font-size: 0.8em;
    }

    .lang-toggle .lang-icon {
        font-size: 1em;
    }

    section{
        padding: 60px 15px;
    }

    .main{
        padding: 80px 15px 60px;
    }

    .main > div{
        max-width: 100%;
    }

    .main h2 span{
        font-size: 1.8em;
    }

    .main h3{
        font-size: 1.3em;
    }

    .app-requirements{
        position: relative;
        margin-top: 25px;
        margin-bottom: 0;
        width: 100%;
    }

    .requirements-grid{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .requirement-item{
        width: fit-content;
        max-width: 160px;
        padding: 10px 14px;
        flex-direction: row;
        text-align: right;
        gap: 10px;
        border-radius: 12px;
    }

    .req-icon{
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 1em;
        border-radius: 8px;
    }

    .req-content{
        align-items: flex-end;
        gap: 2px;
    }

    .req-label{
        font-size: 0.95em;
    }

    .req-value{
        font-size: 1.05em;
    }

    .requirements-title{
        font-size: 1.15em;
        margin-bottom: 12px;
    }

    .requirements-title i{
        font-size: 1.2em;
    }

    .title{
        font-size: 1.5em;
    }

    .theme-toggle{
        width: 56px;
        height: 28px;
    }

    .theme-toggle span{
        font-size: 14px;
    }
}

@media (max-width:480px){
    .navigation{
        justify-content: flex-end;
        gap: 2px;
    }

    .navigation a:first-of-type{
        padding-inline-start: 0;
    }

    .lang-toggle-wrap,
    .theme-toggle-wrap {
        margin-inline-start: 4px;
        padding-inline-start: 8px;
    }
}

@media (max-width:300px){
    body{
        font-size: 10px;
    }

    .main{
        padding: 70px 10px 50px;
    }
}