
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #20242c;
    line-height: 1.5;
}

/* HEADER */

.header {
    max-width: 1500px;
    margin: auto;
    padding: 22px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f4;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #20242c;
    text-decoration: none;
    font-size: 25px;
    font-weight: 700;
}

.logo-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: #20242c;
    color: white;
    border-radius: 11px;
}

.navigation {
    display: flex;
    gap: 32px;
}

.navigation a {
    color: #656b75;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.navigation a:hover {
    color: #315fca;
}

/* HERO */

.hero {
    max-width: 1150px;
    margin: auto;
    padding: 105px 25px 100px;
    text-align: center;
}

.eyebrow {
    color: #3868ce;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero h1 {
    margin-top: 20px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.12;
    letter-spacing: -2px;
}

.hero p {
    max-width: 540px;
    margin: 22px auto 32px;
    color: #737985;
    font-size: 17px;
    line-height: 1.7;
}

.main-button {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    padding: 15px 25px;
    border-radius: 10px;
    background: #315fca;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.main-button:hover {
    background: #244da9;
    transform: translateY(-2px);
}

/* TOOLS */

.tools-section {
    max-width: 1500px;
    margin: auto;
    padding: 45px 40px 100px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 28px;
}

.section-heading h2,
.about-section h2 {
    margin-top: 10px;
    font-size: 34px;
    letter-spacing: -0.7px;
}

.tools-count {
    color: #8a909a;
    font-size: 13px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 500px;
    padding: 15px 18px;
    margin-bottom: 28px;
    border: 1px solid #e4e7ed;
    border-radius: 11px;
    background: #fafbfc;
    transition: 0.2s;
}

.search-box:focus-within {
    border-color: #8da9e5;
    box-shadow: 0 0 0 3px #315fca12;
    background: #fff;
}

.search-box span {
    font-size: 23px;
    color: #858b95;
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: #20242c;
}

/* GRID */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tool-card {
    position: relative;
    display: block;
    padding: 27px;
    border: 1px solid #e9ebef;
    border-radius: 15px;
    background: #fff;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    border-color: #b7c9ef;
    box-shadow: 0 12px 30px #20242c0d;
    transform: translateY(-4px);
}

.tool-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin-bottom: 21px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.pdf {
    background: #fff0ee;
    color: #d64d42;
}

.image {
    background: #edf3ff;
    color: #3868ce;
}

.status {
    position: absolute;
    top: 28px;
    right: 23px;
    padding: 6px 10px;
    background: #f1f2f4;
    color: #747b85;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.tool-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.tool-card p {
    color: #777e89;
    font-size: 14px;
    line-height: 1.7;
}

.empty-message {
    padding: 25px;
    color: #777e89;
}

/* ABOUT */

.about-section {
    padding: 75px 25px;
    background: #f7f8fa;
    text-align: center;
}

.about-section p {
    max-width: 550px;
    margin: 15px auto 0;
    color: #737985;
    line-height: 1.7;
}

/* FOOTER */

.footer {
    max-width: 1500px;
    margin: auto;
    padding: 32px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer .logo {
    font-size: 20px;
}

.footer p {
    color: #8a909a;
    font-size: 12px;
}

/* TOOL PAGES */

.tool-page {
    max-width: 700px;
    margin: 60px auto;
    padding: 0 20px;
}

.tool-page h1 {
    margin-bottom: 10px;
}

.upload-box {
    margin: 30px 0 20px;
}

.upload-box input {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 35px 20px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
}

.upload-label:hover {
    border-color: #5278c8;
}

.split-settings {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 25px 0;
}

.split-settings input {
    padding: 13px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.split-settings small {
    color: #777;
}

#splitButton {
    padding: 13px 22px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: white;
    cursor: pointer;
}

#splitButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.download-link {
    color: #426fc5;
    text-decoration: none;
}

.download-link:hover {
    text-decoration: underline;
}

.back-button {
    display: inline-block;
    margin-bottom: 25px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
}

.back-button:hover {
    color: #426fc5;
}

.tool-box {
    max-width: 650px;
    margin-top: 30px;
    padding: 25px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.tool-box input,
.tool-box select {
    display: block;
    width: 100%;
    margin: 10px 0 20px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 15px;
}

.tool-box button,
.download-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;
    border: none;
    border-radius: 7px;
    background: #426fc5;
    color: white;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
}

.tool-box button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.tool-box small {
    display: block;
    color: #777;
    line-height: 1.5;
}

#status {
    margin-top: 20px;
}

/* UPLOAD AREA */

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    border: 2px dashed #d5dce5;
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
}

.upload-area:hover {
    border-color: #426fc5;
    background: #f5f8ff;
}

.upload-area strong {
    font-size: 16px;
    color: #333;
}

.upload-area span {
    font-size: 14px;
    color: #777;
}

.upload-area small {
    color: #999;
    font-size: 12px;
}

.upload-area input {
    display: none;
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #edf2fb;
    color: #426fc5;
    font-size: 28px;
}

#toolsCount {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

#convertButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#preview {
    margin-top: 25px;
    overflow: auto;
    background: #eee;
    padding: 15px;
}

#preview .docx-wrapper {
    background: #eee;
}

#preview .docx {
    margin: 0 auto 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header,
    .tools-section,
    .footer {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 18px 16px;
        flex-wrap: wrap;
        gap: 15px;
    }

    .logo {
        font-size: 22px;
    }

    .navigation {
        gap: 14px;
        flex-wrap: wrap;
    }

    .navigation a {
        font-size: 12px;
    }

    .hero {
        padding: 65px 20px;
    }

    .hero h1 {
        font-size: 38px;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 15px;
    }

    .tools-section {
        padding: 35px 16px 60px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tool-card {
        padding: 22px;
    }

    .section-heading {
        align-items: flex-start;
        gap: 10px;
        flex-wrap: wrap;
    }

    .section-heading h2,
    .about-section h2 {
        font-size: 26px;
    }

    .tools-count {
        font-size: 11px;
    }

    .search-box {
        max-width: 100%;
    }

    .footer {
        padding: 25px 16px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .tool-page {
        margin: 35px auto;
        padding: 0 16px;
    }

    .tool-box {
        padding: 18px;
    }
}

.compress-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.compress-button {
    margin-top: 0;
}

.text-compress-button {
    background: #eef0f4;
    color: #626975;
    cursor: not-allowed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.text-compress-button:hover {
    background: #eef0f4;
}

.text-compress-button span {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .compress-actions {
        grid-template-columns: 1fr;
    }
}

/* NEW NAVIGATION */

.navigation a {
    white-space: nowrap;
    font-weight: 500;
}

.navigation a:hover {
    color: #315fca;
}

/* NEW FOOTER */

.footer {
    display: block;
    padding: 55px 40px 25px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 50px;
    padding-bottom: 40px;
}

.footer-brand p {
    max-width: 280px;
    margin-top: 16px;
    color: #858b95;
    font-size: 14px;
    line-height: 1.7;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.footer-column h3 {
    margin-bottom: 5px;
    font-size: 15px;
    color: #20242c;
}

.footer-column a {
    color: #777e89;
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
}

.footer-column a:hover {
    color: #315fca;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 22px;
    border-top: 1px solid #edf0f4;
}

.footer-bottom p {
    color: #999fa8;
    font-size: 12px;
}

/* MOBILE NAVIGATION AND FOOTER */

@media (max-width: 600px) {
    .header {
        align-items: center;
    }

    .navigation {
        width: 100%;
        justify-content: flex-start;
        gap: 12px 18px;
    }

    .navigation a {
        font-size: 12px;
    }

    .footer {
        padding: 40px 20px 22px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand p {
        max-width: 100%;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
}
