/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 80px;
    padding-bottom: 60px;
}

a {
    color: #0077b5;
    font-weight: 600;
    text-decoration: none;
}

a:hover {
    color: #05445E;
    text-decoration: underline;
}
/* Header styles */
header {
    background-color: #05445E;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
}

.navbar {
    display: flex;
    align-items: center;
}

/* Navigation menu styles */
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 10px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: #eeeeee;
    font-weight: 400;
}

/* Hamburger menu (only visible on small screens) */
.hamburger {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    margin-left: auto;
}

/* Ensure the submenu is hidden initially */
.submenu {
    display: none;
    position: absolute;
    background: white;
    list-style: none;
    padding: 10px 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 180px;
}

/* Position submenu below the parent menu item */
.has-submenu {
    position: relative;
}

/* Show submenu on hover */
.has-submenu:hover .submenu {
    display: block;
}

/* Submenu links */
.submenu li {
    padding: 8px 16px;
}

.submenu li a {
    text-decoration: none;
    color: #333;
    display: block;
    transition: 0.3s ease-in-out;
}

.submenu li a:hover {
    background: #f0f0f0;
}

.container {
    width: 60%;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8f6f6;
    margin-top: 5px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-in-out;
    overflow: hidden;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 2rem;
}

h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5rem;
}

.subtitle {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Course Input Styles */
.course {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    animation: slideIn 0.3s ease-in-out;
}

.course input, .course select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    flex: 1;
    min-width: 0;
}

.course input:focus, .course select:focus {
    border-color: #05445E;
    outline: none;
}

.remove-course {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 40px;
    flex-shrink: 0;
}

.remove-course:hover {
    background: #e60000;
}

/* Button Group Styles */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
    padding: 10px;
    background: #05445E;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.button-group button:hover {
    background: #2575fc;
}

/* Result Section Styles */
.result-card {
    display: none;
}

.user-details {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.user-details input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    min-width: 0;
}

.user-details input:focus {
    border-color: #05445E;
    outline: none;
}

#result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#result-table th, #result-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

#result-table th {
    background: #05445E;
    color: white;
}

#result-table tfoot td {
    font-weight: bold;
    text-align: left;
}

#result-table tfoot td:nth-child(2) {
    text-align: center;
}

/* Save Transcript Button */
.save-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    width: 100%; /* Ensure full width to center properly */
}

#save-transcript {
    width: 40%;
    padding: 10px;
    background: #05445E;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto; /* Centers block elements */
    text-align: center;
}

#save-transcript:hover {
    background: #076086;
}

/* disclaimer Section */
.disclaimer-card {
    margin-top: 20px;
    border-left: 4px solid #05445E;
}

/* Related GPA Calculators Section */
.related-calculators-card {
    margin-top: 20px;
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #05445E;
    transition: background 0.3s ease;
    font-weight: 600;
    margin: 10px;
}

.related-link:hover {
    background: #e6e6e6;
    color: #0b98d4;
}

.related-link i {
    font-size: 1.2rem;
}

/* How to Use Section */
.how-to-use-card {
    margin-top: 20px;
}

.how-to-use-card h2 {
    text-align: left;
    margin-bottom: 20px;
    color: #05445E;
}

.guide {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.step h3 {
    margin-bottom: 10px;
    color: #05445E;
}

.step p, .step ul {
    margin: 0;
    color: #555;
}

.step ul {
    padding-left: 20px;
    list-style-type: disc;
}

.step li {
    margin-bottom: 5px;
}

/* Alert Message Styles */
.alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4d4d;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Transcript Print Styles */
@media print {
    body * {
        visibility: hidden;
    }

    .header-logo {
        width: 160px;
    }
    
    .logo-link {
        margin-right: 1rem;
    }
    .result-card, .result-card * {
        visibility: visible;
    }
    .result-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        background: white;
        color: black;
        padding: 20px;
    }
    #result-table th {
        background: #ddd;
        color: black;
    }
    #result-table tfoot td {
        background: none;
    }
    h2 {
        text-align: center;
        margin-bottom: 20px;
    }
}

/* Grade System Table Section */
.grade-system-card {
    margin-top: 20px;
}

.grade-system-card h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #05445E;
}

.grade-system-card p {
    text-align: center;
    margin-bottom: 20px;
    color: #555;
}

.grade-system-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.grade-system-table th, .grade-system-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

.grade-system-table th {
    background: #05445E;
    color: white;
}

/* FAQ Section */
.faq-card {
    margin-top: 20px;
}

.faq-card h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #05445E;
}

.faq-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

.faq-item h3 {
    margin-bottom: 10px;
    color: #05445E;
}

.faq-item p {
    margin: 0;
    color: #555;
}

/* Author Section Styles */
.author-card {
    margin-top: 20px;
    background: #ffffff;
    border: 1px solid #eee;
}

.author-profile {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
}

.author-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #05445E;
}

.author-info h3 {
    color: #05445E;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.author-info p {
    color: #555;
    line-height: 1.6;
}

/* Author Social Icons */
.author-social {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.social-icon {
    color: #05445E;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    color: #2575fc;
    transform: translateY(-3px);
}

/* Social Media Share Section */
.social-share-card {
    margin-top: 20px;
}

.social-share-card h2 {
    text-align: center;
    color: #05445E;
    margin-bottom: 20px;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.social-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: transform 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.facebook { background-color: #3b5998; }
.twitter { background-color: #1da1f2; }
.linkedin { background-color: #0077b5; }
.whatsapp { background-color: #25d366; }
.pinterest { background-color: #e60023; }
.email { background-color: #d44638; }
.copy-link { background-color: #05445E; }

/* Mobile styles */
@media (max-width: 768px) {
    .logo {
        font-size: 1.2rem;
    }

    .navbar {
        width: 100%;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: #075b80;
        text-align: left;
        padding: 10px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        padding-left: 20px;
    }

    .hamburger {
        display: block;
    }

    .container {
        width: 99%;
        padding: 10px;
    }

    .card {
        padding: 15px;
    }

    h1, h2 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .course input, .course select, .remove-course {
        font-size: 0.8rem;
    }

    .button-group button {
        font-size: 0.9rem;
    }

    .user-details input {
        font-size: 0.8rem;
    }

    #result-table th, #result-table td {
        font-size: 0.8rem;
    }

    .course {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .course input, .course select {
        flex: 1;
        min-width: 0;
    }

    .remove-course {
        width: 40px;
    }

    .button-group {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .button-group button {
        flex: 1;
        min-width: 0;
    }

    .user-details {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .user-details input {
        flex: 1;
        min-width: 0;
    }

    .button-group button i,
    #save-transcript i {
        display: none;
    }

    .button-group button .button-text,
    #save-transcript .button-text {
        display: inline;
    }

    #save-transcript {
    width: 70%;

    }

    .grade-system-table th, .grade-system-table td {
        font-size: 0.8rem;
    }

    .faq-item h3 {
        font-size: 1rem;
    }

    .faq-item p {
        font-size: 0.9rem;
    }
    .author-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        width: 100px;
        height: 100px;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .author-social {
        justify-content: center;
    }
}

/* Footer Menu Styles */
.footer-menu {
    background-color: #086d99;
    color: white;
    padding: 10px 20px;
    text-align: center;
    width: 100%;
    margin: 0;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-menu ul li {
    margin: 0;
}

.footer-menu ul li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    font-weight: 500;
}

/* Footer styles */
footer {
    background-color: #05445E;
    color: white;
    text-align: center;
    padding: 10px;
    width: 100%;
    margin: 0;
}