/* ========================================
   HesaplaCevir.com — Modern CSS v4.0
   ======================================== */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background: #f5f7fa;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* Wrapper */
.wrapper { max-width: 1100px; margin: 0 auto; padding: 0 15px; }

/* ========== HEADER ========== */
.mobile-header {
    display: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.mobile-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}
.mobile-header .logo-link {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
}
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

.desktop-header {
    background: #fff;
    border-bottom: 3px solid #2563eb;
    padding: 10px 0;
}
.desktop-header .wrapper { display: flex; align-items: center; }
.logo-img img { height: 50px; }

/* ========== MAIN LAYOUT ========== */
.main-wrapper {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: flex-start;
}

/* Sidebar */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
    position: sticky;
    top: 20px;
}
.sidebar ul { list-style: none; }
.sidebar li { border-bottom: 1px solid #f0f0f0; }
.sidebar li:last-child { border-bottom: none; }
.sidebar a {
    display: block;
    padding: 10px 15px;
    color: #444;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.sidebar a:hover { background: #eef4ff; color: #2563eb; }

/* Content Area */
.content-area { flex: 1; min-width: 0; }

/* ========== BOX ========== */
.box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
}

.box h1 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}
.box h2 {
    font-size: 1.2rem;
    color: #334155;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.box p {
    color: #555;
    margin-bottom: 10px;
    line-height: 1.7;
}

/* ========== CONVERTER FORM ========== */
.convert-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
}
.form-group {
    flex: 1;
    min-width: 150px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #333;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.swap-btn-wrapper {
    display: flex;
    align-items: flex-end;
    padding-bottom: 4px;
}
#swapBtn {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}
#swapBtn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: rotate(180deg);
}

.submit-wrapper {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
}
.btn-convert {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-convert:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

/* ========== CONVERSION RESULT ========== */
.conversion-result {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 10px;
    border: 1px solid #bbf7d0;
    text-align: center;
}
.result-main {
    font-size: 1.3rem;
    font-weight: 700;
}
.result-from { color: #16a34a; }
.result-to { color: #ea580c; }
.result-ratio {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

.result-box .conversion-result {
    margin-top: 0;
}

/* ========== VALUES TABLE ========== */
.values-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.values-table th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: right;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}
.values-table td {
    padding: 10px 15px;
    text-align: right;
    border-bottom: 1px solid #f1f5f9;
    color: #333;
}
.values-table tr:hover td { background: #f8fafc; }

/* ========== ELEMENT LINKS ========== */
.element-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.element-links a {
    display: inline-block;
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
    text-decoration: none;
}
.element-links a:hover {
    background: #2563eb;
    color: #fff;
}

/* ========== CATEGORY GRID (Homepage) ========== */
.category-grid .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.grid-item {
    display: block;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    color: #334155;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}
.grid-item:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    text-decoration: none;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 15px;
    padding: 8px 0;
}
.breadcrumb a { color: #2563eb; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #64748b; }

/* ========== SEO CONTENT ========== */
.seo-content h2 { color: #1e293b; }
.seo-content h3 {
    font-size: 1.05rem;
    color: #475569;
    margin-top: 15px;
    border-bottom: none;
    padding-bottom: 0;
}
.seo-content p { font-size: 0.95rem; line-height: 1.8; }
.seo-content ul { margin: 10px 0 10px 20px; }
.seo-content li { margin-bottom: 5px; color: #555; font-size: 0.95rem; }

/* ========== FAQ ========== */
.faq-list { margin-top: 10px; }
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.faq-item summary {
    padding: 14px 18px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.2s;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.faq-item summary::before {
    content: '▸';
    font-size: 0.9rem;
    color: #2563eb;
    transition: transform 0.2s;
}
.faq-item[open] summary::before {
    transform: rotate(90deg);
}
.faq-item summary:hover { background: #eef4ff; }
.faq-item p {
    padding: 12px 18px 16px;
    color: #555;
    line-height: 1.7;
    border-top: 1px solid #e2e8f0;
}

/* ========== FOOTER ========== */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 20px 0;
    text-align: center;
    margin-top: 30px;
}
.site-footer .wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}
.site-footer a { color: #94a3b8; }
.site-footer a:hover { color: #fff; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .mobile-header { display: block; }
    .desktop-header { display: none; }

    .main-wrapper {
        flex-direction: column;
        padding-top: 10px;
    }

    .sidebar {
        width: 100%;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        bottom: 0;
        display: none;
        border-radius: 0;
        box-shadow: none;
        background: #1e293b;
        z-index: 99;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar.active { display: block; }
    .sidebar ul { padding-bottom: 60px; }
    .sidebar a {
        color: #e2e8f0;
        border-bottom-color: #334155;
        padding: 14px 20px;
        font-size: 1rem;
    }
    .sidebar a:hover, .sidebar a:active { background: #334155; color: #fff; }

    .content-area { width: 100%; }

    .box { padding: 15px; border-radius: 8px; margin-bottom: 12px; }
    .box h1 { font-size: 1.2rem; }
    .box h2 { font-size: 1.05rem; }

    .convert-form {
        flex-direction: column;
        gap: 10px;
    }
    .form-group { min-width: 100%; }
    .form-group input, .form-group select {
        padding: 14px;
        font-size: 1.05rem;
    }
    .swap-btn-wrapper { justify-content: center; }
    .submit-wrapper { width: 100%; }
    .btn-convert { width: 100%; padding: 14px; font-size: 1.05rem; }

    .result-main { font-size: 1.1rem; }
    .conversion-result { padding: 15px; }

    /* Tablo mobil scroll */
    .values-table { font-size: 0.85rem; }
    .values-table th, .values-table td { padding: 8px 10px; }
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .category-grid .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .grid-item { padding: 12px 8px; font-size: 0.9rem; }

    .element-links { gap: 6px; }
    .element-links a { padding: 8px 12px; font-size: 0.85rem; }

    .breadcrumb { font-size: 0.8rem; padding: 6px 0; }

    .seo-content h2 { font-size: 1.1rem; }
    .seo-content h3 { font-size: 0.95rem; }
    .seo-content p, .seo-content li { font-size: 0.9rem; }

    .site-footer { padding: 15px 0; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .category-grid .grid {
        grid-template-columns: 1fr;
    }
    .result-main { font-size: 1rem; }
    .box h1 { font-size: 1.1rem; }
    .conversion-result { padding: 12px; }
    .result-from, .result-to { display: block; text-align: center; }
}

/* Touch cihazlar için */
@media (hover: none) {
    .btn-convert:active {
        transform: scale(0.98);
    }
    #swapBtn:active {
        background: #2563eb;
        color: #fff;
    }
    .grid-item:active {
        background: #2563eb;
        color: #fff;
    }
    .element-links a:active {
        background: #2563eb;
        color: #fff;
    }
}
