/* Color Palette */
:root {
    --primary-color: #2C3E50; /* Deep Blue-Gray */
    --secondary-color: #3498DB; /* Bright Blue */
    --accent-color: #E74C3C; /* Coral Red */
    --background-color: #F5F6FA; /* Light Gray */
    --text-color: #2C3E50; /* Dark Text */
    --light-text: #ECF0F1; /* Light Text */
    --border-color: rgba(52, 152, 219, 0.3); /* Subtle Blue Border */
}

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

body {
    background: var(--background-color);
    color: var(--text-color);
    font-family: "Times New Roman", Times, serif;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background-color: rgba(44, 62, 80, 0.7); /* Translucent primary color */
    padding: 15px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    border-radius: 3px 3px 0 0; /* 3px rounded edges on top left and right */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px; /* Padding from top */
    z-index: 1000;
    width: 50%; /* Half the screen width */
    margin: 0 auto; /* Center horizontally */
    transition: background-color 0.3s ease; /* Smooth color transition */
}

/* Dynamic background color based on scroll */
body.scrolled .navbar {
    background-color: rgba(44, 62, 80, 0.9); /* Slightly darker when scrolled */
}

.navbar a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: bold;
    margin: 0 25px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Header */
header {
    text-align: center;
    margin: 80px 0 30px; /* Increased top margin to account for navbar padding */
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Main Content */
main {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.content {
    text-align: center;
}

.contact-info {
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Blog Posts */
.blog-posts {
    text-align: left;
}

.post {
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(236, 240, 241, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.post h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.date {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 15px;
    font-style: italic;
}

.post p {
    line-height: 1.6;
}

/* Quote Section */
.quote-section {
    margin-top: 40px;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-color);
    padding: 20px;
    background: rgba(236, 240, 241, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.quote-section .author {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    border-top: 2px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        width: 70%; /* Adjust width for smaller screens */
        padding: 10px 20px;
        top: 10px;
    }

    .navbar a {
        margin: 10px 15px;
    }

    header {
        margin-top: 60px;
    }

    h1 {
        font-size: 2rem;
    }

    .contact-info {
        font-size: 1rem;
    }

    .quote-section {
        font-size: 1rem;
        padding: 15px;
    }

    .post h2 {
        font-size: 1.5rem;
    }

    .post {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .navbar {
        width: 90%; /* Full width on very small screens */
        flex-direction: column;
        padding: 10px;
    }

    .navbar a {
        margin: 5px 0;
    }

    header {
        margin-top: 50px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .contact-info {
        font-size: 0.9rem;
    }

    .quote-section {
        font-size: 0.9rem;
        padding: 10px;
    }

    .post h2 {
        font-size: 1.2rem;
    }

    .post {
        padding: 10px;
    }
}

/* JavaScript-triggered scroll class */
body {
    transition: background-color 0.3s ease;
}

body.scrolled .navbar {
    background-color: rgba(44, 62, 80, 0.9); /* Slightly darker when scrolled */
}