@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400&family=Poppins:wght@600&display=swap');

/* CSS Custom Properties for consistent theming */
:root {
    /* Colors */
    --primary-color: #004f9e;
    --primary-dark: #003b73;
    --secondary-color: #134575;
    --secondary-dark: #00305e;
    --text-primary: #333;
    --text-secondary: #555;
    --text-light: #BAB9B9;
    --background: #f4f4f4;
    --surface: white;
    --border-color: #ccc;
    
    /* Spacing */
    --spacing-xs: 0.313rem;  /* 5px */
    --spacing-sm: 0.625rem;  /* 10px */
    --spacing-md: 0.938rem;  /* 15px */
    --spacing-lg: 1.25rem;   /* 20px */
    --spacing-xl: 1.875rem;  /* 30px */
    --spacing-2xl: 2.5rem;   /* 40px */
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --font-size-base: 1rem;
    
    /* Breakpoints */
    --mobile-max: 767px;
    --tablet-min: 768px;
    --tablet-max: 1023px;
    --desktop-min: 1024px;
    --desktop-large: 1440px;
    
    /* Container widths */
    --container-mobile: 100%;
    --container-tablet: 45rem;   /* 720px */
    --container-desktop: 75rem;  /* 1200px */
    --container-wide: 93.75rem; /* 1500px */
}

/* Global Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography System with Fluid Scaling */
html {
    font-size: 100%; /* 16px base */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
}

/* Responsive Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem); }
h2 { font-size: clamp(1.375rem, 1.2rem + 0.875vw, 2rem); }
h3 { font-size: clamp(1.125rem, 1rem + 0.625vw, 1.5rem); }
h4 { font-size: clamp(1rem, 0.95rem + 0.25vw, 1.25rem); }

p, li, a, input, button {
    font-family: var(--font-primary);
    font-weight: 400;
}

/* Main Content Container */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
    width: 100%;
}

/* Login Box with Responsive Sizing */
.login-box {
    text-align: center;
    width: 100%;
    max-width: min(25rem, 90vw); /* 400px max, but responsive */
    
    /* Container query support for future-proofing */
    container-type: inline-size;
}

/* Login box styling when inside login-container (for login-test.html compatibility) */
.login-container .login-box {
    background: var(--surface);
    padding: clamp(var(--spacing-lg), 5vw, var(--spacing-2xl));
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
}

/* Logo Responsive Scaling */
.logo {
    margin-bottom: var(--spacing-lg);
}

.logo img {
    width: 100%;
    max-width: 9.375rem; /* 150px */
    height: auto;
    aspect-ratio: 2/1;
    object-fit: contain;
}

/* Form Styling */
.input-group {
    text-align: left;
    margin-bottom: var(--spacing-md);
}

.input-group label {
    display: block;
    font-size: clamp(0.813rem, 0.75rem + 0.313vw, 0.875rem);
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.input-group input {
    width: 100%;
    padding: clamp(var(--spacing-sm), 2vw, var(--spacing-md));
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    transition: border-color 0.3s ease;
    
    /* Ensure good touch targets on mobile */
    min-height: 2.75rem; /* 44px */
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125rem rgba(0, 79, 158, 0.1);
}

/* Password Field with Toggle */
.password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 3rem; /* Space for icon */
}

.toggle-password {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.25rem;
    user-select: none;
    transition: opacity 0.2s ease;
}

.toggle-password:hover {
    opacity: 0.7;
}

/* Submit Button */
.login-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: clamp(var(--spacing-sm), 2vw, var(--spacing-md));
    width: 100%;
    border-radius: 0.25rem;
    font-size: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    min-height: 2.75rem; /* 44px touch target */
}

.login-btn:hover {
    background-color: var(--primary-dark);
}

.login-btn:active {
    transform: translateY(1px);
}

/* Links */
.options {
    margin-top: var(--spacing-md);
}

.options a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: clamp(0.813rem, 0.75rem + 0.313vw, 0.875rem);
    transition: text-decoration 0.2s ease;
}

.options a:hover {
    text-decoration: underline;
}

/* Footer Responsive Design */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: var(--spacing-xl) 0 0;
    width: 100%;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--spacing-xl);
    max-width: var(--container-wide);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Footer columns responsive behavior */
.footer-column {
    text-align: left;
    padding: var(--spacing-sm);
}

.footer-column img {
    width: 100%;
    max-width: 18.75rem; /* 300px */
    height: auto;
    aspect-ratio: 2/1;
    object-fit: contain;
}

.footer-column h3 {
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    margin-bottom: var(--spacing-sm);
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.813rem);
    margin-bottom: var(--spacing-xs);
}

.footer-column ul li strong {
    font-weight: 600;
}

.footer-column ul li a {
    color: white;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.footer-column ul li a:hover {
    text-decoration: underline;
}

/* Follow Us Section */
.follow-us-heading {
    margin-top: var(--spacing-lg);
}

.linkedin-icon {
    display: inline-block;
    margin-bottom: var(--spacing-lg);
}

.linkedin-icon img {
    width: 1.875rem; /* 30px */
    height: 1.875rem;
    transition: transform 0.3s ease-in-out;
}

.linkedin-icon img:hover {
    transform: scale(1.1);
}

/* Footer Bottom */
.footer-bottom {
    background-color: var(--secondary-dark);
    width: 100%;
    padding: var(--spacing-md) 0;
}

.footer-bottom-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-bottom-column:first-child {
    flex: 3 1 0;
    text-align: left;
    font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    font-weight: 600;
    color: white;
}

.footer-bottom-column:last-child {
    flex: 1 1 0;
    text-align: left;
    font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    color: var(--text-light);
}

/* Removed password-specific styles - now handled inline in password.html */

/* Media Queries for Enhanced Responsiveness */
@media screen and (max-width: 767px) {
    /* Mobile specific adjustments */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column img {
        margin: 0 auto;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-column:first-child,
    .footer-bottom-column:last-child {
        text-align: center;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    /* Tablet specific adjustments */
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .footer-bottom-column:first-child,
    .footer-bottom-column:last-child {
        text-align: center;
    }
}

@media screen and (min-width: 1440px) {
    /* Large desktop adjustments */
    body {
        font-size: 1.0625rem; /* Slightly larger base font */
    }
}

/* Accessibility and Performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-btn,
    .footer-bottom {
        border: 2px solid currentColor;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode variables can be defined here when needed */
}

/* Print styles */
@media print {
    footer {
        display: none;
    }
    
    .login-container {
        box-shadow: none;
    }
}