/* --- Google Font Import: Poppins --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --bg-color: #ffffff;
    --primary-color: #25D366; /* WhatsApp Green */
    --accent-color: #34B7F1; /* Light Blue */
    --footer-bg: #1A1A1A;
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --border-color: #dddddd;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --font-family: 'Poppins', sans-serif;
}

/* --- Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Utility & Component Styles --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-dark);
    transition: all 0.3s ease-in-out;
}

/* --- Main Content: Login Section --- */
.login-section {
    padding: 6rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.login-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.login-title {
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.error-message {
    color: #D32F2F;
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.2em; /* Reserve space to prevent layout shift */
    font-weight: 500;
}

/* Shake animation for inputs */
.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- Digitise Section --- */
.digitise-section {
    background-color: #f8f9fa;
    padding: 5rem 0;
}

.digitise-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center;
}

.digitise-content {
    max-width: 600px;
}

.digitise-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.digitise-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
}

.digitise-image img {
    border-radius: 12px;
}

/* --- Footer --- */
.footer {
    background-color: var(--footer-bg);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col .footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: #a0a0a0;
}

.footer-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-links li, .footer-contact li {
    margin-bottom: 0.75rem;
}

.footer-links a, .footer-contact a {
    color: #a0a0a0;
    transition: color 0.3s ease;
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--primary-color);
}

.footer-contact {
    color: #a0a0a0;
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #a0a0a0;
    font-size: 0.9rem;
}

/* --- Media Queries --- */

/* Tablet Styles */
@media (min-width: 768px) {
    .nav-menu {
        display: none; /* Hide the mobile-first menu items */
        flex-direction: column;
        position: fixed;
        left: -100%;
        top: 70px; /* Adjust based on header height */
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
        display: flex; /* Show when active */
    }

    .nav-item {
        margin: 1.5rem 0;
    }

    .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);
    }
    
    .digitise-container {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }

    .digitise-content {
        flex: 1;
    }

    .digitise-image {
        flex: 1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Styles */
@media (min-width: 992px) {
    .hamburger {
        display: none;
    }

    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        background-color: transparent;
        width: auto;
        box-shadow: none;
        gap: 1.5rem;
    }

    .nav-item {
        margin: 0;
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .footer-col:first-child {
        grid-column: span 1;
    }
}
