/*---------------------------------------
  CUSTOM PROPERTIES ( VARIABLES )             
-----------------------------------------*/
:root {
    --white-color: #ffffff;
    --primary-color: #13547a;
    --secondary-color: #D9B573;
    --section-bg-color: #f0f8ff;
    --custom-btn-bg-color: #80d0c7;
    --custom-btn-bg-hover-color: #13547a;
    --dark-color: #000000;
    --p-color: #2a2a2b;
    --border-color: #7fffd4;

    --accent1: #3b82f6;
    --secondary-color2: #ecd6ad;

    --primary: #4a6fa5;
    --secondary: #f9c846;
    --accent: #e74c3c;
    --light: #f5f7fa;
    --dark: #2c3e50;
    --success: #218838;


    --h1-font-size: 65px;
    --h2-font-size: 24px;
    --h3-font-size: 32px;
    --h4-font-size: 28px;
    --h5-font-size: 24px;
    --h6-font-size: 15px;
    --p-font-size: 17px;
    --menu-font-size: 14px;
    --btn-font-size: 13px;
    --copyright-font-size: 16px;

    --border-radius-medium: 20px;
    --border-radius-small: 4px;
    --radius: 14px;

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* ========== LIGHT/DARK MODE VARIABLES ========== */
:root {
    /* Light theme (default) */
    --bg-color: #fbf9f9;
    --text-color: #000;
    --nav-bg: #ffffff;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-shadow: rgba(0, 0, 0, 0.15);
    --border-color: #e0e0e0;
    --footer-bg: #ffffff;
    --footer-text: #333333;
    --link-hover: #80d0c7;
    --section-bg: #f0f8ff;
    --kids-bg: linear-gradient(to right, #007ABB 0%, 15.384615957736969%, #069BD3 30.769231915473938%, 65.38461595773697%, #ADD7E7 100%);
    --story: #f0f7ff;
    --less: #e8f4f8;
    --vers: #fff9e6;
    --login: #08c8ee;
    --term: #b4c7dd;
    --hh: #4a6fa5;
    --memo: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    --primaryy: #4a6fa5;
    --secondaryy: #e7c566;
    --bg-hover-color: #A67F38;
    --caption: #6c757d4a;
    --gray-color: #d4cbcb;
    /*--bg: #e6e6e6;*/
    --bg: #f2ede1;
    --devotion: #424243;
    --scripture: #585858e3;
    --time: blue;
}

[data-theme="dark"] {
    /* Dark theme */
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --nav-bg: #2d2d2d;
    --card-bg: #2d2d2d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-shadow: rgba(0, 0, 0, 0.5);
    --border-color: #404040;
    --footer-bg: #252525;
    --footer-text: #ffffff;
    --link-hover: #80d0c7;
    --section-bg: #2a2a2a;
    --kids-bg: #1a1a1a;
    --story: #252525;
    --less: #343333;
    --vers: #4c4a4a;
    --login: #08c8ee;
    --term: #454242;
    --hh: #f9c846;
    --memo: linear-gradient(135deg, #e8e0c5, #efd9b1);
    --primaryy: #f9c846;
    --secondaryy: #4a6fa5;
    --bg-hover-color: #A67F38;
    --caption: #252525;
    --gray-color: #665e5e;
    --bg: black;
    --devotion: #424243;
    --scripture: #040404e3;
    --time: yellow;
}



/* Community Page Specific Styles */
.container2 {
    max-width: 1175px;
    margin: 0 auto;
    /* padding: 0 15px; */
}

/* User Info Bar */
.user-info-bar {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 12px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.user-details {
    flex: 1;
}

.user-details h3 {
    color: var(--primary-dark);
    margin-bottom: 5px;
    text-align: center;
}

.user-details p {
    color: var(--gray);
    font-size: 0.9rem;
}

.user-actions {
    display: flex;
    gap: 10px;
}

/* Main Layout */
.community-main {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 10px;
    margin-bottom: 5px;
}

/* Sidebar */
.community-sidebar {
    background: var(--footer-bg);
    padding: 10px;
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow);
    height: fit-content;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-nav {
    margin: 1px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
    margin-bottom: 8px;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--bg-hover-color);
    border-left-color: var(--secondary-color);
}

.nav-item.active {
    background-color: color-mix(in srgb, var(--secondary-color) 10%, transparent);
    color: var(--bg-hover-color);
    border-left-color: var(--secondary-color);
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-badge {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 700;
}

/* Verse of the Day */
.verse-of-day {
    background: color-mix(in srgb, var(--secondary-color) 7%, transparent);
    padding: 20px;
    border-radius: var(--border-radius-small);
    border-left: 4px solid var(--secondary-color);
    font-style: italic;
    color: var(--text-color);
    /* margin-top: 20px; */
}

.verse-of-day i {
    color: var(--secondary-color);
    margin-right: 10px;
    font-size: 1.2rem;
    
}

/* Main Content */
.community-content {
    min-height: 600px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    display: block;
}

.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 1px;
    /* border-bottom: 2px solid rgba(58, 110, 165, 0.1); */
}

.section-title i {
    color: var(--secondary-color);
}

/* Cards Container */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card-item {
    background: var(--footer-bg);
    border-radius: var(--border-radius-small);
    padding: 25px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.card-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary-color));
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    color: var(--primary-dark);
    font-size: 1.3rem;
    line-height: 1.3;
    flex: 1;
}

.card-category {
    background-color: rgba(58, 110, 165, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.card-content {
    color: var(--text-color);
    margin-bottom: 20px;
    flex: 1;
    line-height: 1.6;
    padding: 0 10px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    color: var(--gray);
    font-size: 0.9rem;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.prayed-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.prayed-btn:hover {
    background-color: var(--bg-hover-color);
}

.prayed-btn.prayed {
    background-color: var(--success);
}

/* Form Container */
.form-container {
    background: var(--footer-bg);
    padding: 10px;
    border-radius: var(--border-radius-small);
    margin-top: 1px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}

.form-title {
    font-family: 'Playfair Display', serif;
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    /* margin-bottom: 8px; */
    color: var(--primary-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    width: 100%;
    /* padding: 10px; */
    /* border: 2px solid #e0e6ed; */
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #d1d1d1;
    color: var(--dark-color);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Chat Sidebar */
.community-chat {
    background: var(--footer-bg);
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: fit-content !important;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 10px 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.chat-header p {
    font-size: 0.9rem;
    color: var(--bg-hover-color);
}

.online-count {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--dark-color);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 10px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    padding: 5px;
    overflow-y: auto;
    background-color: var(--chat-bg);
}

.message {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.message-content {
    background: #8EBFB6;
    padding: 12px 16px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    max-width: 80%;
}

.message-sender {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.message-text {
    color: black;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 5px;
    text-align: right;
}

.message.current-user {
    flex-direction: row-reverse;
}

.message.current-user .message-content {
    background: #E6E0D1;
    color: var(--text-color);
    border-top-left-radius: 18px;
    border-top-right-radius: 4px;
}

.message.current-user .message-sender {
    color: var(--text-color);
}

.message.current-user .message-text {
    color: var(--text-color);
}

.message.current-user .message-time {
    color: var(--time);
}

.chat-input-container {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--footer-bg);
}

.chat-input-group {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #f1dd8c;
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    color: black;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    background:
        color-mix(in srgb, var(--secondary-color) 30%, transparent);
    color: var(--text-color);
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(58, 110, 165, 0.3);
}

.chat-send-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
}

.chat-notice {
    text-align: center;
    padding: 15px;
    background-color: rgba(232, 185, 35, 0.1);
    border-radius: var(--border-radius-small);
    margin: 15px 20px;
    font-size: 0.85rem;
    color: var(--primary-dark);
}

.chat-notice i {
    color: var(--secondary-color);
    margin-right: 8px;
}

/* Agenda Grid */
.agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.agenda-item {
    background: var(--footer-bg);
    border-radius: var(--border-radius-small);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    border-left: 5px solid var(--accent);
    transition: var(--transition);
}

.agenda-item:hover {
    transform: translateX(5px);
}

.agenda-date {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.agenda-date .day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.agenda-date .month {
    font-size: 1rem;
    text-transform: uppercase;
    margin-top: 5px;
    color: var(--primary);
}

.agenda-details {
    flex: 1;
}

.agenda-details h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.agenda-time {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fasting-badge {
    display: inline-block;
    background: linear-gradient(to right, #e74c3c, #c0392b);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

/* Auth Tab */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--footer-bg);
    padding: 40px;
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow);
    border-top: 5px solid var(--primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.auth-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    background-color: var(--footer-bg);
    border: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.auth-tab.active {
    background-color: var(--primary);
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.5s;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--footer-bg);
    border-radius: var(--border-radius-small);
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    animation: slideUp 0.4s ease forwards;
    overflow: hidden;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    /* padding: 40px 0px; */
    position: relative;
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px 50px;
}

.modal-content {
    margin-top: 5rem;
    width: 20%;
}

/* Social Login Buttons */
.social-login {
    margin-bottom: 25px;
}

.social-btn {
    width: 100%;
    /* padding: 14px; */
    border-radius: 8px;
    border: 2px solid #e0e6ed;
    background: var(--footer-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-color);
}

.social-btn.google {
    color: #5f6368;
    border-color: #dadce0;
}

.social-btn.google:hover {
    background-color: #f8f9fa;
    border-color: #c0c0c0;
}

.social-btn.google i {
    color: #4285F4;
    font-size: 1.2rem;
}

.divider {
    text-align: center;
    margin: 9px 9px;
    /* position: relative; */
    /* color: var(--gray); */
    /* font-size: 0.9rem; */
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    /* top: 50%; */
    width: 45%;
    height: 1px;
    background-color: #e0e6ed;
    display: none;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Modal Form Styles */
.modal-form {
    display: none;
}

.modal-form.active {
    display: block;
    animation: fadeIn 0.5s;
}

.modal-tabs {
    display: flex;
    background: var(--footer-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.modal-tab {
    flex: 1;
    padding: 1px;
    text-align: center;
    background-color: var(--footer-bg);
    border: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
    font-size: 1rem;
    position: relative;
}

.modal-tab.active {
    background-color: var(--primary);
    color: white;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--footer-bg);
    padding: 15px 25px;
    border-radius: var(--border-radius-small);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 5px solid var(--success);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(150%);
    transition: transform 0.5s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    font-size: 1.5rem;
    color: var(--success);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .community-main {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .community-chat {
        /* grid-column: 1 / -1; */
        height: 400px;
    }
}



@media (max-width: 992px) {
    .community-main {
        grid-template-columns: 1fr 1fr;
        display: grid;
    }

    .community-sidebar,
    .community-chat {

        margin-bottom: 20px;
    }

    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

}

@media (max-width: 768px) {
    .user-info-bar {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .agenda-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .form-container {
        padding: 20px;
    }

    .auth-container {
        padding: 25px;
    }

    .modal-content {
        margin-top: 5rem;

    }

    /*========*/
    .community-main {
        grid-template-columns: 1fr 1fr;
        display: grid;

    }

    .community-sidebar,
    .community-chat {
       /* order: -; */
        margin-bottom: 20px;
    }

    .community-sidebar {
        height: 400px;
    }

    
.community-chat {
    height: 400px !important;
}


    .user-info-bar {
        margin-bottom: 30px;
    }


}

@media (max-width: 480px) {
    .community-content {
        padding: 0;
    }

    .modal-content {
        margin-top: 5rem;
        width: 80% !important;
    }

     .user-info-bar {
        margin-bottom: 10px;
    }

    .sidebar-nav {
    margin: 1px 0;
}

    .community-main {
        display: block;
    }

    .modal-body {
        padding: 10px 20px;
    }

    .terms {
        font-size: 13px;
    }

    .section-title {
    font-size: 1.2rem;
    margin-bottom: -11px;
}

    .nav-item {
    gap: 15px;
    padding: 10px;
    margin-bottom: 0px;
}

    .password-hint {
        font-size: 13px;
    }

    .card-item {
        padding: 20px;
    }

    .community-chat {
        height: 550px !important;
        margin-top: -24% !important;
    }

    .agenda-item {
        flex-direction: column;
    }

    .agenda-date {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
}