/* CSS Document FOR MAIN.html */

body {
    margin: 0;
    background-color: #fafafa; /* Added a very soft off-white for reading comfort */
    font-size: 16px; /* Increased from 12px for mobile readability */
    font-family: "Calibri", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Typography */
.main-title {
    font-size: 26px;
    color: #111;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    font-size: 22px;
    color: darkblue;
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0; /* Clean visual separator */
    padding-bottom: 5px;
}

h3 {
    font-size: 18px;
    color: #444;
    margin-top: 20px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 16px;
    text-align: justify;
}

/* Links */
a {
    text-decoration: none;
    color: #0056b3;
}

a:visited {
    color: #551a8b;
}

a:hover {
    text-decoration: underline;
    color: #003d82;
}

/* Navigation - Mobile First Approach */
#menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #e5e5e5;
    position: relative; /* Removes fixed position so it flows naturally on phones */
    font-size: 16px;
}

#menu li a {
    display: block;
    color: #000;
    padding: 14px 16px;
    text-decoration: none;
    text-align: center; /* Center the link on mobile */
}

#menu li a:hover:not(.active) {
    background-color: #555;
    color: white;
}

#menu .active {
    background-color: grey;
    color: white;
}

/* Main Content Container */
#main-content {
    padding: 20px 15px;
    max-width: 800px;
    margin: 0 auto; /* Centers the content naturally */
}

/* Responsive Image styling */
.responsive-rat {
    max-width: 150px; /* Caps the size so it doesn't get huge */
    width: 100%;
    height: auto;
    float: right;
    margin: 0 0 15px 15px;
}

/* Desktop Overrides */
@media screen and (min-width: 768px) {
    #menu {
        width: 220px;
        height: 100vh;
        position: fixed; /* Restores fixed sidebar for desktop */
        top: 0;
        left: 0;
        overflow: auto;
    }

    #menu li a {
        text-align: left;
    }

    #main-content {
        margin-left: 240px; /* Leaves space for the fixed sidebar */
        padding: 40px;
    }
    
    .main-title {
        text-align: left;
    }
}


/* Existing animation classes retained untouched */
@keyframes blink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

.saving span {
    animation-name: blink;
    animation-duration: 1.4s;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

.saving span:nth-child(2) {
    animation-delay: .2s;
}

.saving span:nth-child(3) {
    animation-delay: .4s;
}
