/* --- CSS Variables (Design Tokens) --- */
:root {
    --primary-color: #4A5D23; /* Earthy Green */
    --primary-light: #6b8436;
    --secondary-color: #C17767; /* Terracotta / Clay */
    --accent-color: #E2C044; /* Wheat / Sun */
    --bg-color: #FDFBF7; /* Off-white / Sand */
    --surface-color: #FFFFFF;
    --text-main: #2D3128;
    --text-muted: #626A59;
    --border-color: #E6E2D6;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.12);
    
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Placeholder Image Styling */
.img-placeholder {
    background: linear-gradient(135deg, #e0dcd3 0%, #d1cbbd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 500;
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: var(--radius-md);
}

.img-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.img-placeholder-content {
    text-align: center;
}

/* --- Layout --- */
main {
    min-height: calc(100vh - 300px); /* Adjust based on navbar/footer height */
    padding-top: 80px; /* Space for sticky navbar */
    animation: fadeIn 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--surface-color);
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
    z-index: 1001;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-bottom: 4rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(45, 49, 40, 0.6), rgba(45, 49, 40, 0.6));
    z-index: 1;
}

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

.hero h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
}
.btn-secondary:hover {
    background-color: #a56152;
}

/* --- Sections & Cards --- */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-link {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
}
.card-link:hover {
    text-decoration: underline;
}

/* --- Page Content (Text Heavy) --- */
.page-header {
    background-color: var(--primary-color);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
    margin-top: -80px; /* Offset for sticky nav */
}

.page-header h1 {
    color: white;
    font-size: 3rem;
}

.content-wrapper {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
    margin-top: -3rem;
    position: relative;
    z-index: 10;
    margin-bottom: 4rem;
}

.content-body h2 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

.content-body p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-main);
}

.content-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.feature-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}
.gallery-item:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* --- Contact Form --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 93, 35, 0.1);
}

/* --- Footer --- */
.footer {
    background-color: #2D3128;
    color: #FDFBF7;
    padding: 4rem 0 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: #b5baad;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul a {
    color: #b5baad;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #1a1c17;
    text-align: center;
    padding: 1.5rem 0;
    color: #8a9080;
    font-size: 0.9rem;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide by default on mobile */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-btn {
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        background-color: var(--bg-color);
        margin-top: 10px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content > * {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content > * {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--secondary-color);
}

/* --- Home Widgets --- */
.visitor-counter {
    position: fixed;
    bottom: 60px;
    left: 20px;
    background: rgba(45, 49, 40, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    font-weight: 500;
}

.news-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--primary-color);
    color: white;
    height: 40px;
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.ticker-title {
    background: var(--secondary-color);
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    z-index: 2;
    white-space: nowrap;
}

.ticker-content {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ticker-text {
    position: absolute;
    white-space: nowrap;
    line-height: 40px;
    animation: ticker 25s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

.weather-section {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    margin-bottom: 2rem;
}

.weather-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
}

.weather-info {
    flex-grow: 1;
    margin-left: 1.5rem;
}

.weather-icon i {
    font-size: 3.5rem;
    color: var(--accent-color);
}

.weather-info h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.weather-temp {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
    color: var(--text-main);
}

/* --- Scroll to Top --- */
.scroll-to-top {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* --- Added Widgets --- */
.digital-clock {
    position: fixed;
    bottom: 60px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ffcc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
    z-index: 1000;
    font-weight: bold;
    letter-spacing: 2px;
}

.mini-calendar {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 100px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1000;
    text-align: center;
    border: 1px solid var(--border-color);
}

.cal-month {
    background: #d93838;
    color: white;
    font-weight: bold;
    padding: 5px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.cal-day {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-main);
    padding: 5px 0;
    line-height: 1;
}

.cal-weekday {
    font-size: 0.8rem;
    color: var(--text-light);
    padding-bottom: 8px;
    text-transform: uppercase;
}

/* --- Ad Popup --- */
.ad-popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ad-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.ad-popup-content {
    width: 350px;
    min-height: 300px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-main);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ad-popup-overlay.show .ad-popup-content {
    transform: scale(1);
}

.ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-image-container {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    position: relative;
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-image-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    text-align: center;
    font-size: 0.9rem;
    padding: 1rem;
}

.ad-popup-text {
    padding: 1rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    z-index: 2;
    transition: color 0.2s;
}

.ad-popup-close:hover {
    color: var(--secondary-color);
}
