/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f6f3f6;
    color: #333;
    line-height: 1.6;
}

/* Container Styles */
.container {
    padding: 2rem 1rem;
    background-color: white;
}

.container-login{
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container p {
    font-size: 1.1rem;  
    line-height: 1.6;   
    text-align: justify; 
    color: #555;       
    margin-bottom: 1rem;
}

.teen-edu-container {
    width: fit-content;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 5rem;
    background-color: white;
    text-align: justify;
}

.teen-edu-container p {
    margin-bottom: 0.7rem;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 5rem;
    height: 5rem;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    overflow: hidden;
    padding: 0.5rem;
}

.logo-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header h1 {
    color: #f87171;
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header p {
    color: #4b5563;
    font-size: 0.875rem;
}

/* Form Container Styles */
.form-container {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
}

/* Form Styles */
.form-label{
    margin: 0;
}
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-field {
    position: relative;
}

.input-field svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
}

.input-field input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background-color: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-field input:focus {
    background-color: white;
    border-color: #fc5252;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* Button Styles */
button {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #f87171;
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 1rem 0;
}

button:hover {
    background-color: #fc5252;
    transform: scale(1.02);
}

/* Link Styles */
.forgot-password {
    text-align: right;
    margin-bottom: 1rem;
}

.forgot-password a {
    color: #fc5252;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #fc5252;
}

.signup-link {
    text-align: center;
    font-size: 0.875rem;
}

.signup-link span {
    color: #4b5563;
}

.signup-link a {
    color: #fc5252;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.signup-link a:hover {
    color: #fc5252;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 32rem;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: #f87171;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #4b5563;
    font-size: 0.875rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    margin: 0;
    width: auto;
}

.close-modal:hover {
    transform: scale(1.1);
}

.close-modal svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #6b7280;
}

/* Home Page Styles */
.pages {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles */
.navbar {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 0.75rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff4f5e;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ff4f5e;
    transition: width 0.2s ease;
}

.nav-link:hover {
    color: #ff4f5e;
}

.nav-link:hover::after {
    width: 100%;
}

/* Notification Icon */
.notification-icon {
    position: relative;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.notification-icon:hover {
    background-color: #f3f4f6;
}

.notification-icon svg {
    color: #4b5563;
    transition: color 0.2s ease;
}

.notification-icon:hover svg {
    color: #ff4f5e;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.user-menu:hover {
    background-color: #f3f4f6;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.user-menu:hover .user-avatar {
    border-color: #ff4f5e;
}

.username {
    font-weight: 500;
    color: #4b5563;
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:first-child {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #ff4f5e;
}

.dropdown-item svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

/* Main Content Styles */
.main-content {
    margin-top: 72px;
    flex: 1;
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(255, 79, 94, 0.9), rgba(255, 79, 94, 0.8)),
        url('https://images.unsplash.com/photo-1467453678174-768ec283a940?q=80&w=2044&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: #ff4f5e;
    padding: 1rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Programs Section */
.programs-section {
    padding: 4rem 2rem;
    background-color: white;
}

.programs-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.program-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.program-card svg {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1rem;
    color: #ff4f5e;
}

.program-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.program-card p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Footer Styles */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* About Page Styles */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.about-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2.5rem;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff4f5e;
    margin-bottom: 1rem;
}

.about-subtitle {
    font-size: 1.5rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

.about-content {
    color: #4b5563;
    line-height: 1.8;
}

.team-section {
    margin: 2rem 0;
}

.team-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.team-members {
    color: #4b5563;
    line-height: 1.8;
}

.team-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.team-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.team-list li::before {
    content: "•";
    color: #ff4f5e;
    font-weight: bold;
    margin-right: 0.5rem;
}

.contact-section {
    margin-top: 2rem;
    text-align: center;
}

.contact-email {
    color: #ff4f5e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-email:hover {
    color: #e63946;
}

.motto {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff4f5e;
    margin-top: 2rem;
}

.funding-info {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f3f4f6;
    border-radius: 0.75rem;
    text-align: center;
    color: #4b5563;
    border-left: 4px solid #ff4f5e;
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-panel.active {
    right: 0;
}

.notification-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.close-notifications {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
}

.close-notifications:hover {
    color: #111827;
}

.notification-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notification-item {
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: #f3f4f6;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.notification-title {
    font-weight: 600;
    color: #ff4f5e;
    margin-bottom: 0.5rem;
}

.notification-message {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.5;
}

.notification-footer {
    color: #ff4f5e;
    font-weight: 500;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Teen Content Page Styles */

.teen-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ff4f5e;
    margin-bottom: 2rem;
    text-align: center;
}

.teen-icon {
    display: block; 
    width: 4rem; 
    height: 4rem; 
    margin: 0 auto; 
    color: #646464; 
    margin-bottom: 2rem; 
}

.teen-image {
    display: block;
    width: 100%;
    max-width: 300px; 
    height: auto;
    margin: 1rem auto;
}


.teen-edu-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem auto;
    align-items: center;
}

.home-btn {
    display: inline-block;
    background-color: #ff4f5e;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.home-btn:hover {
    background-color: #e63946;
    transform: translateY(-2px);
}

/* Teen Body Styles */

.nutrition-form-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.history-bmi{
    color: #f87171;
    font-size: 1.5rem;
    font-weight: 700;
}

.history-details {
    display: flex;
    flex-direction: column; /* Susun elemen ke bawah */
    align-items: center; /* Pusatkan elemen secara horizontal */
    justify-content: center; /* Pusatkan elemen secara vertikal */
    text-align: center; /* Pastikan teks dalam span juga rata tengah */
}


@media (min-width: 768px) {
    .nutrition-form-container {
        flex-direction: row;
        align-items: flex-start;
    }
    
    #nutritionForm {
        flex: 1;
    }
    
    .nutrition-history {
        flex: 1;
    }
}

.input-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: #4b5563;
    font-weight: 500;
}

.calculate-btn {
    background-color: #ff4f5e;
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 200px;
    margin: 1.5rem auto 0;
    display: block;
}

.calculate-btn:hover {
    background-color: #e63946;
    transform: translateY(-2px);
}

.nutrition-history {
    background-color: #f9fafb;
    border-radius: 1rem;
    padding: 1.5rem;
}

.nutrition-history h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    text-align: center;
}

/* Profile Page Styles */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.profile-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2.5rem;
    position: relative;
}

.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #f3f4f6;
    border-radius: 50%;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-link:hover {
    background-color: #e5e7eb;
    color: #111827;
    transform: translateX(-2px);
}

.back-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.profile-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.profile-content {
    display: flex;
    flex-direction: row;
    align-items: top;
    gap: 2.5rem;
}

.profile-image-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 1rem;
    overflow: hidden;
    border: 3px solid #f3f4f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-image-overlay:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.profile-image-icon {
    color: white;
    width: 1.5rem;
    height: 1.5rem;
}

.profile-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-detail-label {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.875rem;
}

.profile-detail-value {
    font-size: 1rem;
    color: #111827;
}

.edit-profile-btn {
    margin-top: 1.5rem;
    background-color: #ff4f5e;
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 200px;
    align-self: center;
}

.edit-profile-btn:hover {
    background-color: #e63946;
    transform: translateY(-2px);
}

/* Language Switcher */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #f3f4f6;
    border-radius: 50%;
    color: #4b5563;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.875rem;
}

.lang-toggle:hover {
    background-color: #e5e7eb;
    color: #111827;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    width: 64px;
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #4b5563;
}

.mobile-text {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {

    .mobile-menu-btn {
        display: block;
    }

    .nav-right {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-right.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Ubah urutan elemen hanya saat mode mobile */
    .user-menu { order: 1; }
    .notification-icon { order: 2; }
    .lang-toggle { order: 3; }
    .nav-link[href*="about"] { order: 4; }

    /* Tambahkan teks di samping ikon saat mode mobile */
    .notification-icon .mobile-text,
    .lang-toggle .mobile-text {
        display: inline;
        font-size: 0.875rem;
        color: #4b5563;
        margin-left: 0.5rem;
    }

    .notification-panel {
        width: 100%;
        right: -100%;
    }

    .username {
        flex: 1;
    }

    .about-title {
        font-size: 2rem;
    }

    .about-subtitle {
        font-size: 1.25rem;
    }

    .about-card {
        padding: 1.5rem;
    }

    .team-list {
        margin: 0.5rem 0;
    }

    .teen-image{
        max-width: 150px;
    }
    .profile-content {
        flex-direction: column;
        align-items: center;
    }
    
    .main-content {
        margin-top: 150px;
    }

    .teen-edu-container {
        padding: 2rem 2rem;
    }

    .container p {
        font-size: 1rem; 
        line-height: 1.5;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }


    .profile-card {
        padding: 1.5rem;
    }
    
    .profile-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
        align-items: center;
    }
    
    .profile-image-container {
        width: 150px;
        height: 150px;
    }
}