/* =========================================
   GLOBAL STYLES & BRANDING (Baalbo.com)
   ========================================= */
* {
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    margin: 0;
    background: #f5f8fc;
    color: #1f2937;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 15px;
}

/* HEADER */
.top-bar {
    background: #ffffff;
    padding: 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    max-width: 1000px;
    margin: auto;
    position: relative;
    text-align: center;
}

.brand-logo {
    height: 46px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.header-text h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0B8EDB;
}

.header-text p {
    margin-top: 4px;
    font-size: 14px;
    color: #6b7280;
}

/* =========================================
   URL SHORTENER TOOL BOX
   ========================================= */
.tool-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 15px;
}

.shortener-main-card {
    width: 100%;
    background: #fff;
    border-radius: 24px;
    padding: 50px 30px;
    text-align: center;
    border: 2px dashed #0B8EDB;
    box-shadow: 0 15px 40px rgba(11, 142, 219, 0.08);
}

.upload-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.input-container-modern {
    display: flex;
    gap: 12px;
    margin: 25px auto;
    max-width: 700px;
}

.input-container-modern input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #eef2f6;
    border-radius: 50px;
    outline: none;
    font-size: 16px;
    transition: 0.3s;
}

.input-container-modern input:focus {
    border-color: #0B8EDB;
    box-shadow: 0 0 15px rgba(11, 142, 219, 0.15);
}

.primary-btn {
    background: linear-gradient(135deg, #F28C38, #e67e22);
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    white-space: nowrap;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(242, 140, 56, 0.3);
}

/* RESULT CARD */
.controls-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    margin-top: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.short-url-output {
    display: flex;
    gap: 10px;
    background: #f0f7ff;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #cfe9f8;
}

.short-url-output input {
    flex: 1;
    background: transparent;
    border: none;
    font-weight: 700;
    color: #0B8EDB;
    font-size: 18px;
    outline: none;
}

.zip-btn {
    background: #16a34a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.qr-result-box {
    text-align: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 25px;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

/* HISTORY SECTION STYLES */
.history-container {
    margin-top: 40px;
    text-align: left;
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #eef2f6;
}

.history-container h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #1f2937;
    border-bottom: 2px solid #f0f7ff;
    padding-bottom: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.history-item:hover {
    background: #f1f5f9;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.history-short {
    font-weight: 700;
    color: #0B8EDB;
    font-size: 15px;
}

.history-long {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.history-copy-btn {
    background: #0B8EDB;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.clear-history {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: underline;
}

/* Custom Slug & Share Buttons Styling */
.main-inputs {
    display: flex;
    flex: 1;
    gap: 10px;
    width: 100%;
}

#longUrlInput {
    flex: 2;
}

#customSlug {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    border: 2px solid #eef2f6;
    border-radius: 50px;
    outline: none;
    font-size: 14px;
}

.share-actions {
    margin: 20px 0;
    text-align: center;
}

.share-actions p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

.whatsapp {
    background: #25D366;
}

.telegram {
    background: #0088cc;
}

.share-btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .main-inputs {
        flex-direction: column;
    }

    #customSlug {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .history-copy-btn {
        width: 100%;
    }
}

/* =========================================
   SEO LONG CONTENT SECTION - FIXED
   ========================================= */
.seo-modern-wrapper {
    background: #ffffff;
    padding: 60px 0;
    border-top: 1px solid #f1f5f9;
}

.long-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
    word-wrap: break-word;
}

.long-content h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    line-height: 1.3;
}

.long-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #334155;
    margin-top: 40px;
    margin-bottom: 15px;
}

.long-content p {
    font-size: 16px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Info Card (Highlight Box) */
.info-card {
    background: linear-gradient(135deg, #0B8EDB, #2563eb);
    padding: 35px;
    border-radius: 24px;
    color: #ffffff;
    margin: 40px 0;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.2);
}

.info-card h4 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    font-size: 15px;
}

/* FAQ SECTION DESIGN */
.faq-section {
    margin-top: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.faq-section h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 40px;
}

.faq-container {
    background: #f8fafc;
    border-radius: 20px;
    padding: 10px;
    border: 1px solid #f1f5f9;
}

.faq-item {
    background: #ffffff;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.faq-question:hover {
    color: #0B8EDB;
    background: #f0f9ff;
}

.faq-question span {
    font-size: 22px;
    color: #94a3b8;
    transition: 0.3s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 20px;
    background: #ffffff;
}

.faq-answer.open {
    max-height: 500px;
    /* Adjust based on content */
    padding-bottom: 20px;
}

.faq-answer p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    border-top: 1px solid #f8fafc;
    padding-top: 15px;
}

/* Horizontal Divider Custom */
.divider {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 60px 0;
}

/* Responsive adjustments for Tablets and Mobile */
@media (max-width: 768px) {
    .seo-modern-wrapper {
        padding: 40px 0;
    }

    .long-content h2 {
        font-size: 22px;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .long-content h3 {
        font-size: 19px;
        margin-top: 25px;
    }

    .long-content p {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 15px;
        color: #4b5563;
    }

    /* Info Card Scaling for Mobile */
    .info-card {
        padding: 20px;
        margin: 25px 0;
        border-radius: 16px;
    }

    .info-card h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .info-card p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* List Item Spacing */
    .long-content ul {
        padding-left: 20px;
    }

    .long-content ul li {
        font-size: 15px;
        margin-bottom: 10px;
        line-height: 1.6;
    }
}

/* Custom Divider Spacing for small screens */
@media (max-width: 640px) {
    .divider {
        margin: 30px 0;
    }
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .long-content h2 {
        font-size: 24px;
    }

    .long-content p {
        font-size: 15px;
    }

    .info-card {
        padding: 25px;
    }

    .faq-question {
        font-size: 15px;
        padding: 15px;
    }
}

/* =========================================
   RELATED TOOLS (5-Column Desktop)
   ========================================= */
.related-tools-premium {
    padding: 60px 0;
    background: #f9fafb;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.p-tool-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    border: 1px solid #eef2f6;
    transition: 0.3s;
}

.p-tool-card:hover {
    transform: translateY(-5px);
    border-color: #0B8EDB;
}

.tool-icon-wrapper {
    font-size: 24px;
    margin-bottom: 10px;
}

/* ===============================
   RELATED BLOGS - FIXED DESIGN
   ================================ */
.related-blogs {
    background: #ffffff;
    padding: 80px 0;
    border-top: 1px solid #eee;
}

.related-blogs-inner {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
    text-align: left;
}

.blog-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: 0.3s ease;
    border: 1px solid #f1f5f9;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-date {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.blog-title {
    font-size: 19px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-readmore {
    display: inline-block;
    color: #0B8EDB;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.blog-readmore:hover {
    text-decoration: underline;
}

/* Responsive Blog Grid */
@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
}

.footer {
    padding: 40px 0;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
}

.footer-links a {
    color: #0B8EDB;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
}

/* UTILS */
.hidden {
    display: none;
}

.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 50px 0;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-container-modern {
        flex-direction: column;
    }

    .brand-logo {
        position: static;
        transform: none;
        margin-bottom: 15px;
    }

    .header-inner {
        padding-top: 10px;
    }
}