/* =========================================================
   OneToolBox - Image OCR
   Matches Image Compressor 3-card tool layout
   ========================================================= */

.ocr-box{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:24px;
    align-items:stretch;
}

.ocr-card{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:22px;
    padding:22px;
    box-shadow:0 10px 30px rgba(15,23,42,.08);
    min-width:0;
}

.ocr-card > h3,
.ocr-card-heading h3{
    margin:0 0 18px;
    text-align:center;
    color:#172033;
    font-size:21px;
    font-weight:800;
}

.ocr-card-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:18px;
}

.ocr-card-heading h3{
    margin:0;
    text-align:left;
}

.ocr-upload-area{
    min-height:350px;
    border:2px dashed #bfdbfe;
    border-radius:18px;
    background:linear-gradient(145deg,#f8fbff,#f1f6ff);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:22px;
    box-sizing:border-box;
    transition:.2s ease;
}

.ocr-upload-area.dragover{
    border-color:#2563eb;
    background:#eff6ff;
    transform:translateY(-1px);
}

.ocr-upload-area > i{
    font-size:54px;
    color:#2563eb;
    margin-bottom:18px;
}

.ocr-upload-area h4{
    margin:0 0 10px;
    color:#172033;
    font-size:20px;
}

.ocr-upload-area p{
    margin:0 0 18px;
    color:#64748b;
    line-height:1.8;
}

.ocr-image-preview{
    display:none;
    width:100%;
    height:215px;
    object-fit:contain;
    border-radius:14px;
    margin-bottom:16px;
    background:#fff;
}

.ocr-choose-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    background:linear-gradient(135deg,#2563eb,#4f46e5);
    color:#fff;
    border:0;
    border-radius:12px;
    padding:13px 22px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 8px 18px rgba(37,99,235,.22);
}

.ocr-choose-btn input{
    display:none;
}

.ocr-reset-btn{
    margin-top:12px;
    width:100%;
    border:0;
    border-radius:12px;
    padding:11px 16px;
    background:#fee2e2;
    color:#dc2626;
    font-weight:800;
    cursor:pointer;
}

.ocr-info,
.ocr-result-info{
    margin-top:14px;
    background:#eff6ff;
    border-radius:12px;
    padding:12px 14px;
    color:#334155;
    text-align:center;
}

.ocr-info b,
.ocr-result-info b{
    color:#2563eb;
}

.ocr-small-reset{
    flex:0 0 auto;
    border:1px solid #dbeafe;
    background:#eff6ff;
    color:#2563eb;
    border-radius:10px;
    padding:8px 11px;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}

.ocr-card.settings label{
    display:block;
    margin:15px 0 7px;
    color:#334155;
    font-weight:800;
}

.ocr-card.settings select{
    width:100%;
    height:48px;
    border:1px solid #dbe3ef;
    border-radius:12px;
    background:#f8fafc;
    padding:0 13px;
    font-size:15px;
    color:#1e293b;
    outline:none;
}

.ocr-card.settings select:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.ocr-browser-note{
    display:flex;
    align-items:center;
    gap:12px;
    margin:18px 0;
    padding:13px;
    border:1px solid #bbf7d0;
    border-radius:12px;
    background:#f0fdf4;
    color:#166534;
}

.ocr-browser-note i{
    font-size:20px;
}

.ocr-browser-note div{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.ocr-browser-note span{
    font-size:12px;
    color:#4b7f5a;
}

.ocr-run-btn{
    width:100%;
    min-height:48px;
    font-weight:800;
}

.ocr-progress-box{
    margin-top:18px;
}

.ocr-progress{
    width:100%;
    height:9px;
    overflow:hidden;
    border-radius:99px;
    background:#e2e8f0;
}

.ocr-progress #progressBar{
    width:0;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg,#2563eb,#4f46e5);
    transition:width .2s ease;
}

#progressText{
    display:block;
    margin-top:7px;
    text-align:center;
    font-weight:800;
    color:#334155;
}

.ocr-status{
    min-height:22px;
    margin:12px 0 0;
    text-align:center;
    color:#64748b;
    font-size:13px;
}

.result-card{
    display:flex;
    flex-direction:column;
}

#resultText{
    width:100%;
    min-height:350px;
    resize:vertical;
    box-sizing:border-box;
    border:1px solid #dbe3ef;
    border-radius:16px;
    background:#f8fafc;
    padding:15px;
    font:500 14px/1.6 Arial,sans-serif;
    color:#1e293b;
    outline:none;
}

#resultText:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.ocr-result-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:12px;
}

.ocr-result-actions .btn{
    min-height:45px;
    font-weight:800;
}

.ocr-small-reset:hover,
.ocr-reset-btn:hover,
.ocr-choose-btn:hover{
    filter:brightness(.98);
    transform:translateY(-1px);
}

.ocr-card .btn:disabled{
    opacity:.55;
    cursor:not-allowed;
}

body.dark-mode .ocr-card,
.dark-mode .ocr-card{
    background:#111827;
    border-color:#334155;
    box-shadow:none;
}

body.dark-mode .ocr-card > h3,
body.dark-mode .ocr-card-heading h3,
.dark-mode .ocr-card > h3,
.dark-mode .ocr-card-heading h3{
    color:#f8fafc;
}

body.dark-mode .ocr-upload-area,
.dark-mode .ocr-upload-area{
    background:linear-gradient(145deg,#111827,#172033);
    border-color:#334155;
}

body.dark-mode .ocr-upload-area h4,
.dark-mode .ocr-upload-area h4{
    color:#f8fafc;
}

body.dark-mode .ocr-card.settings label,
.dark-mode .ocr-card.settings label{
    color:#cbd5e1;
}

body.dark-mode .ocr-card.settings select,
.dark-mode .ocr-card.settings select,
body.dark-mode #resultText,
.dark-mode #resultText{
    background:#0f172a;
    border-color:#334155;
    color:#e2e8f0;
}

body.dark-mode .ocr-info,
.dark-mode .ocr-info,
body.dark-mode .ocr-result-info,
.dark-mode .ocr-result-info{
    background:#172554;
    color:#cbd5e1;
}

body.dark-mode .ocr-browser-note,
.dark-mode .ocr-browser-note{
    background:#052e16;
    border-color:#166534;
    color:#bbf7d0;
}

@media(max-width:1050px){
    .ocr-box{
        grid-template-columns:1fr 1fr;
    }
    .result-card{
        grid-column:1 / -1;
    }
}

@media(max-width:700px){
    .ocr-box{
        grid-template-columns:1fr;
        gap:16px;
    }

    .result-card{
        grid-column:auto;
    }

    .ocr-card{
        padding:17px;
        border-radius:18px;
    }

    .ocr-upload-area,
    #resultText{
        min-height:280px;
    }

    .ocr-card-heading{
        align-items:stretch;
        flex-direction:column;
    }

    .ocr-small-reset{
        width:100%;
    }

    .ocr-result-actions{
        grid-template-columns:1fr;
    }
}


/* =========================================================
   FIX: Lower content sections
   Keeps the same OneToolBox card/grid visual language.
   ========================================================= */

.content-section{
    width:100%;
    padding:42px 0;
}

.content-section.compact-section{
    padding-top:26px;
    padding-bottom:42px;
}

.content-section .container{
    width:min(1200px,calc(100% - 32px));
    margin:0 auto;
}

.content-heading{
    text-align:center;
    max-width:780px;
    margin:0 auto 28px;
}

.content-heading h2{
    margin:0 0 9px;
    color:#172033;
    font-size:30px;
    line-height:1.2;
    font-weight:800;
}

.content-heading p{
    margin:0;
    color:#64748b;
    font-size:16px;
    line-height:1.65;
}

.steps-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
    margin:0;
    padding:0;
}

.info-card{
    display:block;
    width:auto !important;
    min-height:190px;
    margin:0 !important;
    padding:24px;
    box-sizing:border-box;
    text-align:center;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:18px;
    box-shadow:0 8px 24px rgba(15,23,42,.06);
}

.info-card .step-number{
    width:42px;
    height:42px;
    margin:0 auto 15px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#2563eb;
    color:#fff;
    font-size:17px;
    font-weight:800;
}

.info-card h3{
    margin:0 0 9px;
    color:#172033;
    font-size:19px;
    font-weight:800;
}

.info-card p{
    margin:0;
    max-width:none !important;
    color:#64748b;
    font-size:14px;
    line-height:1.65;
}

.privacy-card{
    display:flex;
    align-items:center;
    gap:18px;
    box-sizing:border-box;
    padding:22px 24px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:18px;
}

.privacy-icon{
    flex:0 0 52px;
    width:52px;
    height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    background:#eff6ff;
    color:#2563eb;
    font-size:22px;
}

.privacy-card h2{
    margin:0 0 7px;
    color:#172033;
    font-size:21px;
    font-weight:800;
}

.privacy-card p{
    margin:0;
    color:#64748b;
    font-size:14px;
    line-height:1.65;
}

@media(max-width:1050px){
    .steps-grid{
        grid-template-columns:1fr 1fr;
    }
}

@media(max-width:700px){
    .content-section{
        padding:30px 0;
    }

    .content-section .container{
        width:calc(100% - 24px);
    }

    .content-heading{
        margin-bottom:20px;
    }

    .content-heading h2{
        font-size:24px;
    }

    .steps-grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .info-card{
        min-height:auto;
        padding:20px;
    }

    .privacy-card{
        align-items:flex-start;
        flex-direction:column;
        padding:20px;
    }
}

body.dark-mode .info-card,
.dark-mode .info-card{
    background:#111827;
    border-color:#334155;
    box-shadow:none;
}

body.dark-mode .content-heading h2,
body.dark-mode .info-card h3,
body.dark-mode .privacy-card h2,
.dark-mode .content-heading h2,
.dark-mode .info-card h3,
.dark-mode .privacy-card h2{
    color:#f8fafc;
}

body.dark-mode .content-heading p,
body.dark-mode .info-card p,
body.dark-mode .privacy-card p,
.dark-mode .content-heading p,
.dark-mode .info-card p,
.dark-mode .privacy-card p{
    color:#94a3b8;
}

body.dark-mode .privacy-card,
.dark-mode .privacy-card{
    background:#111827;
    border-color:#334155;
}

body.dark-mode .privacy-icon,
.dark-mode .privacy-icon{
    background:#172554;
    color:#60a5fa;
}



/* =========================================================
   COMMON HERO HEADING - IMAGE OCR
   Match Image Compressor / Resizer common centered layout
   ========================================================= */

.ocr-page-hero,
.tool-hero,
.tool-header,
.page-hero{
    text-align:center !important;
}

.ocr-page-hero h1,
.tool-hero h1,
.tool-header h1,
.page-hero h1{
    margin:0 auto 10px !important;
    text-align:center !important;
    color:#2457d6 !important;
    font-size:clamp(34px,4vw,52px) !important;
    line-height:1.12 !important;
    font-weight:800 !important;
    letter-spacing:-1.2px !important;
}

.ocr-page-hero p,
.tool-hero p,
.tool-header p,
.page-hero p{
    margin:0 auto !important;
    max-width:900px;
    text-align:center !important;
    color:#64748b !important;
    font-size:16px !important;
    line-height:1.6 !important;
}

.ocr-page-hero .eyebrow,
.tool-hero .eyebrow,
.tool-header .eyebrow,
.page-hero .eyebrow{
    display:block;
    margin:0 auto 12px !important;
    text-align:center !important;
    color:#2563eb !important;
    font-weight:800 !important;
}

@media(max-width:700px){
    .ocr-page-hero h1,
    .tool-hero h1,
    .tool-header h1,
    .page-hero h1{
        font-size:32px !important;
    }

    .ocr-page-hero p,
    .tool-hero p,
    .tool-header p,
    .page-hero p{
        font-size:14px !important;
    }
}
