/* 
   Premium Blue Theme
   Palette: Deep Navy, Electric Blue, Slate
*/

:root {
    --bg-color: #0a192f;
    --section-bg: #020c1b;
    /* Slightly darker */
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent: #64ffda;
    --accent-glow: rgba(100, 255, 218, 0.2);
    --white: #e6f1ff;
    --glass-bg: rgba(17, 34, 64, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);

    --font-heading: 'Heebo', sans-serif;
    --font-body: 'Rubik', sans-serif;

    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    /* RTL Support */
}

html {
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--section-bg);
}

.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 255, 218, 0.15), transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
    transition: width 0.3s, height 0.3s;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent), #11998e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-dark {
    background-color: var(--section-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    margin-right: 15px;
}

.btn-outline:hover {
    border-color: var(--white);
    color: var(--white);
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-self: start;
    grid-column: 1;
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    grid-column: 2;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    grid-column: 3;
    justify-self: end;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--accent);
}

/* Hero Section */
.hero {
    padding-top: 150px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero-buttons {
    margin-top: 30px;
}

/* Hero Background Banner Link */
.hero-bg-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Below content but above background */
    opacity: 0.1;
    /* Subtle transparency */
    transition: var(--transition);
    overflow: hidden;
}

.hero-bg-link:hover {
    opacity: 0.2;
    /* Slightly more visible on hover */
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover the whole section */
    filter: grayscale(100%);
    /* Optional: keep it subtle */
}

/* Ensure content stays on top */
.hero-container {
    position: relative;
    z-index: 2;
    /* Sit on top of the bg-link */
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

/* Hero Visuals */
.hero-image {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    width: 180px;
    padding: 20px;
    text-align: center;
    z-index: 2;
}

.floating-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.floating-card:first-child {
    top: 0;
    right: 0;
    animation: float 6s ease-in-out infinite;
}

.card-2 {
    bottom: 20px;
    left: 0;
    animation: float 6s ease-in-out infinite 2s;
}

.code-block {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background: #112240;
    z-index: 1;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #a8b2d1;
    border-radius: 8px;
    padding: 20px;
}

.code-block code {
    white-space: pre-wrap;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--accent);
    font-size: 1.5rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.icon-box {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 2.5rem;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    position: relative;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(100, 255, 218, 0.1);
    margin-bottom: -20px;
    position: relative;
    z-index: 0;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.portfolio-item {
    transition: var(--transition);
}

.portfolio-image {
    height: 200px;
    background-color: #112240;
    position: relative;
    overflow: hidden;
    /* For zoom effect */
    border-radius: 8px;
    margin-bottom: 20px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .project-img {
    transform: scale(1.1);
}

/* Placeholder backgrounds using gradients */


.portfolio-content {
    padding: 20px 0 0 0;
    /* Top padding to separate from image */
}

.project-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative;
}

/* Add a visual link icon that is always visible */
.project-link::after {
    content: '\f0c1';
    /* FontAwesome link icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 15px;
    left: 15px;
    /* RTL aware: left side on the image */
    background: var(--accent);
    color: var(--section-bg);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    z-index: 5;
    opacity: 0.9;
}

.project-link:hover::after {
    transform: scale(1.1);
    background: var(--white);
}

.project-link:active .project-img {
    transform: scale(1.05);
    /* Slight squeeze/pulse on click instead of just zoom */
    filter: brightness(0.9);
}

/* Ensure hover zoom still works */
.portfolio-item:hover .project-img {
    transform: scale(1.1);
}

.btn-icon {
    font-size: 2rem;
    color: var(--section-bg);
}

.tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 10px;
    margin-left: 10px;
    font-family: 'Fira Code', monospace;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    padding-right: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-item i {
    color: var(--accent);
    margin-left: 15px;
    font-size: 1.2rem;
}

.social-links {
    margin-top: 30px;
}

.social-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border: 1px solid var(--text-secondary);
    border-radius: 50%;
    margin-left: 15px;
    transition: var(--transition);
    color: var(--text-secondary);
}

.social-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Contact Actions */
.contact-actions {
    text-align: center;
    padding: 40px;
}

.contact-actions h3 {
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--white);
}

.service-points {
    list-style: none;
    margin-bottom: 35px;
    text-align: right;
    /* RTL alignment */
    display: inline-block;
}

.service-points li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.service-points li i {
    color: var(--accent);
    margin-left: 10px;
    font-size: 1.2rem;
}

.contact-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
}

.btn-phone {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-phone:hover {
    background-color: var(--white);
    color: var(--bg-color);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 60px 0;
    }

    .glass-card {
        padding: 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        /* Force 1 column on mobile */
        gap: 20px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        display: block;
        margin: 40px auto 0;
        width: 100%;
        max-width: 400px;
        height: 380px;
        transform-origin: center top;
    }

    /* Scale down for very small screens */
    @media (max-width: 480px) {
        .hero-image {
            transform: scale(0.8);
            height: 300px;
            /* Reduced height to reduce whitespace */
        }
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--section-bg);
        width: 100%;
        height: 100vh;
        /* cover full height */
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding-top: 50px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 25px 0;
    }

    h1 {
        font-size: 2.5rem;
    }
}