/* Base Styles */
:root {
    /* Light Theme */
    --background-color-light: #f4f7f6;
    --text-color-light: #333;
    --header-bg-light: #ffffff;
    --header-text-light: #333;
    --header-border-light: #e0e0e0;
    --footer-bg-light: #333;
    --footer-text-light: #f4f7f6;
    --link-color-light: #007bff;
    --hover-color-light: #0056b3;
    --menu-toggle-bg-light: #333;

    /* Dark Theme */
    --background-color-dark: #1a1a2e;
    --text-color-dark: #e0e0e0;
    --header-bg-dark: #16213e;
    --header-text-dark: #e0e0e0;
    --header-border-dark: #0f3460;
    --footer-bg-dark: #0f3460;
    --footer-text-dark: #e0e0e0;
    --link-color-dark: #e94560;
    --hover-color-dark: #c0392b;
    --menu-toggle-bg-dark: #e0e0e0;

    /* Current Theme Variables (will be set by JS) */
    --bg-color: var(--background-color-light);
    --text-color: var(--text-color-light);
    --header-bg: var(--header-bg-light);
    --header-text: var(--header-text-light);
    --header-border: var(--header-border-light);
    --footer-bg: var(--footer-bg-light);
    --footer-text: var(--footer-text-light);
    --link-color: var(--link-color-light);
    --hover-color: var(--hover-color-light);
    --menu-toggle-bg: var(--menu-toggle-bg-light);
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Style Switcher */
.style-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--header-bg);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    align-items: center;
}

.style-switcher button,
.style-switcher select {
    padding: 8px 12px;
    border: 1px solid var(--header-border);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.style-switcher button:hover,
.style-switcher select:hover {
    background-color: var(--header-border);
}


/* Header Base Styles */
.header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--header-border);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: none; /* Hidden by default, JS will show the active one */
}

.header.active {
    display: block;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo a {
    font-size: 28px;
    font-weight: 700;
    color: var(--header-text);
    letter-spacing: 1px;
}

.header .main-nav ul {
    display: flex;
    gap: 30px;
}

.header .main-nav a {
    color: var(--header-text);
    font-weight: 600;
    font-size: 16px;
    position: relative;
    padding-bottom: 5px;
}

.header .main-nav a:hover {
    color: var(--hover-color);
}

.header .menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 10;
}

.header .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--menu-toggle-bg);
    margin-bottom: 6px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header .menu-toggle span:last-child {
    margin-bottom: 0;
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
    .header .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        border-top: 1px solid var(--header-border);
        transition: transform 0.3s ease-out;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
    }

    .header .main-nav.open {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .header .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .header .menu-toggle {
        display: block;
    }

    /* Menu Toggle Animation */
    .header .menu-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .header .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .header .menu-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}


/* Footer Base Styles */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 20px;
    margin-top: 50px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: none; /* Hidden by default, JS will show the active one */
}

.footer.active {
    display: block;
}

.footer h3, .footer h4 {
    color: var(--footer-text);
    font-size: 18px;
    margin-bottom: 15px;
}

.footer ul {
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: var(--footer-text);
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer ul li a:hover {
    color: var(--link-color); /* Use a distinct hover color for footer links */
}

.footer p {
    font-size: 15px;
    line-height: 1.6;
}

.footer .copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.footer .social-links a {
    display: inline-block;
    margin-right: 15px;
    font-size: 24px;
    color: var(--footer-text);
}
.footer .social-links img {
    filter: invert(100%); /* Make social icons white for dark background */
    width: 25px;
    height: 25px;
    transition: transform 0.3s ease;
}
.footer .social-links a:hover img {
    transform: translateY(-3px);
}

.content {
    padding: 40px 0;
    min-height: 400px;
}


/* --- Style 1: Modern & Minimalist --- */
#header-style1 {
    border-bottom: 2px solid var(--link-color); /* Subtle accent */
}

#header-style1 .main-nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--link-color);
    transition: width .3s;
    position: absolute;
    bottom: 0;
    left: 0;
}

#header-style1 .main-nav a:hover::after {
    width: 100%;
}

#footer-style1 .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

#footer-style1 .footer-col {
    flex: 1;
    min-width: 200px;
}

#footer-style1 .social-links img {
    /* Style 1 specific icon color handling */
    filter: invert(100%); /* Default for dark theme */
}

body.light-theme #footer-style1 .social-links img {
    filter: invert(0%); /* Change to black for light theme */
}


/* --- Style 2: Elegant & Classic (Initially hidden) --- */
#header-style2 {
    background-color: var(--header-bg); /* Use theme variable */
    border-bottom: 1px solid var(--header-border);
    padding: 20px 0;
}

#header-style2 .logo a {
    font-family: 'Georgia', serif;
    font-size: 32px;
    font-style: italic;
    font-weight: normal;
    color: var(--header-text);
}

#header-style2 .main-nav a {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 0.5px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all 0.3s ease;
    color: var(--header-text);
}

#header-style2 .main-nav a:hover {
    border-color: var(--link-color);
    background-color: rgba(var(--link-color-rgb, 0, 123, 255), 0.1); /* Using rgba with RGB values from JS */
    color: var(--hover-color);
}

#footer-style2 {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 25px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#footer-style2 .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 40px;
}

#footer-style2 .footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

#footer-style2 h4 {
    font-family: 'Georgia', serif;
    font-weight: normal;
    margin-bottom: 20px;
    color: var(--footer-text);
    position: relative;
    padding-bottom: 10px;
}

#footer-style2 h4::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 50px;
    height: 1px;
    background-color: var(--link-color);
}

#footer-style2 ul li a {
    font-style: italic;
    color: var(--footer-text);
    transition: color 0.3s ease;
}

#footer-style2 ul li a:hover {
    color: var(--link-color);
}

#footer-style2 address {
    font-style: normal;
    line-height: 1.8;
}

/* --- Style 3: Bold & Geometric (Initially hidden) --- */
#header-style3 {
    background-color: var(--header-bg);
    padding: 25px 0;
    border-bottom: 5px solid var(--link-color); /* Bold accent line */
}

#header-style3 .logo a {
    font-family: 'Arial Black', Gadget, sans-serif;
    font-size: 36px;
    text-transform: uppercase;
    color: var(--header-text);
    letter-spacing: 2px;
}

#header-style3 .main-nav ul {
    gap: 40px;
}

#header-style3 .main-nav a {
    font-family: 'Arial Black', Gadget, sans-serif;
    text-transform: uppercase;
    font-size: 17px;
    color: var(--header-text);
    padding: 10px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

#header-style3 .main-nav a:hover {
    color: var(--link-color);
    transform: translateY(-3px);
}

#footer-style3 {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 30px;
    border-top: 5px solid var(--link-color);
}

#footer-style3 .container {
    padding: 0 40px; /* More padding for a bolder look */
}

#footer-style3 .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

#footer-style3 .grid-item h3 {
    font-family: 'Arial Black', Gadget, sans-serif;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--footer-text);
    position: relative;
    padding-left: 10px;
}

#footer-style3 .grid-item h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background-color: var(--link-color);
}

#footer-style3 ul li a {
    color: var(--footer-text);
    font-size: 16px;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

#footer-style3 ul li a:hover {
    color: var(--link-color);
    padding-left: 10px;
}

#footer-style3 .social-icons a {
    margin-right: 20px;
}

#footer-style3 .social-icons img {
    filter: invert(100%); /* Default for dark theme */
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

body.light-theme #footer-style3 .social-icons img {
    filter: invert(0%); /* Change to black for light theme */
}

#footer-style3 .social-icons a:hover img {
    transform: scale(1.1);
}

/* Responsive adjustments for specific styles */
@media (max-width: 768px) {
    #footer-style1 .container {
        flex-direction: column;
        text-align: center;
    }
    #footer-style1 .social-links {
        text-align: center;
    }

    #footer-style2 .container {
        flex-direction: column;
    }
    #footer-style2 .footer-section {
        text-align: center;
    }
    #footer-style2 h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    #footer-style3 .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    #footer-style3 .grid-item h3::before {
        display: none; /* Hide vertical line on small screens */
    }
}