/* ==========================
   VARIABLES & COLORS
   ========================== */
:root {
    /* These are your main brand colors */
    --blue: #3B82F6;
    --purple: #8B5CF6;
    --pink: #EC4899;
}

/* LIGHT THEME COLORS */
body.light-theme {
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-secondary: #EEF2FF;
    /* Text color changes to Dark in Light Mode */
    --text-main: #111827; 
    --text-muted: #6B7280;
    --border: rgba(0,0,0,0.08);
}

/* DARK THEME COLORS */
body.dark-theme {
    --bg-body: #0F172A;
    --bg-card: #1E293B;
    --bg-secondary: #162032;
    /* Text color changes to White in Dark Mode */
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: rgba(255,255,255,0.08);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    transition: 0.3s;
    overflow-x: hidden; /* Prevent side scroll when switching languages */
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ==========================
   HEADER & LOGO
   ========================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 90px; 
    display: flex;
    align-items: center;
}

body.dark-theme header {
    background: rgba(19, 22, 42, 0.92);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* LOGO WRAPPER */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* LOGO CONTAINER (Holds both images in same spot) */
.logo-container {
    position: relative;
    width: 70px;
    height: 70px;

    border-radius: 14px;
    overflow: hidden;

    background: #13162A;
    padding: 4px;
}

/* IMAGES STACKED ON TOP OF EACH OTHER */
.logo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keeps aspect ratio */
    transition: opacity 0.3s ease;
}

/* Toggle visibility based on theme */
.logo-light { opacity: 1; }
.logo-dark { opacity: 0; }

body.dark-theme .logo-light { opacity: 0; }
body.dark-theme .logo-dark { opacity: 1; }

/* ==========================
   COMPANY NAME STYLING
   ========================== */
.company-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main); /* Uses variable to switch Black/White */
    letter-spacing: -1px;
}

/* The "2" inside the name */
.gradient-number {
    /* Fixed Gradient: Purple Top -> Blue Bottom */
    background: linear-gradient(to bottom, var(--purple), var(--blue));
    -webkit-background-clip: text;
    color: transparent; /* Makes text transparent so gradient shows */
    display: inline-block;
}

/* ==========================
   NAVIGATION
   ========================== */
.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--pink);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Language Dropdown */
.lang-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    font-size: 14px;
    outline: none;
}

/* Theme Button */
.theme-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-main);
}

/* ==========================
   HERO SECTION
   ========================== */
.hero {
    /* EDIT HERE: Adjust 'min-height' if you want less space at the beginning */
    min-height: 90vh; /* Changed from 100vh to reduce space slightly */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px; /* Space for the fixed header */
    background:
        radial-gradient(circle at top right, rgba(59,130,246,0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(236,72,153,0.12), transparent 40%);
}

.hero h1 {
    font-size: 65px;
    line-height: 1.2;
    margin: 20px 0;
}

.gradient-text {
    background: linear-gradient(to right, var(--blue), var(--purple), var(--pink));
    -webkit-background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 800px;
    margin: auto;
    color: var(--text-muted);
    font-size: 20px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.badge {
    padding: 8px 15px;
    border-radius: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

/* ==========================
   BUTTONS
   ========================== */
.btn {
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    border: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59,130,246,0.3);
}

.btn-outline {
    border: 2px solid var(--blue);
    color: var(--blue);
    background: transparent;
}

/* ==========================
   SECTIONS
   ========================== */
.section-padding {
    padding: 80px 0; /* Reduced padding to fit more content */
}

.section-title {
    font-size: 42px;
    margin: 15px 0 50px;
}

.section-subtitle {
    color: var(--blue);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.text-center {
    text-align: center;
}

/* GRIDS */
.services-grid, .about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px;
    margin-top: 30px;
}

/* ==========================
   CARDS
   ========================== */
.service-card, .team-card, .project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: 0.3s;
}

.service-card:hover, .project-card:hover {
    transform: translateY(-6px);
}

/* PROJECT CARD SPECIFIC */
.project-card {
    padding: 0; /* Remove padding so image touches edges */
    overflow: hidden;
    text-align: left;
}

.project-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 25px;
}

.tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(59,130,246,0.1);
    color: var(--blue);
    display: inline-block;
    margin-right: 5px;
    margin-top: 10px;
}

/* TEAM CARD */
.team-card {
    display: flex; /* Side by side */
    align-items: center;
    gap: 20px;
    text-align: left;
}
.group-card {
    max-width: 900px;
    margin: auto;
    padding: 40px;
}

.group-card .dev-info p {
    line-height: 1.8;
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 15px;
}

html[dir="rtl"] .team-card {
    text-align: right;
}

.dev-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--purple);
    flex-shrink: 0;
}

.dev-role {
    display: block;
    margin: 5px 0;
    color: var(--pink);
    font-weight: 600;
}

/* ==========================
   CONTACT
   ========================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-body);
    color: var(--text-main);
    outline: none;
}

.contact-form textarea {
    height: 120px;
    resize: none;
}

.contact-btn {
    padding: 16px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* ==========================
   BACK TO TOP ARROW
   ========================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59,130,246,0.4);
    opacity: 0;
    pointer-events: none; /* Hidden by default */
    transition: all 0.3s ease;
    z-index: 999;
}

/* RTL FIX */
html[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

/* Show class added by JS */
.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--purple);
    transform: translateY(-3px);
}

/* FOOTER */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    margin-top: 50px;
    color: var(--text-muted);
}

/* ==========================
   MOBILE RESPONSIVE
   ========================== */
@media(max-width:768px){
    .nav-menu {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .show-menu { display: block; }
    .nav-links { flex-direction: column; gap: 20px; text-align: center; }
    .mobile-menu-btn { display: block; }
    
    .hero h1 { font-size: 42px; }
    .hero-buttons { flex-direction: column; }
    
    .team-card { flex-direction: column; text-align: center; }
    html[dir="rtl"] .team-card { text-align: center; }
    
    .contact-wrapper { grid-template-columns: 1fr; }
}