/* Corporate Membership Portal CSS */

:root {
    --primary-color: #FF9933; /* Saffron */
    --secondary-color: #333333; /* Dark Grey */
    --bg-color: #f8f9fa;
    --text-color: #1a1a1a;
    --light-gray: #e5e5e5;
    --white: #ffffff;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --font-family: 'Poppins', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: #222;
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--font-family);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

.form-group input[type="file"] {
    padding: 0.5rem;
    background: var(--white);
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background-color: #0b3b64;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-submit:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Card layout */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Header / Nav */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3%;
    /* changed padding to percentages for better edge fitting */
    max-width: 100%;
    /* forces edge-to-edge layout */
    margin: 0 auto;
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.2rem;
    align-items: center;
    margin-left: auto;
    /* Pushes the menu and lang-switch to the right */
    margin-right: 1.5rem;
    /* Space before language toggle */
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    border-left: 2px solid #ddd;
    padding-left: 1.5rem;
}

.nav-links li a {
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links li a:hover::after {
    width: 60%;
}

@keyframes pulse-blink {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.4);
        background-color: var(--white);
        color: var(--primary-color);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(45, 106, 79, 0);
        background-color: var(--primary-color);
        color: var(--white);
        transform: scale(1.03);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(45, 106, 79, 0);
        background-color: var(--white);
        color: var(--primary-color);
        transform: scale(1);
    }
}

.nav-links li a.nav-btn-highlight {
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s ease;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--primary-color);
}

.nav-links li a.nav-btn-highlight::after {
    display: none;
    /* remove default underline */
}

.nav-links li a.nav-btn-highlight:hover {
    animation: pulse-blink 1.5s infinite;
}

.nav-links .btn-nav-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), #555555);
    color: var(--white);
    font-weight: 600;
    padding: 0.7rem 1.6rem;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(51, 51, 51, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    border: none;
}

.nav-links .btn-nav-primary::after {
    display: none;
    /* No underline on button */
}

.nav-links .btn-nav-primary:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(51, 51, 51, 0.4);
    background: linear-gradient(135deg, #222222, #444444);
}

/* Mobile Responsive Header */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    .logo {
        font-size: 1.3rem;
        /* slightly smaller on mobile */
    }

    .nav-links {
        display: none;
        /* Hidden by default entirely */
        flex-direction: column;
        position: absolute;
        top: 100%;
        /* Right below header */
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 1.5rem 2rem;
        gap: 1.5rem;
        z-index: 99;
        margin-left: 0;
        margin-right: 0;
        align-items: flex-start;
        /* align text left for mobile menu */
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        font-size: 1.2rem;
    }

    .nav-links li a::after {
        display: none;
        /* remove hover effect in mobile so it doesn't look weird */
    }

    .nav-links .btn-nav-primary {
        display: inline-block;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .lang-switch {
        display: none;
        /* Default hidden */
        width: 100%;
        border-left: none;
        padding-left: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #eee;
        justify-content: center;
        background: var(--white);
        position: absolute;
        top: calc(100% + 350px);
        /* Arbitrary push down, JS or layout handles this better if appended into nav, but let's just make it toggle active */
        left: 0;
        z-index: 101;
    }

    /* Bring language switch inside menu flow if both are active */
    .lang-switch.active {
        display: flex;
        position: static;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 250px;
    background: var(--white);
    border-right: 1px solid var(--light-gray);
    padding: 2rem 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: block;
    padding: 1rem 2rem;
    color: #555;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(15, 76, 129, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-color);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #444;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* Badges */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.pending {
    background: #ffeeba;
    color: #856404;
}

.badge.approved {
    background: #d4edda;
    color: #155724;
}

.badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.badge.admin {
    background: #cce5ff;
    color: #004085;
}

/* Membership ID Card */
.id-card {
    width: 350px;
    background: linear-gradient(135deg, var(--primary-color), #e68525);
    color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    font-family: 'Courier New', Courier, monospace;
}

.id-card-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.id-card-header h3 {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.id-card-body {
    padding: 20px;
    display: flex;
    gap: 15px;
}

.id-card-photo {
    width: 100px;
    height: 120px;
    background: #eee;
    border: 3px solid var(--white);
    border-radius: 8px;
    overflow: hidden;
}

.id-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-card-details {
    flex: 1;
}

.id-card-details p {
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #d1e8ff;
}

.id-card-details strong {
    color: var(--white);
    font-size: 1rem;
    display: block;
    margin-bottom: 2px;
}

.id-card-footer {
    background: var(--white);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
}

.qr-placeholder {
    width: 50px;
    height: 50px;
    background: #eee;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

/* Footer Styles */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 4rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.footer-col h3 span {
    color: #4ade80;
    /* Brighter accent color matching nature/NGO theme */
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col ul li a:before {
    content: '\f105';
    /* FontAwesome angle-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-col ul li a:hover:before {
    color: #4ade80;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(45, 106, 79, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.flex {
    display: flex;
}

.gap-1 {
    gap: 1rem;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.text-muted {
    color: #777;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================
   RESPONSIVE - TABLET (768px)
   ============================ */
@media (max-width: 768px) {
    /* Hero Section */
    .hero h1,
    section h1 {
        font-size: 2rem !important;
    }

    .hero p,
    section > .container > p {
        font-size: 1rem !important;
    }

    /* Container */
    .container {
        padding: 1.2rem;
    }

    /* Section padding */
    section,
    .content-section {
        padding: 3rem 1rem !important;
    }

    /* Grid cards - force single column */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Counter section */
    section .container[style*="flex"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    section .container[style*="flex"] h2 {
        font-size: 2.5rem !important;
    }

    /* Cards */
    .card {
        padding: 1.2rem;
    }

    /* Section headings */
    h2 {
        font-size: 1.6rem !important;
    }

    /* Dashboard / Admin */
    .dashboard-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--light-gray);
        padding: 0.5rem 0;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        gap: 0;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-menu li {
        flex-shrink: 0;
    }

    .sidebar-menu li a {
        padding: 0.8rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .sidebar-menu li a:hover,
    .sidebar-menu li a.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary-color);
    }

    .main-content {
        padding: 1rem;
    }

    /* Data Tables - horizontal scroll */
    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.6rem 0.5rem;
    }

    /* Admin member search/filter area */
    .flex.justify-between {
        flex-direction: column;
        gap: 1rem;
    }

    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        padding: 0 1.2rem 2rem;
    }

    .footer-col h3 {
        font-size: 1.3rem;
    }

    /* ID Card */
    .id-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    /* Forms */
    form {
        max-width: 100% !important;
    }

    /* CTA button */
    .btn-submit {
        font-size: 0.95rem;
        padding: 0.7rem 1.2rem;
    }

    /* Booth Modal */
    #boothModal .card {
        width: 90% !important;
        max-width: 400px;
    }

    /* Charts container - 1 column on tablet */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ============================
   RESPONSIVE - MOBILE (480px)
   ============================ */
@media (max-width: 480px) {
    /* Hero */
    .hero h1,
    section h1 {
        font-size: 1.6rem !important;
        line-height: 1.3;
    }

    .hero p {
        font-size: 0.9rem !important;
    }

    /* Container */
    .container {
        padding: 0.8rem;
    }

    /* Section */
    section,
    .content-section {
        padding: 2rem 0.5rem !important;
    }

    /* Headings */
    h2 {
        font-size: 1.3rem !important;
    }

    h3 {
        font-size: 1.05rem;
    }

    /* Counter numbers */
    section .container[style*="flex"] h2 {
        font-size: 2rem !important;
    }

    section .container[style*="flex"] p {
        font-size: 0.95rem !important;
    }

    /* Cards */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Admin sidebar scrollable tabs */
    .sidebar-menu li a {
        padding: 0.6rem 0.8rem;
        font-size: 0.78rem;
    }

    .main-content {
        padding: 0.5rem;
    }

    /* Tables */
    .data-table th,
    .data-table td {
        padding: 0.4rem;
        font-size: 0.78rem;
    }

    /* ID Card */
    .id-card {
        width: 100%;
    }

    .id-card-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .id-card-photo {
        width: 80px;
        height: 100px;
    }

    /* Navbar */
    .logo img {
        max-height: 40px !important;
    }

    /* Footer */
    .footer-container {
        padding: 0 0.8rem 1.5rem;
    }

    .social-links {
        justify-content: center;
    }

    /* CTA Section */
    a.btn-submit {
        padding: 0.9rem 2rem !important;
        font-size: 1rem !important;
    }

    /* Focus area images */
    [style*="height: 220px"] {
        height: 180px !important;
    }

    /* Join form steps */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }

    /* Badges */
    .badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ============================
   RESPONSIVE - LARGE SCREENS (1200px+)
   ============================ */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .main-content {
        padding: 2.5rem;
    }
}

/* ============================
   RESPONSIVE - SMALL LAPTOP (1024px)
   ============================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 200px;
    }

    .sidebar-menu li a {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.8rem !important;
    }
}

/* Ensure images never overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure tables don't overflow on mobile - wrap in scrollable container */
.card[style*="overflow-x"] {
    -webkit-overflow-scrolling: touch;
}

/* Print styles */
@media print {
    .sidebar,
    .menu-toggle,
    .nav-links,
    .lang-switch,
    header {
        display: none !important;
    }

    .dashboard-wrapper {
        display: block;
    }

    .main-content {
        padding: 0;
    }
}