@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;700&display=swap');

/*common styles*/

body {
    font-family: "Crimson Pro", serif !important;
    font-size: 22px;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    line-height: 1.6;
    margin-top: 80px;
    color: #333;
    background-color: #fff;
    transition: background-color 0.3s ease, color 0.3s ease;
}
p.article-heading{
    font-size: 65px;
    text-align: center;
    font-style: bold;
}

.article-container {
    display: flex;
    width: 100%; 
}

.author-info {
    width: 25%;
    padding-left: 20px;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.blog-home {
    width: 60%;
    text-align: left;
    margin-left: 40px;
    margin-right: 150px;
}
.blog-text {
    width: 60%;
    text-align: left;
    margin-left: 180px;
    margin-right: 155px;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}
.content-hidden {
    visibility: hidden;
}

.content-visible {
    visibility: visible;
}
.invisible {
    opacity: 0 !important;
    visibility: hidden !important;
}        
.fade-in {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in-out;
}


/*essay page*/
.essay-links-container p {
    font-size: 25px;
    margin: 0.75rem 0;
}
.essay-links-container a {
    text-decoration: none;
    color: black;}

.essay-links-container a:hover {
    text-decoration: underline;
    color: black;
}

/*NAVIGATION STYLES*/

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100px - 40px);
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s ease;
}
.navbar .logo {
    font-size: 21px;
    font-weight: bold;
    margin-left: 20px;
    transition: color 0.3 ease;
}
.navbar .nav-links {
    display: flex;
    gap: 20px;
    margin-right: 20px;
}
.navbar a {
    color: black;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}
.navbar a:hover {
    text-decoration: none;
}
.container {
    max-width: 800px;
    margin: 0 auto;
}



/*DARK MODE*/

body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}
.dark-mode .navbar {
    background: #222;
    border-bottom: 1px solid #444;
}
.dark-mode .navbar a {
    color: #ddd;
}
.dark-mode .essay-links-container a{
    color: white;
}
.dark-mode .essay-links-container a:hover{
    color: white;
}
body.dark-mode a {
    color: #4a90e2; /* Adjust this blue color to match your dark mode theme */
}
body.dark-mode a:hover {
    color: #1e70bf; /* Slightly darker blue for hover effect */
}
#dark-mode-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 18px;
    cursor: pointer;
    margin-left: 20px;
    color: #000;
    transition: color 0.3s ease, background-color 0.3 ease, opacity 0.3s ease;
    outline: none;
    box-shadow: none;
    appearance: none;
}
body.dark-mode #dark-mode-toggle {
    color: white;
}
#dark-mode-toggle:hover {
    opacity: 0.7;
}



/*TOPIC TAGS*/

h1 {
    margin-bottom: 8px;
}
.article-meta {
    margin: 8px 0; 
    color: #4a5568;
    line-height: 1.4;
    padding-bottom: 70px; 
    border-bottom: 1px solid #e2e2e2;
}
.article-meta .author {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.article-meta .author em {
    font-style: italic;
    font-size: 21px;
    color: #666;
}
.article-meta a {
    text-decoration: none;
    color: #4a5568;
    transition: all 0.2s ease;
    margin-left: 4px;
}
.article-meta a:hover {
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-color: #888;
}
.meta-line {
    display: flex;
    align-items: center;
}
.article-endline{
    margin: 8px 0; 
    color: #4a5568;
    line-height: 1.4;
    padding-bottom: 70px; 
    border-bottom: 1px solid #e2e2e2;
}
.bottom-line {
    margin: 8px 0; 
    color: #4a5568;
    line-height: 1.4;
    padding-bottom: 70px; 
    border-bottom: 1px solid #e2e2e2;
  }



/*DROP DOWN*/

.references-container {
    margin-top: 20px; 
}
.references-header {
    display: flex; 
    align-items: center;
    cursor: pointer;
}
.references-header .icon {
    margin-right: 10px;
    font-size: 1.2em;
}
.references-list {
    display: none;
    list-style: none;
    padding: 0;
    margin: 10px 0;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
}
.references-list li {
    margin-bottom: 5px;
}
.icon::before { 
    content: "+";
}
.references-header.expanded .icon::before {
    content: "-"; 
}


/*underline-popups*/
.underline-popup {
    position: relative;
    display: inline-block;
}
.underline {
    text-decoration: underline;
    cursor: pointer;
}
.popup {
    display: none;
    font-size: 12px;
    position: absolute;
    top: -30px;
    left: 60%;
    transform: translateX(-50%);
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    z-index: 1;
    border-radius: 5px;
    white-space: normal;
    max-width: none; /* Initially allow full width */
    max-height: none; /* Maximum height */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.popup.show {
    display: block;
    opacity: 1;
}

.popup p {
    margin: 0;
}
body.dark-mode .popup {
    background-color: #222;
    color: #eee;
    border: 1px solid #444;
    box-shadow: 2px 2px 5px rgba(255, 255, 255, 0.2);
}

body.dark-mode .popup::before {
    border-top-color: #222;
}
body.dark-mode #dark-mode-toggle {
    color: white;
}


/* Newsletter */
#newsletter-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    z-index: 1001;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
#newsletter-popup h2 {
    margin-top: 0;
}
#newsletter-popup button {
    margin-top: 10px;
}
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000; 
    display: none;
}
.button-group {
    display: flex; 
    justify-content: center; 
    gap: 10px;
    margin-top: 10px;
}
body.dark-mode #newsletter-popup {
    background-color: #222;
    color: #eee;
    border: 1px solid #444;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
body.dark-mode #newsletter-popup h2 {
    color: #ddd;
}
body.dark-mode #newsletter-popup input[type="email"] {
    background-color: #333;
    color: #ccc;
    border: 1px solid #555;
}
body.dark-mode #newsletter-popup button {
    background-color: #555;
    color: #eee;
    border: none;
}
body.dark-mode #newsletter-popup button:hover {
    background-color: #666;
}
body.dark-mode #overlay {
    background-color: rgba(0, 0, 0, 0.7);
}
#newsletter-popup {
    position: fixed;
    padding: 30px;
}

/*
#newsletter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
}

#newsletter-bar form {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

#newsletter-bar input[type="email"] {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-right: 5px;
}

#newsletter-bar button {
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
#newsletter-bar .close-bar {
}
*/


@media (max-width: 768px) {
    .navbar{
        overflow-x: hidden;
        height: calc(100px - 55px);
    }
    .navbar .logo{
        margin-left: 10px;
    }
    body {
        font-size: 20px;
        overflow-x: hidden;
        position: relative;
      }

    .article-container {
        flex-direction: column;
    }

    .blog-home, .blog-text {
        width: 100%;
        margin: 0;
        padding-right: 10px;
        padding: 0;
    }

    .author-info {
        display: none;
    }

    p.article-heading{
        font-size: 55px;
    }
    
}