/*
 * ASF&IPL Website Stylesheet
 *
 * This stylesheet defines the layout and appearance of the two‑page
 * website. Colours are derived from the provided company logo, using
 * a strong red and green palette. Feel free to adjust the CSS variables
 * at the top of this file if you wish to fine‑tune the colour scheme.
 */

/* Root variables for easy colour management */
:root {
    --primary-red: #e03311;      /* approximated from the logo */
    --primary-green: #009e4d;    /* approximated from the logo */
    --dark-text: #1a1a1a;         /* dark text for good contrast */
    --light-bg: #ffffff;          /* background colour */
    --nav-bg: #f5f5f5;            /* navigation background */
    --border-radius: 4px;
    --transition-speed: 0.3s;
}

/* Reset some default margins/paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
    /* Make the layout fill the viewport height and allow main sections to flex */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Prevent horizontal scrolling by hiding overflow on the x‑axis */
    overflow-x: hidden;
}

/* Reusable container to constrain width */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation styles */
.navbar {
    background-color: var(--nav-bg);
    border-bottom: 3px solid var(--primary-green);
    padding: 0.5rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
    padding: 0.25rem;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: var(--primary-green);
}

nav a.active {
    border-bottom-color: var(--primary-red);
    color: var(--primary-red);
}

/* Hero section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Allow the hero section to stretch and fill available space */
    flex: 1 0 auto;
    text-align: center;
    background: linear-gradient(135deg, rgba(224, 51, 17, 0.05), rgba(0, 158, 77, 0.05));
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.hero-content {
    max-width: 700px;
}

.hero-logo {
    /* Scale the logo responsively – it will shrink on small screens but never exceed 280px */
    width: 60%;
    max-width: 280px;
    height: auto;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--primary-green);
    font-weight: 600;
    text-transform: capitalize;
}

/* Primary call‑to‑action button */
.btn-contact {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-green);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn-contact:hover {
    background-color: var(--primary-red);
    transform: translateY(-2px);
}

/* Contact page styles */
.contact-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, rgba(0, 158, 77, 0.03), rgba(224, 51, 17, 0.03));
    /* Make the contact page content centre‑aligned and fill available height */
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 0 auto;
}

/* Container for contact page contents */
.contact-content {
    text-align: center;
    max-width: 600px;
    width: 90%;
    margin: 0 auto;
}

/* Logo on the contact page */
.contact-logo {
    width: 60%;
    max-width: 250px;
    height: auto;
    margin-bottom: 1.5rem;
}

/* Go back button styling */
.btn-back {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn-back:hover {
    background-color: var(--primary-green);
    transform: translateY(-2px);
}

.contact-container {
    max-width: 600px;
    text-align: left;
}

.contact-section h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-red);
}

.contact-details {
    font-size: 1rem;
    line-height: 1.6;
}

.contact-details strong {
    color: var(--primary-green);
    font-weight: 700;
}

.contact-details a {
    color: var(--primary-red);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--nav-bg);
    border-top: 3px solid var(--primary-red);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    nav ul {
        margin-top: 0.5rem;
        gap: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.4rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .btn-contact {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
}