/* Project: FastMill Enterprises
   File: css/main_style.css
   Author: Strange Shapes Studio
   Version: 1.4.0
*/

:root {
    --primary-green: #82c91e; 
    --dark-bg: #0a0a0a;
    --surface-bg: rgba(26, 26, 26, 0.9);
    --text-light: #f0f0f0;
    --silver: #a0a0a0;
    --nav-height: 80px;
    --footer-height: 110px; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
    height: 100%;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow: hidden; /* Strict no-scroll for desktop */
}

/* --- Navigation --- */
nav {
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 0 5%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #222;
}

.nav-logo img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

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

nav ul li {
    margin-left: 2.2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-green);
}

/* --- Hero Section Stacking & Background --- */
.hero {
    position: relative;
    height: calc(100vh - var(--nav-height) - var(--footer-height));
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background-color: #000;
    margin-top: var(--nav-height);
    padding: 20px;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: -8%;           /* Shift video upward in the frame */
    left: 0;
    width: 100%;
    height: 116%;       /* Compensate height so bottom edge still covers */
    z-index: 1;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: rgba(0, 0, 0, 0.25); /* Reduced from 0.4 */
    backdrop-filter: blur(2px);       /* Reduced from 4px */
    transition: all 0.6s ease;
}

.hero-overlay.overlay-dimmed {
    background: rgba(0, 0, 0, 0.75); /* Reduced from 0.85 */
    backdrop-filter: blur(10px);      /* Reduced from 12px */
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 1900px;
    width: 95%;
}

/* --- Home Panel --- */
.hero-logo-main {
    max-width: 400px; 
    width: 85%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.hero p {
    font-size: 1.15rem;
    color: var(--silver);
    margin: 0 auto;
    max-width: 650px;
    line-height: 1.8;
    font-weight: 300;
}

/* --- Panel Box --- */
.hero-panel {
    animation: fadeIn 0.4s ease-out;
}

/* All panels except home get a frosted box */
.hero-panel:not(#panel-home) {
    background: rgba(10, 10, 10, 0.65);
    border: 1px solid rgba(130, 201, 30, 0.15);
    border-radius: 14px;
    backdrop-filter: blur(18px);
    padding: 35px 40px;
    max-height: calc(100vh - var(--nav-height) - var(--footer-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) rgba(255,255,255,0.04);
}

.hero-panel:not(#panel-home)::-webkit-scrollbar {
    width: 5px;
}

.hero-panel:not(#panel-home)::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.hero-panel:not(#panel-home)::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.panel-title {
    font-size: 1.6rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 12px;
}

.panel-intro {
    color: var(--silver);
    font-size: 0.92rem;
    max-width: 750px;
    margin: 0 auto 24px;
    line-height: 1.8;
}

.panel-intro p + p {
    margin-top: 8px;
}

/* --- Capabilities / Equipment Grid --- */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;       /* cards in same row match height */
    gap: 15px;
    width: 100%;
    max-width: 1865px;          /* 8 × 220px + 7 × 15px gap */
    margin: 0 auto 25px;
}

.card {
    flex: 0 0 220px;
    width: 220px;
    display: flex;
    flex-direction: column;     /* allows inner content to stretch */
    background: rgba(255, 255, 255, 0.04);
    padding: 24px 18px;
    border: 1px solid rgba(130, 201, 30, 0.12);
    border-radius: 10px;
    text-align: left;
}

.card p {
    flex: 1;                    /* body text fills remaining vertical space */
}

.card i {
    font-size: 2rem;
    color: var(--primary-green);
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1rem;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.82rem;
    color: var(--silver);
    line-height: 1.5;
    flex: 1;
}

/* --- Coming Soon Box --- */
.coming-soon-box {
    background: rgba(10, 10, 10, 0.5);
    padding: 50px 30px;
    border: 1px solid rgba(130, 201, 30, 0.2);
    border-radius: 15px;
    margin: 0 auto 25px;
    max-width: 650px;
}

.coming-soon-box h2 {
    font-size: 2.2rem;
    letter-spacing: 5px;
    color: #fff;
    text-transform: uppercase;
}

.accent-line {
    width: 50px;
    height: 3px;
    background: var(--primary-green);
    margin: 15px auto;
}

.status-tag {
    display: inline-block;
    padding: 4px 15px;
    background: var(--primary-green);
    color: #000;
    font-weight: 900;
    font-size: 0.6rem;
    text-transform: uppercase;
}

/* --- Contact Panel --- */
.contact-details {
    list-style: none;
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.contact-details li {
    font-size: 0.95rem;
    color: var(--silver);
}

.contact-details li i {
    color: var(--primary-green);
    margin-right: 8px;
}

.contact-details a {
    color: var(--silver);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--primary-green);
}

/* --- Back Link --- */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-green);
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    opacity: 0.7;
    transition: 0.3s;
}

.back-link:hover {
    opacity: 1;
    letter-spacing: 3px;
}

/* --- Footer --- */
footer {
    height: var(--footer-height);
    background: #050505;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #111;
    padding: 0 20px;
}

.footer-info p {
    color: var(--silver);
    font-size: 0.9rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.copyright {
    font-size: 0.75rem; 
    color: #888; 
    border-top: 1px solid #222;
    padding-top: 10px;
    width: auto;
    white-space: nowrap; 
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.designer::before {
    content: "|";
    margin: 0 15px;
    color: #444;
    font-weight: 300;
}

.copyright a { 
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.copyright a:hover {
    text-shadow: 0 0 8px rgba(130, 201, 30, 0.5);
    text-decoration: underline;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Adjustments --- */
/* ── Hamburger button (hidden on desktop) ──────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    body { overflow-y: auto; }
    .hero { height: auto; min-height: 85vh; padding: 60px 20px; }
    .card { flex: 0 0 calc(50% - 8px); width: calc(50% - 8px); box-sizing: border-box; }
    .copyright { white-space: normal; text-align: center; flex-direction: column; }
    .designer::before { content: ""; margin: 5px 0; }
    .hero-panel:not(#panel-home) { padding: 24px 20px; }
    .contact-details { flex-direction: column; gap: 12px; align-items: center; }

    .nav-hamburger { display: flex; }

    nav ul {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(15px);
        border-bottom: 1px solid #222;
        padding: 12px 0 20px;
        z-index: 999;
        gap: 0;
    }

    nav ul.open { display: flex; }

    nav ul li { margin: 0; }

    nav ul li a {
        display: block;
        padding: 13px 28px;
        font-size: 0.85rem;
        border-bottom: 1px solid #111;
    }

    nav ul li:last-child a { border-bottom: none; }
}


@media (max-width: 500px) {
    .card { flex: 0 0 100%; width: 100%; }
}

/* ── Gallery Panel ───────────────────────────────────────── */
.gallery-loading,
.gallery-empty {
    color: var(--silver);
    font-size: 0.9rem;
    padding: 40px 0;
    text-align: center;
    letter-spacing: 1px;
}

.gallery-loading i,
.gallery-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--primary-green);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 24px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #82c91e;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 12px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Gallery Modal ───────────────────────────────────────── */
.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.gallery-modal-inner {
    display: flex;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    position: relative;
}

.gallery-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s;
}

.gallery-modal-close:hover {
    color: #fff;
}

.gallery-modal-image {
    flex: 1.2;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 360px;
}

.gallery-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-modal-info {
    flex: 1;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.gallery-modal-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
}

.gallery-modal-info p {
    font-size: 0.88rem;
    color: var(--silver);
    line-height: 1.8;
    text-align: left;
}

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-modal-inner { flex-direction: column; max-height: 90vh; }
    .gallery-modal-image { min-height: 220px; flex: none; }
}

/* ── Contact Form ────────────────────────────────────────── */
.contact-form-wrap {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 20px;
}

.contact-form-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-field--full {
    grid-column: 1 / -1;
}

.contact-field label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
}

.contact-input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 0.88rem;
    padding: 10px 14px;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.2s;
}

.contact-input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.contact-input::placeholder { color: #555; }

.contact-textarea {
    resize: vertical;
    min-height: 90px;
}

.contact-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-green);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.contact-submit-btn:hover   { opacity: 0.88; }
.contact-submit-btn:disabled{ opacity: 0.5; cursor: not-allowed; }

.cf-message-box {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.83rem;
}

.cf-success { background: rgba(130,201,30,0.12); color: var(--primary-green); border: 1px solid rgba(130,201,30,0.3); }
.cf-error   { background: rgba(224,49,49,0.1);   color: #e03131;             border: 1px solid rgba(224,49,49,0.3); }

@media (max-width: 900px) {
    .contact-form-inner { grid-template-columns: 1fr; }
}

/* ── Contact file upload ────────────────────────────────── */
.cf-file-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cf-file-input {
    display: none;
}

.cf-file-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #ccc;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
}

.cf-file-label:hover {
    border-color: var(--primary-green);
    background: rgba(130,201,30,0.08);
}

.cf-file-name {
    font-size: 0.78rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}
