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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 20px;
    flex-wrap: wrap;
}

.logo a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Hero Section */
.hero {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding-top: 50px;
}

/* Calculator Section */
.calculator-section {
    padding: 2rem 0;
}

.calculator-section h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

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

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Results */
.result {
    background: var(--bg-light);
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item span {
    color: var(--text-light);
}

.result-item strong {
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* Tools Grid */
.tools-section {
    padding: 3rem 0;
    background: var(--bg-light);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.tool-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.tool-card h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tool-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.features li {
    padding: 0.5rem 0;
    color: var(--text-light);
    padding-left: 1.5rem;
    position: relative;
}

.features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Use Cases */
.use-cases {
    padding: 3rem 0;
}

.use-cases h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.case {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.case h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.case p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Guide Section */
.guide-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.guide-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.guide-section h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.guide-section ol,
.guide-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.guide-section li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.use-cases-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.use-case {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.use-case h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.use-case p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.faq-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* FAQ Section */
.faq {
    padding: 3rem 0;
    background: var(--bg-light);
}

.faq h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Ads Section */
.ads-section {
    padding: 2rem 0;
    text-align: center;
    margin: 2rem 0;
}

.ads-section ins {
    display: inline-block;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: #d1d5db;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .guide-section {
        padding: 1.5rem;
    }

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

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

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

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

    .hero h1 {
        font-size: 1.5rem;
    }

    .navbar-top .container {
        flex-direction: row;
    }

    .navbar-menu .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .calculator-card {
        padding: 1rem;
    }
}


/* Date Picker */
.datepicker-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.datepicker {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    z-index: 1000;
    min-width: 350px;
    margin-top: 0.5rem;
}

.datepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.datepicker-year {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 80px;
    text-align: center;
}

.datepicker-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.datepicker-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.datepicker-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.datepicker-months .datepicker-btn {
    padding: 0.75rem;
    font-size: 0.85rem;
}

.datepicker-calendar {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

.datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.datepicker-day {
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.datepicker-day:not(.other-month):hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.datepicker-day.other-month {
    color: var(--border-color);
    cursor: default;
}

.datepicker-day.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 480px) {
    .datepicker {
        min-width: 280px;
        padding: 1rem;
    }
    
    .datepicker-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }
}


/* Date Input Optimization */
input[type="date"],
input[type="time"],
select {
    font-size: 16px !important;
    padding: 0.75rem !important;
    min-height: 44px;
    cursor: pointer;
}

/* Other Calculators Section */
.calculator-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.calculator-links a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background-color: #f0f4f8;
    border: 1px solid #d0d8e0;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #0066cc;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.3s ease;
}

.calculator-links a:hover {
    background-color: #e6f0ff;
    border-color: #0066cc;
    color: #0052a3;
}

/* Other Calculators Section */
.other-calculators {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.other-calculators h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

/* Language Switcher */
.language-switcher {
    margin-right: 2rem;
}

.language-switcher select {
    padding: 0.5rem 0.75rem !important;
    min-height: auto;
    font-size: 0.9rem;
    width: auto !important;
}

/* Mobile-friendly date picker */
@media (max-width: 768px) {
    input[type="date"],
    input[type="time"],
    select {
        font-size: 16px !important;
        padding: 1rem !important;
        min-height: 48px;
        width: 100% !important;
    }
    
    .language-switcher {
        margin-right: 0;
    }
    
    .language-switcher select {
        padding: 0.4rem 0.6rem !important;
        min-height: auto !important;
        font-size: 0.85rem !important;
        width: auto !important;
    }
    
    input[type="date"]::-webkit-calendar-picker-indicator {
        cursor: pointer;
        padding: 0.5rem;
    }
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.35rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        width: 100%;
        z-index: 99;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links a {
        display: block;
        padding: 1rem 20px;
        font-size: 0.95rem;
    }
}
