/* =========================================
   VARIABLES & BASE STYLES (CANONICAL PRODUCTION SCHEME)
========================================= */
:root {
    --ochre: #D4A574;
    --deep-red: #8B3A3A;
    --black: #000000;
    --cream: #F5F1E8;
    --white: #FFFFFF;
    --light-gray: #f9f9f9;
    --medium-gray: #ddd;
    --dark-gray: #666;
    --font-primary: 'Georgia', serif;
    --font-secondary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--cream);
    margin: 0;
    line-height: 1.7;
    color: #333333;
    overflow-x: hidden; /* Prevent horizontal page scrollbar */
}

/* =========================================
   FULL-WIDTH HEADER BANNER & WIDGET FADE OVERLAY
========================================= */
header {
    background-color: var(--black);
    border-bottom: 3px solid var(--ochre);
    width: 100%;
}

.header-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000000;
    min-height: 140px;
    display: flex;
    align-items: center;
}

.banner-section {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-section a {
    display: block;
    width: 100%;
    height: 100%;
}

.site-banner {
    width: 100%;
    max-width: 100%;
    height: 145px;
    object-fit: cover;
    object-position: center left;
    display: block;
    /* Smooth linear gradient mask fading out behind the top-right widget */
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 55%, rgba(0,0,0,0.3) 80%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 55%, rgba(0,0,0,0.3) 80%, rgba(0,0,0,0) 100%);
}

.header-widget {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 25px;
    z-index: 100;
}

.season-time-box {
    background: rgba(15, 15, 15, 0.94);
    border: 2px solid var(--ochre);
    border-radius: 6px;
    padding: 10px 16px;
    color: var(--cream);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    font-family: 'Georgia', serif;
    text-align: right;
    min-width: 190px;
}

.widget-season {
    font-size: 1rem;
    color: var(--cream);
}

.widget-subdesc {
    font-size: 0.78rem;
    color: var(--ochre);
    font-style: italic;
}

.widget-time {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: bold;
    margin-top: 4px;
    border-top: 1px solid rgba(212, 165, 116, 0.3);
    padding-top: 4px;
}

/* =========================================
   VIEWPORT-CONSTRAINED NAVIGATION MENU
========================================= */
.main-menu {
    background-color: var(--black);
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* Allows menu to wrap gracefully on smaller viewports */
    justify-content: center;
}

/* Level 1 Items */
.main-menu ul li { 
    position: relative; 
}

.main-menu ul li a {
    display: block;
    padding: 14px 20px;
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.88em;
    letter-spacing: 0.5px;
    transition: background-color 0.25s, color 0.25s;
    white-space: nowrap;
}

.main-menu ul li a:hover,
.main-menu ul li:hover > a { 
    background: var(--deep-red); 
    color: var(--cream); 
}

/* Level 2 Dropdown (Positioned absolute, overflow visible to allow flyouts) */
.main-menu ul li ul,
.main-menu ul li .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--black);
    flex-direction: column;
    min-width: 240px;
    max-width: 320px;
    max-height: none;
    overflow: visible;
    border-top: 3px solid var(--ochre);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.main-menu ul li:hover > ul,
.main-menu ul li:hover > .submenu { 
    display: flex; 
}

.main-menu ul li ul li {
    position: relative;
    width: 100%;
}

.main-menu ul li ul li a {
    padding: 8px 14px;
    border-bottom: 1px solid #222222;
    text-transform: none;
    font-weight: normal;
    font-size: 0.85em;
    line-height: 1.3;
    white-space: normal; /* Allow text wrapping if title is long */
}

.main-menu ul li ul li a:hover {
    background: var(--deep-red);
    color: #ffffff;
}

/* Level 3 Dropdown (Smart fly-out to left or right, overflow visible) */
.main-menu ul li ul li ul {
    display: none;
    position: absolute;
    top: 0;
    left: 100%; /* Default right flyout */
    min-width: 240px;
    max-width: 300px;
    max-height: none;
    overflow: visible;
    border-top: none;
    border-left: 3px solid var(--ochre);
    box-shadow: 4px 4px 15px rgba(0,0,0,0.5);
}

/* Align Level 2 dropdowns to the right for items on the right half of the screen to prevent overflow */
.main-menu > ul > li:nth-child(n+4) > ul {
    left: auto;
    right: 0;
}

/* Reverse fly-out direction for items on the right half of screen to prevent side overflow */
.main-menu > ul > li:nth-child(n+4) ul li ul {
    left: auto;
    right: 100%;
    border-left: none;
    border-right: 3px solid var(--ochre);
    box-shadow: -4px 4px 15px rgba(0,0,0,0.5);
}

.main-menu ul li ul li:hover > ul { 
    display: flex; 
}

/* =========================================
   MAIN CONTENT AREA & CARDS
========================================= */
.content-area {
    max-width: 1050px;
    margin: 40px auto;
    padding: 40px 45px;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-radius: 4px;
}

h1, h2, h3, h4 { 
    color: var(--deep-red); 
    font-family: 'Georgia', serif;
}

h1, h2 {
    border-bottom: 2px solid var(--ochre); 
    padding-bottom: 10px; 
    margin-top: 35px;
}

h1 { font-size: 2.5em; margin-top: 10px; }
h2 { font-size: 1.8em; }
h3 { color: var(--ochre); font-size: 1.35em; }
h4 { color: var(--deep-red); font-size: 1.15em; }

p { font-size: 1.05em; line-height: 1.85; margin-bottom: 20px; }

/* =========================================
   FOOTER STYLES
========================================= */
.site-footer {
    background-color: var(--black);
    color: var(--cream);
    padding: 50px 20px 20px 20px;
    border-top: 5px solid var(--deep-red);
    margin-top: 60px;
    font-size: 0.9em;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-column h3 {
    color: var(--ochre);
    border-bottom: 1px solid #333333;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
}

.footer-column p {
    line-height: 1.6;
    color: #CCCCCC;
    font-size: 0.95em;
}

.warning-column {
    background-color: #111111;
    padding: 18px;
    border-left: 4px solid var(--deep-red);
    border-radius: 3px;
}

.warning-column strong {
    color: var(--white);
    display: block;
    margin-bottom: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--ochre);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333333;
    margin-top: 30px;
    padding-top: 20px;
    color: #888888;
    font-size: 0.85em;
}

/* Cultural Warning Modal */
.cultural-warning-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.cultural-warning-content {
    background: #1a1a1a;
    border: 3px solid var(--ochre);
    border-radius: 8px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--cream);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.cultural-warning-header {
    background: var(--deep-red);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--ochre);
}

.cultural-warning-header h2 {
    color: var(--cream);
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--cream);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.cultural-warning-body {
    padding: 20px;
    line-height: 1.6;
}

.cultural-warning-body ul {
    margin: 10px 0 15px 20px;
}

.cultural-warning-footer {
    background: #111;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
}

.btn-primary {
    background: var(--ochre);
    color: var(--black);
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--cream);
}



/* =========================================
   CULTURAL WARNING POPUP (APH.GOV.AU STYLE)
========================================= */
.cultural-warning-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.cultural-warning-content {
    background-color: var(--cream);
    border: 3px solid var(--deep-red);
    border-radius: 8px;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    margin: 20px;
}

.cultural-warning-header {
    background-color: var(--black);
    color: var(--ochre);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--ochre);
}

.cultural-warning-header h2 {
    margin: 0;
    font-size: 1.8em;
    color: var(--ochre);
    border-bottom: none;
    padding-bottom: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--ochre);
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cultural-warning-body {
    padding: 24px;
    color: #111111;
    line-height: 1.6;
}

.cultural-warning-body p {
    margin-bottom: 12px;
}

.cultural-warning-body ul {
    margin-top: 5px;
    margin-bottom: 15px;
    padding-left: 20px;
}

.cultural-warning-footer {
    padding: 20px 24px;
    background-color: var(--cream);
    border-top: 1px solid var(--ochre);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary {
    background-color: var(--deep-red);
    color: var(--white);
    border: none;
    padding: 10px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    transition: 0.3s;
}

.btn-primary:hover {
    background-color: var(--ochre);
    color: var(--black);
}

/* Contact Form Styles */
.contact-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5em;
    color: var(--deep-red);
    margin-bottom: 10px;
}

.page-header .subtitle {
    font-size: 1.1em;
    color: #666;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.contact-info {
    background: var(--cream);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--deep-red);
}

.contact-info h2 {
    color: var(--deep-red);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.contact-info a {
    color: var(--deep-red);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-form-wrapper h2 {
    color: var(--deep-red);
    margin-bottom: 20px;
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--deep-red);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--deep-red);
    box-shadow: 0 0 5px rgba(139, 58, 58, 0.3);
}

.form-group textarea {
    resize: vertical;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
