/* Modern Industrial Theme CSS */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

:root {
    --primary-color: #333;
    --secondary-color: #555;
    --accent-color: #888;
    --background-dark: #1a1a1a;
    --background-light: #f5f5f5;
    --text-light: #b3b3b3;
}

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

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    background-color: var(--background-dark);
}

body {
    font-family: 'Roboto Mono', monospace;
    line-height: 1.6;
    color: var(--primary-color);
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.95),  /* Dark grey with 95% opacity */
        rgba(26, 26, 26, 0.85)   /* Dark grey with 85% opacity */
    ),
    url('/img/shingle.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    background-color: var(--background-dark);
}

/* Remove the pseudo-elements since we're using the gradient directly in the background */
body::before,
body::after {
    display: none;
}

/* Ensure content stays above the background */
header, main, footer {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

header {
    background: transparent;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav h1 {
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Menu icon */
.menu-icon {
    display: none;
    position: absolute;
    right: 1rem;
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--text-light);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.menu-icon:hover {
    transform: rotate(90deg);
    fill: white;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

/* Update hero section to remove the background */
.hero {
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;  /* Ensure content stays above the gradient overlay */
}

/* Remove the hero::after since we moved the gradient to body */
.hero::after {
    display: none;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 700;
    letter-spacing: 1px;
}

.contact {
    flex: 1;
    width: 100%;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.contact-form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: transparent;
    border-radius: 8px;
    border: 1px solid rgba(179, 179, 179, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    height: auto;
    min-height: 80vh;
}

.contact-form-container.active {
    display: block;
    opacity: 1;
}

.contact-form {
    background: transparent;
    padding: 1rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

/* Add hover effect to match button */
.contact-form-container:hover {
    border-color: rgba(179, 179, 179, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Update the form group styles to ensure consistent width */
.form-group {
    margin-bottom: 0.75rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 0.75rem auto;
}

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    border: 1px solid rgba(179, 179, 179, 0.2);
    border-radius: 4px;
    background: var(--background-dark);
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.9rem;  /* Match label size */
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;  /* Make text uppercase */
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Add placeholder styling */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Keep the label styling consistent */
.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
}

/* Form input styles */
.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.1);
}

/* Update textarea focus style to match other inputs */
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.1);
}

/* Remove any default mobile textarea styling */
.form-group textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Message textarea */
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(179, 179, 179, 0.2);
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}

/* Submit button */
.submit-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
    padding-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 1px solid rgba(179, 179, 179, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    font-size: 0.9rem;
}

.btn:hover {
    background: rgba(179, 179, 179, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: var(--text-light);
}

/* Success and error messages */
.success-message,
.error-message {
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem auto;
    text-align: center;
    max-width: 600px;
    width: 90%;
    border: 1px solid rgba(179, 179, 179, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.success-message {
    background: rgba(0, 128, 0, 0.2);
    border: 1px solid rgba(0, 128, 0, 0.4);
}

.success-message p {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-message {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
}

.error-message p {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

footer {
    background: transparent;
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

footer p {
    margin: 1rem 0;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Update the main section to be more flexible */
main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Add media queries for different screen sizes */
@media screen and (max-width: 768px) {
    .contact-form-container {
        padding: 0.75rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .form-group {
        margin-bottom: 0.5rem;
    }
    
    input, textarea {
        padding: 0.4rem;
    }
    
    .submit-container {
        margin-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .email-link {
        margin-top: 0.25rem;
        padding-bottom: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .contact {
        padding: 1rem 0.5rem;
    }
    
    .contact-form-container {
        padding: 0.5rem;
    }
}

/* Services section - Desktop default */
.services-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.service-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 600px;  /* Increased from 400px to 600px */
    height: 225px;     /* Increased from 150px to 225px */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    text-align: center;
    border-radius: 4px;
    margin: 0;
}

.service-overlay h3 {
    color: white;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Responsive adjustments for services */
@media screen and (max-width: 768px) {
    .services-container {
        gap: 1.5rem;
    }
    
    .service-card {
        width: 100%;
        max-width: 300px;
        height: 125px;
    }
}

@media screen and (max-width: 480px) {
    .service-card {
        max-width: 300px;
        height: 150px;
    }
}

/* Email link styling */
.email-link {
    text-align: center;
    margin-top: 0.5rem;
    padding-bottom: 1rem;
}

.email-link a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.email-link a:hover {
    color: white;
}

/* Update contact form container for footer */
.contact-form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: transparent;
    border-radius: 8px;
    border: 1px solid rgba(179, 179, 179, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.contact-form-container.active {
    display: block;
    opacity: 1;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    footer {
        padding: 1rem 0;
    }
    
    .contact-form-container {
        padding: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    footer {
        padding: 0.75rem 0;
    }
    
    .contact-form-container {
        padding: 0.5rem;
    }
}

/* Success popup styling */
.success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(179, 179, 179, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    min-width: 300px;
}

.success-popup.active {
    display: block;
    opacity: 1;
}

.success-popup p {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.close-popup {
    background: transparent;
    border: 1px solid rgba(179, 179, 179, 0.2);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(179, 179, 179, 0.1);
    color: white;
}

.form-group input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(179, 179, 179, 0.2);
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: rgba(179, 179, 179, 0.4);
}

.estimate-button {
    transition: all 0.3s ease;
}

.btn.success-message {
    background: rgba(0, 128, 0, 0.2);
    color: white;
    font-size: 0.9rem;
    padding: 1rem 2rem;
    white-space: normal;
    height: auto;
    line-height: 1.4;
    text-align: center;
    max-width: 600px;  /* Desktop width */
    margin: 0 auto;
    pointer-events: none;
    border: 1px solid rgba(0, 128, 0, 0.4);
    transition: all 0.3s ease;
}

/* Add responsive styles */
@media screen and (max-width: 768px) {
    .btn.success-message {
        font-size: 0.8rem;
        padding: 0.8rem 1.5rem;
        max-width: 300px;  /* Match service card mobile width */
    }
}

@media screen and (max-width: 480px) {
    .btn.success-message {
        font-size: 0.75rem;
        padding: 0.7rem 1.2rem;
        max-width: 300px;  /* Match service card mobile width */
    }
}