/* community.css */

/* Language content styling */
body:not(.kannada) .en {
    display: block;
}

body:not(.kannada) .kn {
    display: none;
}

body.kannada .en {
    display: none;
}

body.kannada .kn,
body.kannada {
    display: block;
    font-family: 'Noto Sans Kannada', sans-serif;
}

/* ---------------- ROOT COLORS ---------------- */
:root {
    --teal-primary: #008080;
    --teal-dark: #004d4d;
    --teal-light: #00cccc;
    --orange-primary: #ff7f50;
    --orange-dark: #e65c35;
    --orange-light: #ff9a75;
    --white: #ffffff;
    --gray-light: #f5f7fa;
    --gray-medium: #e2e8f0;
    --gray-dark: #2c3e50;
    --cream-bg: #fff8dc;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s ease;
    --border-radius: 15px;
}

/* ---------------- GLOBAL ---------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--cream-bg);
    color: var(--gray-dark);
    line-height: 1.7;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.community-container {
    width: 100%;
    background-color: #fff8dc;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Smooth scroll bar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--teal-primary), var(--orange-primary));
    border-radius: 6px;
}

::-webkit-scrollbar-track {
    background: #ddd;
}

/* ---------------- HEADER ---------------- */
.page-header {
    margin-bottom: 0;
    height: 75vh;
    min-height: 450px;
    background-image: linear-gradient(90deg, rgba(22, 48, 5, 0.7) 0%, rgba(196, 110, 57, 0.7) 100%), url('community_assets/community.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    animation: headerZoom 20s ease-in-out infinite;
}

.header-content {
    max-width: 800px;
    z-index: 2;
    padding: 40px 20px;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInDown 1.2s ease;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.page-header p {
    font-size: 1.4rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* ---------------- BUTTONS ---------------- */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(to right, var(--teal-primary), var(--orange-primary));
    color: var(--white);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* ---------------- SCROLL INDICATOR ---------------- */
.scroll-indicator {
    animation: bounce 2s infinite;
    color: var(--white);
    margin-top: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(5px);
}

.arrow {
    width: 30px;
    height: 30px;
    border-right: 3px solid var(--white);
    border-bottom: 3px solid var(--white);
    transform: rotate(45deg);
    margin: 10px auto;
    animation: bounce 2s infinite;
}

/* ---------------- LANGUAGE TOGGLE ---------------- */
.language-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.small-btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.small-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ---------------- SECTIONS ---------------- */
.main-content {
    padding: 0;
}

.community-section,
.forum-section,
.post-section {
    background-color: #fff8dc;
    padding: 80px 0;
    position: relative;
    scroll-margin-top: 80px;
}

.community-section:nth-child(even) {
    background: #fff8dc;
}

.community-section:nth-child(odd) {
    background: #fff8dc;
}

/* ---------------- SECTION HEADERS ---------------- */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--teal-dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--teal-primary), var(--orange-primary));
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gray-dark);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------------- FORUM CATEGORIES ---------------- */
.forum-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* exactly 2 columns */
    gap: 30px;
    margin-top: 40px;
}


.forum-category {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.forum-category:hover {
    transform: translateY(-5px);
}

.forum-category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--teal-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.forum-category h3 i {
    color: var(--teal-primary);
    font-size: 1.3rem;
}

/* ---------------- DISCUSSION LISTS ---------------- */
.discussion-list {
    list-style: none;
}

.discussion-list li {
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-medium);
}

.discussion-list li:last-child {
    border-bottom: none;
}

.discussion-list a {
    font-weight: 600;
    color: var(--teal-dark);
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: block;
}

.discussion-list a:hover {
    color: var(--orange-primary);
}

.meta {
    font-size: 0.85rem;
    color: var(--gray-dark);
    opacity: 0.8;
    display: block;
    margin-bottom: 8px;
}

.discussion-list p {
    font-size: 0.95rem;
    color: var(--gray-dark);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ---------------- LISTINGS ---------------- */
.listings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* exactly 2 columns */
    gap: 30px;
    margin-top: 40px;
}

.listing-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--teal-primary);
}

.listing-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--orange-primary);
}

.listing-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--teal-dark);
}

.listing-card p {
    margin-bottom: 12px;
    color: var(--gray-dark);
}

.listing-card strong {
    color: var(--teal-dark);
}

/* ---------------- SERVICES GRID ---------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* exactly 2 columns */
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--teal-primary), var(--orange-primary));
    color: var(--white);
    font-size: 2rem;
    margin: 0 auto 20px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--teal-dark);
}

.service-card p {
    margin-bottom: 15px;
    color: var(--gray-dark);
}

/* ---------------- POST FORM ---------------- */
.post-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.post-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--teal-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px;
    border: 2px solid var(--gray-medium);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ---------------- FOOTER ---------------- */
.page-footer {
    background: linear-gradient(135deg, var(--teal-dark), var(--gray-dark));
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-section p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--white);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--orange-light);
}

.footer-section i {
    width: 20px;
    margin-right: 10px;
    color: var(--orange-light);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0;
    opacity: 0.8;
}

/* ---------------- ANIMATIONS ---------------- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* ---------------- RESPONSIVE DESIGN ---------------- */
@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2.8rem;
    }

    .page-header p {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .forum-categories,
    .listings,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .community-container {
        padding: 0 15px;
    }

    .page-header {
        min-height: 70vh;
        padding-top: 60px;
    }

    .page-header h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .page-header p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .community-section,
    .forum-section,
    .post-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .forum-category,
    .listing-card,
    .service-card {
        padding: 20px;
    }

    .post-form-container {
        padding: 30px 20px;
    }

    .language-toggle-container {
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 576px) {
    .community-container {
        padding: 0 12px;
    }

    .page-header {
        min-height: 60vh;
        padding-top: 50px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    .community-section,
    .forum-section,
    .post-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .forum-categories,
    .listings,
    .services-grid {
        gap: 15px;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Schema.org microdata styling */
[itemprop] {
    border: none !important;
}