/* =========================================================
   DIXANI — UNIT CONVERTER
   CLEAN FINAL PAGE-SPECIFIC STYLES
   Shared header/footer/base styles remain in templates.css
   ========================================================= */

.unit-converter-page {
    background: #ffffff;
    color: #0f172a;
}

.unit-converter-page *,
.unit-converter-page *::before,
.unit-converter-page *::after {
    box-sizing: border-box;
}

/* HERO */
.unit-converter-page .tool-hero {
    padding: 64px 0 46px;
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 38%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.unit-converter-page .tool-hero .container {
    max-width: 900px;
}

.unit-converter-page .tool-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 7px 14px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.unit-converter-page .tool-hero h1 {
    margin: 0 0 14px;
    color: #0f1f4b;
    font-size: clamp(40px, 5vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.unit-converter-page .tool-hero-text {
    max-width: 680px;
    margin: 0 auto;
    color: #64748b;
    font-size: 17px;
    line-height: 1.7;
}

/* MAIN CONVERTER */
.unit-converter-page .tool-main {
    padding: 20px 0 72px;
}

.unit-converter-page .tool-main > .container {
    width: min(1120px, calc(100% - 40px));
    max-width: 1120px;
    margin: 0 auto;
}

.unit-converter-page .converter-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    gap: 24px;
    align-items: stretch;
}

.unit-converter-page .converter-card,
.unit-converter-page .result-card {
    border-radius: 20px;
}

.unit-converter-page .converter-card {
    padding: 30px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 31, 75, 0.07);
}

.unit-converter-page .converter-header {
    margin-bottom: 24px;
}

.unit-converter-page .converter-header h2 {
    margin: 0 0 8px;
    color: #0f1f4b;
    font-size: 25px;
    line-height: 1.25;
}

.unit-converter-page .converter-header p {
    max-width: 620px;
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.65;
}

.unit-converter-page .form-group {
    display: block;
    margin: 0 0 18px;
}

.unit-converter-page .form-group label {
    display: block;
    margin: 0 0 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.unit-converter-page .form-group input,
.unit-converter-page .form-group select {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
}

.unit-converter-page .form-group input:focus,
.unit-converter-page .form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09);
}

.unit-converter-page .unit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.unit-converter-page .unit-grid .form-group {
    margin-bottom: 18px;
}

.unit-converter-page .swap-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 18px;
}

.unit-converter-page .swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dbe3ef;
    border-radius: 50%;
    background: #f8fafc;
    color: #2563eb;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.unit-converter-page .swap-button:hover {
    background: #eff6ff;
    transform: rotate(180deg);
}

.unit-converter-page .tool-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 12px;
    margin-top: 4px;
}

.unit-converter-page .primary-button,
.unit-converter-page .secondary-button {
    min-height: 50px;
    padding: 0 22px;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.unit-converter-page .primary-button {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.unit-converter-page .primary-button:hover {
    background: #1d4ed8;
}

.unit-converter-page .secondary-button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
}

.unit-converter-page .secondary-button:hover {
    background: #f8fafc;
}

.unit-converter-page .result-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 430px;
    padding: 32px;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.20), transparent 38%),
        linear-gradient(145deg, #0f1f4b 0%, #173778 100%);
    color: #ffffff;
}

.unit-converter-page .result-card::before {
    position: absolute;
    top: -80px;
    right: -70px;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
}

.unit-converter-page .result-label,
.unit-converter-page .result-value,
.unit-converter-page .result-units,
.unit-converter-page .conversion-summary {
    position: relative;
    z-index: 1;
}

.unit-converter-page .result-label {
    margin-bottom: 12px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.unit-converter-page .result-value {
    overflow-wrap: anywhere;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: clamp(42px, 4vw, 54px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.unit-converter-page .result-units {
    color: #dbeafe;
    font-size: 16px;
}

.unit-converter-page .conversion-summary {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.unit-converter-page .conversion-summary h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
}

.unit-converter-page .conversion-summary p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
}

/* SUPPORTED MEASUREMENTS */
.unit-converter-page .uc-section {
    width: 100%;
    padding: 72px 0;
    background: #f8fafc;
}

.unit-converter-page .uc-container {
    width: min(1120px, calc(100% - 40px));
    max-width: 1120px;
    margin: 0 auto;
}

.unit-converter-page .uc-heading {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}

.unit-converter-page .uc-eyebrow {
    display: block;
    width: fit-content;
    margin: 0 auto 10px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.07em;
    text-align: center;
    text-transform: uppercase;
}

.unit-converter-page .uc-heading h2 {
    margin: 0 0 12px;
    color: #0f1f4b;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.unit-converter-page .uc-heading p {
    max-width: 650px;
    margin: 0 auto;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
}

.unit-converter-page .uc-measure-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.unit-converter-page .uc-measure-card {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 220px;
    padding: 26px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    color: #0f172a;
    text-align: left;
    box-shadow: 0 8px 24px rgba(15, 31, 75, 0.05);
}

.unit-converter-page .uc-measure-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #eff6ff;
    font-size: 22px;
    line-height: 1;
}

.unit-converter-page .uc-measure-card h3 {
    margin: 0 0 10px;
    color: #0f1f4b;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.unit-converter-page .uc-measure-card p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

/* HOW IT WORKS */
.unit-converter-page .uc-how-wrap {
    padding: 70px 0;
    background: #f8fafc;
}

.unit-converter-page .uc-how-wrap > .container {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin: 0 auto;
}

.unit-converter-page .uc-how-box {
    padding: 42px 38px 46px;
    border-radius: 22px;
    background: #111c33;
    color: #ffffff;
}

.unit-converter-page .uc-how-head {
    margin-bottom: 34px;
    text-align: left;
}

.unit-converter-page .uc-how-label {
    display: block;
    margin-bottom: 12px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.unit-converter-page .uc-how-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.unit-converter-page .uc-how-steps {
    display: grid;
    grid-template-columns: minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr) 28px minmax(0,1fr);
    gap: 12px;
    align-items: center;
}

.unit-converter-page .uc-step-card {
    min-height: 160px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.unit-converter-page .uc-step-number {
    display: block;
    margin-bottom: 14px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 800;
}

.unit-converter-page .uc-step-card h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.unit-converter-page .uc-step-card p {
    margin: 0;
    color: #aeb8c9;
    font-size: 14px;
    line-height: 1.6;
}

.unit-converter-page .uc-step-arrow {
    color: #64748b;
    font-size: 22px;
    text-align: center;
}

/* WHO IT'S FOR */
.unit-converter-page .uc-uses-section {
    width: 100%;
    padding: 72px 0 78px;
    background: #f8fafc;
}

.unit-converter-page .uc-uses-container {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin: 0 auto;
}

.unit-converter-page .uc-uses-heading {
    width: 100%;
    max-width: 760px;
    margin: 0 0 38px;
    text-align: left;
}

.unit-converter-page .uc-uses-label {
    display: block;
    margin: 0 0 12px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.unit-converter-page .uc-uses-heading h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.unit-converter-page .uc-uses-heading p {
    max-width: 760px;
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
}

.unit-converter-page .uc-uses-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.unit-converter-page .uc-use-card {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 180px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}

.unit-converter-page .uc-use-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 18px;
    font-weight: 800;
}

.unit-converter-page .uc-use-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.unit-converter-page .uc-use-card p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

/* FAQ */
.unit-converter-page .uc-faq-section {
    padding: 72px 0 82px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.unit-converter-page .uc-faq-container {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin: 0 auto;
}

.unit-converter-page .uc-faq-heading {
    margin-bottom: 40px;
}

.unit-converter-page .uc-faq-label {
    display: block;
    margin-bottom: 14px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.unit-converter-page .uc-faq-heading h2 {
    max-width: 900px;
    margin: 0;
    color: #0f172a;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.unit-converter-page .uc-faq-list {
    max-width: 900px;
}

.unit-converter-page .uc-faq-list details {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.unit-converter-page .uc-faq-list summary {
    display: list-item;
    padding: 4px 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.45;
    cursor: pointer;
}

.unit-converter-page .uc-faq-list details p {
    max-width: 760px;
    margin: 8px 0 14px 22px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

/* RELATED TOOLS */
.unit-converter-page .uc-related-section {
    width: 100%;
    padding: 72px 0 80px;
    background: #ffffff;
}

.unit-converter-page .uc-related-container {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin: 0 auto;
}

.unit-converter-page .uc-related-heading {
    max-width: 760px;
    margin: 0 0 38px;
    text-align: left;
}

.unit-converter-page .uc-related-label {
    display: block;
    margin: 0 0 12px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.unit-converter-page .uc-related-heading h2 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.unit-converter-page .uc-related-heading p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
}

.unit-converter-page .uc-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.unit-converter-page .uc-related-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 190px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.unit-converter-page .uc-related-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow: 0 10px 26px rgba(15, 31, 75, 0.07);
}

.unit-converter-page .uc-related-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.unit-converter-page .uc-related-card p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

.unit-converter-page .uc-related-card span {
    display: block;
    margin-top: auto;
    color: #2563eb;
    font-size: 13px;
    font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 980px) {
    .unit-converter-page .converter-layout {
        grid-template-columns: 1fr;
    }

    .unit-converter-page .result-card {
        min-height: 320px;
    }
}

@media (max-width: 900px) {
    .unit-converter-page .uc-measure-grid,
    .unit-converter-page .uc-uses-grid,
    .unit-converter-page .uc-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .unit-converter-page .uc-how-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .unit-converter-page .uc-step-arrow {
        display: none;
    }
}

@media (max-width: 600px) {
    .unit-converter-page .tool-hero {
        padding: 48px 0 36px;
    }

    .unit-converter-page .tool-hero h1 {
        font-size: 38px;
    }

    .unit-converter-page .tool-hero-text {
        font-size: 15px;
    }

    .unit-converter-page .tool-main {
        padding: 14px 0 54px;
    }

    .unit-converter-page .tool-main > .container,
    .unit-converter-page .uc-container,
    .unit-converter-page .uc-how-wrap > .container,
    .unit-converter-page .uc-uses-container,
    .unit-converter-page .uc-faq-container,
    .unit-converter-page .uc-related-container {
        width: calc(100% - 28px);
    }

    .unit-converter-page .converter-card,
    .unit-converter-page .result-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .unit-converter-page .unit-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .unit-converter-page .swap-wrap {
        justify-content: flex-start;
        padding: 0 0 16px;
    }

    .unit-converter-page .swap-button {
        transform: rotate(90deg);
    }

    .unit-converter-page .swap-button:hover {
        transform: rotate(270deg);
    }

    .unit-converter-page .tool-actions {
        grid-template-columns: 1fr;
    }

    .unit-converter-page .uc-section,
    .unit-converter-page .uc-uses-section,
    .unit-converter-page .uc-faq-section,
    .unit-converter-page .uc-related-section {
        padding-top: 56px;
        padding-bottom: 64px;
    }

    .unit-converter-page .uc-heading h2 {
        font-size: 29px;
    }

    .unit-converter-page .uc-how-wrap {
        padding: 50px 0;
    }

    .unit-converter-page .uc-how-box {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .unit-converter-page .uc-how-head h2,
    .unit-converter-page .uc-uses-heading h2,
    .unit-converter-page .uc-faq-heading h2,
    .unit-converter-page .uc-related-heading h2 {
        font-size: 28px;
    }

    .unit-converter-page .uc-measure-grid,
    .unit-converter-page .uc-how-steps,
    .unit-converter-page .uc-uses-grid,
    .unit-converter-page .uc-related-grid {
        grid-template-columns: 1fr;
    }

    .unit-converter-page .uc-measure-card,
    .unit-converter-page .uc-step-card,
    .unit-converter-page .uc-use-card,
    .unit-converter-page .uc-related-card {
        min-height: auto;
    }

    .unit-converter-page .uc-faq-list summary {
        font-size: 15px;
    }
}
.template-action {
    margin-top: auto;
    padding-top: 24px;

    color: #2563eb;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.template-card:hover .template-action {
    color: #1d4ed8;
}
.template-action {
    margin-top: auto;
    padding-top: 24px;

    color: #2563eb;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.template-card:hover .template-action {
    color: #1d4ed8;
}
.template-card {
    text-decoration: none;
    color: inherit;
}
