/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #f3e8ff 50%, #fef3c7 100%);
    background-attachment: fixed;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navbar */
header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.logo img {
    height: 45px;
    width: auto;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ff6b9d;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 80%;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 80px; /* Below the header */
    left: 0;
    right: 0;
    bottom: 0; /* Cover the full screen */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98), rgba(118, 75, 162, 0.98));
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000; /* Higher than everything */
    display: none; /* Hidden by default */
    transition: all 0.3s ease;
    overflow-y: auto; /* Allow scrolling if needed */
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 1rem;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mobile-menu.active {
    display: flex; /* Show when active */
    opacity: 1;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    display: block; /* Ensure it's a block element */
    width: 100%; /* Full width */
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem 1rem;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 4rem auto 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 20px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: brightness(1); }
    to { filter: brightness(1.1); }
}

.hero h2 {
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1rem;
    color: #1e40af;
    font-weight: 600;
}

.hero p {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-bottom: 1.5rem;
    color: #374151;
    line-height: 1.7;
    max-width: 1200px;
    font-weight: 400;
}

.hero a {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.hero a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hero a:hover::before {
    left: 100%;
}

.hero a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.hero ul {
    text-align: left;
    padding-left: 1.5rem;
    margin: 1rem 0;
    max-width: 1000px;
    list-style: none; /* Remove default bullets */
  }

.hero li {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 1200px;
    font-weight: 400;
    position: relative;
    padding-left: 4rem; /* Increased padding for custom marker */
  }

/* Custom list markers based on content context */
.hero li::before {
    content: '💰'; /* Default money symbol */
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    color: #3b82f6;
}

/* Salary components list - briefcase/money related */
.hero li:nth-child(1)::before { content: '💼'; } /* Basic Salary */
.hero li:nth-child(2)::before { content: '🏠'; } /* House Rent Allowance */
.hero li:nth-child(3)::before { content: '🎁'; } /* Special Allowances */
.hero li:nth-child(4)::before { content: '🏢'; } /* Employer Contributions */
.hero li:nth-child(5)::before { content: '📉'; } /* Deductions */

/* Tax regimes list - scale/balance symbols */
.hero h2:nth-of-type(2) + p + ul li:nth-child(1)::before { content: '⚖️'; } /* Old Regime */
.hero h2:nth-of-type(2) + p + ul li:nth-child(2)::before { content: '⚖️'; } /* New Regime */

/* Benefits/Why it matters list - checkmark/target symbols */
.hero h2:nth-of-type(3) + ul li:nth-child(1)::before { content: '📅'; } /* Plan your monthly budget */
.hero h2:nth-of-type(3) + ul li:nth-child(2)::before { content: '📈'; } /* Decide on investments */
.hero h2:nth-of-type(3) + ul li:nth-child(3)::before { content: '🤝'; } /* Negotiate better */
.hero h2:nth-of-type(3) + ul li:nth-child(4)::before { content: '🎯'; } /* Prepare for long-term goals */

/* Regime Page Specific Styles */
.regime-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: -4rem;
}

.regime-buttons a {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    text-align: center;
}

.regime-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

.regime-buttons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.regime-buttons a:hover::before {
    left: 100%;
}

#poll {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

#poll-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.poll-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.poll-btn.old {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.poll-btn.old:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #d97706, #b45309);
}

.poll-btn.new {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.poll-btn.new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.poll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#pollChart {
    max-width: 100%;
    height: 300px;
    margin: 0 auto;
}

/* Calculator Actions */
.calculator-actions {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    min-width: 250px;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.action-btn.secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-icon {
    font-size: 1.25rem;
}

.btn-text {
    font-size: 1rem;
    white-space: nowrap;
}

/* Mobile adjustments for calculator actions */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        min-width: 280px;
        width: 100%;
        max-width: 350px;
    }
}

/* Add padding to body to account for fixed header */
body {
    padding-top: 0;
}

/* Adjust hero spacing for mobile */
@media (max-width: 768px) {
    .hero {
        margin: 5rem 1rem 2rem;
        padding: 3rem 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Footer */
footer {
    background-color: #1e3a8a;
    color: white;
    text-align: center;
    align-items: center;
    padding: 1rem;
}

.footer-copy span {
    color: #38bdf8;
}

footer .footer-copy {
    font-size: 13px;
    margin-bottom: 0.5rem;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

footer .footer-links a {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.9rem;
}

footer .footer-links a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #1f2037;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    max-width: 500px;
    margin: 40px auto;
    box-sizing: border-box;
    word-wrap: break-word;
}

.modal-content h2 {
    margin-top: 0;
    color: #60a5fa;
}

.modal-content p {
    margin-bottom: 0;
}

.developer-link {
    background-color: #577b8b;
    color: #ebacefeb;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bolder;
}

.developer-link:hover {
    background-color: #0ea5e9;
    color: #fff;
}

.close {
    position: absolute;
    top: 10px;
    right: 24px;
    width: fit-content;
    height: 20px;
    line-height: 24px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
}

.close:hover {
    color: #f87171;
}

/* Calculator Modal */
.calculator-modal {
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1f2937;
}

.calculator-modal h2 {
    color: #1e40af;
    text-align: center;
    margin-bottom: 1rem;
}

.calculator-modal .close {
    color: #6b7280;
    font-size: 28px;
    top: 15px;
    right: 20px;
}

.calculator-modal .close:hover {
    color: #ef4444;
}

/* Enhanced Table Styling for Modal Tables */
.calculator-modal table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.calculator-modal th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
}

.calculator-modal td {
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-top: none;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
}

.calculator-modal tbody tr:nth-child(even) {
    background: #f8fafc;
}

.calculator-modal tbody tr:nth-child(odd) {
    background: #ffffff;
}

.calculator-modal tbody tr:hover {
    background: #eff6ff;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.calculator-modal .display-cell {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1f2937;
}

.calculator-modal .computed {
    color: #059669;
    font-weight: 700;
    text-align: center;
}

.calculator-modal th,
.calculator-modal td {
    text-align: center;
}

.calculator-modal .final-row {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border: 3px solid #f59e0b;
    font-weight: 800;
    color: #92400e;
}

.calculator-modal .final-row td {
    color: #92400e;
    font-size: 16px;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .calculator-modal table {
        font-size: 12px;
    }

    .calculator-modal th,
    .calculator-modal td {
        padding: 10px 8px;
    }

    .calculator-modal th {
        font-size: 13px;
    }
}

/* Table container styling */
.calculator-modal .table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calculator-modal .card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Main Calculator Table Styling - Same as Modal Tables */
#table1-container {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
}

#table1-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#table1-container th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
}

#table1-container td {
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-top: none;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
}

#table1-container tbody tr:nth-child(even) {
    background: #f8fafc;
}

#table1-container tbody tr:nth-child(odd) {
    background: #ffffff;
}

#table1-container tbody tr:hover {
    background: #eff6ff;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

#table1-container .display-cell {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1f2937;
}

#table1-container .computed {
    color: #059669;
    font-weight: 700;
    text-align: center;
}

#table1-container .final-row {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border: 3px solid #f59e0b;
    font-weight: 800;
    color: #92400e;
}

#table1-container .final-row td {
    color: #92400e;
    font-size: 20px;
}

/* Toolbar links styling - elegant buttons */
.toolbar-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.toolbar-links .btn.elegant {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 0.75rem 1.5rem;
    border: 2px solid #2563eb;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbar-links .btn.elegant:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.toolbar-links .btn.link.elegant {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: #047857;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.toolbar-links .btn.link.elegant:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

/* Table note styling */
.table-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
    font-weight: 600;
    padding: 1rem;
    background: rgba(251, 252, 254, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.table-note em {
    font-style: italic;
}

.table-note strong {
    font-weight: 700;
    color: #1e40af;
}

/* Responsive adjustments for toolbar */
@media (max-width: 768px) {
    .toolbar-links {
        gap: 0.75rem;
    }

    .toolbar-links .btn.elegant {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    #table1-container {
        max-width: 95vw;
        margin: 0 10px;
    }

    #table1-container th,
    #table1-container td {
        padding: 10px 8px;
        font-size: 13px;
    }

    #table1-container th {
        font-size: 14px;
    }

    .table-note {
        font-size: 0.85rem;
        padding: 0.75rem;
        margin: 0.75rem auto;
    }
}

/* Responsive modal for mobile */
@media (max-width: 600px) {
    .modal-content {
        margin: 20px;
        padding: 16px;
    }

    .calculator-modal {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px auto;
    }
}

.pill-link {
    display: flow-root;
    padding: 4px 12px;
    background-color: #2660be;
    color: #fff;
    border-radius: 9999px;
    /* pill shape */
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background-color 0.2s ease;
}

.pill-link:hover {
    background-color: #0a36b0;
    /* darker on hover */
}

#poll {
    text-align: center;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}

#poll-buttons {
    margin-bottom: 25px;
}

.poll-btn {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

/* Specific colors */
.poll-btn.old {
    background-color: rgb(115, 195, 119);
}

.poll-btn.new {
    background-color: rgb(204, 128, 105);
}

/* Hover effect */
.poll-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Disabled state after voting */
.poll-btn:disabled {
    background-color: #b0b0b0 !important;
    color: #f1f1f1;
    opacity: 1;
    cursor: not-allowed;
    transform: none;
    position: relative;
}

.poll-btn.voted::after {
    content: " ✔";
    font-size: 16px;
    color: #fff;
}

#pollChart {
    max-width: 250px;
    max-height: 250px;
    margin: 0 auto 50px auto;
    display: block;
}

/* Salary Slider */
#salary-slider-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-family: Arial, sans-serif;
}

#salary-slider-container h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #1e40af;
}

#salary-slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    accent-color: #3b82f6;
    margin-bottom: 20px;
}

#salary-slider-container p {
    font-size: 1.1rem;
    margin: 5px 0;
    color: #374151;
}

#salary-slider-container span {
    font-weight: bold;
    color: #1e40af;
}

#salary-slider-container span#inHandValue {
    color: #059669;
}

.faq {
    text-align: center;
    max-width: 1200px;
    margin: 2rem auto;
}

.accordion-item {
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.accordion-header {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    border-radius: 12px;
    color: #1e40af;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
}

.accordion-header:focus {
    outline: 2px solid #3b82f6;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1rem;
    text-align: left;
    color: #374151;
}

.accordion-content p {
    margin: 1rem 0;
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    /* enough to show content */
    padding-bottom: 1rem;
    text-align: left;
}

.accordion-icon {
    font-size: 1.5rem;
    color: #3b82f6;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide desktop nav, show hamburger */
    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    /* Mobile menu is hidden by default, shown only when active */
    .mobile-menu.active {
        display: flex !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Adjust header for mobile */
    header {
        padding: 1rem;
    }

    .logo img {
        height: 35px;
        padding: 6px;
    }

    /* Hero adjustments */
    .hero {
        margin: 5rem 1rem 2rem;
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .hero h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    .hero p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    /* Salary slider adjustments */
    #salary-slider-container {
        margin: 20px 1rem;
        padding: 20px;
        border-radius: 15px;
    }

    #salary-slider-container h2 {
        font-size: 1.3rem;
    }

    /* FAQ adjustments */
    .faq {
        margin: 1rem;
        max-width: none;
    }

    .accordion-header {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .accordion-content p {
        font-size: 0.95rem;
    }

    /* Footer adjustments */
    footer {
        padding: 1.5rem 1rem;
    }

    footer .footer-links {
        gap: 0.8rem;
    }

    footer .footer-links a {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero a {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .mobile-menu {
        padding: 1.5rem;
    }

    .mobile-menu a {
        font-size: 1rem;
        padding: 0.8rem;
    }
}

/* Stats Grid Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 0 2rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s ease-out both;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        #3b82f6 0%,
        #8b5cf6 25%,
        #ec4899 50%,
        #f59e0b 75%,
        #10b981 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-card:nth-child(1) .stat-number::before {
    content: '👥';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-card:nth-child(2) .stat-number::before {
    content: '🎯';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-card:nth-child(3) .stat-number::before {
    content: '🕐';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-card:nth-child(4) .stat-number::before {
    content: '💎';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.stat-card:hover .stat-number {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-label {
    color: #1e40af;
    transition: color 0.3s ease;
}

/* Responsive adjustments for stats grid */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .stat-card {
        padding: 2rem 1.5rem;
    }

    .stat-number {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 0.5rem;
    }

    .stat-label {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }
}

/* Modern animations and effects */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Apply animations to key elements */
.hero a {
    animation: bounceIn 1s ease-out 0.5s both;
}

#salary-slider-container {
    animation: slideUp 0.8s ease-out 0.3s both;
}

.faq {
    animation: fadeIn 1s ease-out 0.7s both;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}





/* Dropdown Menu Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98), rgba(118, 75, 162, 0.98));
    backdrop-filter: blur(10px);
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    margin-top: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dropdown hover handled by JavaScript */

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

/* Mobile Dropdown Menu Styling */
.mobile-dropdown {
    width: 100%;
}

.mobile-dropdown-toggle {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.mobile-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mobile-dropdown-menu {
    display: none;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    border-radius: 12px;
    margin-top: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.mobile-dropdown-menu a:last-child {
    border-bottom: none;
}

.mobile-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Active state for mobile dropdown */
.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
}

/* Table centering and sizing improvements - Responsive */
#table1-container {
    overflow-x: auto; /* Allow scrolling if absolutely necessary, but design to avoid it */
    width: 100%;
}

#table1-container table {
    width: 100%;
    min-width: auto;
    max-width: 100%;
    margin: 0 auto;
    table-layout: fixed; /* Fixed table layout for better control */
}

#table1-container th,
#table1-container td {
    text-align: center;
    white-space: nowrap;
    padding: 8px 4px; /* Reduced padding for mobile */
    font-size: 15px; /* Base font size */
}

/* Responsive font sizes */
@media (max-width: 768px) {
    #table1-container th,
    #table1-container td {
        font-size: 12px; /* Smaller font on mobile */
        padding: 6px 2px; /* Even smaller padding */
    }
}

@media (max-width: 480px) {
    #table1-container th,
    #table1-container td {
        font-size: 11px; /* Even smaller on very small screens */
        padding: 4px 2px;
    }
}

/* Input field styling - responsive and centered */
#table1-container input {
    width: 100%; /* Full width of cell */
    max-width: 120px; /* Maximum width */
    min-width: 80px; /* Minimum width for usability */
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit; /* Inherit from table cell */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Include padding in width */
}

#table1-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    background: #f8fafc;
}

/* Responsive input sizes */
@media (max-width: 768px) {
    #table1-container input {
        max-width: 100px;
        min-width: 70px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #table1-container input {
        max-width: 80px;
        min-width: 60px;
        padding: 3px 4px;
        font-size: 11px;
    }
}

#table1-container select {
    width: 100%; /* Full width of cell */
    max-width: 120px; /* Maximum width */
    min-width: 80px; /* Minimum width */
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit; /* Inherit from table cell */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Include padding in width */
}

#table1-container select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Responsive select sizes */
@media (max-width: 768px) {
    #table1-container select {
        max-width: 100px;
        min-width: 70px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #table1-container select {
        max-width: 80px;
        min-width: 60px;
        padding: 3px 4px;
        font-size: 11px;
    }
}
