/* Global Enhanced Styles - Australian Theme */
/* Include this CSS file on all pages for consistent styling */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables for Australian Colors */
:root {
    --aus-gold: #ffcd00;
    --aus-green: #00843d;
    --aus-green-dark: #006930;
    --aus-green-light: #00a651;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5f7a;
    --bg-light: #f8fbfd;
    --bg-white: #ffffff;
    --border-light: #e0e7ed;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Full Width Container for Header Elements - NEW */
.language-bar > .language-quick-select,
.main-header > .container {
    max-width: none;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .language-bar > .language-quick-select,
    .main-header > .container {
        padding: 0 20px;
    }
}

/* Language Bar - UPDATED */
.language-bar {
    background: #f5f5f5;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    position: static; /* Changed to static */
    width: 100%; /* NEW */
    z-index: 100;
    transition: transform 0.3s ease; /* NEW */
}

.language-quick-select {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.language-quick-select h4 {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.lang-btn {
    padding: 5px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lang-btn:hover {
    background: var(--aus-green);
    color: white;
    border-color: var(--aus-green);
}

.lang-btn.active {
    background: var(--aus-green);
    color: white;
    border-color: var(--aus-green);
}

/* Main Header - UPDATED */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: static; /* Changed to static */
    width: 100%; /* NEW */
    z-index: 99;
    transition: transform 0.3s ease; /* NEW */
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--aus-green);
    margin: 0;
}

/* Navigation Menu */
.nav-menu {
    background: var(--bg-light);
    border-radius: 50px;
    padding: 8px;
    display: flex;
    gap: 4px;
    align-items: center;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--bg-white);
    color: var(--aus-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Main Content - UPDATED */
main {
    flex: 1;
    padding: 40px 0;
    /* Removed margin-top since headers are now static */
}

/* Section Styles */
section {
    background-color: var(--bg-white);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--aus-green);
    margin-bottom: 16px;
    font-weight: 600;
}

h1 { font-size: 48px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }

p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Lists */
ul, ol {
    margin-left: 30px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

li {
    margin-bottom: 8px;
    line-height: 1.8;
}

/* Links */
a {
    color: var(--aus-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.button, .btn, button {
    display: inline-block;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.start-button {
    background: linear-gradient(135deg, var(--aus-green) 0%, var(--aus-green-dark) 100%);
    color: white;
}

.start-button:hover {
    background: linear-gradient(135deg, var(--aus-green-dark) 0%, #005025 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 61, 0.3);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-white);
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--aus-green);
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Footer */
.main-footer {
    background: var(--bg-white);
    padding: 40px 0;
    margin-top: auto;
    border-top: 1px solid var(--border-light);
}

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

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--aus-green);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 132, 61, 0.3);
    border-radius: 50%;
    border-top-color: var(--aus-green);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 500;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--aus-gold);
    color: #856404;
}

.alert-error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] ul,
[dir="rtl"] ol {
    margin-left: 0;
    margin-right: 30px;
}

/* Language Bar Base Styles - UPDATED */
.language-bar {
    background-color: var(--aus-blue, #002776);
    color: white;
    padding: 15px 0;
    border-bottom: 3px solid var(--aus-gold, #FFB500);
    position: static; /* Changed to static */
    width: 100%; /* NEW */
    z-index: 1000;
    transition: transform 0.3s ease; /* NEW */
}

.language-quick-select {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.language-quick-select h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

/* Desktop Language Buttons */
.desktop-languages {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

/* Language Buttons */
.lang-btn {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.lang-btn.active {
    background-color: var(--aus-gold, #FFB500);
    color: var(--aus-blue, #002776);
    border-color: var(--aus-gold, #FFB500);
    font-weight: 600;
}

/* Dropdown Container */
.lang-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 140px;
    justify-content: center;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Items */
.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item.active {
    background-color: var(--aus-blue, #002776);
    color: white;
    font-weight: 600;
}

/* Hide header on scroll down, show on scroll up - NEW */
.language-bar.hide-header,
.main-header.hide-header {
    transform: translateY(-100%);
}

/* Wrapper for full-width headers */
body > .language-bar,
body > .main-header {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

/* Mobile/Desktop visibility */
.desktop-only,
.desktop-languages,
.desktop-text,
.desktop-more-languages {
    display: block;
}

.mobile-text,
.mobile-languages {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .language-bar {
        padding: 10px 0;
    }
    
    .language-quick-select {
        padding: 0 15px;
        justify-content: center;
    }
    
    /* Hide desktop elements */
    .desktop-only,
    .desktop-languages,
    .desktop-text,
    .desktop-more-languages {
        display: none !important;
    }
    
    /* Show mobile elements */
    .mobile-text,
    .mobile-languages {
        display: block !important;
    }
    
    /* Full width dropdown on mobile */
    .lang-dropdown {
        width: 100%;
        max-width: 300px;
    }
    
    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 10px 20px;
        font-size: 16px;
        min-width: unset;
        background-color: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .dropdown-toggle:active {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .dropdown-menu {
        left: 0;
        right: 0;
        max-height: 70vh;
        border-radius: 0 0 8px 8px;
        margin-top: 0;
        border-top: none;
    }
    
    .dropdown-item {
        padding: 14px 20px;
        font-size: 15px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }
    
    /* Ensure scrollbar is visible on mobile */
    .dropdown-menu::-webkit-scrollbar {
        width: 6px;
    }
    
    .dropdown-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .dropdown-menu::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .desktop-languages {
        flex-wrap: wrap;
    }
    
    .lang-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lang-btn {
        border-width: 2px;
    }
    
    .dropdown-menu {
        border-width: 2px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dropdown-menu {
        background-color: #2a2a2a;
        border-color: #444;
        color: white;
    }
    
    .dropdown-item {
        color: white;
    }
    
    .dropdown-item:hover {
        background-color: #3a3a3a;
    }
    
    .dropdown-item.active {
        background-color: var(--aus-gold, #FFB500);
        color: var(--aus-blue, #002776);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        gap: 16px;
    }
    
    .logo {
        height: 50px;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    section {
        padding: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
    
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    h4 { font-size: 18px; }
}

/* Founder Section Styles */
.founder-section {
    padding: 60px 20px;
    background-color: #f8f9fa; /* A light grey background to make it stand out */
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.founder-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.founder-photo {
    flex: 0 0 250px; /* Base width of 250px */
}

.founder-photo img {
    width: 100%;
    border-radius: 50%; /* Creates the circular image */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 5px solid #fff;
}

.founder-bio {
    flex: 1;
}

.founder-title {
    font-size: 2.2em;
    color: #1e3a8a;
    margin-top: 0;
    margin-bottom: 20px;
}

.founder-bio p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 1.5em;
}

/* Responsive styles for tablets and mobile */
@media (max-width: 768px) {
    .founder-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .founder-photo {
        max-width: 200px; /* Make the photo a bit smaller on mobile */
        margin-bottom: 20px;
    }

    .founder-title {
        font-size: 1.8em;
    }
}