/* Base Reset & Variables */
:root {
    /* Color Palette - Nature & Warmth */
    --color-primary: #2ECC71;
    /* Modern Green */
    --color-primary-dark: #27AE60;
    --color-accent: #F39C12;
    /* Warm Orange */
    --color-bg: #FDFBF7;
    /* Warm Off-white */
    --color-text: #2C3E50;
    /* Deep Blue-Grey */
    --color-text-light: #7F8C8D;
    --color-white: #FFFFFF;
    --color-danger: #e74c3c;
    --color-success: #27ae60;

    /* Typography */
    --font-main: 'Outfit', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --radius-md: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-accent:hover {
    background-color: #d35400;
    /* Darker orange */
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Header */
header {
    background: var(--color-white);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(253, 251, 247, 1) 100%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background: var(--color-white);
    padding: var(--spacing-lg) 0;
    text-align: center;
    color: var(--color-text-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

/* Responsive / Mobile Styles */
/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    border: none;
    background: transparent;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-primary-dark);
}

/* Responsive / Mobile Styles */
@media (max-width: 768px) {

    /* Layout Adjustments */
    .container {
        padding: 0 1rem;
    }

    /* Navigation */
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 85px;
        bottom: auto;
        /* Don't anchor to bottom, avoid browser bar issues */
        height: 80vh;
        /* Only take up 80% of screen */
        gap: 0;
        flex-direction: column;
        background-color: var(--color-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 99;

        overflow-y: auto;
        padding-bottom: 150px;
        /* EXTRA generous buffer */
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .logo img {
        height: 50px !important;
        /* Slightly smaller logo on mobile */
    }

    /* Hero Section */
    .hero {
        padding: 2rem 0;
        /* Reduce padding */
    }

    .hero h1 {
        font-size: 2.2rem;
        /* Smaller heading */
    }

    .hero p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    /* Forms */
    form .form-group input,
    form .form-group select,
    form .form-group textarea {
        font-size: 16px;
        /* Prevent iOS zoom on focus */
    }

    /* Generic Grid/Flex Stacking overrides */

    /* Force grids to single column */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Wrap flex containers */
    div[style*="display: flex"] {
        flex-wrap: wrap;
    }

    /* Keep nav bar flex row */
    nav {
        flex-wrap: nowrap !important;
    }

    /* Don't wrap the hamburger bars */
    .hamburger span {
        flex-wrap: nowrap;
    }

    /* Exception: Keep small inputs side-by-side if they fit (like height/secure) */
    .form-group div[style*="display: flex"] {
        gap: 0.5rem !important;
    }

    /* Application Form Table - Allow horizontal scroll */
    div[style*="overflow-x: auto"] {
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border: 1px solid #eee;
    }

    /* Buttons */
    .btn {
        width: 100%;
        /* Full width buttons on mobile */
        text-align: center;
        margin-bottom: 0.5rem;
        display: block;
    }

    /* Footer Text */
    footer p {
        font-size: 0.85rem;
        padding: 0 1rem;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}