/* === Fonts & Variables === */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200..1000&display=swap');
:root {
    --primary: #58cc02;
    --secondary: #fff;
    --text: #3c3c3c;
    --background: #f5f5f5;
    --hover: #45a501;
    --container-max: 1200px;
    --error: #ff6f61;
}

/* === Global Styles === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 1rem;
    line-height: 1.5;
}

main {
    padding: 70px 1rem 1rem;
    min-height: calc(100vh - 60px - 50px);
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Typography === */
h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* === Navigation === */
.navbar {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0;
    background-color: var(--secondary);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* === Dropdown === */
.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background-color: var(--secondary);
    min-width: 150px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    z-index: 1;
    border-radius: 0.625rem;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-0.625rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown a {
    color: var(--text);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.dropdown a:hover {
    background-color: #f5f5f5;
}

.dropdown a img {
    width: 1.25rem;
    height: auto;
    margin-right: 0.625rem;
}

.dropdown a i {
    margin-right: 0.5rem;
    color: var(--primary);
}

/* === Language Selector (not logged) === */
#language-select {
    position: relative;
    display: inline-block;
}

#language-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

#language-button img {
    width: 1.25rem;
    height: auto;
    margin-right: 0.25rem;
}

#language-button i {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

#language-button.active i {
    transform: rotate(180deg);
}

/* === Profile Selector (logged) === */
#profile-select {
    position: relative;
    display: inline-block;
}

#profile-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

#profile-button .avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    margin-right: 0.25rem;
}

#profile-button i {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

#profile-button.active i {
    transform: rotate(180deg);
}

/* === Notification === */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 450px;
    animation: slideIn 0.3s ease-out, fadeOut 0.3s ease-out 4.7s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.notification.show {
    opacity: 1;
}

.notification i {
    font-size: 1.25rem;
}

.notification-success {
    background-color: #ecfdf3;
    color: #166534;
    border: 1px solid #dcfce7;
}

.notification-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

.notification-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}

.notification-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.75rem;
    padding: 0 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    line-height: 1;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(45deg, #69D01B, #83E635);
    color: white;
    box-shadow: 0 2px 8px rgba(105, 208, 27, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(105, 208, 27, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #333;
    border: 2px solid #E5E7EB;
}

.btn-secondary:hover {
    border-color: #69D01B;
    color: #69D01B;
}

.btn-accept {
    background-color: #f2fef5;
    color: var(--primary);
    border: 2px solid #c4f1b0;
    transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.btn-accept:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.02);
}

.btn-cancel {
    background-color: #fef2f2;
    color: #dc2626;
    border: 2px solid #fecaca;
    transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.btn-cancel:hover {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
    transform: scale(1.02);
}

/* === Form Components === */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #555;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(88, 204, 2, 0.1);
}

.input-group i {
    color: #aaa;
    padding: 0 0.75rem;
    transition: color 0.3s;
}

.input-group:focus-within i {
    color: var(--primary);
    transform: scale(1.1);
    transition: color 0.3s, transform 0.3s;
}

.input-group input {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    border-radius: 0.75rem;
    background-color: transparent;
}

/* === Select Input Group === */
.input-group select {
    padding-left: 2.5rem;
    appearance: none;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9375rem;
    width: 100%;
    padding: 0.75rem 0.5rem;
}

.input-group .select-arrow {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.875rem;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.input-group select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* === Check Box Input Group === */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    color: #fff;
}

.checkbox-group label {
    cursor: pointer;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-title {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal-message {
    color: #777;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    justify-content: center;
}

/* === Links === */

.link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.link:hover {
    color: var(--hover);
    text-decoration: underline;
}

/* === Footer === */
footer {
    padding: 0.5rem 0;
    background-color: var(--primary);
    color: var(--secondary);
    width: 100%;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
    gap: 0.75rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    line-height: 1;
}

.social-icons a {
    color: var(--secondary);
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    height: 1.25rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.social-icons a:hover {
    transform: scale(1.2);
}

.copyright {
    font-size: 0.875rem;
    line-height: 1.2;
}

/* === Media Queries === */

@media (max-width: 375px) {
    .input-group input {
        padding-right: 2rem;
    }
}

@media (max-width: 320px) {
    .notification-container {
        right: 10px;
        left: 10px;
    }
    .notification {
        min-width: auto;
        width: 100%;
    }
    .input-group input {
        padding-right: 2.5rem;
    }
}

@media (min-width: 576px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 0.5rem 1rem;
    }
    
    .logo {
        font-size: 1.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
    
    .navbar-content {
        padding: 0 1.5rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    .footer-content {
        padding: 0.5rem 1.5rem;
    }
}

@media (min-width: 992px) {
    html {
        font-size: 17px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 18px;
    }
    
    .navbar-content {
        padding: 0 2rem;
    }
    
    .footer-content {
        padding: 0.5rem 2rem;
    }
}

@media (min-width: 2560px) {
    .container-max {
        max-width: 1400px;
    }
    
    html {
        font-size: 20px;
    }
}