/* ==============================
   1. Import Google Fonts
   ============================== */
/* Combined font imports into a single @import rule to reduce HTTP requests */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Bebas+Neue&display=swap');


/* ==============================
   2. Root Variables
   ============================== */
:root {
    --primary-bg: #043834;
    --primary-color: #057F74;
    --secondary-color: #b6fff4;
    --primary-white: #ffffff;
    --light-gray: rgb(242, 242, 242);
    --font-main: "Poppins", sans-serif;
    --font-second: "Bebas Neue", sans-serif;
    --bg-light-dark: #023e39;
}

/* ==============================
   3. Base Styles and Utilities
   ============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    background: var(--primary-bg);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
    padding: 0;
}

.blr {
    padding-left: 8vw;
    padding-right: 8vw;
}

.btb {
    padding-top: 6vw;
    padding-bottom: 6vw;
}

.section-title {
    color: white;
    font-size: 1.6vw;
}

.section-description {
    color: var(--primary-color);
    font-size: 1.2vw;
    margin-bottom: 2.2vw;
}

/* ==============================
   4. Hero Section
   ============================== */
.hero {
    height: 100vh;
    background-image: url(../images/hero-eng.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

.wrapper .left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.left h1 {
    font-family: var(--font-second);
    color: var(--primary-white);
    text-transform: uppercase;
    font-size: 4vw;
    line-height: 4vw;
}

.left p {
    color: var(--light-gray);
    font-size: 1.4vw;
    margin-bottom: 2.4vw;
}

.animated-button {
    position: relative;
    width: 200px;
    padding: 0.8rem 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-white);
    background-color: transparent;
    border: 1px solid var(--primary-white);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s ease-in-out;
}

/* The pseudo-element for the perfect round circle fill */
.animated-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.animated-button:hover {
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Scale the pseudo-element to a perfect circle fill on hover */
.animated-button:hover::before {
    width: 400px;
    height: 400px;
}

/* ==============================
   5. Trust Section
   ============================== */
.trust-section {
    text-align: center;
    background-color: var(--bg-light-dark);
}

.trusted {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logo-container {
    display: flex;
    gap: 20px;
    align-content: center;
    justify-content: center;
}

.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 100px;
    color: white;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

/* ==============================
   6. Components Section
   ============================== */
.components-container {
    text-align: center;
}

.components-content {
    margin-bottom: 2vw;
}

.components {
    display: grid;
    grid-template-columns: repeat(5, auto);
    gap: 10px;
    justify-content: center;
    margin-bottom: 2vw;
}

.components-img {
    width: 200px;
    height: 200px;
    background-color: var(--light-gray);
    overflow: hidden;
    border-radius: 10px;
    align-content: center;
}

.components-img img {
    width: 140px;
}

/* ==============================
   7. Machines Sections
   ============================== */
.machine-container {
    text-align: center;
    background-color: var(--bg-light-dark);
}

.main-heading {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    color: #38b2ac;
    margin-bottom: 0.5rem;
}

.sub-heading-text {
    text-align: center;
    color: #4a5568;
    margin-bottom: 2.5rem;
}

.content-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.left-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
}

.intro-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.intro-text p {
    color: #4a5568;
    line-height: 1.625;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.capability-button {
    padding: 1rem;
    color: #ffffff;
    text-align: center;
    border-radius: 0.75rem;
    background: linear-gradient(var(--primary-color), var(--primary-bg));
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.capability-button:hover {
    background-color: #006666;
    transform: scale(1.05);
}

.active-button {
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.right-panel {
    width: 100%;
}

.image-box {
    width: 512px;
    height: 376px;
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 5px solid white;
}

.display-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ==============================
   8. How We Work Section
   ============================== */
.hww {
    height: 88vh;
    background-image: url(../images/hww.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ==============================
   9. Contact Section
   ============================== */
.contact-section {
    background-color: var(--primary-color);
    color: #fff;
    padding: 3rem;
    border-radius: 1.5rem;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-text h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-text p {
    font-size: 1.125rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: none;
    background-color: #fff;
    color: #000;
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #6c757d;
}

.contact-submit-btn {
    position: relative;
    width: 200px;
    padding: 0.6rem 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-white);
    background-color: transparent;
    border: 1px solid var(--primary-white);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s ease-in-out;
}

.contact-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--primary-bg);
    width: 400px;
    height: 100%;
    transform: translateX(-100%);
    transition: all 0.6s ease-in-out;
    border-radius: 50px;
    z-index: -1;
}

.contact-submit-btn:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.contact-submit-btn:hover::before {
    transform: translateX(0%);
}

.contact-image-panel {
    width: 100%;
    background-color: #026f6f;
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-image-panel img {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    object-fit: cover;
}

.contact-form-panel {
    width: 100%;
}

/* ==============================
   10. Footer Section
   ============================== */
.footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 2rem 1rem;
    border-radius: 1.5rem 1.5rem 0 0;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    text-align: center;
}

.footer-grid h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-white);
}

.footer-grid p,
.footer-grid a {
    font-size: 0.875rem;
    color: var(--secondary-color);
    text-decoration: none;
    line-height: 1.5;
}

.footer-grid a:hover {
    text-decoration: underline;
    color: #fff;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icon {
    color: var(--secondary-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #38b2ac;
}

/* ==============================
   11. Media Queries (Consolidated)
   ============================== */

/* Extra Small Mobile Devices (320px - 576px) */
@media (max-width: 576px) {
    .blr {
        padding-left: 4vw;
        padding-right: 4vw;
    }

    .btb {
        padding-top: 8vw;
        padding-bottom: 8vw;
    }

    .section-title {
        font-size: clamp(16px, 4.5vw, 22px);
    }

    .section-description {
        font-size: clamp(14px, 3.5vw, 18px);
        margin-bottom: 24px;
    }

    /* Hero Section */
    .wrapper {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .wrapper .left {
        padding: 20px 0;
        text-align: center;
    }

    .left h1 {
        font-size: clamp(32px, 10vw, 48px);
        line-height: 1.2;
    }

    .left p {
        font-size: clamp(14px, 4vw, 18px);
        margin-bottom: 24px;
    }

    .animated-button {
        width: 100%;
        max-width: 240px;
    }

    /* Trust Section */
    .logo-container {
        flex-direction: column;
        gap: 16px;
    }

    .logos {
        width: 100%;
        max-width: 240px;
    }

    /* Components Section */
    .components {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .components-img {
        width: 100%;
        height: 160px;
    }

    .components-img img {
        width: 100px;
    }

    /* Machines Section */
    .main-heading {
        font-size: 1.75rem;
    }

    .sub-heading-text {
        font-size: 14px;
        padding: 0 16px;
    }

    .content-section {
        padding: 1rem;
    }

    .intro-text h2 {
        font-size: 1.25rem;
    }

    .intro-text p {
        font-size: 14px;
    }

    .button-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .capability-button {
        padding: 0.75rem;
        font-size: 14px;
    }

    .image-box {
        width: 100%;
        height: auto;
        min-height: 240px;
    }

    /* Contact Section */
    .contact-text h2 {
        font-size: 1.75rem;
    }

    .contact-text p {
        font-size: 1rem;
    }

    .contact-submit-btn {
        width: 100%;
    }
}

/* Small devices (sm, 577px - 640px) */
@media (min-width: 577px) and (max-width: 640px) {
    .wrapper {
        grid-template-columns: 1fr;
    }

    .components {
        grid-template-columns: repeat(3, 1fr);
    }

    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small devices (sm, 640px and up) */
@media (min-width: 640px) {

    /* Rule from Machines and Footer sections */
    .button-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .components {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium devices (md, 768px and up) */
@media (min-width: 768px) {

    /* Rule from Footer section */
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        text-align: left;
    }

    .social-links {
        justify-content: flex-start;
    }

    .wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .wrapper .left {
        text-align: left;
    }

    .section-title {
        font-size: clamp(18px, 1.6vw, 24px);
    }

    .section-description {
        font-size: clamp(16px, 1.2vw, 18px);
    }

    .components {
        grid-template-columns: repeat(5, auto);
    }

    .logo-container {
        flex-direction: row;
    }
}

/* Large devices (lg, 1024px and up) */
@media (min-width: 1024px) {

    /* Rules from Machines section */
    .main-heading {
        font-size: 3rem;
    }

    .content-section {
        flex-direction: row;
        gap: 3rem;
    }

    .left-panel,
    .right-panel {
        width: 50%;
    }

    /* Rules from Contact section */
    .contact-content {
        flex-direction: row;
    }

    .contact-image-panel,
    .contact-form-panel {
        width: 50%;
    }

    .contact-form {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 1.6vw;
    }

    .section-description {
        font-size: 1.2vw;
    }
}