:root {
    --romay-yellow: #FFC000;
    --romay-dark: #000000;
    --romay-blue: #4F81BD;
    --romay-blue-light: #B8CCE4;
    --text-color: #000000;
    --bg-dark: #1a1a1a;
}

@page {
    size: A4;
    margin: 0;
}

body.brochure-body {
    margin: 0;
    padding: 0;
    background-color: #333;
    font-family: 'Segoe UI', Arial, sans-serif;
    -webkit-print-color-adjust: exact;
}

.page {
    width: 210mm;
    height: 297mm; /* Fixed height for A4 */
    background: white;
    margin: 20px auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    page-break-after: always;
}

/* Background Texture for Pages 2, 3, 4 */
.page.mining-bg {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1518558352668-384cb3229b4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1000&q=80'); /* Generic mining/dark texture */
    background-size: cover;
    background-position: center;
}

/* Page 1 Specifics */
.page-1-header {
    display: flex;
    justify-content: space-between;
    padding: 40px;
    height: 350px;
}

.logo-container {
    width: 40%;
    background: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.romay-logo {
    max-width: 100%;
    height: auto;
}

.romay-text {
    font-size: 40px;
    font-weight: 900;
    color: #0f2439; /* Dark blue/black */
    letter-spacing: 2px;
    margin-top: 10px;
}

.main-image-container {
    width: 55%;
    height: 100%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-info-table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

.main-info-table td {
    border: 1px solid #000;
    padding: 8px 15px;
    vertical-align: middle;
}

.main-info-table td:first-child {
    font-weight: 900;
    width: 35%;
    font-size: 16px;
    text-transform: uppercase;
}

.page-footer-stripe {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 60px;
    background: 
        repeating-linear-gradient(
            -45deg,
            #000,
            #000 20px,
            #FFC000 20px,
            #FFC000 40px
        );
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-label-left {
    background: black;
    color: var(--romay-yellow);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 40px;
    font-family: 'Arial Black', sans-serif; /* Placeholder for futuristic font */
    font-size: 24px;
    text-transform: uppercase;
    clip-path: polygon(0 0, 90% 0, 100% 100%, 0% 100%);
    width: 40%;
}

.footer-label-right {
    background: var(--romay-yellow);
    color: black;
    height: 80%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: bold;
    font-size: 20px;
    margin-right: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Section Headers (Pages 2-4) */
.section-header {
    background: rgba(100, 100, 100, 0.8);
    color: var(--romay-yellow);
    padding: 10px 40px;
    margin: 40px 0 20px 0;
    font-family: 'Arial Black', sans-serif;
    font-size: 24px;
    text-transform: uppercase;
    border-left: 10px solid var(--romay-yellow);
    border-top: 1px solid white;
    border-bottom: 1px solid white;
    width: 60%;
    border-radius: 0 20px 0 0;
}

/* Parts Layout */
.parts-container {
    display: flex;
    padding: 0 40px;
    gap: 20px;
    align-items: flex-start;
}

.parts-table {
    flex: 1;
    border-collapse: collapse;
    background: #FFF2CC; /* Light yellow bg */
}

.parts-table th {
    background-color: var(--romay-yellow);
    color: white;
    font-weight: bold;
    padding: 10px;
    text-align: left;
    font-size: 16px;
    text-transform: uppercase;
}

.parts-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    color: black;
}

.parts-table tr:nth-child(even) {
    background-color: #ffe699;
}

.parts-images {
    flex: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.part-img {
    background: white;
    padding: 10px;
    border-radius: 5px;
    width: 120px;
    height: 120px;
    object-fit: contain;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* Maintenance Page */
.maintenance-table {
    width: 90%;
    margin: 0 auto 40px auto;
    border-collapse: collapse;
    background: white;
    font-size: 12px;
}

.maintenance-table th {
    background-color: var(--romay-yellow);
    color: white;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid #e0e0e0;
}

.maintenance-table th:first-child {
    text-align: left;
    padding-left: 20px;
    width: 40%;
}

.maintenance-table td {
    border: 1px solid #dcdcdc;
    padding: 5px;
    text-align: center;
    background: #FFF2CC; /* Light yellow bg */
    font-weight: bold;
    color: #333;
}

.maintenance-table tr:nth-child(even) td {
    background: #FFE699; /* Darker yellow bg */
}

.maintenance-table td:first-child {
    text-align: left;
    padding-left: 20px;
    color: white; /* Based on image, the item names seem to be on white or just dark text? Image shows yellow bg for rows. Text is white? No, text looks black/dark. */
    color: #000;
}

/* Date Table (Blue) */
.date-table {
    width: 90%;
    margin: 0 auto;
    border-collapse: collapse;
    background: white;
    font-size: 12px;
}

.date-table th {
    background-color: var(--romay-blue);
    color: white;
    padding: 10px;
    font-size: 12px;
    border: 1px solid white;
    text-transform: uppercase;
    text-align: center;
}

.date-table td {
    border: 1px solid #fff;
    padding: 8px;
    background: #DCE6F1; /* Light blue */
    text-align: center;
    height: 25px;
    color: #000;
    font-weight: bold;
}

.date-table tr:nth-child(even) td {
    background: #B8CCE4; /* Darker blue */
}

@media print {
    body.brochure-body {
        background: none;
    }
    .page {
        margin: 0;
        box-shadow: none;
        page-break-after: always;
    }
}
