/* --- Common Styles --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* A bit more modern than Arial */
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    /* Softer, modern light gray-blue */
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background-color: #2c3e50;
    /* Softer, modern dark blue */
    color: white;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    margin: 0;
    font-size: 2.5em;
    letter-spacing: 1px;
}

.header p {
    margin-top: 5px;
    color: #a8e6cf;
    /* Pastel mint accent */
    font-style: italic;
}

.navbar {
    background-color: #34495e;
    /* Lighter dark-grey for modern feel */
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 16px 24px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar a:hover {
    background-color: #1abc9c;
    /* Vivid teal hover */
    color: white;
}

.container {
    padding: 30px;
    margin: 30px auto;
    max-width: 1000px;
    /* Constrain width on large screens */
    flex-grow: 1;
}

h2 {
    color: #2c3e50;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 5px;
    display: inline-block;
}

.btn {
    background-color: #1abc9c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    /* slightly sharper modern radius */
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #16a085;
    /* darker teal */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: #ecf0f1;
    margin-top: 60px;
    clear: both;
    font-size: 0.9em;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* --- Home Page (index.html) --- */
#home-page .cards-wrapper {
    display: flex;
    justify-content: center;
    gap: 25px;
    /* modern uniform spacing */
    flex-wrap: wrap;
    /* allows safe wrapping on tiny screens */
}

#home-page .card {
    display: flex;
    flex-direction: column;
    width: 30%;
    /* flexible width */
    min-width: 250px;
    /* safety for small screens */
    margin: 0;
    border: none;
    border-top: 5px solid #2c3e50;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Modern soft shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#home-page .card .btn {
    margin-top: auto;
    /* keeps buttons aligned at the bottom! */
    align-self: flex-start;
}

#home-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

#home-page .card h3 {
    margin-top: 0;
    color: #2c3e50;
}

#home-page .card strong {
    color: #1abc9c;
}

#home-page h2.section-title {
    margin-left: 1.5%;
}

/* --- Add Course Page (add.html) --- */
#add-page .container {
    background-color: white;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 60%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#add-page h2 {
    text-align: center;
    display: block;
    border-bottom: none;
}

#add-page .form-group {
    margin-bottom: 20px;
    clear: both;
}

#add-page .form-label {
    display: inline-block;
    width: 30%;
    font-weight: 600;
    color: #34495e;
}

#add-page .form-input {
    display: inline-block;
    width: 65%;
    padding: 10px;
    border: 1px solid #ccd1d1;
    border-radius: 6px;
    font-family: inherit;
    transition: border-color 0.3s;
}

#add-page .form-input:focus {
    outline: none;
    border-color: #1abc9c;
    /* nice highlight ring */
}

#add-page .btn {
    float: right;
    margin-top: 15px;
    margin-right: 5%;
}

/* --- Contact Page (contact.html) --- */
#contact-page .container {
    background-color: white;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#contact-page .contact-info {
    float: left;
    width: 45%;
    padding: 20px;
    box-sizing: border-box;
}

#contact-page .contact-form {
    float: right;
    width: 50%;
    padding: 20px;
    background-color: #fdfdfd;
    border: 1px solid #eee;
    /* Clean solid line instead of dashed */
    border-radius: 8px;
    box-sizing: border-box;
}

#contact-page .form-group {
    margin-bottom: 15px;
}

#contact-page .form-group input,
#contact-page .form-group textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccd1d1;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s;
}

#contact-page .form-group input:focus,
#contact-page .form-group textarea:focus {
    outline: none;
    border-color: #1abc9c;
}

#contact-page .btn {
    width: 50%;
    /* Modern look for the contact send button */
}

#contact-page .mint-text {
    color: #16a085;
    font-weight: bold;
}

/* --- My Courses Page (mycourse.html) --- */
#mycourse-page .container {
    background-color: white;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#mycourse-page table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
}

#mycourse-page th,
#mycourse-page td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

#mycourse-page th {
    background-color: #f8f9fa;
    /* Lighter header instead of thick mint color */
    color: #2c3e50;
    font-weight: bold;
    border-bottom: 2px solid #2c3e50;
}

#mycourse-page tr:hover td {
    background-color: #fbfcfc;
    /* subtle row hover */
}

#mycourse-page .btn {
    padding: 6px 12px;
    font-size: 0.9em;
    background-color: #e74c3c;
    /* Red color for 'Drop' action */
}

#mycourse-page .btn:hover {
    background-color: #c0392b;
}