/* Common styles for Math-Kids Club */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #0D6EFD;
    padding: 0.25rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar {
    padding: 0;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 1rem;
    font-size: 24px;
    font-weight: bold;
    color: white !important;
}

.logo_size {
    height: 50px;
    width: auto;
    max-width: 150px;
}

.navbar-nav {
    gap: 20px;
    margin-left: 20px;
}

.nav-link {
    color: white !important;
    font-size: 16px;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.nav-link:hover {
    text-decoration: underline;
}

.navbar-toggler {
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Account menu styles */
.account-menu {
    position: relative;
    display: inline-block;
}

.account-menu .dropdown-menu {
    right: 0;
    left: auto;
}

.account-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal and Dialog Styles */
.modal-dialog {
    max-width: 400px;
    margin: 1.75rem auto;
}

@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        margin: 1rem auto;
    }
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Login Dialog Styles */
.login-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    justify-content: center;
    align-items: center;
}

.login-dialog.show {
    display: flex;
}

.login-dialog-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.login-dialog .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.login-dialog h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.login-dialog .dialog-button {
    width: 100%;
    margin-top: 1rem;
}

.login-dialog .mt-3 {
    text-align: center;
}

/* Override Bootstrap modal styles for login dialog */
.login-dialog.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.login-dialog .modal-dialog {
    margin: 1.75rem auto;
    max-width: 400px;
}

.login-dialog .modal-content {
    border: none;
    background: none;
    box-shadow: none;
}

/* Login dialog styles */
.login-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.login-dialog-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

/* Center menu items in mobile view */
@media (max-width: 767.98px) {
    .navbar-collapse {
        text-align: center;
    }
    .navbar-nav {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    .nav-item {
        margin: 0.5rem 0;
    }
    .account-menu {
        margin-top: 1rem;
    }
}

/* Language selector styles */
.flag-icon {
    width: 30px;
    height: 22px;
    margin-right: 8px;
    vertical-align: middle;
}

.dropdown-menu .flag-icon {
    width: 20px;
    height: 15px;
    margin-top: -2px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
}

/* Campaign Modal */
#campaignModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#campaignModal.show {
    display: flex;
}

.campaign-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.campaign-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
}

.campaign-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

#campaignAction {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.campaign-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.campaign-button:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close-button:hover {
    color: #333;
}


/* Footer Styles */
.footer {
    background-color: #0D6EFD;
    color: white;
    padding: 25px 0 15px;
    margin-top: 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: white;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 6px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: white;
    text-decoration: underline;
}

.footer-newsletter input {
    padding: 6px;
    border: none;
    border-radius: 4px;
    margin-right: 5px;
    width: 180px;
    max-width: 100%;
    font-size: 14px;
}

.footer-newsletter button {
    padding: 6px 12px;
    background-color: #0056b3;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.footer-newsletter button:hover {
    background-color: #003d82;
}

.footer-social {
    margin-top: 15px;
}

.footer-social a {
    color: white;
    margin-right: 12px;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.footer-social a:hover {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

main {
    flex: 1;
}
