/* =========================================
   1. BASE & VARIABLES
========================================= */
:root {
    /* Exact BlyLekker Logo Colors */
    --brand-navy: #002855; 
    --brand-orange: #FF6600;
    
    /* Layout Colors */
    --bg-white: #FFFFFF; 
    --bg-blue-grey: #F0F4F8; /* Subtle blue/grey for alternating sections */
    --card-bg: #FFFFFF;
    --text-main: #333333;
    --border-subtle: rgba(0, 40, 85, 0.1); /* Tinted navy border */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
}

a { 
    text-decoration: none; 
    color: inherit; 
}

/* =========================================
   2. NAVIGATION & SEARCH
========================================= */
.main-nav {
    background-color: var(--bg-white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 75px; 
    width: auto;
    display: block;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-blue-grey);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    padding: 5px 5px 5px 20px;
    width: 100%;
    max-width: 400px;
    transition: box-shadow 0.3s ease;
}

.search-form:focus-within {
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2);
    border-color: var(--brand-orange);
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    flex-grow: 1;
    font-size: 1rem;
    color: var(--text-main);
}

.search-btn {
    background-color: var(--brand-navy);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 10px 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-btn:hover {
    background-color: var(--brand-orange);
}

@media (max-width: 768px) {
    .nav-container { 
        flex-direction: column; 
        gap: 15px; 
    } 
    .search-form { 
        max-width: 100%; 
    }
}

/* =========================================
   3. HERO SECTIONS & INFO BARS
========================================= */
.hero {
    position: relative;
    width: 100%;
    height: 60vh;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #FFF;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--brand-orange);
    margin-top: 10px;
}

.hero-province-label { 
    color: var(--brand-orange); 
    font-size: 1.2rem; 
    letter-spacing: 3px; 
    margin-bottom: 10px; 
    font-weight: bold; 
}
.town-hero { height: 45vh; }

.town-info-bar { 
    background: #fff; 
    padding: 20px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    flex-wrap: wrap; 
    gap: 20px; 
}
.info-widget { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-weight: bold; 
    color: var(--brand-navy); 
    font-size: 1.1rem; 
}
.weather-icon { 
    width: 45px; 
    height: 45px; 
    background: var(--bg-blue-grey); 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
#distance-text { 
    transition: opacity 0.5s ease; 
}

/* Rotating Landing Page Hero */
.hero-slider {
    position: relative;
    height: 70vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider .slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-slider .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.hero-slider h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-slider h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    opacity: 0.9;
}

/* =========================================
   4. LAYOUT & SECTIONS (TOWN SPECIFIC)
========================================= */
.content-section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.bg-alt { 
    background-color: var(--bg-blue-grey); 
    border-top: 1px solid var(--border-subtle); 
    border-bottom: 1px solid var(--border-subtle); 
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    color: var(--brand-navy);
    font-size: 2.2rem;
}

.town-tabs-nav { 
    background: var(--bg-white); 
    border-bottom: 1px solid var(--border-subtle); 
    position: sticky; 
    top: 95px; 
    z-index: 90; 
}
.tabs-container { 
    max-width: 1400px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: center; 
    overflow-x: auto; 
    white-space: nowrap; 
}
.tab-link { 
    padding: 20px 25px; 
    color: var(--text-main); 
    font-weight: bold; 
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    border-bottom: 4px solid transparent; 
    transition: all 0.2s; 
}
.tab-link:hover { 
    color: var(--brand-orange); 
}
.tab-link.active { 
    color: var(--brand-orange); 
    border-bottom: 4px solid var(--brand-orange); 
}

.explore-layout { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: start; 
}
.explore-map-container { 
    background: #fff; 
    padding: 10px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border: 1px solid var(--border-subtle); 
}
#town-specific-map { 
    width: 100%; 
    height: 400px; 
    border-radius: 4px; 
}
@media (max-width: 900px) { 
    .explore-layout { 
        grid-template-columns: 1fr; 
    } 
}

/* =========================================
   5. GRIDS & INTERACTIVE CARDS
========================================= */

/* Directory Grid (Town Pages) */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Province Grid (Fixed 3 Columns on Desktop) */
.province-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Province Interactive Cards */
.province-card { 
    position: relative; 
    height: 300px; 
    background-size: cover; 
    background-position: center; 
    border-radius: 8px; 
    overflow: hidden; 
    color: white; 
    display: flex; 
    align-items: flex-end; 
    border: 3px solid transparent; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.province-card:hover { 
    transform: translateY(-7px); 
    border: 3px solid var(--brand-orange); 
    box-shadow: 0 15px 30px rgba(0, 40, 85, 0.25); 
}

.province-overlay {
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0, 40, 85, 0.9), transparent);
}

.province-overlay h3 { 
    font-size: 1.5rem; 
    margin-bottom: 5px; 
}

.listing-count { 
    font-size: 0.9rem; 
    color: var(--brand-orange); 
    font-weight: bold; 
}

@media (max-width: 768px) {
    .province-grid { 
        grid-template-columns: 1fr; 
    } 
    .province-card { 
        height: 250px; 
    }
}

/* Listing & Blog Grids */
.recent-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Interactive Listing & Blog Cards */
.listing-card, .blog-card { 
    background: var(--card-bg); 
    border: 1px solid var(--border-subtle); 
    border-bottom: 4px solid var(--brand-navy); 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0, 0, 85, 0.03); 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.listing-card:hover, .blog-card:hover { 
    transform: translateY(-7px); 
    border-bottom: 4px solid var(--brand-orange); 
    box-shadow: 0 15px 25px rgba(0, 40, 85, 0.12), 0 0 0 1px rgba(255, 102, 0, 0.05); 
}

.listing-image, .blog-image { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    position: relative; 
    background-size: cover; 
    background-position: center; 
}

.badge {
    position: absolute;
    top: 15px;
    left: 0;
    background-color: var(--brand-navy);
    color: #FFF;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge.explore { 
    background-color: var(--brand-orange); 
}

.listing-content, .blog-content { 
    padding: 20px; 
}

.listing-title, .blog-content h3 { 
    color: var(--brand-navy); 
    font-size: 1.4rem; 
    margin-bottom: 10px; 
}

.blog-date { 
    color: var(--brand-orange); 
    font-size: 0.85rem; 
    font-weight: bold; 
    text-transform: uppercase; 
}

.read-more { 
    display: inline-block; 
    margin-top: 15px; 
    color: var(--brand-navy); 
    font-weight: bold; 
}

/* Hide Blog Section on Mobile */
@media (max-width: 768px) {
    .blog-section { 
        display: none; 
    }
}

/* Town Uniform Cards */
.uniform-card { 
    display: flex; 
    flex-direction: column; 
    height: 450px; 
    background: var(--card-bg); 
    border: 1px solid var(--border-subtle); 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0, 0, 85, 0.03); 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.uniform-card:hover { 
    transform: translateY(-7px); 
    box-shadow: 0 15px 25px rgba(0, 40, 85, 0.12), 0 0 0 1px rgba(255, 102, 0, 0.05); 
}

.premium-card { border-bottom: 4px solid var(--brand-navy); }
.premium-card:hover { border-bottom: 4px solid var(--brand-orange); }
.basic-card { border-bottom: 4px solid #aaa; }
.basic-card:hover { border-bottom: 4px solid #666; }

.uniform-card .listing-image { height: 200px; flex-shrink: 0; background-color: #e0e0e0; background-size: cover; background-position: center; position: relative; }
.uniform-card .listing-content { flex-grow: 1; display: flex; flex-direction: column; padding: 20px; }
.uniform-card .listing-title { color: var(--brand-navy); font-size: 1.4rem; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uniform-card .listing-tagline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #666; margin: 0; }

.card-actions { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--border-subtle); display: flex; gap: 10px; flex-wrap: wrap;}

/* =========================================
   6. BUTTONS & UI ELEMENTS
========================================= */
.btn-primary { 
    background: var(--brand-navy); 
    color: white; 
    padding: 10px 15px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.2s; 
}
.btn-primary:hover { 
    background: var(--brand-orange); 
}

.btn-secondary { 
    background: transparent; 
    color: var(--brand-navy); 
    border: 2px solid var(--brand-navy); 
    padding: 8px 15px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.2s; 
}
.btn-secondary:hover { 
    background: var(--brand-navy); 
    color: white; 
}

.btn-premium-pill, .btn-explore-all {
    background-color: #ffffff;
    color: var(--brand-navy);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
    background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(to right, var(--brand-navy), var(--brand-orange));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
}
.btn-premium-pill:hover, .btn-explore-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 102, 0, 0.15);
    color: var(--brand-orange);
}

.pagination { display: flex; justify-content: center; gap: 10px; }
.page-link { padding: 8px 16px; background: white; border: 1px solid var(--border-subtle); border-radius: 4px; color: var(--brand-navy); font-weight: bold; transition: all 0.2s; }
.page-link.active { background: var(--brand-navy); color: white; border-color: var(--brand-navy); }
.page-link:hover:not(.active) { background: var(--bg-blue-grey); color: var(--brand-orange); }

/* =========================================
   7. FOOTER
========================================= */
.site-footer {
    background-color: var(--bg-white);
    color: var(--text-main);
    border-top: 5px solid var(--brand-orange);
    padding: 60px 5% 20px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* Footer Logo */
.footer-logo { 
    height: 85px; 
    margin-bottom: 15px; 
    display: block; 
}

.social-icons { 
    margin-top: 15px; 
    display: flex; 
    gap: 10px; 
}

.footer-col h4 { 
    color: var(--brand-orange); 
    margin-bottom: 20px; 
    font-size: 1.2rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

.footer-col ul { 
    list-style: none; 
}

.footer-col ul li { 
    margin-bottom: 12px; 
    font-weight: 500; 
}

.footer-col ul a, .contact-col a { 
    color: var(--text-main); 
    transition: color 0.2s; 
}

.footer-col ul a:hover, .contact-col a:hover { 
    color: var(--brand-orange); 
}

.contact-col p { 
    margin-bottom: 15px; 
    font-size: 0.95rem; 
}

.contact-col a { 
    color: var(--brand-navy); 
    font-weight: bold; 
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--border-subtle);
    color: #666;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legal-links a { 
    color: #666; 
    transition: color 0.2s; 
}

.legal-links a:hover { 
    color: var(--brand-orange); 
}

/* =========================================
   8. COOKIE CONSENT BANNER
========================================= */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--brand-navy);
    color: white;
    padding: 15px 5%;
    display: none; 
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-consent p { 
    margin-right: 20px; 
    font-size: 0.9rem; 
}

.cookie-consent a { 
    color: var(--brand-orange); 
    text-decoration: underline; 
}

.btn-primary.cookie-btn { 
    background: var(--brand-orange); 
    color: white; 
    border: none; 
    padding: 8px 20px; 
    border-radius: 4px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: background 0.2s; 
}

.btn-primary.cookie-btn:hover { 
    filter: brightness(1.1); 
}

@media (max-width: 768px) {
    .cookie-consent { 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
}