/* --- Root Variables --- */
:root {
    /* Primary Colors */
    --moss-green: #3c5e3ddb;
    --warm-ochre: #C29F0F;
    --deep-tech-blue: #2A5A9C;
    --mid-tone-sky-blue: #5998C5;

    /* Neutral Colors */
    --deep-charcoal-grey: #171616e1;
    --off-white: #F0F0F0;
    --mid-grey: #A0A0A0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.section1 {
    height: 80vh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Good practice for full-screen containers */
    background-image: url('../images/contact-bgr.jpeg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.section1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.nav-menu a.active {
    color: var(--warm-ochre);
}

header {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.connect-content {
    position: absolute;
    bottom: 5rem;     /* Distance from the bottom */
    left: 5%;         /* Distance from the left */
    z-index: 2;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    background-color: rgba(15, 16, 15, 0.5);
    /* Animation properties */
    opacity: 0;
    animation: slideInFromLeft 1s ease-out forwards;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.connect-content h1 {
    font-size: 3rem;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 80vh;
    background-color: var(--deep-charcoal-grey);
    padding: 5%;
}

.split-container {
    display: flex;
    width: 100%;
    gap: 4rem;
    background-color: #060606ea ;
    padding: 3rem 5rem;
    border-radius: 15px;
}

.left, .right {
    flex: 1;
}

/* --- Left Column Styles --- */
.left h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--mid-grey);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info h2 {
    font-size: 1.7rem;
    margin-bottom: 0;
    color: var(--off-white);
}

.contact-social {
    margin-top: 0.7rem;
    display: flex;
    gap: 1.5rem;
}

.contact-social a {
    color: var(--off-white);
    font-size: 1.3rem;
    text-decoration: none;
}

/* --- Right Column (Form) Styles --- */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: var(--mid-grey);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="text"],
input[type="email"],
textarea {
    background-color: #2c2c2e;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1rem;
    color: var(--off-white);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button[type="submit"] {
    background-color: var(--deep-tech-blue);
    color: var(--off-white);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: background-color 0.3s ease;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--warm-ochre); /* Or whatever your hover color is */
    transition: width 0.5s ease-out;
    z-index: -1;
}

button[type="submit"]:hover::before {
    width: 100%;
}

/* --- Form Status Message --- */
#form-status {
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    display: none; /* Hidden by default */
    font-weight: 600;
}

#form-status.success {
    background-color: var(--moss-green);
    color: var(--off-white);
    display: block; /* Becomes visible on success */
}

#form-status.error {
    background-color: var(--terracotta);
    color: var(--off-white);
    display: block; /* Becomes visible on error */
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* --- 5.1 Tablet & Large Mobile (max-width: 1366px) --- */
@media (max-width: 1366px) {
    .connect-content h1 {
        font-size: 3rem; /* Scaled down title */
    }

    main {
        height: auto; /* Allow height to be flexible */
        padding: 3rem 2rem; /* Reduced padding */
    }

    .split-container {
        gap: 2rem; /* Reduced gap */
        padding: 2rem 3rem; /* Reduced padding */
    }

    /* --- Left Column --- */
    .left h1 {
        font-size: 2.5rem; /* Scaled down */
    }
    .contact-info p {
        font-size: 1rem; /* Scaled down */
    }
    .contact-info h2 {
        font-size: 1.8rem; /* Scaled down */
    }
    .contact-social a {
        font-size: 1.2rem; /* Scaled down icons */
    }

    /* --- Right Column (Form) --- */
    .form {
        gap: 1rem; /* Tighter form groups */
    }
    .form-group label {
        font-size: 0.9rem;
    }
    input[type="text"],
    input[type="email"],
    textarea {
        padding: 0.8rem; /* Smaller padding */
        font-size: 0.9rem;
    }
    textarea {
        min-height: 120px; /* Shorter textarea */
    }
    button[type="submit"] {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

/* --- 5.2 Small Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
    .section1 {
        height: 85vh; /* Shorter hero section */
        background-image: url('../images/contact-por.jpeg'); /* Portrait image */
    }

    .connect-content {
        bottom: 2rem;
        left: 5%;
        width: 70%;
        text-align: center;
    }

    .connect-content h1 {
        font-size: 2rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .split-container {
        flex-direction: column; /* Stack the columns */
        padding: 2rem;
        gap: 2.5rem; /* Space between the stacked sections */
    }

    .left {
        text-align: center; /* Center-align text */
    }

    .left h1 {
        font-size: 2rem;
    }
    .contact-info p {
        font-size: 0.9rem;
    }
    .contact-info h2 {
        font-size: 1.5rem;
    }
    .contact-social {
        justify-content: center; /* Center the social icons */
    }
}