/* General Styles */
/* 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, body {
    font: 18px 'Noto Sans', Arial, sans-serif;
    background-color: #333;
    background-image: linear-gradient(0deg, #333 50%, #2c282d 50%);
    background-size: 10px 10px;
    margin: 0;
    padding: 0;
    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 */
}

/* Info Bar */
.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;
}

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

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

/* Headers — scoped to avoid bleeding into other pages */
.repairs h2,
.servicestitle h2 {
    color: #f0f0f0;
    text-align: center;
    font-size: 30px;
    margin: 0 0 0.5em 0;
}

.repairs h3,
.repairs h4,
.carousel-card h3 {
    text-align: center;
    color: #fff;
}

/* Compu-Doc brand title */
.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;
    margin: 0;
}

@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));
    }
}

/* Main Content */
main {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Title Box */
.titlebox {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    z-index: 1050;
}

/* Services Title Section */
.servicestitle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 250px;
    padding: 2vh 20px;
    color: #f0f0f0;
    width: 100%;
    box-sizing: border-box;
}

.servicestitle p,
.servicestitle h1 {
    margin: 0;
}

/* Repairs Section */
.repairs {
    color: white;
    padding: 50px 0;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    min-height: 50vh;
    background-image: linear-gradient(
        0deg,
        rgba(145,145,145,0.5) 50%,
        rgba(145,145,145,0.5) 50%
    ),
    url('../images/background2.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

/* Carousel */
.carousel {
    position: relative;
    margin: auto;
    overflow: hidden;           /* clips off-screen cards — must stay on */
    width: 90%;
    max-width: 1000px;
    padding: 40px 30px 20px 30px;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    overflow: visible;
}

.carousel-card {
    flex: 0 0 46%;
    max-width: 46%;
    margin: 0 1%;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    padding: 30px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(106, 56, 255, 0.3);
    border-radius: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    color: white;
    position: relative;
    overflow: visible;          /* cards themselves can overflow (no clipping) */
    transition: transform 0.4s, box-shadow 0.4s, border 0.3s;
    height: auto;
}

.carousel-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(106, 56, 255, 0.6);
    border: 2px solid #6a38ff;
    background: linear-gradient(135deg, rgba(40,40,60,0.7), rgba(106,56,255,0.8));
}

.carousel-card::before {
    content: "";
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    z-index: -1;
    background: rgba(255, 255, 255, 0.05);
    filter: blur(12px);
    opacity: 0.3;
    border-radius: 25px;
}

.carousel-card h3 {
    margin-top: 10px;
    font-size: 24px;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px #000;
}

.carousel-card p {
    font-size: 16px;
    color: #ddd;
    line-height: 1.5;
    font-weight: normal;        /* repairs sets font-weight: bold globally */
}

.carousel-card img.bulletserv {
    width: 60px;
    height: auto;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

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

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}

.prev { left: 0; }
.next { right: 0; }

.carousel-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Questions Section */
.questions {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 40px;
}

.questions-btn {
    font-size: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(106, 56, 255, 0.6);
    color: white;
    border-radius: 20px;
    padding: 12px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.questions-btn:hover {
    background: #6a38ff;
    color: #fff;
    border-radius: 28px;
    box-shadow: 0 0 10px rgba(106, 56, 255, 0.6);
}

/* Footer */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    background-color: #2c282d;
    color: white;
}

.footercontact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.contacticon {
    text-align: center;
}

.contacticon img {
    width: 50px;
    height: 50px;
}

/* Responsive */
@media (max-width: 700px) {
    body {
        width: 100vw;
        padding-top: 103px;
        padding-bottom: 0;
        overflow-x: hidden;
    }

    .servicestitle {
        min-height: auto;
        padding: 20px;
    }

    .repairs {
        padding: 20px 10px;
        font-size: 16px;
    }

    /* On mobile, disable JS carousel and stack cards naturally */
    .carousel {
        width: 100%;
        padding: 10px 0;
        overflow: visible;
    }

    .carousel-container {
        flex-wrap: wrap;
        transform: none !important;  /* disable JS transform on mobile */
        gap: 15px;
        transition: none;
    }

    .carousel-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0;
    }

    .carousel-btn {
        display: none;
    }

    .questions-btn {
        font-size: 20px;
        padding: 10px 16px;
    }

    .footercontact {
        flex-direction: column;
        align-items: center;
    }

    .address p {
        font-size: 14px;
    }
}

/* 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;
    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;
}

/* 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));
    }

    .bulletserv {
        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;
    }

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

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

    .carousel-container {
        transition: none;
    }
}