/* ==========================================
   Global Styles
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1B4332;
    --secondary-color: #D4914A;
    --action-hover: #FFB703;
    --dark-color: #1a1a1a;
    --light-color: #f1f1f1;
    --text-color: #212529;
    --gray-color: #708D81;
    --accent-color: #708D81;
    --border-color: #e0e0e0;

    --light-bg: #f8f9fa;
    --primary-variant: #2D5A47;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/hero2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    min-height: 70dvh;

}

/* Dark overlay for better text contrast */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 67, 50, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    /* allow the hero content to grow wider so headings don't wrap too early */
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    padding: 40px 10px;
}

.hero h1 {
    font-size: 2.9rem;
}

/* ==========================================
   Section headers
   ========================================== */
.section-header { 
    text-align: center; 
    margin-bottom: 30px; 
    
}
.section-header h2 { 
    text-align: center;
    font-size: 2.3rem;
    color: var(--primary-color);
    font-weight: 600;
}
/* ==========================================
   Service cards
   ========================================== */
.services-main { padding: 40px 0; background: var(--white); }

.service-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 30px;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

/* Every second card flips the image and text */
.service-card:nth-child(even) { direction: rtl; }
.service-card:nth-child(even) .service-info { direction: ltr; }

.service-info { padding: 30px 60px; }

.service-info h3 { 
    font-size: 1.5rem; 
    margin-bottom: 20px; 
    margin-top: 0;
    color: var(--secondary-color); 
}

.feature-list { list-style: none; margin-top: 25px; }
.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}
.feature-list i { color: var(--secondary-color); }
.feature-list svg {
    stroke-width: 2px;         /* Makes the lines thicker/bolder */
    stroke-linecap: round;     /* Makes the ends of the lines soft/pro */
    stroke-linejoin: round;    /* Makes the corners smooth */
    width: 20px;
    height: 20px;
    color: var(--secondary-color);
}

.service-img img { 
    width: 100%; 
    height: 455px; 
    object-fit: cover; 
    object-fit: cover; /* This is the magic: it crops the image instead of squashing it */
    object-position: center; /* Ensures the main part of the machine stays visible */
    display: block;
}


/* ==========================================
   The Tonnet Process: 
   ========================================== */

   .process-wrapper {
    padding: 10px 0;
    overflow: hidden;
}

.process-grid {
    display: flex;
    gap: 10px; /* Small gap to show the arrow separation */
}

.process-step {
    position: relative;
    flex: 1;
    padding: 40px 25px 40px 50px; /* Padding adjusted for the arrow indent */
    background: #f4f7f6;
    text-align: left;
    min-height: 300px;
    
    /* The Magic: Creates the interlocking arrow shape */
    clip-path: polygon(calc(100% - 30px) 0%, 100% 50%, calc(100% - 30px) 100%, 0% 100%, 30px 50%, 0% 0%);
    transition: all 0.3s ease;
}

/* Fix for the first step: No indent on the left */
.process-step:first-child {
    clip-path: polygon(calc(100% - 30px) 0%, 100% 50%, calc(100% - 30px) 100%, 0% 100%, 0% 50%, 0% 0%);
    padding-left: 30px;
}

/* Fix for the last step: No point on the right */
.process-step:last-child {
    clip-path: polygon(100% 0%, 100% 50%, 100% 100%, 0% 100%, 30px 50%, 0% 0%);
}

/* Color Progression (Light to Dark) */
.process-step:nth-child(1) { background: #f0f4f2; }
.process-step:nth-child(2) { background: #e1e9e5; }
.process-step:nth-child(3) { background: #d2ded9; }
.process-step:nth-child(4) { background: #c3d3cc; }

/* Icon Styling */
.step-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.step-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5px;
}

.process-step h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.process-step p {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
    margin: 0;
}

/* Mobile Responsiveness: Stacks vertically and removes the arrow shapes */
@media (max-width: 992px) {
    .process-grid {
        flex-direction: column;
        gap: 20px;
    }
    .process-step, .process-step:first-child, .process-step:last-child {
        clip-path: none;
        padding: 30px;
        border-radius: 10px;
        min-height: auto;
    }
}
/* ================================
   Machines in Operation Section
================================ */

.machines-operation {
    padding: 50px 0;
    background: white;
}

.operation-gallery {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Gallery item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4 / 3;
}

/* Images */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* keeps image scaled without stretching */
    transition: transform 0.4s ease;
}

/* Hover zoom effect */
.gallery-item:hover img {
    transform: scale(1.08);
}
/* Optional subtle overlay on hover */
.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
}

.gallery-item:hover::after {
    background: rgba(0,0,0,0.08);
}

/* Description overlay */
.gallery-item .desc-overlay {
    position: absolute;
    inset: 0; /* top:0; bottom:0; left:0; right:0; */
    background: rgba(0, 0, 0, 0.5); /* semi-transparent black */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
    opacity: 0; /* hidden by default */
    transition: opacity 0.3s ease;
    border-radius: 6px;
}

/* Show overlay on hover */
.gallery-item:hover .desc-overlay {
    opacity: 1;
}

/* ================================
   CTA Section
================================ */
.cta-section {
    padding: 20px 10px;
    text-align: center;
}

.cta-content h2.section-header {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 35px;
    line-height: 1.2;
    font-weight: 500;
    font-style: italic;
}

.cta-btn {
    background: var(--secondary-color);
    transition: 0.3s;
    display: inline-block;
    padding: 18px 45px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px; /* Slightly squared for an industrial feel */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-btn:hover {
    background: var(--action-hover);
    color: var(--primary-color);
}



/* ================================
   Responsive Styles
================================ */

/* Tablets */
@media (max-width: 992px) {

    .operation-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

}

/* Mobile */
@media (max-width: 600px) {

    .machines-operation {
        padding: 60px 0;
    }

    .operation-gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }

}

/* Responsive-CTA */
@media (max-width: 768px) {
    .cta-section h2 {
        font-size: 2rem;
    }

    .cta-section p {
        font-size: 1rem;
    }

    .cta-btn {
        padding: 15px 35px;
    }
}

/* MACHINES IN HTE FIELD
For mobile, we want the description overlay to always show since hover isn't available. 
We also make it a bit lighter so they can see the photo behind it, and move the text to the bottom for better readability. */
@media (max-width: 768px) {
    .gallery-item .desc-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.4); /* Lighter so they can see the photo too */
        align-items: flex-end; /* Move text to bottom */
        padding-bottom: 15px;
    }
}

/*process flow responsiveness */
/* --- RESPONSIVE (STACK ON MOBILE) --- */
@media (max-width: 992px) {
    .process-line { display: none; } /* Hide line on mobile when stacking */
    .process-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .service-card { grid-template-columns: 1fr; gap: 0; }
    .service-card:nth-child(even) { direction: ltr; }
    .service-info { padding: 40px; }
    .service-img img { height: 350px; }
    .hero-content h1 { font-size: 2.2rem; }
}
