/* =========================================
   SHED ELECTRIC - PURE CARBON THEME
========================================= */

/* --- Basic Reset & Typography --- */
* { box-sizing: border-box; }
body { 
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; 
    margin: 0; 
    padding: 0; 
    line-height: 1.6; 
    background-color: #121212; /* Pure deep carbon background (no blue) */
    color: #e5e5e5; /* Clean light gray text */
}
h1, h2, h3 { color: #ffffff; } 
img { max-width: 100%; height: auto; }

/* --- Header & Navigation (Kept white for your logo) --- */
header { 
    background-color: #ffffff; 
    padding: 1rem 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-bottom: 3px solid #f29a2e; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    position: sticky; 
    top: 0;
    z-index: 100;
}
.logo img { 
    max-height: 55px; 
    display: block;
}
nav a { 
    color: #000000; 
    text-decoration: none; 
    margin-left: 1.5rem; 
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}
nav a:hover { color: #f29a2e; } 

/* --- Hero Section --- */
.hero { 
    background-color: #0a0a0a; /* Almost pitch black */
    color: #ffffff;
    padding: 7rem 5%; 
    text-align: center; 
    border-bottom: 4px solid #f29a2e;
}
.hero h1 { font-size: 2.8rem; margin-top: 0; margin-bottom: 1rem; color: #ffffff;}
.hero p { font-size: 1.25rem; max-width: 650px; margin: 0 auto 2.5rem auto; color: #a3a3a3; }

/* --- Buttons --- */
.btn { 
    display: inline-block; 
    background-color: #f29a2e; 
    color: #000; 
    padding: 0.9rem 2.5rem; 
    text-decoration: none; 
    border-radius: 5px; 
    font-weight: bold; 
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(242, 154, 46, 0.2); 
}
.btn:hover { 
    background-color: #d68523; 
    color: #fff; 
    transform: translateY(-2px); 
    box-shadow: 0 6px 12px rgba(242, 154, 46, 0.4);
}

/* --- Layout Containers --- */
section { padding: 5rem 5%; max-width: 1000px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 3.5rem; font-size: 2.2rem; }
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2.5rem; 
}

/* --- Service Cards --- */
.card { 
    background: #1e1e1e; /* Pure dark gray for cards */
    padding: 2.5rem 2rem; 
    border-radius: 8px; 
    border-top: 4px solid #f29a2e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.3s ease; 
}
.card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.6); 
}

/* --- Photo Gallery (Scrolling Animation) --- */
#portfolio {
    position: relative;
}

/* This creates the "window" and fades the top/bottom so images disappear cleanly */
.gallery-window {
    height: 650px; /* Adjust this to make the gallery taller or shorter */
    overflow: hidden;
    position: relative;
    /* Fades the images out at the top (behind the text) and bottom */
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

/* Update these lines in style.css */
.gallery-track {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: scrollUp 30s linear infinite;
    cursor: pointer; /* Tells users it's interactive */
}

/* The exact math for a flawless, glitch-free infinite loop */
@keyframes scrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-50% - 0.75rem)); } 
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.photo-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover; 
    border-radius: 8px;
    border-bottom: 4px solid #f29a2e;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.photo-grid img:hover {
    transform: scale(1.02); 
}

.focus-top { object-position: top; }
.focus-custom { object-position: 50% 25%; }
.focus-bottom { object-position: bottom; }
.focus-left { object-position: left; }

/* --- Review Section --- */
.review-wrapper {
    background-color: #1e1e1e; 
    max-width: 650px; 
    margin: 0 auto; 
    text-align: center;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border-top: 4px solid #f29a2e;
}
.review-wrapper h2 { font-size: 2.2rem; margin-top: 0; margin-bottom: 1rem; color: #ffffff; }
.review-wrapper p { font-size: 1.1rem; color: #e5e5e5; margin-bottom: 2.5rem; }

/* --- Contact Form --- */
.contact-header { text-align: center; margin-bottom: 2.5rem; }
.contact-header p { font-size: 1.2rem; font-weight: 500; color: #e5e5e5; }
.contact-header a { color: #f29a2e; text-decoration: none; font-weight: bold; transition: color 0.3s; }
.contact-header a:hover { color: #d68523; }

.contact-container { 
    max-width: 600px; 
    margin: 0 auto; 
    background: #1e1e1e; 
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.95rem; color: #ffffff;}
.form-group input, .form-group textarea { 
    width: 100%; 
    padding: 0.9rem; 
    background-color: #121212; /* Matches the body background */
    color: #ffffff; 
    border: 1px solid #333333; /* Pure gray border, no blue */
    border-radius: 5px; 
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #f29a2e; 
}
.form-group textarea { resize: vertical; min-height: 120px; }
.contact-container .btn { width: 100%; font-size: 1.1rem; }

/* --- Footer --- */
footer { 
    background-color: #0a0a0a; 
    color: #a3a3a3; 
    text-align: center; 
    padding: 2.5rem 5%; 
    margin-top: 4rem; 
    border-top: 4px solid #f29a2e;
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .logo img { max-height: 45px; margin: 0 auto; }
    header { flex-direction: column; padding: 1.25rem; }
    nav { margin-top: 1.25rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
    nav a { margin: 0; color: #000000; }
    section { padding: 4rem 5%; }
    .gallery-track {
        /* Prevents the browser's touch-move from fighting the animation */
        touch-action: pan-y;
    }
}
/* --- Center the 4th card on desktop --- */
@media (min-width: 1024px) {
    .card:nth-child(4):last-child { grid-column: 2; }
}

/* --- Preloader --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    display: flex;
    flex-direction: column;
    justify-content: center; /* This centers everything vertically */
    align-items: center;     /* This centers everything horizontally */
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #333;
    border-top: 5px solid #f29a2e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}