/* Consolidated Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;900&family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============= GLOBAL STYLES =========*/
a { text-decoration: none; color: #007bff; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; }
hr { border: 0; height: 1px; background-color: #e1e1e1; margin-bottom: 20px; }

/* ============= HERO SECTION =========*/
.shayar-profile-hero-section {
    position: relative;
    min-height: 280px; 
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto 4rem auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start; /* Pulls items together on desktop */
    gap: 80px; /* Controlled gap between info and sher */
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.profile-info h2 {
    font-size: 1.2rem;
    font-family: 'Merriweather', serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    line-height: 2;
    opacity: 0.9;
}

.details {
    font-size: 0.85rem;
    margin-top: 8px;
    display: flex;
    gap: 15px;
}

/* Featured Sher Styling */

.profile-sher {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
}

.misra-stretch {
    display: block;
    width: 100%;
    text-align: justify;
    text-align-last: justify;
    margin-bottom: 5px; /* desired gap */
    
}

.profile-sher span{
    font-family: 'Noto Nastaliq Urdu', serif;
    line-height: 2;
    letter-spacing: .5px;
    font-weight: 500;
}

.profile-sher small{
    margin-top: 10px;
}

.audio-wrapper { margin-bottom: 10px; }

.play-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Social Icons */
.profile-sher-socialicons ul {
    display: flex;
    margin-top: 15px;
    gap: 12px;
    justify-content: center;
}

.p-s-si-content a {
    width: 24px;
    height: 24px;
    border-radius: 20%;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    transition: 0.3s;
}

.p-s-si-content a:hover { background: #888; }

/* ============= INDIVIDUAL GHAZAL, NAZM, SHER ======= */
/* ==========================================
   1. SHARED STYLES (Applies to both Desktop & Mobile)
   ========================================== */
.literary-container {
    margin: 30px 0 2px 0;
    font-family: 'Merriweather', serif;
    /*width: 100%;*/
}

/* Couplet Spacing */
.ghazal-couplet, .nazm-block {
    margin-bottom: 40px; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================
   2. VISIBILITY LOGIC (The Switch)
   ========================================== */

/* On Desktop: Show desktop-poetry, Hide mobile-poetry */
@media (min-width: 769px) {
    .mobile-poetry { 
        display: none !important; 
    }
    .desktop-poetry { 
        display: flex; /* Restores flex for alignment */
        flex-direction: column;
        align-items: center;
    }
}

/* On Mobile: Show mobile-poetry, Hide desktop-poetry */
@media (max-width: 768px) {
    .desktop-poetry { 
        display: none !important; 
    }
    
    .misra-mobile-line {
    display: flex;
    text-align: center;
    justify-content: space-around !important;
    padding: 0 5px;
    width: 100% !important;
    overflow-x: hidden;
    font-size: clamp(.8rem, 4.2vw, 2rem);
    margin-bottom: 10px;
    font-weight: 600;
    color: rgb(75,75,75);
    white-space: nowrap !important;
    
    }
}

/* ==========================================
   3. DESKTOP-SPECIFIC STYLES (Word-Flex)
   ========================================== */
.desktop-poetry .misra-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-width: 350px;
    max-width: 1000px;
    margin-bottom: 12px;
}

.desktop-poetry .word {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #1a1a1a;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.profile-flourish{
    display: flex;
    align-items:center;
    justify-content: center;
    color: #888;
    margin-bottom: 20px;
}

/* ========= content meta bar  ============*/
.content-meta-bar{
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-bottom: 10px;
}

/*  ==========  meter styling ============*/
.meter-info-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(182, 6, 64, 0.04); /* Safhaat brand tint */
    border: 1px dashed rgba(182, 6, 64, 0.25);
    padding: 6px 16px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer; /* Tells the user "this is clickable" */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.meter-info-badge:hover {
    background: rgba(182, 6, 64, 0.08);
    border-style: solid;
    transform: translateY(-1px); /* Subtle lift */
    box-shadow: 0 4px 12px rgba(182, 6, 64, 0.1);
}

.meter-icon {
    color: #b60640;
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.meter-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #b60640;
    letter-spacing: 0.8px;
    margin-right: 8px;
}

.meter-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d2d2d;
    letter-spacing: 1px; /* Makes numbers like 2122 easier to read */
}

/* Responsive adjustment for mobile */
@media (max-width: 600px) {
    .content-meta-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ======= Urdu Text ========= */
/* Base style for all poetry variants */
.variant-box {
    padding: 10px;
    transition: opacity 0.3s ease;
}

/* Specific styling for Urdu (Nastaliq) */
.variant-urdu {
    direction: rtl;            /* Right-to-Left is mandatory */
    text-align: right;         /* Align text to the right */
    font-family: "Noto Nastaliq Urdu", serif;
    
    /* URDU NEEDS MORE SPACE */
    font-size: 1rem;         
    line-height: 2;   /* Increase line-height to prevent overlapping loops/dots */
    letter-spacing: 0px;  /* Nastaliq doesn't use letter-spacing like Roman text */
    word-spacing: 2px;
}

/* Specific styling for Roman/English */
.variant-roman {
    font-style: italic;
    color: #555;
    line-height: 1.6;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .variant-urdu {
        font-size: .825rem; /* Slightly smaller for mobile, but still larger than Hindi */
        line-height: 1.2;
    }
}

/* ======= Navigation ======== */
.poetry-footer-nav{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}
.prev-btn, .next-btn{
    color: #262626;
    font-size: 1rem;
    text-transform: Uppercase;
}
.prev-btn p{
    text-align: right;
    padding-right: 20px;
}
.prev-btn:hover, .next-btn:hover{
    transform: scale(1.05);
    transition: ease .03s;
}
.separater{
    color: #b60640;
}
.next-btn p{
    padding-left: 20px;
    text-align: left;
}


/* ============= TABS BAR =========*/
.tabs-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    z-index: 10;
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid #eee;
}

.tabs-bar ul {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    list-style: none; /* Ensure no bullets */
}

.tab-link {
    display: inline-block; /* Ensure padding works correctly on anchor */
    padding: 15px 25px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    position: relative;
    text-decoration: none; /* Remove underline from links */
    transition: color 0.3s ease;
}

/* Hover Effect */
.tab-link:hover {
    color: #b60640;
}

/* Active State: Target the link inside the active LI */
li.active .tab-link {
    color: #000;
}

li.active .tab-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #b60640;
}
/* ============= MAIN CONTENT =========*/
.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
}

.bio-content {
    flex: 2.5;
    background: #fff;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.4s ease; }

.bio-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* ==== ghazal title ====*/
.bio-content-inner h2{
    font-family: 'oswaldregular';
    font-size: 1.2rem;
    letter-sapcing: .5px;
    line-height: 1.8;
    color: #1a1a1a;
}

.sidebar {
    flex: 1;
}
.sidebar-widget{
    width: 100%;
    max-width: 300px;
}
.sidebar-widget h3{
    margin: 20px 0;
    border-left: 4px solid #b60640;
    padding-left: 10px;
    font-size: 1.2rem;
}

.ad-img{
    width: 250px;
    object-fit: cover;
}

/* ============= MOBILE RESPONSIVE QUERIES =========*/

@media (max-width: 768px) {
    .shayar-profile-hero-section {
        min-height: auto;
        padding-bottom: 55px; /* Adjust for tabs */
    }

    .hero-content {
        flex-direction: column; /* Stack container and sher */
        margin: 1rem 0;
        padding: 0 15px;
        gap: 10px;
    }

    .profile-container {
        flex-direction: row; /* Img on left, Name on right */
        text-align: left;
        width: 100%;
        gap: 15px;
        justify-content: flex-start;
        margin-bottom: -5px;
    }

    .profile-img {
        width: 80px;
        height: 80px;
    }

    .profile-info h1 { 
        font-size: 1.4rem !important;
        margin-bottom: 2px;
    }
    .profile-info h2 { font-size: 1rem;}
    
    .details{display: none;}

    
    .name-actions{
        display: flex;
        flex-direction: column;
        margin-top: 25px;
        gap: 2px
    }

    .bio-content-inner h2{
    font-size: 1rem;
    }

    .main-container {
        flex-direction: column;
        margin-top: 15px;
    }

    .sidebar { order: 2; }
    .bio-content { padding: 10px 0; box-shadow: none; }
    .tabs-bar::-webkit-scrollbar { display: none; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}