:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --text-color: #ffffff;
    --background-color: #121212;
    --accent-color: #ff6b00;
    --muted-text: #a0a0a0;
    --header-bg: #dfdfdf;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%; /* Ensure all elements fit within the viewport */
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden; /* Prevent horizontal scrolling on mobile */
}

header {
    background-color: var(--header-bg);
    color: var(--primary-color);
    padding: 1rem 1rem;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
}

.logo-container {
    width: 500px;
    height: auto;
    margin-bottom: 0rem;
    overflow: hidden;
    position: relative;
}

.logo {
    width: 100%;
    height: auto;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    filter: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
    transform-origin: center center;
    will-change: transform, opacity;
    z-index:1000;
}

.logo:hover {
    transform: scale(1.08);
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--muted-text);
}

canvas#pipeCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.05;
    pointer-events: none;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.wrapper {
    overflow-x: hidden; /* Prevent horizontal scrolling on the main content wrapper */
}

.services {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    border: 1px solid #333;
}

.services h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.services ul {
    list-style-position: inside;
    margin: 1rem 0;
    color: var(--text-color);
}

.services li {
    margin: 0.5rem 0;
    padding-left: 1rem;
    transition: color 0.3s ease;
}

.services li:hover {
    color: var(--accent-color);
}

.contact-card {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.contact-card h2 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.company-name {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--accent-color);
}

.company-name strong {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.company-name span {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact-item strong {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.contact-item a:hover {
    color: var(--accent-color);
}

.contact-item.address a {
    line-height: 1.4;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: -0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.phone-link:hover {
    background-color: rgba(255, 107, 0, 0.1);
}

.phone-link .phone-icon {
    color: var(--accent-color);
}

#rotating-text {
    min-height: 2em; /* Increased height for better accommodation */
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.2);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(255, 107, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 0, 0);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header h2 {
        font-size: 1.2rem;
    }

    .services, .contact-card {
        padding: 1.5rem;
    }

    .phone-link {
        font-size: 1.2rem;
        padding: 0.7rem;
        margin: -0.7rem;
        animation: pulse 2s infinite;
    }
    
    .phone-link:hover {
        animation: none;
    }
}

footer {
    background-color: var(--primary-color);
    color: var(--muted-text);
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 1;
    border-top: 3px solid var(--accent-color);
}

.grey-area {
    height: calc(100vh - env(safe-area-inset-bottom)); /* Adjust for address bar at the bottom */
    box-sizing: border-box; /* Include padding and border in the element's total height and width */
}
