:root {
    --text-primary: #1c183c;
    --text-secondary: #4b5563;
    --bg-light: #fdfaf1;
    --bg-dark: #1a1a1a;
    --accent-blue: #2563eb;
    --transition-standard: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Palatino', Arial, sans-serif;
    background: linear-gradient(to bottom, #fdfaf1, #47a6d6);
    color: #1c183c;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

header,
footer,
button,
nav a {
    transition: all 0.3s ease;
}

header {
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color:#fdfaf1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 70px; 
}

nav {
    display: flex;
    align-items: center;
    height: 100%; 
    gap: 1rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: normal;
    color: #1f2937;
    animation: fadeIn 1s ease-out;
}

nav a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
    position: relative;
    padding-bottom: 2px;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s;
}

nav a:hover {
    color: #1d4ed8;
}

nav a:hover::after {
    width: 100%;
}

main {
    flex: 1;
    text-align: center;
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Specific styles for the Contact Us page */
body.contact-page main {
    padding-top: 2rem; 
}

h2 {
    font-size: 3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s, transform 0.7s;
}

p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: #494a4b;
    line-height: 1.75;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 1s, transform 1s;
}

button {
    position: relative;
    overflow: hidden;
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    margin-bottom: 2rem;
    font-family: 'Palatino', Arial, sans-serif; 
}

button:hover {
    background-color: #1d4ed8;
    transform: scale(1.02); 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 70px at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.2), transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

button:hover .spotlight {
    opacity: 1;
}

.image-container {
    max-width: 100%;
    margin-top: 3rem;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s, transform 0.7s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

footer {
    background-color: var(--bg-light);
    color: #00000035;
    padding: 1% 0;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-nav {
    display: inline-block;
    margin-top: 0.5rem;
}

.footer-nav a {
    color: #4b5563; 
    text-decoration: none;
    padding: 0.5rem 1rem;
    position: relative;
    transition: var(--transition-standard);
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #000000;
    transition: var(--transition-standard);
    transform: translateX(-50%);
}

.footer-nav a:hover {
    color: #000000;
}

.footer-nav a:hover::after {
    width: 80%;
}

.footer-nav .separator {
    color: #4b5563; 
    margin: 0 0.5rem;
}

/* Dark mode support for footer navigation */
body.dark-mode .footer-nav a {
    color: rgba(255, 255, 255, 0.35);
}

body.dark-mode .footer-nav a:hover {
    color: #ffffff;
}

body.dark-mode .footer-nav a::after {
    background-color: #ffffff;
}

body.dark-mode .footer-nav .separator {
    color: rgba(255, 255, 255, 0.35);
}

/* Dark theme styles */
body.dark-mode {
    background: linear-gradient(to bottom, #1a1a1a, #2d4a77);
    color: #ffffff;
}

body.dark-mode header {
    background-color: #1a1a1a;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

body.dark-mode h1,
body.dark-mode h2 {
    color: #ffffff;
}

body.dark-mode p {
    color: #e0e0e0;
}

body.dark-mode nav a {
    color: #b0b0b0;
}

body.dark-mode nav a:hover {
    color: #ffffff;
}

body.dark-mode footer {
    background-color: #1a1a1a;
    color: rgba(255, 255, 255, 0.35);
}

body.dark-mode footer a {
    color: rgba(255, 255, 255, 0.35);
}

body.dark-mode footer a:hover {
    color: #ffffff;
}

/* Theme toggle button styles */
#toggleModeBtn {
    position: relative;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
    margin: 0; 
}

#toggleModeBtn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode #toggleModeBtn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#toggleModeBtn svg {
    width: 20px;
    height: 20px;
}

.sun-icon {
    display: block;
    color: #000000;
    fill: #000000;
}

.moon-icon {
    display: none;
    color: #ffffff;
    fill: #ffffff;
}

body.dark-mode .sun-icon {
    display: none;
}

body.dark-mode .moon-icon {
    display: block;
}

/* Contact Form Styles */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: inherit;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical; 
    max-height: 300px; 
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

body.dark-mode .contact-container {
    background-color: rgba(0, 0, 0, 0.2);
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #4f46e5;
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
}

/* Home button styles */
.home-button {
    color: #4b5563;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-right: 1rem;
    background: none;
    border: none;
    box-shadow: none;
}

.home-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

body.dark-mode .home-button {
    color: rgba(255, 255, 255, 0.8);
    background: none;
}

body.dark-mode .home-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Header styles for contact page */
body.contact-page header {
    position: relative;
    justify-content: center;  
}

body.contact-page header .home-button {
    position: absolute;
    left: 2rem;
}

body.contact-page header nav {
    position: absolute;
    right: 2rem;
}

/* Media queries */
@media screen and (max-width: 768px) {
    header {
        padding: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        position: relative;
    }

    header h1 {
        text-align: center;
        width: 100%;
        order: 2;
        margin: 0.5rem 0;
    }

    header nav {
        position: absolute;
        top: 1rem;
        right: 1rem;
        order: 1;
        height: auto;
    }

    #toggleModeBtn {
        margin: 0;
    }

    main {
        padding: 2rem 1rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    button {
        width: 90%;
        max-width: 300px;
    }

    .image-container {
        margin-top: 2rem;
        padding: 0 1rem;
    }

    /* Adjust footer for mobile */
    footer {
        padding: 1rem;
    }

    .footer-nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-nav .separator {
        display: none;
    }

    .footer-nav a {
        padding: 0.5rem;
    }

    .member-btn {
        display: none; /* Hide in header for mobile */
    }

    .footer-nav .member-btn {
        display: block; /* Show in footer for mobile */
        margin: 0.5rem 0;
        text-align: center;
        width: 100%;
        padding: 0.75rem;
    }

    .footer-nav {
        width: 100%;
        max-width: 300px;
    }

    /* Switch visibility for mobile */
    header .member-btn {
        display: none !important; 
    }

    .footer-nav .member-btn {
        display: block !important; 
        margin: 0.5rem 0;
        text-align: center;
        width: 100%;
        padding: 0.75rem;
    }
}

/* Additional adjustments for small screens */
@media screen and (max-width: 480px) {
    h2 {
        font-size: 1.75rem;
    }

    p {
        font-size: 1rem;
    }

    #toggleModeBtn {
        margin-top: 0.5rem;
    }
}

/* Styles for the Member Space button */
.member-btn {
    background: none;
    color: #4b5563;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-right: 1.5rem; 
}

.member-btn:hover {
    color: #1d4ed8;
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    text-decoration: none; 
}

.member-btn::after {
    display: none; 
}

/* Hide footer member button by default (desktop) */
.footer-nav .member-btn {
    display: none;
}

/* Dark mode styles for Member Space button */
.dark-mode .member-btn {
    color: #b0b0b0;
}

.dark-mode .member-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}