/* CSS Variables for easy theme management */
:root {
    --primary-color: #00aaff; /* A vibrant blue */
    --primary-hover: #0088cc;
    --background-color: #0a192f; /* A dark navy blue, techy feel */
    --component-bg: #172a45;
    --text-color: #ccd6f6;
    --heading-color: #e6f1ff;
    --light-text: #8892b0;
    --font-main: 'Cairo', sans-serif;
    --font-code: 'Fira Code', monospace;
}

/* General Resets and Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header and Navigation */
.main-header {
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: top 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-code);
    font-size: 24px;
    color: var(--primary-color);
    text-decoration: none;
}

.logo span {
    color: var(--heading-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-right: 25px;
}

.main-nav ul li:last-child {
    margin-right: 0;
}

.main-nav a {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    padding: 180px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-family: var(--font-main);
    font-size: 3.5rem;
    color: var(--heading-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content h1 .highlight {
    color: var(--primary-color);
}

.hero-content .subtitle {
    font-family: var(--font-code);
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.hero-content .description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--light-text);
}

/* Call-to-Action Button */
.cta-button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 35px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

/* General Section Styling */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    color: var(--heading-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--component-bg);
    padding: 35px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #2a3f5a;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px -15px rgba(0, 170, 255, 0.2);
}

.service-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.4rem;
    color: var(--heading-color);
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--light-text);
    flex-grow: 1;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* SEO: Use <article> for semantic grouping of portfolio items */
.portfolio-item {
    background-color: var(--component-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2a3f5a;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px -10px rgba(0, 170, 255, 0.2);
}

.portfolio-item img {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.portfolio-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h3 {
    color: var(--heading-color);
    margin-bottom: 10px;
}

.portfolio-content p {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 0.9rem;
    flex-grow: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    background-color: rgba(0, 170, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-code);
}

/* About Us Section */
#about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--component-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #2a3f5a;
    position: relative;
}

.testimonial-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    color: rgba(0, 170, 255, 0.1);
}

.testimonial-card p {
    font-style: italic;
    color: var(--light-text);
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: bold;
    color: var(--heading-color);
}

.testimonial-author span {
    display: block;
    font-weight: normal;
    font-size: 0.9em;
    color: var(--light-text);
}

/* Contact Section */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Accessibility: Added a visually-hidden class for labels */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--component-bg);
    border: 1px solid #2a3f5a;
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.main-footer {
    background-color: var(--component-bg);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    text-align: right;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h4 {
    color: var(--heading-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p, .footer-section a {
    color: var(--light-text);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section .contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-section .contact-info i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #2a3f5a;
    color: var(--light-text);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav ul {
        display: none; /* Simple hide for mobile, can be replaced with a hamburger menu */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .footer-section .contact-info p {
        justify-content: center;
    }
}
