﻿/* ============================================================================
   PUBLIC-LAYOUT.CSS — All colors use CSS variables from active theme
   Theme variables are set in /css/themes/themeN.css
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

    body[lang="gu"] {
        font-family: 'Noto Sans Gujarati', sans-serif;
    }

    body[lang="hi"] {
        font-family: 'Noto Sans Devanagari', 'Poppins', sans-serif;
    }

.main-content {
    min-height: calc(100vh - 400px);
    padding-top: 20px;
}

.container {
    max-width: 1200px;
}

section {
    padding: 40px 0;
}

/* ============================================================================
   SCROLL TO TOP
   ============================================================================ */

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--theme-scroll-btn);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

    .scroll-top-btn.show {
        opacity: 1;
        visibility: visible;
    }

    .scroll-top-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    }

    .scroll-top-btn i {
        font-size: 20px;
    }

/* ============================================================================
   FOOTER
   ============================================================================ */

.modern-footer {
    background: var(--theme-footer-bg);
    color: white;
    margin-top: 60px;
}

.footer-top {
    padding: 50px 0 30px;
}

.footer-widget {
    margin-bottom: 20px;
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
    color: white;
}

    .footer-title::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 50px;
        height: 3px;
        background: var(--theme-secondary);
        border-radius: 2px;
    }

.footer-widget p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.7);
}

.footer-contact i {
    color: var(--theme-secondary);
    width: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-links a {
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .footer-links a::before {
            content: '\f105';
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            color: var(--theme-secondary);
            transition: all 0.3s;
        }

        .footer-links a:hover {
            color: white;
            transform: translateX(5px);
        }

            .footer-links a:hover::before {
                color: white;
            }

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

    .footer-social a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        color: white;
        transition: all 0.3s;
        text-decoration: none;
    }

        .footer-social a:hover {
            background: var(--theme-secondary);
            transform: translateY(-5px);
        }

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

    .footer-bottom p {
        margin: 0;
        font-size: 14px;
        color: rgba(255,255,255,0.7);
    }

    .footer-bottom strong {
        color: white;
    }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 991px) {
    .main-content {
        padding-top: 15px;
        padding-bottom: 30px;
    }

    section {
        padding: 30px 0;
    }

    .footer-top {
        padding: 40px 0 20px;
    }

    .footer-widget {
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 10px;
        padding-bottom: 20px;
    }

    section {
        padding: 20px 0;
    }

    .footer-top {
        padding: 30px 0 15px;
    }

    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    overflow: hidden;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.card-text {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: white !important;
    border: none;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        opacity: 0.92;
        color: white !important;
    }

.btn-secondary {
    background: #6c757d;
    color: white !important;
    border: none;
}

    .btn-secondary:hover {
        background: #5a6268;
        transform: translateY(-2px);
        color: white !important;
    }

.btn-outline-primary {
    border: 2px solid var(--theme-primary);
    color: var(--theme-primary);
    background: transparent;
}

    .btn-outline-primary:hover {
        background: var(--theme-primary);
        color: white;
        transform: translateY(-2px);
    }

/* ============================================================================
   PAGE HEADERS
   ============================================================================ */

.page-header {
    background: var(--theme-topbar-bg);
    padding: 40px 0;
    margin-bottom: 40px;
    color: white;
    text-align: center;
}

    .page-header h1 {
        font-size: 32px;
        font-weight: 700;
        margin-bottom: 10px;
        color: white;
    }

    .page-header p {
        font-size: 16px;
        opacity: 0.9;
        color: white;
    }

@media (max-width: 768px) {
    .page-header {
        padding: 30px 0;
        margin-bottom: 30px;
    }

        .page-header h1 {
            font-size: 24px;
        }

        .page-header p {
            font-size: 14px;
        }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-gradient {
    background: var(--theme-topbar-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-light-gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    color: #2c3e50;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: var(--theme-topbar-bg);
        border-radius: 2px;
    }

@media (max-width: 768px) {
    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
}

/* ============================================================================
   LINKS & ACCENTS
   ============================================================================ */

a {
    color: var(--theme-primary);
    transition: color 0.3s;
}

    a:hover {
        color: var(--theme-secondary);
    }

.badge-primary,
.badge.bg-primary {
    background: var(--theme-primary) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15) !important;
}

.pagination .page-link {
    color: var(--theme-primary);
}

.pagination .page-item.active .page-link {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
}

/* ============================================================
   BUTTON TEXT VISIBILITY FIX
   All form buttons with theme backgrounds must show white text
   ============================================================ */
.btn-login,
.btn-send-password,
.btn-send-otp,
.btn-verify-otp,
.btn-change-password,
.btn-primary-member,
.btn-transaction-animated,
.btn-view-receipt,
.btn-primary-ledger,
.btn-view-toggle.active,
.btn-calculate-main,
.btn-primary-action,
.btn-action.btn-primary-action {
    color: white !important;
}

.btn-secondary-action,
.btn-action.btn-secondary-action {
    color: var(--theme-primary) !important;
}

    .btn-secondary-action:hover,
    .btn-action.btn-secondary-action:hover {
        color: white !important;
    }

/* Outline/secondary buttons keep their theme color text */
.btn-back-change,
.btn-back-receipt,
.btn-secondary-member,
.btn-secondary-ledger,
.btn-back-gifts {
    color: var(--theme-primary) !important;
}

    .btn-back-change:hover,
    .btn-back-receipt:hover,
    .btn-secondary-member:hover,
    .btn-secondary-ledger:hover,
    .btn-back-gifts:hover {
        color: white !important;
    }
