/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

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

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.nav-logo svg {
    color: #2563eb;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2563eb;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #2563eb;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.calculator-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.calculator-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2563eb;
}

/* Calculator Tabs */
.calculator-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 8px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.tab-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.tab-btn svg {
    width: 16px;
    height: 16px;
}

/* Calculator Modes */
.calculator-mode {
    display: none;
}

.calculator-mode.active {
    display: block;
}

.calculator-input {
    margin-bottom: 1.5rem;
}

.calculator-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.calculator-input input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.calculator-input input:focus {
    outline: none;
    border-color: #2563eb;
}

/* Date Inputs */
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.calculator-result {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.calculator-result p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
}

.result-detail {
    font-size: 0.9rem !important;
    color: #6b7280 !important;
    margin-top: 0.5rem;
}

/* Date Result Grid */
.date-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.date-result-item {
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.result-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.date-result-item span:last-child {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2563eb;
}

.calculate-btn {
    width: 100%;
    padding: 0.75rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.calculate-btn:hover {
    background: #1d4ed8;
}

/* Quick Presets */
.quick-presets {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.quick-presets h3 {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 1rem;
    text-align: left;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.preset-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Article Section */
.article-section {
    padding: 4rem 0;
}

.article-section .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.main-article {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.main-article h2 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.main-article h3 {
    font-size: 1.8rem;
    color: #374151;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.main-article h4 {
    font-size: 1.3rem;
    color: #4b5563;
    margin: 1.5rem 0 0.75rem 0;
}

.main-article p {
    margin-bottom: 1.5rem;
    color: #4b5563;
    font-size: 1.1rem;
    line-height: 1.8;
}

.main-article a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.main-article a:hover {
    text-decoration: underline;
}

.main-article ul, .main-article ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.main-article li {
    margin-bottom: 0.5rem;
    color: #4b5563;
    line-height: 1.7;
}

/* Blockquote Styles */
blockquote {
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.1rem;
    color: #374151;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid #f59e0b;
}

.highlight-box h4 {
    color: #92400e;
    margin-bottom: 1rem;
}

.highlight-box p {
    color: #92400e;
    margin-bottom: 0.5rem;
}

/* Tip Box */
.tip-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid #2563eb;
}

.tip-box h4 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.tip-box p {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

/* Table Styles */
.conversion-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.conversion-table th,
.conversion-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.conversion-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.conversion-table tbody tr:hover {
    background: #f8fafc;
}

.highlight-row {
    background: #fef3c7 !important;
    font-weight: 600;
}

/* Practical Examples */
.practical-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.example-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.example-card h4 {
    color: #2563eb;
    margin-bottom: 0.75rem;
}

.example-card p {
    color: #4b5563;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Sources */
.sources {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    border: 1px solid #e5e7eb;
}

.sources h4 {
    color: #374151;
    margin-bottom: 1rem;
}

.sources ol {
    padding-left: 1.5rem;
}

.sources li {
    margin-bottom: 0.5rem;
}

.sources a {
    color: #2563eb;
    text-decoration: none;
}

.sources a:hover {
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    padding: 2rem 0;
}

.related-articles {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.related-articles h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.related-articles ul {
    list-style: none;
}

.related-articles li {
    margin-bottom: 0.75rem;
}

.related-articles a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.related-articles a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
}

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

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

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

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

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

.footer-section a:hover {
    color: #60a5fa;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* GDPR Notice */
.gdpr-notice {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #1f2937;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    max-width: 300px;
    font-size: 0.9rem;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
}

.gdpr-notice.show {
    display: block;
}

.gdpr-notice a {
    color: #60a5fa;
    text-decoration: none;
}

.gdpr-notice a:hover {
    text-decoration: underline;
}

.gdpr-notice button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.gdpr-notice button:hover {
    background: #1d4ed8;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2563eb;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.back-to-top.show {
    display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .calculator-card {
        margin: 0 1rem;
        padding: 1.5rem;
        max-width: none;
    }

    .date-inputs {
        grid-template-columns: 1fr;
    }

    .date-result-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-section .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-article {
        padding: 2rem 1.5rem;
    }

    .main-article h2 {
        font-size: 2rem;
    }

    .main-article h3 {
        font-size: 1.5rem;
    }

    .practical-examples {
        grid-template-columns: 1fr;
    }

    .conversion-table {
        font-size: 0.9rem;
    }

    .conversion-table th,
    .conversion-table td {
        padding: 0.75rem 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gdpr-notice {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

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

    .hero {
        padding: 2rem 0;
    }

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

    .calculator-card {
        padding: 1rem;
    }

    .tab-btn {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    .tab-btn svg {
        width: 14px;
        height: 14px;
    }

    .main-article {
        padding: 1.5rem 1rem;
    }

    .main-article h2 {
        font-size: 1.5rem;
    }

    .main-article h3 {
        font-size: 1.3rem;
    }

    .main-article p {
        font-size: 1rem;
    }

    .conversion-table {
        font-size: 0.8rem;
    }

    .conversion-table th,
    .conversion-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Animation for elements */
.main-article {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-card {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.example-card {
    animation: fadeInUp 0.6s ease-out;
}

.example-card:nth-child(1) { animation-delay: 0.1s; }
.example-card:nth-child(2) { animation-delay: 0.2s; }
.example-card:nth-child(3) { animation-delay: 0.3s; }

/* Calculator Mode Transitions */
.calculator-mode {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.calculator-mode:not(.active) {
    opacity: 0;
    transform: translateY(10px);
}

.calculator-mode.active {
    opacity: 1;
    transform: translateY(0);
}