/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures footer sticks to the bottom */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

/* Header Styles */
header {
    background-color: #0077cc;
    color: white;
    padding: 20px 10px;
    text-align: center;
    border-bottom: 4px solid #005fa3;
  }


header h1 {
    margin-bottom: 10px;
    font-size: 2.5em;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Main Content Styles */
main {
    flex-grow: 1; /* Allows main content to take up available space */
    padding: 20px;
    max-width: 960px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

section {
    margin-bottom: 40px;
}

section h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    display: inline-block; /* Makes border-bottom only as wide as content */
    width: fit-content; /* Ensure border only spans content */
    margin-left: auto;
    margin-right: auto;
    display: block; /* To center the inline-block element */
}

/* Tip Card Styles */
.tip-card {
    background-color: #ecf0f1;
    border-left: 5px solid #3498db;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out; /* Smooth hover effect */
}

.tip-card:hover {
    transform: translateY(-3px);
}

.tip-card h3 {
    color: #2980b9;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Motivation Section Styles */
.motivation-quote {
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    padding: 15px;
    margin-bottom: 20px;
    font-style: italic;
    text-align: center;
    border-radius: 5px;
    min-height: 80px; /* Give some space even if quote is short */
    display: flex; /* Use flexbox for vertical centering */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.motivation-quote p {
    margin: 0;
    font-size: 1.1em;
    padding-bottom: 5px; /* Space between quote and cite */
}

.motivation-quote cite {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
    font-style: normal; /* Override italic for cite */
}

#newQuoteBtn {
    display: block;
    margin: 20px auto;
    padding: 12px 25px;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#newQuoteBtn:hover {
    background-color: #229a54;
    transform: translateY(-2px);
}

#newQuoteBtn:active {
    transform: translateY(0);
    background-color: #1e8449;
}

.dynamic-quote {
    text-align: center;
    margin-top: 20px;
    font-size: 1.2em;
    color: #555;
    font-weight: bold;
    min-height: 60px; /* Ensures space for dynamic quote */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eaf7ff; /* Light background for dynamic quote */
    border-radius: 5px;
    padding: 10px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}


/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    main {
        padding: 15px;
        margin: 15px auto;
    }
    section h2 {
        font-size: 1.8em;
    }
    .tip-card {
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    header p {
        font-size: 1em;
    }
    main {
        padding: 10px;
        margin: 10px auto;
    }
    .tip-card, .motivation-quote {
        padding: 10px 15px;
    }
    #newQuoteBtn {
        padding: 10px 20px;
        font-size: 1em;
    }
    .dynamic-quote {
        font-size: 1em;
    }
}

.nav-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: #3498db; /* A nice blue */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: #2980b9; /* Darker blue on hover */
}