/* Mobile-friendly CSS styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f4f1ec;
}

header {
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(128, 49, 49, 0.1);
    background-color: #fff;
    border-radius: 0 0 25px 25px;
    margin-bottom: 20px;
}

.community-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1000px;
}

@media (max-width: 768px) {
    .community-wrapper {
        flex-direction: column;
        text-align: center;
        gap:0px;
    }

    .community-content {
        margin-left: 0;
    }
}

/* FAQ and Subject Dropdown Styles */
.faq-item, .dropdown-item-container {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: block;
}

.subject-card .dropdown-item-container {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 0.5rem;
}

.faq-question-btn, .dropdown-question-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 15px 0;
    display: block;
}

.subject-card .dropdown-question-btn {
    padding: 10px;
    border-radius: 12px;
    color: white;
}

.faq-question-btn:hover {
    background-color: rgba(128, 49, 49, 0.05);
}

.subject-card .dropdown-question-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.faq-question-content, .dropdown-question-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.faq-text, .dropdown-text {
    flex: 1;
    margin-right: 1rem;
    font-weight: 600;
}

.faq-text {
    color: #803131;
}

.dropdown-text {
    color: white;
    font-size: 14px;
}

.faq-arrow, .dropdown-arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    font-size: 14px;
}

.faq-arrow {
    color: #803131;
}

.dropdown-arrow {
    color: white;
}

.faq-item.active .faq-arrow,
.dropdown-item-container.active .dropdown-arrow {
    transform: rotate(180deg);
}

.faq-answer, .dropdown-answer {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0;
    line-height: 1.6;
    display: block;
    clear: both;
    margin-top: 0;
}

.dropdown-answer {
    color: white;
    font-size: 13px;
    padding-left: 10px;
    padding-right: 10px;
}

.faq-item.active .faq-answer,
.dropdown-item-container.active .dropdown-answer {
    max-height: 500px;
    padding: 15px 0;
}

.dropdown-item-container.active .dropdown-answer {
    padding: 10px;
}

.faq-section .faq-item,
.subject-card .dropdown-item-container {
    display: block !important;
}

.faq-section .faq-answer,
.subject-card .dropdown-answer {
    display: block !important;
    position: static !important;
}

.header-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(128, 49, 49, 0.3);
}

.logo {
    font-size: 24px;
    color: #803131;
    font-weight: bold;
}
/* in your stylesheet */
.btn-row {
  display: flex;
  gap: 10px;
}
.btn-row .get-btn {
  flex: 1;
  max-width: 50%;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}
.logout-btn {
    padding: 8px 16px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
}

.logout-btn {
    background-color: #803131;
    color: white;
}



.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(128, 49, 49, 0.2);
}
.login-btn, .signup-btn {
    padding: 8px 16px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
}

.login-btn {
    background-color: #803131;
    color: white;
}

.signup-btn {
    background-color: white;
    color: #803131;
    border: 2px solid #803131;
}

.login-btn:hover, .signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(128, 49, 49, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #803131;
    font-size: 24px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 20px;
    padding: 5px 0;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(128, 49, 49, 0.3);
    flex-wrap: wrap;
}

.nav-links a {
    color: #803131;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 15px;
}

.nav-links a:hover {
    background-color: rgba(128, 49, 49, 0.1);
}

.hero {
    display: flex;
    flex-direction: row;
    padding: 25px;
    align-items: center;
    margin-bottom: 30px;
    background-color: white;
    border-radius: 20px;
    margin: 0 20px 30px 20px;
    box-shadow: 0 5px 15px rgba(128, 49, 49, 0.1);
}

.hero-content {
    flex: 1;
    padding-right: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #803131;
}

.hero p {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 16px;
}

.store-btn {
    display: inline-block;
    background-color: #803131;
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(128, 49, 49, 0.2);
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(128, 49, 49, 0.3);
}

.subjects {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
    margin-bottom: 30px;
}

.subject-card {
    background-color: #8c3a3a;
    color: white;
    border-radius: 20px;
    padding: 20px;
    width: 32%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 15px rgba(128, 49, 49, 0.2);
    transition: all 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(128, 49, 49, 0.3);
}

.subject-card h3 {
    margin-bottom: 15px;
    text-align: center;
    font-size: 20px;
}

.dropdown {
    margin-bottom: 20px;
}

/* Legacy dropdown-item styles for backward compatibility */
.dropdown-item {
    padding: 10px;
    border-radius: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.get-btn {
    background-color: white;
    color: #803131;
    border: none;
    border-radius: 30px;
    padding: 10px 0;
    margin-top: auto;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.get-btn:hover {
    background-color: #f4f1ec;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

strong {
    font-weight: bold;
}

.community-section, .referral-section, .faq-section {
    padding: 25px;
    margin: 0 20px 30px 20px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(128, 49, 49, 0.1);
}

.community-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.community-content {
    flex: 2;
    margin-left: auto;
    max-width: 600px;
}

.community-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.community-image img {
    max-width: 100%;
    height: auto;
}

.forum-btn {
    display: inline-block;
    background-color: #803131;
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(128, 49, 49, 0.2);
}

.forum-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(128, 49, 49, 0.3);
}

.referral-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.referral-content {
    flex: 1;
}

.referral-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.referral-image img {
    max-width: 100%;
    height: auto;
}

.referral-btn {
    display: inline-block;
    background-color: #803131;
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.referral-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(128, 49, 49, 0.3);
}

.terms {
    font-size: 0.8rem;
    margin-top: 10px;
}

.terms a {
    color: black;
    text-decoration: underline;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 25px;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #803131;
    margin-top: 20px;
    font-size: 14px;
}

.footer a {
    color: #737373;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Login Container Styles */
.login-container {
    max-width: 90%;
    margin: 40px auto;
    background-color: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(128, 49, 49, 0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 25px;
    color: #803131;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #803131;
    box-shadow: 0 0 0 2px rgba(128, 49, 49, 0.2);
}

.login-btnn {
    width: 100%;
    background-color: #803131;
    color: white;
    border: none;
    padding: 12px 0;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-size: 16px;
}

.login-btnn:hover {
    background-color: #6a2929;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(128, 49, 49, 0.2);
}

.login-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    font-size: 14px;
    text-align: center;
}

.login-links a {
    color: #803131;
    text-decoration: none;
    transition: all 0.2s ease;
}

.login-links a:hover {
    text-decoration: underline;
}

.back-home {
    text-align: center;
    margin-top: 20px;
}

.back-home a {
    color: #803131;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
}

.back-home a:hover {
    text-decoration: underline;
}

/* Product page specific styles */
.product-container {
    display: flex;
    gap: 30px;
    padding: 25px;
    margin: 0 20px 30px 20px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(128, 49, 49, 0.1);
}

.product-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 32px;
    color: #803131;
    margin-bottom: 20px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #803131;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    color: #803131;
    font-size: 18px;
}

.rating-link {
    color: #803131;
    text-decoration: underline;
    font-size: 14px;
}

.add-to-cart-btn {
    background-color: #803131;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    font-size: 16px;
}

.add-to-cart-btn:hover {
    background-color: #6a2929;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(128, 49, 49, 0.2);
}
.form-group-1 {
  display: grid;
  grid-template-columns: max-content max-content; /* label in col 1, stars in col 2 */
  column-gap: 14rem;                               /* fixed gap between them */
  align-items: center;                            /* vertical centering */
}

.rating-label {
  /* no width or margin needed—grid handles spacing */
  font-weight: bold;
}

.star-rating {
  display: flex;
  flex-direction: row-reverse;  /* keep the CSS-only star-fill trick */
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 2rem;
  color: #ccc;
  cursor: pointer;
  padding: 0 0.1em;
  user-select: none;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
  color: gold;
}

.star-rating input:checked ~ label {
  color: gold;
}

.reviews-section {
    padding: 25px;
    margin: 0 20px 30px 20px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(128, 49, 49, 0.1);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.reviews-title {
    font-size: 24px;
    color: #803131;
}

.write-review-btn {
    background-color: #803131;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.write-review-btn:hover {
    background-color: #6a2929;
    transform: translateY(-1px);
}

.rating-overview {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: center;
}

.overall-rating {
    text-align: center;
}

.rating-number {
    font-size: 36px;
    font-weight: bold;
    color: #803131;
}

.rating-stars {
    color: #803131;
    font-size: 20px;
    margin: 5px 0;
}

.rating-count {
    font-size: 12px;
    color: #666;
}

.rating-breakdown {
    flex: 1;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rating-label {
    font-size: 14px;
    color: #666;
    width: 15px;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background-color: #803131;
}

.rating-count-num {
    font-size: 14px;
    color: #666;
    width: 20px;
    text-align: right;
}

.review-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.reviewer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #803131;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.reviewer-name {
    font-weight: bold;
    color: #333;
}

.review-date {
    margin-left: auto;
    font-size: 12px;
    color: #666;
}

.review-stars {
    color: #803131;
    font-size: 14px;
    margin-bottom: 8px;
}

.review-text {
    color: #333;
    line-height: 1.5;
}

/* Mobile Navigation */
#mobile-nav-toggle {
    display: none;
}

/* Add Media Queries for Responsive Design */
@media (max-width: 1024px) {
    .subjects {
        flex-wrap: wrap;
    }
    
    .subject-card {
        width: 48%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        display: none; /* Hidden by default */
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        padding-bottom: 20px;
    }
    
    .subjects {
        flex-direction: column;
    }
    
    .subject-card {
        width: 100%;
    }
    
    .community-section, .referral-section {
        flex-direction: column;
        text-align: center;
    }
    
    .community-image, .referral-image {
        margin-top: 20px;
        justify-content: center;
    }
    
    .login-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .product-container {
        flex-direction: column;
    }
    
    .rating-overview {
        flex-direction: column;
        gap: 20px;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-buttons {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
    
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mobile-menu-btn {
        position: absolute;
        right: 20px;
        top: 20px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .hero, .community-section, .referral-section, .faq-section {
        padding: 20px 15px;
        margin: 0 15px 25px 15px;
    }
    
    .login-container {
        padding: 20px;
    }
}
.flash-message {
    padding: 12px 20px;
    margin: 10px 0;
    border-radius: 6px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    animation: fade-in 0.4s ease-in-out;
}

/* Category-specific styles */
.flash-success {
    background-color: #28a745; /* Green */
}

.flash-error {
    background-color: #dc3545; /* Red */
}

.flash-warning {
    background-color: #ffc107; /* Yellow */
    color: #333;
}

.flash-info {
    background-color: #17a2b8; /* Blue */
}

/* Optional: fade-in animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* JavaScript support for mobile menu toggle */
.js-mobile-nav-active .nav-links {
    display: flex !important;
}