/* ==================================================
   GLOBAL STYLESHEET
   Shared styles used across the portfolio website.
================================================== */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap");

/* Shared CSS files */
@import url("variables.css");
@import url("navbar.css");
@import url("home.css");
@import url("responsive.css");

/* ==================================================
   RESET
================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--light);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    padding-top: 80px;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

input,
textarea,
select {
    font-family: inherit;
}

/* ==================================================
   REUSABLE CLASSES
================================================== */

.container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

.section {
    padding: 90px 0;
}

.section-padding {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-family: var(--heading-font);
    font-size: var(--fs-lg);
}

.section-subtitle {
    margin-bottom: 50px;
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ==================================================
   SHARED BACK-TO-TOP BUTTON
================================================== */

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-4px);
}

.back-to-top:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 4px;
}

/* ==================================================
   FOOTER
   These selectors match site-footer in your HTML.
================================================== */

.site-footer {
    padding: 75px 0 25px;
    background-color: #0f172a;
    color: #cbd5e1;
}

.footer-brand p,
.footer-links a,
.footer-contact a,
.footer-bottom p {
    color: #cbd5e1;
}

.footer-links h3,
.footer-contact h3 {
    color: #f8fafc;
}

.footer-logo {
    color: #f8fafc;
    font-family: var(--heading-font);
    font-size: 1.6rem;
    font-weight: 700;
}

.footer-logo span {
    color: #60a5fa;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: #60a5fa;
}

.footer-social-links {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-social-links a:hover {
    border-color: #60a5fa;
    background-color: #60a5fa;
    color: #0f172a;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom .fa-heart {
    color: #ef4444;
}

/* ==================================================
   DARK THEME
   Applied when theme.js adds .dark-theme to body.
================================================== */

body.dark-theme {
    background-color: #0f172a;
    color: #e2e8f0;
}

/* Shared text colours in dark mode */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: #f8fafc;
}

body.dark-theme p,
body.dark-theme li {
    color: #cbd5e1;
}

/* Common light page areas become dark */
body.dark-theme .services-section,
body.dark-theme .featured-portfolio-section,
body.dark-theme .process-section,
body.dark-theme .trust-section,
body.dark-theme .portfolio-projects,
body.dark-theme .services-overview-page {
    background-color: #0f172a;
}

/* Common cards become readable dark cards */
body.dark-theme .service-card,
body.dark-theme .featured-project-card,
body.dark-theme .project-card,
body.dark-theme .portfolio-card,
body.dark-theme .trust-card,
body.dark-theme .process-card,
body.dark-theme .stat-card {
    background-color: #1e293b;
    border-color: rgba(148, 163, 184, 0.2);
}

/* Keep text readable inside dark cards */
body.dark-theme .service-card p,
body.dark-theme .featured-project-card p,
body.dark-theme .project-card p,
body.dark-theme .portfolio-card p,
body.dark-theme .trust-card p,
body.dark-theme .process-card p,
body.dark-theme .stat-card p {
    color: #cbd5e1;
}

/* Service cards that intentionally remain white */
body.dark-theme .service-page-card {
    background-color: #ffffff;
    border-color: rgba(148, 163, 184, 0.25);
}

body.dark-theme .service-page-card h3 {
    color: #0f172a;
}

body.dark-theme .service-page-card p,
body.dark-theme .service-page-card li {
    color: #334155;
}

/* Keep the footer consistently dark in both themes */
body.dark-theme .site-footer {
    background-color: #020617;
}

/* Mobile hamburger stays visible in dark mode */
body.dark-theme .hamburger span {
    background-color: #f8fafc;
}

/* ==================================================
   RESPONSIVE SHARED STYLES
================================================== */

@media (max-width: 768px) {
    .section {
        padding: 75px 0;
    }

    .section-padding {
        padding: 75px 0;
    }

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

@media (max-width: 480px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }

    .btn {
        padding: 13px 24px;
    }
}