@import url('view-transitions.css');

html {
    scroll-behavior: smooth;
}

body {
    padding: 0;
    margin: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: #d9d9d9;
    padding: 10px 3%;
    box-sizing: border-box;
} 

/* Active navigation link highlight */
.nav-links a.active {
    color: #2c4b1d;
    text-decoration: underline;
    text-decoration-color: #2c4b1d;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
    font-weight: 600;
}

.logos {
    margin-left: 0;
} 

.login {
    margin-right: 0;
    display: flex;
    gap: 10px;
}

ul {
    list-style-type: none;
    display: flex;
    padding: 0;
    margin: 0;
    gap: 23px;
}

.nav-links a {
    text-decoration: none;
    font-family: "Inter Tight", sans-serif;
    color: black;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: #2c4b1d;
}

/* Main Layout - Natural Flow with Controlled Gap */
#main-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 3% 5% 3% 4%;
    gap: 48px; /* Holds text comfortably close to image */
    box-sizing: border-box;
}

#about {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    padding: 3% 4%;
    gap: 48px;
    box-sizing: border-box;
}

/* Image Containers */
.image,
.about-img {
    flex: 0 0 auto;
    width: 46%;
    max-width: 670px;
}

/* Identical Image Sizing */
#plant-img,
#about-image {
    width: 100%;
    height: auto;
    aspect-ratio: 670 / 580;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Content Columns - Expanded Horizontal Room */
.information,
.cont-about {
    flex: 1;
    min-width: 0; /* Allows flex box to stretch text horizontally */
    color: #333333;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero Title - Wide Horizontal Span */
#info-hero {
    width: 100%;
    font-size: 5rem;
    line-height: 1.15;
    font-family: "Inter Tight", sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

/* Hero Paragraph */
#info-p {
    width: 100%;
    max-width: 100%;
    font-size: 1.1rem;
    text-align: left;
    line-height: 1.6;
    color: #444444;
    margin-bottom: 25px;
    font-family: Arial, Helvetica;
}

#try-button {
    border-radius: 48px;
    border-style: none;
    background-color: #2c4b1d;
    color: white;
    padding: 17px 28px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 0.85rem;
    align-self: flex-start;
}

#try-button:hover {
    background-color: #1c3012;
}

#sign-button {
    color: #2c4b1d;
    border-color: #2c4b1d;
    border-radius: 5px;
    padding: 11px 18px;
    border-width: 1px;
    cursor: pointer;
    font-weight: bold;
}

#login-button {
    background-color: #2c4b1d;
    color: white;
    padding: 11px 18px;
    border-style: dotted;
    border-width: 1px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#sign-button:hover {
    background-color: #2c4b1d;
    color: white;
}

#login-button:hover {
    background-color: #1c3012;
}

#how-it-works {
    background-image: url('../images/background.png');
    background-size: cover;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.le-content {
    display: flex;
    justify-content: space-evenly;
    padding-top: 10%;
    padding-left: 1%;
    padding-right: 1%;
}

footer {
    text-align: center;
    background-color: #d9d9d9;
    padding-top: 1%;
    padding-bottom: 1%;
    font-family: sans-serif;
    font-size: 12px;
}

#about-us-title {
    font-family: "Inter Tight", sans-serif;
    font-size: 2.7rem;
}

.mini-title {
    color: black;
    line-height: 1.6;
    font-size: 1.4rem;
    font-weight: bold;
    width: 100%;
    font-family: "Inter Tight", sans-serif;
    text-decoration: none;
    text-align: left; /* Left-aligns the mini title */
}

.cont-about {
    text-align: justify; /* Justifies paragraph text */
    font-size: 1.1rem;
}

.about-info {
    text-align: justify; /* Ensures paragraph text under mini titles is justified */
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.le-title {
    text-align: center;
    font-family: "Inter Tight", sans-serif;
    text-transform: uppercase;
    padding-top: 4%;
    text-decoration: underline;
    font-size: 1.4rem;
}

.info {
    max-width: 380px;
    background-color: rgba(133, 127, 127, 0.867);
    padding: 50px 16px; /* Increased top/bottom padding to 50px for extra height */
    border-radius: 12px;
    font-family: Arial, Helvetica;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.894);
    width: 100%;
    box-sizing: border-box;
}

#main-logo {
    cursor: pointer;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    background-color: #d9d9d9;
}

.nav-links-section {
    text-align: center;
    display: flex;
    padding: 10px 0;
    padding-right: 47%;
}

.logo-sign-in {
    padding-left: 2%;
}

.logo-sign-in:hover {
    cursor: pointer;
}

.nav-links-section a {
    text-decoration: none;
    font-family: "Inter Tight", sans-serif;
    color: black;
    font-size: 1.1rem;
}

/* Active highlight for Login/Register links (no underline) */
.nav-links-section a[href="sign-in.php"].active,
.nav-links-section a[href="register.php"].active,
.nav-links-section a.active {
    color: #2c4b1d;
    font-weight: bold;
    text-decoration: none; /* Prevents underline */
}

.sign-in-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../images/background.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
    box-sizing: border-box;
}

.content {
    margin-top: 0;
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
}

.form {
    background-color: rgba(223, 220, 220, 0.966);
    padding: 40px 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 800px;
    min-height: auto;
    border-radius: 16px;
    box-sizing: border-box;
}

.login-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 5%;
    flex: 0 0 300px;
}

.login-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

.vertical-line {
    width: 1px;
    height: 380px;
    background-color: #000000;
}

#deForm {
    display: flex;
    flex-direction: column;
    padding-left: 8%;
    flex: 1;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.form h1,
p {
    text-align: center;
}

#info-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 8px;
}

#name,
#email,
#user-password,
.emailname {
    padding: 12px 20px;
    border-radius: 12px;
    border-style: none;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
}

#name {
    margin-top: 5%;
}

#info-container-password,
#info-container-email {
    padding-bottom: 20px;
}

.emailname {
    margin-top: 5%;
}

#sign-in-title {
    font-family: 'Inter Tight', sans-serif;
    margin-top: 0;
}

.intro, p {
    font-family: 'Inter Tight', sans-serif;
}

#sign-in-btn {
    padding: 15px 30px;
    border-radius: 48px;
    background-color: #2c4b1d;
    border-style: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 5%;
    margin-bottom: 5%;
}

#sign-in-btn:hover {
    background-color: #1c3012;
}

.footer-link {
    text-align: center;
    font-family: 'Inter Tight', sans-serif;
}

.register-title {
    margin-bottom: 10%;
}

.message,
.error {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    line-height: 1.4;
    width: 100%;
    max-width: 280px;
    text-align: center;
    box-sizing: border-box;
}

.error {
    text-align: justify;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.regMessage {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
}

/* Global Responsive Base Rules for Images */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive Media Queries */
@media screen and (max-width: 1024px) {
    #info-hero {
        font-size: 2.8rem;
    }

    .le-content {
        flex-wrap: wrap;
        gap: 20px;
        padding-top: 5%;
    }

    .info {
        max-width: 220px;
    }
}

@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .logos, .login {
        margin: 0;
    }

    .nav-links-section {
        padding-right: 0;
        justify-content: center;
    }

    #main-section {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }

    #about {
        flex-direction: column-reverse;
        padding: 20px 15px;
    }

    .image, .about-img {
        justify-content: center;
    }

    .image, .about-img, .information, .cont-about {
        margin: 0 0 20px 0;
        width: 100%;
    }

    #info-hero {
        font-size: 2.2rem;
    }

    #info-p {
        max-width: 100%;
        text-align: center;
    }

    #try-button {
        align-self: center;
    }

    #how-it-works {
        min-height: auto;
        padding-bottom: 40px;
    }

    .le-content {
        flex-direction: column;
        align-items: center;
        padding-top: 30px;
    }

    .info {
        width: 85%;
        max-width: 280px;
        padding: 35px 20px;
        box-sizing: border-box;
    }

    .cont-about {
        padding-right: 0;
        text-align: left;
    }

    #about-us-title {
        text-align: center;
        padding-bottom: 5%;
    }

    footer {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    /* Form Mobile Layout Adjustments */
    .sign-in-page {
        padding: 20px 15px;
    }

    .content {
        padding: 0;
    }

    .form {
        flex-direction: column;
        padding: 30px 20px;
        width: 100%;
        max-width: 450px;
    }

    .login-image {
        padding-right: 0;
        padding-bottom: 10px;
        flex: 0 0 auto;
        width: 100%;
    }

    .login-image img {
        width: 180px;
        height: 180px;
    }

    .vertical-line {
        width: 80%;
        height: 1px;
        margin: 10px 0 20px 0;
    }

    #deForm {
        padding-left: 0;
        width: 100%;
    }

    #sign-in-title {
        font-size: 1.6rem;
    }

    #name, #email, #user-password, .emailname {
        max-width: 100%;
        width: 100%;
    }

    #sign-in-btn {
        width: 100%;
        padding: 14px 0;
    }

    .message, .error, .regMessage {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 480px) {
    #info-hero {
        font-size: 1.8rem;
    }

    ul {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .info {
        width: 90%;
        max-width: 260px;
        padding: 30px 16px;
        box-sizing: border-box;
    }

    footer {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .form {
        padding: 25px 15px;
    }

    .login-image img {
        width: 140px;
        height: 140px;
    }

    #sign-in-title {
        font-size: 1.4rem;
    }
}