/* DINGO 2030 NETWORK - Flat Website Theme */

:root {
    /* Brand Colours - Extracted from Dingo 2030 Logo */
    --brand-rust: #D68C5E;     /* The Dingo Icon colour */
    --brand-teal: #4F756F;     /* The Logo Text colour */
    --brand-teal-dark: #3A5550;
    --brand-charcoal: #2C3E50;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    
    /* Spacing & Layout */
    --container-width: 1140px;
    --header-height: 115px; /* Approximate height with padding and logo */
    --border-radius: 12px; /* Softer corners */
}

/* Reset & Base Typography */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.7;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll only */
    overflow-y: auto; /* Explicitly allow vertical scrolling */
}

h1, h2, h3, h4 {
    color: var(--brand-charcoal);
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

h1 { font-size: 4rem; letter-spacing: -2px; }
h2 { 
    font-size: 2.75rem; 
    letter-spacing: -1px; 
    position: relative;
    display: inline-block;
}
h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-rust), var(--brand-teal));
    border-radius: 2px;
}
.text-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}
h3 { font-size: 1.75rem; color: var(--brand-teal); font-weight: 700; }

a { text-decoration: none; color: inherit; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
img { max-width: 100%; display: block; border-radius: var(--border-radius); }

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

header .container {
    height: 100%;
}

.text-center { text-align: center; }
.section-padding { padding: 100px 0; }
.content-section {
    padding: 60px 0;
}
.bg-white { background-color: var(--bg-white); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 50px; /* Modern pill shape */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--brand-rust);
    color: white;
    box-shadow: 0 4px 14px rgba(214, 140, 94, 0.39);
}
.btn-primary:hover {
    background-color: #BF784B;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(214, 140, 94, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--brand-rust);
    color: var(--brand-rust);
}
.btn-secondary:hover {
    background-color: var(--brand-rust);
    color: white;
    transform: translateY(-3px);
}

.btn-nav {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--brand-rust);
    color: white;
    padding: 12px 24px;
    font-size: 1.08rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    /* Override .btn class properties */
    border: none;
}
.btn-nav:hover { 
    background-color: #BF784B; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 140, 94, 0.3);
}

/* Header & Navigation */
header {
    background: white;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

/* Hide header when scrolling down on mobile */
header.header-hidden {
    transform: translateY(-100%);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-lockup {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-lockup:hover {
    opacity: 0.85;
}

.logo-img { 
    height: 110px; 
    width: auto; 
    border-radius: 0; 
    object-fit: contain;
    display: block;
}


nav ul { 
    display: flex; 
    gap: 40px; 
    align-items: center; 
    list-style: none; 
    margin: 0;
    padding: 0;
}

nav a { 
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 600; 
    color: var(--brand-charcoal); 
    font-size: 1.08rem; /* 20% larger than 0.9rem */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
    position: relative;
}

/* Donate button matches nav link size and font exactly */
nav a.btn-nav {
    font-size: 1.08rem !important;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

nav a:hover { 
    color: var(--brand-rust); 
}

nav a[style*="color:var(--brand-rust)"] {
    color: var(--brand-rust) !important;
}

/* Desktop nav visibility */
#desktop-nav {
    display: block;
}

#desktop-nav ul {
    display: flex;
    gap: 40px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Card Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    align-items: start;
}

/* Network Grid - 4 columns by 4 rows */
.network-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    background: transparent;
}

.partner-logo-placeholder {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(79, 117, 111, 0.3);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-height: 150px;
}

.partner-logo-placeholder:hover {
    border-color: var(--brand-rust);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

/* Partner logo images will replace placeholders */
.network-grid img {
    width: 100%;
    height: 100%;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    padding: 20px;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.network-grid img:hover {
    transform: scale(1.05);
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 4px solid var(--brand-teal);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-teal), var(--brand-rust));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.card:hover::before {
    transform: scaleX(1);
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    border-top-color: var(--brand-rust);
}
.card-body { flex-grow: 1; }
.card-body i {
    display: inline-block;
    transition: transform 0.3s ease;
}
.card:hover .card-body i {
    transform: scale(1.1) rotate(5deg);
}
.card-footer { margin-top: 30px; }

/* PAGE: Home Specifics */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.55), rgba(44, 62, 80, 0.35)), url('images/TM_DINGOES0015.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--bg-light);
    z-index: 1;
}
.hero .container {
    position: relative;
    z-index: 2;
}
.hero h1 { 
    color: white; 
    margin-bottom: 30px; 
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 4.5rem;
    line-height: 1.1;
}
.hero p { 
    font-size: 1.4rem; 
    max-width: 700px; 
    margin-bottom: 50px; 
    opacity: 0.95; 
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.6;
    text-align: left;
}
.hero .btn {
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll only */
    overflow-y: auto; /* Explicitly allow vertical scrolling */
}

/* Selection styling */
::selection {
    background: var(--brand-rust);
    color: white;
}
::-moz-selection {
    background: var(--brand-rust);
    color: white;
}

.supporters-strip {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 60px 0;
}
.logos-grid {
    display: flex;
    justify-content: space-around;
    opacity: 0.5;
    align-items: center;
    filter: grayscale(100%);
    transition: 0.3s;
}
.logos-grid:hover { opacity: 0.8; filter: grayscale(0%); }

.cta-strip {
    background: linear-gradient(135deg, var(--brand-teal), var(--brand-teal-dark));
    color: white;
    padding: 100px 0;
    text-align: center;
}
.cta-strip h2 { color: white; margin-bottom: 40px; }
.cta-strip .btn { border-color: white; color: white; margin: 10px; border-radius: 50px; }
.cta-strip .btn:hover { background: white; color: var(--brand-teal); transform: scale(1.05); }

/* PAGE: Map Specifics */
.map-layout { 
    display: flex; 
    flex-direction: column; 
    height: calc(100vh - 80px - 130px - 200px);
    min-height: 500px;
    padding-bottom: 0; 
    box-sizing: border-box;
}
.map-toolbar {
    background: white;
    padding: 24px 40px;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.map-toolbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.map-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.map-toolbar-credit {
    margin-left: auto;
}

.state-selector {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--brand-charcoal);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.state-selector:hover {
    border-color: var(--brand-teal);
}

.state-selector:focus {
    outline: none;
    border-color: var(--brand-rust);
    box-shadow: 0 0 0 3px rgba(214, 140, 94, 0.1);
}
.map-container { 
    flex: 1;
    position: relative; 
    background: #e0e0e0; 
    overflow: hidden;
    min-height: 400px;
}
.map-container #nsw-parks-map {
    width: 100%;
    height: 100%;
    z-index: 1;
    min-height: 400px;
}

.map-legend {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    min-width: 220px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.map-details {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 24px 28px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    min-width: 280px;
    max-width: 320px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* PAGE: Library Specifics */
.filters-bar {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    align-items: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background: #596e71;
    color: #ffffff;
    padding: 80px 0 40px;
    font-size: 0.95rem;
    margin-top: 0;
}
footer h4 { 
    color: white; 
    margin-bottom: 25px; 
    font-size: 1.25rem; 
    font-weight: 700;
}
footer a { 
    color: #ffffff;
    transition: color 0.3s ease;
    opacity: 0.95;
}
footer a:hover { 
    color: #ffffff; 
    opacity: 1;
    text-decoration: underline;
}
footer ul li {
    transition: transform 0.2s ease;
}
footer ul li:hover {
    transform: translateX(5px);
}
footer i {
    transition: transform 0.3s ease;
    cursor: pointer;
}
footer i:hover {
    transform: scale(1.2);
    color: var(--brand-rust);
}

/* PRESERVE EXISTING MAP STYLING */
.map-section { 
    padding: 100px 0;
}
.map-section .container {
    max-width: 1200px;
}
.map-section h2 { 
    margin-bottom: 3rem; 
}
.map-wrapper { 
    background: white; 
    padding: 2rem; 
    border-radius: var(--border-radius); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}
#nsw-parks-map { 
    width: 100%; 
    height: 80vh; 
    min-height: 600px; 
    border-radius: 8px; 
    z-index: 1; 
}

/* PRESERVE EXISTING DONATION SECTION */
.donation-section { 
    padding: 100px 0;
}
.donation-section .container {
    max-width: 1200px;
}
.donation-section h2 { 
    margin-bottom: 3rem; 
}
.raisely-donate { 
    display: flex; 
    justify-content: center; 
    margin: 0 auto;
}

/* PRESERVE EXISTING GIPA DOCUMENT STYLING */
#gipa-document-container { 
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 0 24px; 
}
#gipa-document-container .container {
    max-width: 1000px;
}
.gipa-doc-item { 
    border-bottom: 1px solid #f1f1f1; 
    padding: 30px 0; 
    transition: padding 0.3s ease;
}
.gipa-doc-item:hover {
    padding-left: 15px;
    border-left: 3px solid var(--brand-rust);
}
.gipa-doc-title { 
    font-weight: 700; 
    font-size: 1.25rem; 
    color: var(--brand-teal); 
    transition: color 0.3s ease;
}
.gipa-doc-title:hover { 
    color: var(--brand-rust); 
    text-decoration: underline; 
}
.gipa-doc-desc { 
    margin-top: 10px; 
    color: #718096; 
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    .hero h1 { font-size: 3.5rem; }
    .grid-3 { grid-template-columns: 1fr; gap: 30px; }
    .section-padding { padding: 80px 0; }
    .network-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
@media (max-width: 768px) {
    header { 
        padding: 12px 0; 
    }
    .nav-flex { 
        flex-direction: row; 
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }
    .logo-img { 
        height: 90px; 
    }
    /* Hide desktop nav on mobile */
    #desktop-nav,
    #desktop-nav ul,
    #desktop-nav li,
    #desktop-nav a {
        display: none !important;
    }
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--brand-charcoal);
        cursor: pointer;
        padding: 8px;
        border-radius: 6px;
        transition: background-color 0.2s ease;
        margin-left: auto;
    }
    .mobile-menu-btn:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    .mobile-menu-btn svg {
        width: 28px;
        height: 28px;
        stroke: var(--brand-charcoal);
    }
    .section-padding { padding: 60px 0; }
    .network-grid { grid-template-columns: 1fr; gap: 20px; }
    .hero { 
        height: 70vh; 
        min-height: 500px;
        text-align: center; 
        background-attachment: scroll;
        background: linear-gradient(rgba(44, 62, 80, 0.45), rgba(44, 62, 80, 0.25)), url('images/TM_DINGOES0015.jpg');
        background-size: cover;
        background-position: center center;
    }
    .hero::before {
        height: 1px;
        background: var(--bg-light);
    }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .card { padding: 30px 20px; }
    h2 { font-size: 2rem; }
    .map-layout { 
        height: calc(100vh - 140px - 320px); 
        min-height: calc(100vh - 140px - 320px);
        padding-bottom: 0;
    }
    .map-toolbar {
        padding: 15px 20px;
    }
    .map-toolbar-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }
    .map-toolbar-content h2 {
        font-size: 1.1rem;
    }
    .map-toolbar-controls {
        width: 100%;
        justify-content: center;
    }
    .state-selector {
        width: 100%;
        min-width: auto;
    }
    .map-toolbar-content > span,
    .map-toolbar-credit {
        margin-left: 0;
        font-size: 0.75rem;
        text-align: center;
        width: 100%;
    }
    .filters-bar {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    .filters-bar > div:first-child {
        width: 100%;
    }
    .filters-bar input {
        width: 100% !important;
    }
    .map-legend {
        top: 10px;
        left: 10px;
        padding: 16px 18px;
        min-width: 180px;
    }
    .map-details {
        top: 10px;
        right: 10px;
        padding: 18px 20px;
        min-width: 240px;
        max-width: 280px;
    }
    
    /* Responsive minimap sizing for mobile */
    .leaflet-control-minimap {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Ensure minimap doesn't get cut off */
    .leaflet-bottom.leaflet-right {
        bottom: 10px !important;
        right: 10px !important;
    }
    
    /* Adjust map container for mobile to prevent cutoff */
    .map-container {
        padding-bottom: 0;
    }
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--brand-charcoal);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.mobile-menu-btn svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}

.mobile-menu {
    display: none;
}

.mobile-menu.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        display: block;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 2001;
    }

    .mobile-menu-panel {
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 320px;
        max-width: 85vw;
        background-color: transparent;
        z-index: 2002;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding-top: 100px;
        padding-bottom: 2rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .mobile-menu:not(.hidden) .mobile-menu-panel {
        transform: translateX(0);
    }

    .mobile-menu-close {
        position: fixed;
        top: 12px;
        right: 24px;
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        color: white;
        cursor: pointer;
        padding: 8px;
        border-radius: 6px;
        transition: all 0.2s ease;
        z-index: 2003;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .mobile-menu-close:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }

    .mobile-menu-close svg {
        width: 28px;
        height: 28px;
    }

    .mobile-menu-content {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        background-color: rgba(0, 0, 0, 0.6);
        padding: 1.5rem;
        border-radius: 0.75rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .mobile-menu-link {
        display: block;
        padding: 1rem 1.25rem;
        color: white;
        text-decoration: none;
        font-size: 1.25rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
        opacity: 0;
        transform: translateX(20px);
    }

    .mobile-menu:not(.hidden) .mobile-menu-link {
        opacity: 1;
        transform: translateX(0);
    }

    .mobile-menu-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateX(4px);
    }

    .mobile-menu-donate {
        background-color: var(--brand-rust);
        color: white;
        margin-top: 0.5rem;
    }

    .mobile-menu-donate:hover {
        background-color: #BF784B;
        transform: translateX(4px);
    }

    /* Stagger animation for menu links */
    .mobile-menu-link:nth-child(1) {
        transition-delay: 0.05s;
    }
    .mobile-menu-link:nth-child(2) {
        transition-delay: 0.1s;
    }
    .mobile-menu-link:nth-child(3) {
        transition-delay: 0.15s;
    }
    .mobile-menu-link:nth-child(4) {
        transition-delay: 0.2s;
    }
}
