/* ==========================================
   DAILY SARHAD TOOLS - GLOBAL STYLES
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Inter,Segoe UI,Arial,sans-serif;
    background:#f7f8fa;
    color:#222;
    line-height:1.6;
}

a{
    text-decoration:none;
    color:inherit;
}

.container{
    max-width:1200px;
    margin:auto;
    padding:0 20px;
}

/* ==========================================
   NAVBAR
========================================== */

.navbar{
    background:#fff;
    position:sticky;
    top:0;
    z-index:999;
    box-shadow:0 2px 10px rgba(0,0,0,.06);
}

.nav-container{
    max-width:1200px;
    margin:auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 20px;
}

.logo{
    font-size:24px;
    font-weight:800;
    color:#e5322d;
}

.nav-links{
    display:flex;
    gap:30px;
    list-style:none;
}

.nav-links a{
    color:#333;
    font-weight:600;
    transition:.2s;
}

.nav-links a:hover{
    color:#e5322d;
}

.menu-toggle{
    display:none;
    width:auto;
    background:none;
    border:none;
    color:#333;
    font-size:28px;
    cursor:pointer;
    padding:0;
}

/* ==========================================
   HERO
========================================== */

.hero{
    background:#fff;
    text-align:center;
    padding:90px 20px;
}

.hero h1{
    font-size:56px;
    font-weight:800;
    margin-bottom:20px;
}

.hero p{
    max-width:750px;
    margin:auto;
    font-size:20px;
    color:#666;
}

.hero-btn{
    display:inline-block;
    margin-top:30px;
    background:#e5322d;
    color:#fff;
    padding:15px 35px;
    border-radius:10px;
    font-weight:700;
    transition:.2s;
}

.hero-btn:hover{
    background:#c92b26;
}

/* ==========================================
   ADS
========================================== */

.ad{
    max-width:1200px;
    margin:25px auto;
    padding:20px;
    text-align:center;
    background:#fff;
    border-radius:15px;
    box-shadow:0 3px 15px rgba(0,0,0,.05);
}

/* ==========================================
   TOOLS GRID
========================================== */

.tools{
    padding:70px 0;
}

.section-title{
    text-align:center;
    font-size:38px;
    margin-bottom:40px;
}

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:25px;
}

.card{
    background:#fff;
    border-radius:18px;
    padding:30px;
    box-shadow:0 8px 25px rgba(0,0,0,.06);
    transition:.25s;
}

.card:hover{
    transform:translateY(-8px);
}

.icon{
    font-size:42px;
}

.card h3{
    margin:15px 0;
    font-size:22px;
}

.card p{
    color:#666;
}

/* ==========================================
   STATS
========================================== */

.stats{
    background:#fff;
    padding:70px 0;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:30px;
    text-align:center;
}

.stats h2{
    font-size:42px;
    color:#e5322d;
}

/* ==========================================
   FEATURES
========================================== */

.features{
    padding:80px 0;
}

.feature-box{
    background:#fff;
    border-radius:18px;
    padding:25px;
    box-shadow:0 6px 20px rgba(0,0,0,.05);
}

/* ==========================================
   SEO CONTENT
========================================== */

.seo{
    padding:70px 0;
}

.seo p{
    margin-bottom:20px;
    color:#555;
}

/* ==========================================
   FAQ
========================================== */

.faq{
    background:#fff;
    padding:80px 0;
}

.faq h3{
    margin-top:25px;
    margin-bottom:10px;
}

/* ==========================================
   TOOL PAGES
========================================== */

.tool-hero{
    text-align:center;
    padding:70px 20px;
    background:#fff;
}

.tool-hero h1{
    font-size:48px;
    margin-bottom:15px;
}

.tool-hero p{
    max-width:700px;
    margin:auto;
    color:#666;
    font-size:18px;
}

.tool-box{
    max-width:1000px;
    margin:30px auto;
}

.drop{
    border:3px dashed #d9dde5;
    background:#fff;
    border-radius:20px;
    text-align:center;
    padding:60px 30px;
    cursor:pointer;
    transition:.2s;
}

.drop:hover{
    border-color:#e5322d;
}

.drop h2{
    margin:15px 0;
    font-size:30px;
}

.drop p{
    color:#666;
}

.upload-icon{
    font-size:70px;
}

button{
    width:100%;
    border:none;
    background:#e5322d;
    color:#fff;
    font-size:18px;
    font-weight:700;
    padding:16px;
    border-radius:12px;
    margin-top:20px;
    cursor:pointer;
}

button:hover{
    background:#c92b26;
}

/* ==========================================
   PREVIEW SYSTEM
========================================== */

.preview-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
    gap:20px;
    margin-top:25px;
}

.preview-card{
    background:#fff;
    border-radius:15px;
    overflow:hidden;
    position:relative;
    box-shadow:0 4px 15px rgba(0,0,0,.08);
    transition:.15s;
}

.preview-card img{
    width:100%;
    height:220px;
    object-fit:cover;
}

.preview-info{
    padding:10px;
    text-align:center;
    font-size:13px;
    word-break:break-word;
}

.remove-file{
    position:absolute;
    top:10px;
    right:10px;
    width:30px;
    height:30px;
    border:none;
    border-radius:50%;
    background:#dc3545;
    color:#fff;
    cursor:pointer;
}

.file-count{
    margin-top:15px;
    color:#e5322d;
    font-weight:700;
}

.preview-card.dragging{
    opacity:.5;
    transform:scale(.95);
}

.preview-card.drag-over{
    outline:3px dashed #e5322d;
}

/* ==========================================
   TRUST BAR
========================================== */

.trust-bar{
    max-width:1200px;
    margin:25px auto;
    background:#fff;
    border-radius:15px;
    padding:20px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
    text-align:center;
    box-shadow:0 3px 12px rgba(0,0,0,.05);
}

/* ==========================================
   RELATED TOOLS
========================================== */

.related-tools{
    margin-top:50px;
}

.related-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
    margin-top:20px;
}

.related-grid a{
    background:#fff;
    padding:18px;
    border-radius:12px;
    box-shadow:0 3px 10px rgba(0,0,0,.06);
    transition:.2s;
}

.related-grid a:hover{
    transform:translateY(-4px);
}

/* ==========================================
   FOOTER
========================================== */

.footer{
    background:#111;
    color:#ddd;
    margin-top:60px;
}

.footer-inner{
    max-width:1200px;
    margin:auto;
    padding:35px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:20px;
}

.footer-links{
    display:flex;
    gap:20px;
}

.footer-links a{
    color:#ddd;
}

/* ==========================================
   MOBILE
========================================== */

@media(max-width:768px){

    .menu-toggle{
        display:block;
    }

    .nav-links{
        display:none;
        position:absolute;
        top:70px;
        left:0;
        right:0;
        background:#fff;
        flex-direction:column;
        padding:20px;
        box-shadow:0 5px 15px rgba(0,0,0,.08);
    }

    .nav-links.show{
        display:flex;
    }

    .hero h1,
    .tool-hero h1{
        font-size:34px;
    }

    .hero p,
    .tool-hero p{
        font-size:17px;
    }

    .section-title{
        font-size:28px;
    }

    .trust-bar{
        grid-template-columns:1fr 1fr;
    }

    .footer-inner{
        flex-direction:column;
        text-align:center;
    }

    .drop{
        padding:40px 20px;
    }

    .drop h2{
        font-size:24px;
    }
}

/* for same */
.tool-hero{
background:#fff;
padding:70px 20px;
text-align:center;
}

.tool-hero h1{
font-size:48px;
margin-bottom:15px;
}

.tool-hero p{
max-width:750px;
margin:auto;
color:#666;
font-size:18px;
}

.tool-box{
max-width:900px;
margin:auto;
}

.feature-box{
background:#fff;
padding:20px;
border-radius:14px;
box-shadow:0 4px 15px rgba(0,0,0,.06);
}

@media(max-width:768px){

.tool-hero h1{
font-size:34px;
}

.tool-hero p{
font-size:16px;
}

}

/* Fro Rearrange */
.sort-hint{
background:#fff3cd;
border:1px solid #ffe69c;
padding:15px;
border-radius:12px;
margin:15px 0;
text-align:center;
font-weight:600;
color:#664d03;
}

.generate-btn{
margin-top:20px;
}

.preview-card{
cursor:move;
}

.preview-card.dragging{
opacity:.5;
transform:scale(.95);
}

.preview-card.drag-over{
outline:3px dashed #e5322d;
}

.status-box{
text-align:center;
font-weight:600;
padding:15px;
color:#e5322d;
}

/* FIXED PREVIEW FRAME (NO LAYOUT SHIFT) */
.img-frame{
    width:100%;
    height:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    background:#f5f6f8;
    position:relative;
}

/* IMAGE ALWAYS CENTERED */
.img-frame img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    transition:transform 0.25s ease;
}

/* ROTATION (PERFECT FIT — NO CROPPING) */
.rot-0 img{
    transform:rotate(0deg);
}

.rot-90 img{
    transform:rotate(90deg);
}

.rot-180 img{
    transform:rotate(180deg);
}

.rot-270 img{
    transform:rotate(270deg);
}

/* BUTTON STYLES (ROTATE + INSERT CLEAN UI) */
.rot-btn,
.insert-btn{
    position:absolute;
    top:10px;
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    font-size:14px;
    color:#fff;
}

.rot-btn{
    left:10px;
    background:#000;
}

.insert-btn{
    left:45px;
    background:#0d6efd;
}

.rot-btn:hover,
.insert-btn:hover{
    opacity:0.85;
}

/* MOBILE OPTIMIZATION (IMPORTANT) */
@media(max-width:768px){

    .img-frame{
        height:180px;
    }

    .rot-btn,
    .insert-btn{
        width:26px;
        height:26px;
        font-size:13px;
    }
}

/* FIX CSS (THIS IS WHY BUTTONS “DISAPPEARED”) */

.preview-card{
    position:relative;
    overflow:hidden;
}

/* DELETE BUTTON */
.btn-delete{
    position:absolute;
    top:10px;
    right:10px;
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    background:#dc3545;
    color:#fff;
    font-size:16px;
    cursor:pointer;
    z-index:10;
}

/* ROTATE BUTTON */
.btn-rotate{
    position:absolute;
    top:10px;
    left:10px;
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    background:#000;
    color:#fff;
    font-size:14px;
    cursor:pointer;
    z-index:10;
}

/* INSERT BUTTON */
.btn-insert{
    position:absolute;
    top:10px;
    left:45px;
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    background:#0d6efd;
    color:#fff;
    font-size:14px;
    cursor:pointer;
    z-index:10;
}

/* IMAGE FRAME */
.img-frame{
    width:100%;
    height:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f5f6f8;
    overflow:hidden;
}

.img-frame img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

/* ROTATION */
.rot-0 img{ transform:rotate(0deg); }
.rot-90 img{ transform:rotate(90deg); }
.rot-180 img{ transform:rotate(180deg); }
.rot-270 img{ transform:rotate(270deg); }
