/* CSS Variables for consistent theming */
:root {
    --purple-primary: #6a38ff;
    --purple-light: rgb(192, 119, 255);
    --purple-dark: rgb(102, 36, 255);
    --purple-visited: rgb(198, 197, 201);
    --dark-bg: #2c282d;
    --light-text: #f0f0f0;
    --accent-orange: orange;
}

a {
    color: var(--purple-light);
}
a:visited {
    color: var(--purple-visited);
}
a:hover {
    color: var(--purple-dark);
}
a:active {
    color: var(--accent-orange);
}

/* Keyboard focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--purple-primary);
    outline-offset: 2px;
}

html {
    font: 18px 'Noto Sans', Arial, sans-serif;
    background-color: #333;
    background-image: linear-gradient(0deg, #333 50%, #2c282d 50%);
    background-size: 10px 10px;
    scroll-behavior: smooth;  /* Smooth scrolling */
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background: #2c282d;
    font-family: 'Noto Sans', Arial, sans-serif;
    padding-top: 103px;       /* compensates for the fixed .info-bar and header */
}

/* Skip to Content Link - Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--purple-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

h1 {
    text-align: center;
    color: #f0f0f0;
    margin-bottom: 1.5em;
    font-size: 40px;
    font-family: 'Noto Sans', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.index-text h2 {
    font-family: 'Noto Sans', Arial, sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #eaeaea;
    text-align: center;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.index-text h2 .subtitle {
    display: block;
    font-weight: 400;
    font-size: 22px;
    color: #d0d0d0;
    margin-top: 0.3em;
    line-height: 1.3;
}

h3 {
    font-family: 'Noto Sans', Arial, sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #ddd;
    margin-bottom: 0.75em;
    line-height: 1.3;
    text-align: center;
}

.info-bar {
    background-color: #f0f0f0;
    color: #333;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    font-size: 16px;
    padding: 6px 0;          /* gives it some breathing room */
}

.info-bar a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.info-bar a:hover {
    text-decoration: underline;
}

.titlebox {
    align-items: center;
    flex-direction: column;
    position: relative;
    z-index: 1050;
}

.compudoc h1 {
    font-size: 45px;
    font-weight: bold;
    background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 50%, #6a38ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4))
            drop-shadow(0 0 40px rgba(106, 56, 255, 0.3));
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4))
                drop-shadow(0 0 40px rgba(106, 56, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.6))
                drop-shadow(0 0 50px rgba(106, 56, 255, 0.5));
    }
}

.title {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 30vh;
    padding-top: 2vh;
    color: #f0f0f0;
}

.index-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.index-text p,
.index-text h1 {
    margin: 0;
}

.services-btn {
    margin-top: 40px;   /* add this — replaces the 6x <br> tags */
    display: inline-block;
    /* ... rest of your existing rules unchanged ... */
}

.about {
    background-image: linear-gradient(0deg, rgba(145,145,145,0.5) 50%, rgba(145,145,145,0.5) 50%), url('../images/background2.jpg');
    background-color: #2a2a2a;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    padding-top: 10vh;
    padding-bottom: 10vh;
    font-size: 14px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.features {
    display: flex;
    flex-wrap: wrap;             /* was missing — cards now wrap on medium screens */
    justify-content: center;
    padding-left: 15px;
    padding-right: 15px;
    text-align: center;
    gap: 10px;
}

.wrapper {
    padding: 30px;
    margin: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: visible;        /* was 'hidden' — was clipping content */
    border: 2px solid rgba(106, 56, 255, 0.4);
    flex: 1 1 250px;
    max-width: 360px;
    height: auto;             /* ensures the box grows to fit its content */
    box-sizing: border-box;
}

.wrapper:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(106, 56, 255, 0.5);
    border: 2px solid #6a38ff;
    background: linear-gradient(135deg, rgba(51,51,51,0.7), rgba(80,0,160,0.8));
}

.wrapper h3 {
    font-size: 26px;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    margin-bottom: 10px;
}

.wrapper h4 {
    font-size: 16px;
    color: #ddd;
    line-height: 1.5;
}

.wrapper img.bullet {
    width: 60px;
    height: auto;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.services-btn {
    display: inline-block;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    padding: 15px 40px;
    border: 2px solid rgba(106, 56, 255, 0.6);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s, transform 0.2s;
    margin: 0 auto;
}

.services-btn:hover {
    background: linear-gradient(90deg, #6a38ff 0%, #4411aa 100%);
    color: #fff;
    border: 2.5px solid #fff;
    box-shadow: 0 12px 28px rgba(106, 56, 255, 0.25), 0 2px 8px rgba(0,0,0,0.25);
    transform: translateY(-3px) scale(1.035);
    text-decoration: none;
}

.bullet {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 25%;
}

.text-box {
    color: white;
    position: static;
    text-align: center;
}

.text-box h1 {
    font-size: 62px;
}

.text-box p {
    margin: 10px 0 40px;
    font-size: 14px;
    color: white;
}

@media (max-width: 700px) {
    .title {
        height: auto;
        padding: 10px;
    }

    .mainlogo {
        width: 40vw;
        max-width: 200px;
        height: auto;
    }

    .about {
        font-size: 14px;
        padding: 20px;
        margin: 0;
        text-align: center;
    }

    .text-box h1 {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 0.5em;
    }

    .text-box h2 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 0.75em;
    }

    .text-box {
        margin-top: 0;
        padding: 0 10px;
        text-align: center;
    }

    .about h3 {
        font-size: 24px;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 0.75em;
        color: #f0f0f0;
    }

    .about h4 {
        font-size: 14px;
        line-height: 1.5;
        color: #ccc;
        margin-bottom: 1em;
    }

    .about a {
        font-size: 18px;
        color: #6a38ff;
        font-weight: 600;
    }

    .features {
        flex-direction: column;
        padding: 0 15px;
        gap: 20px;
    }

    .wrapper {
        border-radius: 15px;
        padding: 15px;
        margin: 0 auto;
        max-width: 400px;
        box-shadow: 0 10px 20px rgba(106, 56, 255, 0.3);
    }

    .wrapper:hover {
        transform: none;
        box-shadow: 0 10px 20px rgba(106, 56, 255, 0.3);
    }

    .bullet {
        margin-top: 20px;
        margin-bottom: 0;
        width: 50px;
    }

    .repairs {
        font-size: 15px;
        padding-bottom: 50px;
    }

    .repairsquestion h2 {
        font-size: 18px;
    }

    .repairsflex {
        width: 100%;
        flex-direction: column;
        float: none;
    }

    .servicesheader {
        height: auto;
        padding: 20px 10px;
    }

    .servicestitle {
        position: static;
        text-align: center;
        padding: 15vh 10px 10px;
    }

    .servicestitle h1 {
        font-size: 30px;
        height: auto;
        margin-bottom: 0.25em;
    }

    .servicestitle h2 {
        font-size: 18px;
    }

    .contactheader {
        height: auto;
        width: 100%;
        padding: 20px 10px;
    }

    body {
        width: 100vw;
        padding-top: 103px;
        padding-bottom: 0;
        overflow-x: hidden;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--purple-primary) 0%, var(--purple-dark) 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: none;  /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(106, 56, 255, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(106, 56, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.6);
}

.back-to-top.show {
    display: flex;
}

@media (max-width: 700px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Fade-in scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .compudoc h1 {
        animation: none;
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4))
                drop-shadow(0 0 40px rgba(106, 56, 255, 0.3));
    }

    .bullet {
        animation: none;
        filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
    }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .back-to-top {
        transition: none;
    }

    .back-to-top:hover {
        transform: none;
    }

    .services-btn {
        transition: background-color 0.3s, border-color 0.3s;
    }

    .services-btn:hover {
        transform: none;
    }
}