:root {
    --primary-blue: #2c3e50;
    --primary-red: #e74c3c;
    --light-red: #ffebee;
    --dark-blue: #2980b9;
    --light-blue: #3498db;
    --dark-red: #c0392b;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --gray-light: #ecf0f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

body {
    background-color: var(--gray-light);
    color: var(--primary-blue);
    line-height: 1.6;
}

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

.d-none {
    display: none !important;
}

/* =====================
 Header Section
======================= */
header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.logo-wrapper {
    display: flex;
    flex: 1;
}

.logo-wrapper img {
    height: 40px;
    width: 100px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--light-blue);
}

.login-btn {
    background-color: var(--light-blue);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-left: 1.5rem;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: var(--white);
    color: var(--light-blue);
}

/* ========================
 Main Content Section
===========================*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.125rem;
    color: var(--primary-blue);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* =========================
 Upload file Section
=========================== */
.upload-area {
    background-color: #e1f1fb;
    border: 2px dashed var(--dark-blue);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover {
    border-color: var(--light-blue);
}

.upload-area.active {
    border-color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.05);
}

.upload-area h2 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.upload-icon {
    font-size: 3rem;
    color: var(--light-blue);
    margin-bottom: 1rem;
}

.upload-icon img {
    height: 100px;
    width: auto;
}

.upload-btn {
    background-color: var(--light-blue);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.upload-btn:hover {
    background-color: var(--dark-blue);
}

#file-input {
    display: none;
}

.file-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.file-name {
    font-weight: bold;
    color: var(--primary-blue);
    margin-top: 0.5rem;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-file {
    color: #e74c3c;
    cursor: pointer;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

/* ===========================
 How It Works Section
============================= */
.how-it-works {
    margin-bottom: 3rem;
}

.how-it-works h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
    text-align: center;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.step {
    background-color: white;
    padding: 1.8rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--light-blue), var(--dark-blue));
    transition: height 0.3s ease;
}

.step:hover::before {
    height: 10px;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: transform 0.3s ease;
}

.step:hover .step-icon {
    transform: scale(1.1);
}

.step h3 {
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* =====================
 Info Section
======================= */

.info-section h2 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.info-section {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--light-blue);
}

.info-section:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    font-size: 1.5rem;
    padding-right: 12px;
    color: var(--primary-blue);
}

/* ========================
 Footer Section
========================== */
footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a:hover {
    color: var(--light-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
    margin: 0 1rem;
}

.footer-links a:hover {
    color: var(--light-blue);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: var(--white);
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    color: var(--light-blue);
    transform: translateY(-3px);
}

/* ======================
 Responsiveness
========================= */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .nav-toggle {
        display: block;
        order: 2;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: white;
        margin-left: auto;
    }

    header nav {
        width: 100%;
        order: 3;
        display: none;
    }

    header nav ul {
        flex-direction: column;
        padding: 0;
        margin-top: 1rem;
    }

    header nav ul li {
        margin: 0px;
        padding: 10px;
    }

    header nav ul li:hover {
        background-color: var(--gray-light);
        color: var(--dark-blue);
    }

    .login-btn {
        margin-left: 0;
        display: block;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

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

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }

    .subscribe-btn {
        border-radius: 4px;
        padding: 0.8rem;
    }

    .how-it-works h2 {
        font-size: 1.5rem;
        line-height: 28px;
        margin-bottom: 1rem;
        text-align: start;
    }

    .info-section h2 {
        font-size: 1.25rem;
        line-height: 24px;
    }
}

/* =================
 Utility Classes Section
==================== */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 2rem;
}


/* =====================
   Blog Section
======================= */
.blog-posts {
    margin-bottom: 4rem;
}

.blog-post {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.blog-post:hover .post-image img {
    transform: scale(1.03);
}

.post-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    color: var(--light-blue);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.blog-post h2,
.blog-post h3 {
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-post h2 a,
.blog-post h3 a {
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

.blog-post h2 a:hover,
.blog-post h3 a:hover {
    color: var(--light-blue);
    text-decoration: none;
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--light-blue);
    font-weight: bold;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--dark-blue);
}

.read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* ===========================
    Newsletter
==============================*/
.newsletter {
    background-color: var(--primary-blue);
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.newsletter h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.subscribe-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 4px 4px 0;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.subscribe-btn:hover {
    background-color: var(--dark-red);
}


/* Add to your CSS file */
.upload-area.active {
    border-color: #4CAF50;
    background-color: #f8fff8;
}

.ocrText {
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-family: inherit;
    resize: vertical;
}

#submitBtn {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px auto;
    width: 340px;
    height: 40px;
}

#submitBtn:hover {
    background-color: #45a049;
}

#submitBtn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.output-section {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 60px;
    min-height: auto;
}

.start__over {
    float: right;
    height: 35px;
    margin-bottom: 12px;
    width: 93px;
    background: #e55555;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

#preview img {
    max-width: 100px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px;
    height: 50px;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* image preview sction  */
.uploaded-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.uploaded-image-card {
    position: relative;
    width: 100%;
    background: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

.uploaded-image-card img {
    height: 35px;
    border-radius: 5px;
}

.file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.crop-btn,
.remove-btn {
    background: #f1f1f1;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.crop-btn {
    color: #333;
}

.remove-btn {
    color: #000;
}
.copy-btn:hover,
.download-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* other tool section */
.other-tool-section {
    background-color: var(--gray-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--white);
}
.tool-main-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.single-tool-wrapper {
    background-color: white;
    padding: 1.8rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.single-tool-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.single-tool-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--light-blue), var(--dark-blue));
    transition: height 0.3s ease;
}

.single-tool-wrapper:hover::before {
    height: 10px;
}