/* =========================================
   WEBLIXA PDF MAKER
   COMPLETE CSS
========================================= */


/* =========================================
   RESET
========================================= */

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


html {
    scroll-behavior: smooth;
}


body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f8fafc;

    color: #102A56;

    line-height: 1.6;
}


button,
input,
select,
textarea {
    font-family: inherit;
}


button {
    cursor: pointer;
}


a {
    text-decoration: none;
    color: inherit;
}



/* =========================================
   CONTAINER
========================================= */

.container {
    width: min(1200px, calc(100% - 40px));

    margin: 0 auto;
}



/* =========================================
   HEADER
========================================= */

.site-header {
    height: 72px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;

    top: 0;

    z-index: 1000;
}


.header-container {
    width: min(1200px, calc(100% - 40px));

    height: 100%;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;
}


.brand {
    display: flex;

    align-items: center;

    flex-shrink: 0;
}


.brand svg {
    width: 180px;

    height: 52px;

    display: block;
}


.main-nav {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 26px;

    margin-left: auto;
}


.main-nav a {
    color: #52627a;

    font-size: 14px;

    font-weight: 600;

    transition: 0.2s ease;
}


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


.main-nav a.active {
    color: #2563eb;
}


.header-actions {
    display: flex;

    align-items: center;

    gap: 10px;
}


.theme-button {
    width: 40px;

    height: 40px;

    border: 1px solid #dbe3ef;

    border-radius: 10px;

    background: #ffffff;

    color: #102a56;

    font-size: 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: 0.2s ease;
}


.theme-button:hover {
    background: #f1f5f9;

    border-color: #cbd5e1;
}



/* =========================================
   PAGE INTRO
========================================= */

.page-intro {
    padding: 55px 0 45px;

    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.10),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom left,
            rgba(124, 58, 237, 0.07),
            transparent 35%
        ),
        #f8fafc;
}


.back-link {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 24px;

    color: #52627a;

    font-size: 14px;

    font-weight: 600;

    transition: 0.2s ease;
}


.back-link:hover {
    color: #2563eb;

    transform: translateX(-2px);
}


.section-label {
    color: #2563eb;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1.8px;

    margin-bottom: 10px;
}


.page-intro h1 {
    font-size: clamp(36px, 5vw, 58px);

    line-height: 1.1;

    letter-spacing: -1.5px;

    color: #102a56;

    margin-bottom: 15px;
}


.page-intro p {
    max-width: 650px;

    color: #64748b;

    font-size: 17px;
}



/* =========================================
   MAKER SECTION
========================================= */

.maker-section {
    padding: 20px 0 70px;

    background: #f8fafc;
}


.maker-layout {
    display: grid;

    grid-template-columns: 280px minmax(0, 1fr);

    gap: 24px;

    align-items: start;
}



/* =========================================
   TOOL PANEL
========================================= */

.tool-panel {
    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    padding: 22px;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.06);

    position: sticky;

    top: 95px;
}


.panel-title {
    padding-bottom: 18px;

    margin-bottom: 20px;

    border-bottom: 1px solid #edf1f6;
}


.panel-title h2 {
    color: #102a56;

    font-size: 19px;

    line-height: 1.3;

    margin-bottom: 4px;
}


.panel-title p {
    color: #7b8799;

    font-size: 13px;
}



/* =========================================
   CONTROL GROUP
========================================= */

.control-group {
    margin-bottom: 19px;
}


.control-group:last-child {
    margin-bottom: 0;
}


.control-group label {
    display: block;

    color: #334155;

    font-size: 13px;

    font-weight: 700;

    margin-bottom: 8px;
}


.control-group input,
.control-group select {
    width: 100%;

    height: 42px;

    border: 1px solid #dbe3ef;

    border-radius: 9px;

    background: #ffffff;

    color: #243b5a;

    padding: 0 12px;

    font-size: 14px;

    outline: none;

    transition: 0.2s ease;
}


.control-group input:focus,
.control-group select:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10);
}


.control-group input::placeholder {
    color: #a0aec0;
}



/* =========================================
   FORMAT BUTTONS
========================================= */

.format-buttons {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 7px;
}


.format-buttons button {
    height: 40px;

    border: 1px solid #dbe3ef;

    border-radius: 8px;

    background: #ffffff;

    color: #334155;

    font-size: 16px;

    transition: 0.2s ease;
}


.format-buttons button:hover,
.format-buttons button.active {
    background: #eff6ff;

    border-color: #2563eb;

    color: #2563eb;
}



/* =========================================
   ALIGNMENT BUTTONS
========================================= */

.alignment-buttons {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 7px;
}


.alignment-buttons button {
    height: 40px;

    border: 1px solid #dbe3ef;

    border-radius: 8px;

    background: #ffffff;

    color: #334155;

    font-size: 18px;

    transition: 0.2s ease;
}


.alignment-buttons button:hover,
.alignment-buttons button.active {
    background: #eff6ff;

    border-color: #2563eb;

    color: #2563eb;
}



/* =========================================
   ORIENTATION
========================================= */

.orientation-buttons {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 7px;
}


.orientation-buttons button {
    min-height: 55px;

    border: 1px solid #dbe3ef;

    border-radius: 9px;

    background: #ffffff;

    color: #52627a;

    font-size: 12px;

    font-weight: 600;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 3px;

    transition: 0.2s ease;
}


.orientation-buttons button span {
    font-size: 18px;

    line-height: 1;
}


.orientation-buttons button:hover,
.orientation-buttons button.selected {
    border-color: #2563eb;

    background: #eff6ff;

    color: #2563eb;
}



/* =========================================
   SECONDARY BUTTON
========================================= */

.secondary-button {
    width: 100%;

    min-height: 42px;

    border: 1px solid #dbe3ef;

    border-radius: 9px;

    background: #ffffff;

    color: #334155;

    font-size: 13px;

    font-weight: 700;

    transition: 0.2s ease;
}


.secondary-button:hover {
    border-color: #2563eb;

    background: #eff6ff;

    color: #2563eb;
}



/* =========================================
   CLEAR BUTTON
========================================= */

.clear-button {
    width: 100%;

    min-height: 42px;

    border: 1px solid #fecaca;

    border-radius: 9px;

    background: #fff7f7;

    color: #dc2626;

    font-size: 13px;

    font-weight: 700;

    transition: 0.2s ease;
}


.clear-button:hover {
    background: #fef2f2;

    border-color: #f87171;
}



/* =========================================
   EDITOR AREA
========================================= */

.editor-area {
    min-width: 0;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    overflow: hidden;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.06);
}



/* =========================================
   EDITOR TOP BAR
========================================= */

.editor-topbar {
    min-height: 76px;

    padding: 14px 20px;

    border-bottom: 1px solid #e8edf4;

    background: #ffffff;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}


.editor-topbar h2 {
    color: #102a56;

    font-size: 18px;

    margin-bottom: 2px;
}


.editor-topbar span {
    color: #8491a5;

    font-size: 12px;
}


.editor-actions {
    display: flex;

    align-items: center;

    gap: 8px;

    flex-wrap: wrap;
}


.preview-button,
.create-button {
    min-height: 40px;

    padding: 0 16px;

    border-radius: 8px;

    font-size: 13px;

    font-weight: 700;

    transition: 0.2s ease;
}


.preview-button {
    border: 1px solid #dbe3ef;

    background: #ffffff;

    color: #334155;
}


.preview-button:hover {
    border-color: #2563eb;

    background: #eff6ff;

    color: #2563eb;
}


.create-button {
    border: 0;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #7c3aed
        );

    color: #ffffff;

    box-shadow:
        0 6px 15px rgba(37, 99, 235, 0.22);
}


.create-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(37, 99, 235, 0.28);
}



/* =========================================
   DOCUMENT WORKSPACE
========================================= */

.document-workspace {
    min-height: 720px;

    padding: 40px;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(37, 99, 235, 0.04),
            transparent 30%
        ),
        #eef2f7;

    display: flex;

    align-items: flex-start;

    justify-content: center;

    overflow: auto;
}



/* =========================================
   PDF PAGE
========================================= */

.pdf-page {
    width: 794px;

    min-height: 1123px;

    background: #ffffff;

    padding: 70px 65px;

    box-shadow:
        0 12px 35px rgba(15, 23, 42, 0.13);

    position: relative;

    color: #111827;

    overflow: hidden;

    transition: 0.25s ease;
}


.pdf-page.landscape {
    width: 1123px;

    min-height: 794px;
}



/* =========================================
   TITLE EDITOR
========================================= */

.editable-title {
    min-height: 45px;

    margin-bottom: 24px;

    font-size: 28px;

    font-weight: 700;

    line-height: 1.25;

    color: #102a56;

    outline: none;

    border-bottom: 1px dashed transparent;

    transition: 0.2s ease;
}


.editable-title:focus {
    border-bottom-color: #93c5fd;
}


.editable-title:empty::before {
    content: attr(data-placeholder);

    color: #cbd5e1;
}



/* =========================================
   CONTENT EDITOR
========================================= */

.editable-content {
    min-height: 500px;

    font-size: 16px;

    line-height: 1.75;

    color: #1f2937;

    outline: none;

    white-space: pre-wrap;

    word-break: break-word;
}


.editable-content:focus {
    outline: none;
}


.editable-content:empty::before {
    content: attr(data-placeholder);

    color: #cbd5e1;
}



/* =========================================
   IMAGE CONTAINER
========================================= */

.image-container {
    margin-top: 25px;

    display: flex;

    flex-direction: column;

    gap: 15px;
}


.image-container:empty {
    display: none;
}


.document-image {
    max-width: 100%;

    height: auto;

    display: block;

    border-radius: 4px;
}



/* =========================================
   PAGE NAVIGATION
========================================= */

.page-navigation {
    min-height: 64px;

    border-top: 1px solid #e8edf4;

    padding: 10px 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 20px;

    background: #ffffff;
}


.page-navigation button {
    min-height: 36px;

    padding: 0 13px;

    border: 1px solid #dbe3ef;

    border-radius: 8px;

    background: #ffffff;

    color: #475569;

    font-size: 12px;

    font-weight: 700;

    transition: 0.2s ease;
}


.page-navigation button:hover:not(:disabled) {
    background: #eff6ff;

    border-color: #2563eb;

    color: #2563eb;
}


.page-navigation button:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}


#pageNumber {
    min-width: 35px;

    text-align: center;

    color: #102a56;

    font-size: 13px;

    font-weight: 700;
}



/* =========================================
   FEATURES SECTION
========================================= */

.features-section {
    padding: 80px 0;

    background: #ffffff;

    border-top: 1px solid #e8edf4;
}


.section-heading {
    text-align: center;

    margin-bottom: 45px;
}


.section-heading .section-label {
    margin-bottom: 8px;
}


.section-heading h2 {
    color: #102a56;

    font-size: clamp(28px, 4vw, 40px);

    line-height: 1.2;

    margin-bottom: 10px;
}


.section-heading p {
    color: #718096;

    font-size: 15px;
}



/* =========================================
   FEATURE GRID
========================================= */

.feature-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;
}


.feature-card {
    padding: 25px 22px;

    background: #ffffff;

    border: 1px solid #e5eaf1;

    border-radius: 14px;

    text-align: center;

    transition: 0.2s ease;
}


.feature-card:hover {
    transform: translateY(-3px);

    border-color: #cbd5e1;

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.07);
}


.feature-icon {
    width: 48px;

    height: 48px;

    margin: 0 auto 15px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #eff6ff,
            #f5f3ff
        );

    color: #2563eb;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 21px;

    font-weight: 700;
}


.feature-card h3 {
    color: #102a56;

    font-size: 16px;

    margin-bottom: 7px;
}


.feature-card p {
    color: #718096;

    font-size: 13px;

    line-height: 1.6;
}



/* =========================================
   FOOTER
========================================= */

.site-footer {
    background: #0b1f3a;

    color: #ffffff;

    padding-top: 45px;
}


.footer-container {
    width: min(1200px, calc(100% - 40px));

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

    padding-bottom: 35px;
}


.footer-brand svg {
    display: block;

    filter: brightness(0) invert(1);

    margin-bottom: 8px;
}


.footer-brand p {
    max-width: 360px;

    color: #a9b7ca;

    font-size: 13px;
}


.footer-links {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 20px;
}


.footer-links a {
    color: #b7c4d7;

    font-size: 13px;

    transition: 0.2s ease;
}


.footer-links a:hover {
    color: #ffffff;
}


.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);

    text-align: center;

    padding: 18px 20px;
}


.footer-bottom p {
    color: #91a1b8;

    font-size: 12px;
}



/* =========================================
   DARK MODE
========================================= */

body.dark-mode {
    background: #0f172a;

    color: #e2e8f0;
}


body.dark-mode .site-header,
body.dark-mode .editor-area,
body.dark-mode .tool-panel,
body.dark-mode .editor-topbar,
body.dark-mode .page-navigation,
body.dark-mode .feature-card {
    background: #111c30;

    border-color: #24344d;
}


body.dark-mode .main-nav a {
    color: #a8b6ca;
}


body.dark-mode .main-nav a:hover,
body.dark-mode .main-nav a.active {
    color: #60a5fa;
}


body.dark-mode .theme-button {
    background: #111c30;

    border-color: #334155;

    color: #e2e8f0;
}


body.dark-mode .page-intro,
body.dark-mode .maker-section {
    background: #0f172a;
}


body.dark-mode .page-intro h1,
body.dark-mode .panel-title h2,
body.dark-mode .editor-topbar h2,
body.dark-mode .section-heading h2,
body.dark-mode .feature-card h3 {
    color: #f1f5f9;
}


body.dark-mode .page-intro p,
body.dark-mode .panel-title p,
body.dark-mode .section-heading p,
body.dark-mode .feature-card p {
    color: #94a3b8;
}


body.dark-mode .control-group label {
    color: #cbd5e1;
}


body.dark-mode .control-group input,
body.dark-mode .control-group select,
body.dark-mode .format-buttons button,
body.dark-mode .alignment-buttons button,
body.dark-mode .orientation-buttons button,
body.dark-mode .secondary-button,
body.dark-mode .preview-button,
body.dark-mode .page-navigation button {
    background: #0f172a;

    border-color: #334155;

    color: #dbeafe;
}


body.dark-mode .format-buttons button:hover,
body.dark-mode .format-buttons button.active,
body.dark-mode .alignment-buttons button:hover,
body.dark-mode .alignment-buttons button.active,
body.dark-mode .orientation-buttons button:hover,
body.dark-mode .orientation-buttons button.selected,
body.dark-mode .secondary-button:hover,
body.dark-mode .preview-button:hover {
    background: #172554;

    border-color: #3b82f6;

    color: #60a5fa;
}


body.dark-mode .document-workspace {
    background: #0b1220;
}


body.dark-mode .feature-section {
    background: #0f172a;
}


body.dark-mode .feature-card {
    background: #111c30;
}


body.dark-mode .back-link {
    color: #94a3b8;
}


body.dark-mode .back-link:hover {
    color: #60a5fa;
}



/* =========================================
   RESPONSIVE — 1100px
========================================= */

@media (max-width: 1100px) {

    .main-nav {
        gap: 15px;
    }


    .main-nav a {
        font-size: 13px;
    }


    .maker-layout {
        grid-template-columns: 250px minmax(0, 1fr);
    }


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

}



/* =========================================
   RESPONSIVE — 900px
========================================= */

@media (max-width: 900px) {

    .site-header {
        height: auto;

        min-height: 72px;
    }


    .header-container {
        padding: 10px 0;

        flex-wrap: wrap;
    }


    .main-nav {
        order: 3;

        width: 100%;

        overflow-x: auto;

        justify-content: flex-start;

        padding-bottom: 3px;
    }


    .maker-layout {
        grid-template-columns: 1fr;
    }


    .tool-panel {
        position: static;
    }


    .document-workspace {
        min-height: 600px;

        padding: 25px;

        justify-content: flex-start;
    }


    .pdf-page {
        width: 794px;

        min-height: 1123px;
    }

}



/* =========================================
   RESPONSIVE — 650px
========================================= */

@media (max-width: 650px) {

    .container,
    .header-container,
    .footer-container {
        width: min(100% - 24px, 1200px);
    }


    .page-intro {
        padding: 35px 0;
    }


    .page-intro h1 {
        font-size: 38px;
    }


    .maker-section {
        padding-top: 10px;
    }


    .editor-topbar {
        align-items: flex-start;

        flex-direction: column;
    }


    .editor-actions {
        width: 100%;
    }


    .preview-button,
    .create-button {
        flex: 1;
    }


    .document-workspace {
        padding: 15px;

        overflow-x: auto;
    }


    .pdf-page {
        width: 794px;

        min-height: 1123px;

        padding: 55px 50px;
    }


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


    .footer-container {
        flex-direction: column;

        align-items: flex-start;
    }


    .footer-links {
        justify-content: flex-start;
    }

}



/* =========================================
   RESPONSIVE — 480px
========================================= */

@media (max-width: 480px) {

    .brand svg {
        width: 150px;

        height: auto;
    }


    .main-nav {
        gap: 18px;
    }


    .main-nav a {
        white-space: nowrap;
    }


    .tool-panel {
        padding: 17px;
    }


    .editor-topbar {
        padding: 13px;
    }


    .page-navigation {
        gap: 10px;

        padding-left: 10px;

        padding-right: 10px;
    }


    .page-navigation button {
        padding: 0 9px;
    }

}