/* Root variables for consistent styling */
:root {
    --font-family: Inter, sans-serif;
    --primary-color: #8BCC00;
    --secondary-color: #5D65C0;
    --secondary-color-active: #3D4380;
    --neutral-color-1: #000000; /* pitch black */
    --neutral-color-2: #1F1F1F;
    --text-color-primary: #EBEBEB;
    --text-color-secondary: #c2c2c2;
    --text-color-tertiary: #999999;
    --line-height: 1.5;
}

/* General body styling */
body {
    margin: 0;
    background-color: var(--neutral-color-1);
    color: var(--text-color-primary);
    width: 100%;
    overflow-x: hidden;
}

/* Header Section */
#lets-connect {
    width: auto;
    padding: 44px 44px 0px 44px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 32px;
} 

#lets-connect svg {
    width: 300px;
    min-width: 200px;
    height: auto;
    fill: var(--text-color-primary);
}

#lets-connect a {
    color: var(--text-color-secondary);
    text-decoration: none;
}

.logo-container {
    width: auto;
    min-width: 64px;
    height: auto;
    flex-shrink: 0;
    align-items: center;
    fill: var(--text-color-primary);
}

.intro-text {
    width: auto;
    text-align: justify;
}

/* Hero Section */
.hero-section {
    background-color: var(--neutral-color-2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 144px;
    padding: 32px 64px; /* Match padding with About Us */
    border-radius: 12px;
    min-height: calc(100vh - 288px - 40px);
    gap: 0;
    align-items: center;
}

/* Container styling */
.container {
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 144px; 
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Contact Info Section */
#contact-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 80px 64px;
    border-radius: 12px;
    margin-bottom: 80px;
}

#contact-info h3 {
    margin: 0 0 32px 0;
}

#contact-info > div {
    line-height: 1.8;
}

#contact-info a {
    color: var(--text-color-tertiary);
    text-decoration: none;
}

#contact-info a:hover {
    color: var(--primary-color);
}

/* Contact Form Section */
.contact-form-section {
    display: flex;
    width: auto;
    flex-direction: column;
    margin-top: 144px;
    margin-bottom: 144px;
    padding: 80px 64px;
    border-radius: 12px;
    gap: 24px;
}

.contact-form-section h3 {
    margin: 0 0 12px 0;
}

.contact-form-section > p {
    margin: 0 0 32px 0;
}

.contact-form-section h5 {
    margin: 0 0 24px 0;
}

.form textarea,
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"] {
    font-family: var(--font-family);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: var(--line-height);
    letter-spacing: 2%;
    width: calc(100% - 24px); /* Adjust width to account for padding */
    margin: 0 auto;
    padding: 16px 12px;
    border-radius: 4px;
    background-color: var(--text-color-secondary);
    color: var(--neutral-color-1);
    border: 1px solid var(--text-color-secondary);
}

.textbox {
    margin-bottom: 20px !important;
    width: 100%;
}

input.textbox,
textarea.textbox {
    margin-bottom: 0 !important;
}

#message {
    height: 140px;
    resize: vertical;
}

.form textarea:focus,
.form input[type="text"]:focus,
.form input[type="email"]:focus,
.form input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

#row {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 20px;
}

#row input {
    flex: 1;
    margin-bottom: 0 !important;
}

#name {
    text-transform: capitalize;
}

/* Button Styling */
button {
    width: auto;
    margin-top: 32px;
    padding: 16px 40px;
    border-radius: 12px;
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    transition-behavior: smooth;
    transition-duration: 0.3s;
    align-self: flex-start;
}

button h6 {
    color: var(--neutral-color-1);
    margin: 0;
}

button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

button:hover h6 {
    color: var(--primary-color);
}

button:active {
    background-color: var(--secondary-color-active);
}

button:active h6 {
    color: var(--primary-color);
}

/* Map Container Styling */
.map-container {
    width: 100%;
    max-width: auto; /* Match the width of other sections */
    border-radius: 12px; /* Add rounded corners */
    overflow: hidden; /* Ensure the map stays within the container */
    -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
    filter: grayscale(100%);
}

/* Smooth transition and remove grayscale on hover */
.map-container {
    -webkit-transition: -webkit-filter 0.3s ease;
    transition: filter 0.3s ease;
}

.map-container:hover {
    -webkit-filter: none;
    filter: none;
}

.map-container iframe {
    width: 100%;
    height: 400px; /* Ensure the iframe takes full width of the container */
    border: none; /* Remove default border */
}

/* Message Overlay Styles */
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.message-modal {
    background: var(--neutral-color-1);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease-in-out;
}

.success-modal {
    border-color: var(--primary-color);
}

.error-modal {
    border-color: #ff4444;
}

.message-header {
    margin-bottom: 24px;
}

.message-content h2 {
    color: var(--text-color-primary);
    font-size: 24px;
    margin: 0 0 16px 0;
    font-family: var(--font-family);
}

.message-content p {
    color: var(--text-color-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    font-family: var(--font-family);
}

.sub-message {
    color: var(--primary-color) !important;
    font-weight: 500;
    margin-top: 16px !important;
}

#close-overlay-btn {
    background: var(--primary-color);
    color: var(--neutral-color-1);
    font-size: 16px;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

#close-overlay-btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Scroll Down Button Styling */
.hero-scroll-arrow {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 64px; /* Adjusted to match About Us */
    text-decoration: none;
    transition: transform 0.3s ease;
}

.hero-scroll-arrow:hover {
    transform: translateY(4px);
}

.hero-scroll-arrow svg {
    rotate: 90deg;
    stroke: var(--text-color-primary);
    width: 11px;
    height: 19px;
    transition: stroke 0.3s ease;
}

.hero-scroll-arrow p {
    color: var(--text-color-primary);
}

.hero-scroll-arrow:hover p {
    color: var(--primary-color);
}

.hero-scroll-arrow:hover svg {
    stroke: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile responsive overlay */
@media (max-width: 768px) {
    .message-modal {
        margin: 20px;
        padding: 24px;
    }

    .message-content h2 {
        font-size: 20px;
    }

    .message-content p {
        font-size: 14px;
    }

    /* Hero Section Mobile Adjustments */
    .hero-section {
        margin: 64px 20px 0;
    }

    #hero-section {
        width: calc(100% - 40px);
        flex-direction: column;
        margin: 0;
        gap: 32px;
        padding: 32px;
    }

    /* Make contact sections stack on mobile */
    #lets-connect {
        flex-direction: column;
        margin: 72px 24px 0;
        gap: 24px;
    }

    #lets-connect svg {
        width: 40vw;
        min-width: 150px;
    }

    #contact-info {
        flex-direction: column;
        width: calc(100% - 48px);
        margin: 72px 24px 80px;
        gap: 32px;
        padding: 48px 32px;
    }

    .contact-form-section {
        padding: 48px 32px;
        margin: 0 24px 72px;
    }

    .contact-form {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    #row {
        flex-direction: column;
        gap: 16px;
    }

    #row input {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 560px) {
    .hero-section { margin: 56px 20px 0; padding: 28px 20px; }
    #lets-connect { gap: 20px; }
    h2 { font-size: clamp(1.6rem, 6.5vw, 2.1rem); }
    h3 { font-size: clamp(1.3rem, 5.5vw, 1.7rem); }
    p { font-size: clamp(0.95rem, 3.2vw, 1.05rem); line-height: 1.55; }
    .contact-form-section { padding: 48px 40px; margin-top: 96px; margin-bottom: 72px; }
}

@media (max-width: 420px) {
    .contact-form-section { padding: 40px 28px; }
    .form textarea, .form input[type="text"], .form input[type="email"], .form input[type="tel"] { font-size: 1.05rem; }
    button { width: 100%; }
}

@media (pointer: coarse) {
    button:hover { transform: none; }
}
