/* ======== GLOBAL STYLES & VARIABLES ======== */
:root {
    /* Colors (Light Mode) */
    --primary-color: #2B67F6;
    --primary-color-alt: #1a4ecc;
    --text-color: #333;
    --text-color-light: #666;
    --body-color: #FDFDFD;
    --container-color: #FFFFFF;
    --border-color: #E0E0E0;

    /* Fonts */
    --body-font: 'Poppins', sans-serif;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Other */
    --header-height: 4rem;
    --border-radius: 0.75rem;
    --soft-shadow: 0 4px 20px hsla(220, 20%, 80%, 0.4);
    --transition: color .3s, background-color .3s, transform .3s;
}

/* Dark Theme Variables */
html[data-theme='dark'] {
    --text-color: #E0E7FF;
    --text-color-light: #A8B2CC;
    --body-color: #0D1117;
    --container-color: #161B22;
    --border-color: #30363D;
    --soft-shadow: 0 4px 20px hsla(220, 20%, 5%, 0.4);
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    transition: var(--transition);
}

h1, h2, h3 {
    font-weight: 600;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* ======== REUSABLE CSS CLASSES ======== */
.container {
    max-width: 1024px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.section {
    padding: 4rem 0 2rem;
}

.section__title, .section__subtitle {
    text-align: center;
}

.section__subtitle {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ======== HEADER & NAV ======== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: var(--body-color);
    box-shadow: 0 2px 4px hsla(0, 0%, 15%, 0.1);
}

html[data-theme='dark'] .header {
    box-shadow: 0 2px 4px hsla(0, 0%, 5%, 0.4);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__toggle, .nav__close, .change-theme {
    font-size: 1.5rem;
    cursor: pointer;
}

@media screen and (max-width: 767px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        background-color: var(--body-color);
        width: 80%;
        height: 100%;
        padding: 6rem 2rem 0;
        box-shadow: -2px 0 12px hsla(0, 0%, 15%, 0.1);
        transition: right .4s;
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav__link {
    color: var(--text-color);
    font-weight: 600;
    transition: color .3s;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
}

/* Show menu */
.show-menu {
    right: 0;
}

/* ======== HERO ======== */
.hero {
    padding-top: calc(var(--header-height) + 2rem);
    text-align: center;
}

.hero__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero__title {
    font-size: var(--h1-font-size);
    line-height: 1.2;
}

.hero__tagline {
    font-size: 1.125rem;
    color: var(--text-color-light);
    max-width: 600px;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

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

/* ======== SERVICES ======== */
.services__grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
}

.service__card {
    background-color: var(--container-color);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: var(--soft-shadow);
    transition: var(--transition);
}

.service__card:hover {
    transform: translateY(-5px);
}

.service__icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
}

.service__description {
    color: var(--text-color-light);
}

.services__view-all-container {
    width: 100%;
    text-align: center;
    margin-top: 4rem; /* More space for emphasis */
}

/* ADD THIS FINAL STYLE */
.services__view-all-container {
    text-align: center;
    margin-top: 4rem; /* Increased top margin for more space */
}

/* ======== ABOUT ======== */
.about__container {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.about__description {
    color: var(--text-color-light);
    line-height: 1.6;
    margin-top: 1rem;
}

.about__image {
    border-radius: var(--border-radius);
    justify-self: center;
}

/* ======== BLOG ======== */
.blog__grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
}

.blog__card {
    background-color: var(--container-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.blog__card:hover {
    transform: translateY(-5px);
}

.blog__content {
    padding: 1.5rem;
}

.blog__title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.blog__excerpt {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    margin-bottom: 1rem;
}

.blog__link {
    font-weight: 600;
    font-size: var(--small-font-size);
}

.blog__link i {
    vertical-align: middle;
    transition: transform .3s;
}

.blog__link:hover i {
    transform: translateX(4px);
}

/* ======== FOOTER ======== */
.footer {
    background-color: var(--container-color);
    padding-bottom: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer__container {
    display: grid;
    gap: 2rem;
    text-align: center;
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

.footer__link {
    color: var(--text-color-light);
    transition: color .3s;
}

.footer__link:hover {
    color: var(--primary-color);
}

.footer__social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer__social-link {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: color .3s;
}

.footer__social-link:hover {
    color: var(--primary-color);
}

.footer__copy {
    margin-top: 3rem;
    text-align: center;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}


/* ======== MEDIA QUERIES FOR RESPONSIVENESS ======== */

/* For small devices (e.g., larger phones) */
@media screen and (min-width: 375px) {
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* For medium devices (e.g., tablets) */
@media screen and (min-width: 768px) {
    body {
        font-size: var(--normal-font-size);
    }
    
    .section {
        padding: 6rem 0 4rem;
    }

    .nav__toggle, .nav__close {
        display: none;
    }
    
    .nav__list {
        flex-direction: row;
        gap: 2.5rem;
    }
    
    .nav__menu {
        margin-left: auto;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    .about__content {
        order: 0;
    }

    .blog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer__container {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
    .footer__social {
        justify-content: flex-start;
    }
}

/* For large devices (e.g., desktops) */
@media screen and (min-width: 1024px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    :root {
        --h1-font-size: 3rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
    }

    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .about__container {
        gap: 5rem;
    }

    .blog__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}