/* Import Tech Font */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;700&display=swap');

/* Default Theme Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #007BFF;
    --card-bg-color: #f8f8f8;
    --card-text-color: #000000;
    --card-border-color: #ccc;
    --box-shadow-color: rgba(0, 123, 255, 0.2);
    --transition-duration: 0.5s;
    --card-hover-scale: 1.02;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #1E90FF;
    --card-bg-color: #1e1e1e;
    --card-text-color: #ffffff;
    --card-border-color: rgba(255, 255, 255, 0.1);
    --box-shadow-color: rgba(30, 144, 255, 0.2);
}

body {
    margin: 0;
    font-family: 'Exo 2', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    text-align: center;
    padding: 50px 20px;
    max-width: 1280px;
    width: 100%;
}

.logo {
    font-size: 3em;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.services {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
}

.card {
    position: relative;
    background: var(--card-bg-color);
    color: var(--card-text-color);
    flex: 0 1 24%;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color var(--transition-duration) ease, color var(--transition-duration) ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: calc(0.2s * var(--card-index));
    border: 1px solid var(--card-border-color);
    box-sizing: border-box;
}

.icon {
    font-size: 3em;
    color: var(--accent-color);
    margin-bottom: 15px;
    text-align: left;
}

.card h2 {
    margin-top: 0;
    font-size: 1.5em;
}

.card p {
    font-size: 1em;
    flex-grow: 1;
}

.card:hover {
    transform: scale(var(--card-hover-scale));
    box-shadow: 0 15px 30px var(--box-shadow-color);
}

.contact {
    margin-top: 40px;
    font-size: 1.2em;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1s;
}

.contact a {
    color: var(--accent-color);
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}

/* Dark Mode Toggle Switch */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1;
}

.theme-toggle input {
    opacity: 0;
    position: absolute;
}

.theme-toggle label {
    width: 50px;
    height: 25px;
    background: var(--accent-color);
    display: block;
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    transition: background-color var(--transition-duration) ease;
}

.theme-toggle label::after {
    content: '';
    width: 21px;
    height: 21px;
    background: var(--bg-color);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease, background-color var(--transition-duration) ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.theme-toggle input:checked + label::after {
    transform: translateX(25px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */

/* Up to 1280px width */
@media (max-width: 1280px) {
    .container {
        padding: 30px 10px;
    }
}

/* Up to 1024px width - two cards per row */
@media (max-width: 1024px) {
    .card {
        flex: 0 1 48%;
    }
}

/* Up to 768px width - one card per row */
@media (max-width: 768px) {
    .services {
        flex-direction: column;
        align-items: center;
    }
    .card {
        flex: 0 1 auto;
        width: 100%;
        max-width: 600px;
        margin-bottom: 20px;
    }
    .container {
        padding: 20px 16px;
    }
}
