:root {
    /* Light Theme Variables */
    --bg-color: #faf8fc;
    --text-color: #4a4a4a;
    --text-muted: #777777;
    --primary-color: #5d3a8e;
    --secondary-color: #e5d9f2;
    --accent-color: #d4af37; /* Elegant Gold */
    --header-bg: rgba(250, 248, 252, 0.95);
    --footer-bg: #2a2a2a;
    --footer-text: #dcdcdc;
    --card-bg: #ffffff;
    --shadow-soft: 0 10px 40px rgba(93, 58, 142, 0.08);
    --shadow-hover: 0 15px 50px rgba(93, 58, 142, 0.15);
    --link-highlight: var(--primary-color);
}

:root[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-color: #121212;
    --text-color: #e4e4e4;
    --text-muted: #a0a0a0;
    --primary-color: #a782d9;
    --secondary-color: #2d1b4e;
    --accent-color: #e5c158;
    --header-bg: rgba(18, 18, 18, 0.95);
    --footer-bg: #0a0a0a;
    --footer-text: #a0a0a0;
    --card-bg: #1e1e1e;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.7);
    --link-highlight: var(--accent-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2 {
    font-family: 'Architects Daughter', cursive;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
h3, h4 {
    font-family: 'Bree Serif', serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-highlight);
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-section {
    margin: 40px 0;
}

/* Header & Nav */
.site-header { 
    background-color: var(--header-bg); 
    height: 190px;
    padding-top: 5px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--secondary-color);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.header-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; width: 100%; position: relative; height: 100%; }
.logo a { font-family: 'Bree Serif', serif; font-size: 24px; color: var(--primary-color); }

/* Dark Mode Logo Swap */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline-block; }

/* Header Right Content */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 25px;
    flex: 1;
}
.header-info {
    text-align: right;
    margin-right: 130px; /* Safe space for Dark Mode button */
}
.header-tagline {
    font-family: 'Architects Daughter', cursive;
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}
.header-contact { font-size: 15px; color: var(--text-muted); }
.header-contact a { color: var(--text-color); font-weight: bold; transition: color 0.3s ease; }
.header-contact a:hover { color: var(--link-highlight); }

.main-nav ul { list-style: none; display: flex; gap: 35px; }
.main-nav a { 
    font-family: 'Bree Serif', serif; 
    font-size: 19px; 
    font-weight: 600; 
    position: relative;
    padding-bottom: 5px;
}

/* Animated Menu Underline & Active State */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--link-highlight);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a:hover, .main-nav a.active { color: var(--link-highlight); }

.theme-toggle {
    position: absolute;
    top: 15px;
    right: 0px;
}

/* Theme Toggle Button */
#theme-switch { 
    background: transparent; border: 2px solid var(--primary-color); padding: 6px 14px; 
    border-radius: 20px; cursor: pointer; font-family: 'Raleway', sans-serif; 
    font-weight: bold; color: var(--text-color); font-size: 13px; transition: all 0.3s ease; 
}
#theme-switch:hover { background: var(--primary-color); color: #fff; }

/* Hamburger Menu Button (Hidden on Desktop) */
.hamburger-btn { display: none; }

/* Responsive Header & Nav */
@media (max-width: 850px) {
    .site-header { 
        height: auto; 
        padding: 15px 0; 
        position: relative; /* Un-stick on small screens to save screen space */
    }
    .header-inner { 
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "logo logo logo"
            "burger . theme"
            "right right right";
        gap: 15px; 
        padding-top: 0; 
        align-items: center;
    }
    .logo { grid-area: logo; text-align: center; }
    .logo img { width: 140px !important; }
    
    .header-right { grid-area: right; align-items: center; gap: 15px; width: 100%; }
    .header-info { margin-right: 0; text-align: center; }
    .header-tagline { font-size: 20px; }
    .header-contact { font-size: 14px; }
    
    /* Hamburger Button */
    .hamburger-btn {
        grid-area: burger;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        background: none;
        border: none;
        position: static;
        cursor: pointer;
        z-index: 1001;
        padding: 5px;
    }
    .hamburger-btn span {
        display: block;
        width: 30px;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    :root[data-theme="dark"] .hamburger-btn span { background-color: var(--text-color); }
    
    /* Hamburger Animation */
    .hamburger-btn.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger-btn.active span:nth-child(2) { opacity: 0; }
    .hamburger-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* Hidden Menu by Default */
    .main-nav {
        display: none;
        width: 100%;
        background: var(--card-bg);
        padding: 20px;
        border-radius: 10px;
        box-shadow: var(--shadow-soft);
        animation: slideDown 0.3s ease forwards;
    }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; align-items: center; gap: 20px; }
    .main-nav a { font-size: 18px; }
    
    .theme-toggle { grid-area: theme; position: static; margin: 0; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.site-footer { background-color: var(--footer-bg); color: var(--footer-text); padding: 50px 0; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; text-align: left; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h4 { font-family: 'Bree Serif', serif; font-size: 20px; color: var(--accent-color); margin-bottom: 15px; }
.footer-col p { margin-bottom: 5px; line-height: 1.6; }
.footer-col a { color: var(--footer-text); transition: color 0.3s ease; }
.footer-col a:hover { color: var(--accent-color); }
.footer-credits { text-align: right; display: flex; flex-direction: column; justify-content: flex-end; }

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-credits { text-align: center; }
}

/* Footer Credit Link */
.repair-it a { color: #0e5d03; font-weight: bold; }

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg, #ffffff);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    padding: 20px 0;
    border-top: 1px solid var(--secondary-color, #e0e0e0);
    transform: translateY(100%);
    animation: slideUp 0.5s forwards 0.5s; /* Slide up gracefully after 0.5s */
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color, #444);
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cookie-accept {
    background: var(--primary-color, #5d3a8e);
    color: #fff;
    border: none;
}

.cookie-accept:hover {
    filter: brightness(1.1);
}

.cookie-decline {
    background: transparent;
    color: var(--text-muted, #777);
    border: 1px solid var(--text-muted, #ccc);
}

.cookie-decline:hover {
    background: var(--secondary-color, #f4f4f4);
    color: var(--text-color, #333);
}

[data-theme="dark"] .cookie-banner {
    border-top: 1px solid #333;
}

[data-theme="dark"] .cookie-decline:hover {
    background: var(--secondary-color, #2a2a2a);
}

@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    .cookie-btn {
        flex: 1;
    }
}