@font-face {
    font-family: 'JameelNooriKasheeda';
    src: url('../../fonts/Amiri-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'MehrNastaliqWeb';
    src: url('../../fonts/MehrNastaliqWeb.woff2') format('woff2');
}

.menu-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 7vw;
    z-index: 1000;
    background-color: #0a0a24;
    overflow: hidden;
}

.nav-menu {
    display: flex;
    justify-content: right;
    align-items: center;
    height: 100%;
    padding: 0 2vw;
    position: relative;
}

.menu-logo {
    height: 7vw;
    width: auto;
    cursor: pointer;
    margin: 0.5vw;
}
.menu-logo:hover {
    transform: scale(1.1);
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 2vw 2vw 0 1vw;
}

.nav-links li a {
    font-family: 'JameelNooriKasheeda', sans-serif;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: #ffd900;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    padding: 0 1vw;
    position: relative;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

h1 {
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-size: 3.0vw;
    color: #000000;
    text-align: center;
    margin: 0;
    position: relative;
}

h2 {
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-size: 1.8rem;
    color: #000000;
    text-align: center;
    margin: 1.5vw 0;
}

.header-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4vw;
    margin-bottom: 1.5vw;
}

.logo-left {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8.5vw;
    right: 10vw;
    margin-bottom: 2vw;
}

body {
    font-family: 'JameelNooriKasheeda', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 60px 0 2vw 0;
    color: #000000;
    direction: rtl;
    width: 100%;
    min-width: 320px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.input-section {
    background-color: #FFFFFF;
    padding: 2vw 5vw;
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 0.2vw 0.4vw rgba(0, 0, 0, 0.1);
    border-radius: 0.4rem;
    display: block;
    text-align: center;
    z-index: 300;
    position: relative;
    box-sizing: border-box;
    justify-content: center;
}

.input-row {
    display: flex;
    justify-content: center;
       width: 100%;
    margin: 0 auto 2vw;
    gap: 2vw;
    box-sizing: border-box;
}

.input-group {
    flex: 1;
    min-width: 0;
    margin: 0;
    transform: none;
}



.input-group label {
    display: block;
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-weight: 700;
    color: #000000;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-align: right;
}

.input-group label small {
    display: inline-block !important;
    font-size: 0.8rem;
    color: #666666;
    margin: 0 5px;
    font-weight: normal;
    visibility: visible !important;
}

input, select {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.5rem;
    border: 0.1rem solid #D1D5DB;
    border-radius: 0.4rem;
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-size: 1.1rem;
    -webkit-user-select: text;
    user-select: text;
    z-index: 400;
    box-sizing: border-box;
    margin: 0;
}

.input-group input,
.input-group select {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 2vw;
    margin-top: 3vw;
    padding: 0;
}


button {
    padding: 0.5rem 2vw;
    color: #FFFFFF;
    border: none;
    border-radius: 0.4rem;
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 1.3rem;
    position: relative;
    width: auto;
}

#calculate-btn {
    background-color: #3599db;
     z-index: 999;
}

#trace-btn {
    background-color: #2fcc70;
}

button:hover {
    transform: scale(1.05);
}

#calculate-btn:hover {
    background-color: #27a65b;
}

#trace-btn:hover {
    background-color: #2d81b8;
}

.output-section {
    margin-top: 2vw;
    width: 100%;
    max-width: 100vw;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

.qibla-section {
    background-color: #edf1f2;
    padding: 1vw 0;
    margin: 0.05rem 0;
    width: 100%;
    box-shadow: 0 0.2vw 0.4vw rgba(0, 0, 0, 0.1);
    border-radius: 0.4rem;
    text-align: center;
    font-size: 1.5rem;
    color: #000000;
}

.city-name-section {
    background-color: #edf1f2;
    padding: 1vw 0;
    margin: 0.05rem 0;
    width: 100%;
    box-shadow: 0 0.2vw 0.4vw rgba(0, 0, 0, 0.1);
    border-radius: 0.4rem;
    text-align: center;
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-size: 0.8rem;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    direction: rtl;
}

.city-search-group {
    position: relative;
    z-index: 1000;
}

.city-search-suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    background-color: #ffffff;
    border: 0.1rem solid #d1d5db;
    border-radius: 0.4rem;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.12);
    max-height: 16rem;
    overflow-y: auto;
    z-index: 1001;
}

.city-search-suggestion {
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    background: transparent;
    color: #000000;
    text-align: right;
    cursor: pointer;
    font-family: 'MehrNastaliqWeb', sans-serif;
    font-size: 1rem;
}

.city-search-suggestion:hover,
.city-search-suggestion:focus {
    background-color: #edf1f2;
    outline: none;
}

.city-search-suggestion small {
    display: block;
    margin-top: 0.15rem;
    color: #555555;
    font-size: 0.9rem;
}

#qibla span {
    direction: rtl;
    padding: 0.5vw 0;
    display: inline-block;
}

.table-container {
    position: relative;
    background-color: #FFFFFF;
    padding: 2vw;
    margin-bottom: 2vw;
    box-shadow: 0 0.2vw 0.4vw rgba(0, 0, 0, 0.1);
    border-radius: 0.4rem;
    width: 90%;
    max-width: calc(100vw - 20px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow-x: auto;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    opacity: 0.09;
    z-index: 3;
}

table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0.3rem;
    position: relative;
    z-index: 2;
    background-color: transparent;
    box-sizing: border-box;
}

th, td {
    border: none;
    padding: 0.3rem;
    text-align: center;
    white-space: nowrap;
    font-family: 'MehrNastaliqWeb', sans-serif;
  
    font-size: 1.6vw;
}

th {
    background-color: #3599db;
    color: #FFFFFF;
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-size: 1.8vw;
}

td {
    font-weight: bold;
      direction: ltr;
}

tr:nth-child(even) td {
    background-color: #f2f2f2;
}

tr:nth-child(odd) td {
    background-color: #fafafa;
}

tr:first-child td:first-child {
    background-color: #FFFFFF;
}

.error {
    color: red;
}

#save-pdf-btn {
    display: block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'JameelNooriKasheeda', sans-serif;
    font-size: 1.3rem;
    transition: background-color 0.3s, transform 0.2s;
    z-index: 10;
    position: relative;
    width: 100%;
    max-width: 200px;
    text-align: center;
}
#save-pdf-btn.visible {
    display: block; /* دکھائیں جب .visible کلاس شامل ہو */
}

#save-pdf-btn:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.pdf-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px auto;
    width: 100%;
    max-width: 300px;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

.detailed-times-button-container {
    text-align: center;
    margin: 10px 0 0 0;
    display: none; /* This line hides the button by default */
}

.detailed-times-btn {
    color: blue; /* Dark blue text color */
    border: 0px none #0A0A23;
    border-radius: 20px; /* Rounded corners */
    padding: 7.528px 15px;
    font-size: 0.9rem;
    font-family: JameelNooriKasheeda, sans-serif; /* Consistent font with the website */
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    display: inline-block;
    margin: 0px;
    text-decoration: none; /* Remove underline from link */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
}

.detailed-times-btn:hover {
    transform: scale(1.05); /* Slight scale effect on hover */
    text-decoration: none;
}

.detailed-times-btn:focus {
    outline: 2px solid #0A0A23;
    outline-offset: 2px;
}
/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .header-container {
        margin-top: 0vh;
    }
    
    .menu-container {
        height: 7vw;
        z-index: 1003;
        position: relative;
        overflow: visible;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 2vw;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
        cursor: pointer;
        font-size: 2rem;
        color: white;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 7vw;
        right: 0;
        width: 80%;
        min-width: 200px;
        background-color: #0a0a24;
        padding: 2vw;
        z-index: 1001;
        border-radius: 0.4rem;
        box-sizing: border-box;
        transition: all 0.3s ease;
        opacity: 0;
        transform: translateX(100%);
    }

    .nav-links.active {
        display: flex !important;
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
        padding: 1vw 0;
    }

    .nav-links li a {
        display: block;
        padding: 0.5vw 1vw;
        color: white;
        text-decoration: none;
        font-size: 1.4rem;
        font-family: 'JameelNooriKasheeda', sans-serif;
    }

    .nav-menu {
        justify-content: flex-end;
        position: relative;
        z-index: 1000;
        height: 100%;
    }

    .menu-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        height: 7vw;
        z-index: 999;
    }

    body {
        direction: rtl;
    }

    h1 {
        font-size: 5.5vw;
        margin: 6vw 0 4vw 0;
    }
    h2 {
        font-size: 1.9rem;
    }
    .logo-left {
        width: 10vw;
        right: 3vw;
    }
    .input-section {
        display: block;
        text-align: center;
        width: 90%;
        padding: 1.5vw;
    }
    .input-row {
        flex-direction: column;
        margin-bottom: 1.5vw;
        position: relative;
        z-index: 1;
    }
    .input-row:first-of-type {
        z-index: 5000;
    }
    .input-group {
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 1.5vw;
    }
    .input-group:last-child {
        margin-bottom: 0;
    }
    .city-search-suggestions {
        max-height: 14rem;
    }
    .city-search-suggestion {
        padding: 1rem;
        font-size: 1rem;
    }
    .input-group label {
        font-size: 0.8rem;
    }
    input, select {
        padding: 0.5rem 0.2rem;
        font-size: 1.1vw;
    }
    .button-container {
    justify-content: center;
    align-items: center;
       width: 100%;
        flex-direction: column;
        gap: 1vw;
    }
    button {
        font-size: 1.3rem;
        padding: 0 2vw;
        width: 70%;
    }
 .button-container button:first-child {
    order: 2; /* Pushes it below */
}

.button-container button:last-child {
    order: 1; /* Brings it above */
}
    .qibla-section {
        font-size: 4vw;
    }
    #qibla span {
        padding: 2vw 0;
    }
    .table-container {
        padding: 0.2vw;
    }
    table {
        width: 100%;
    }
    th, td {
        font-size: 1.8vw;
        padding: 0.07vw 0 0.05vw 0;
    }
    th {
        font-size: 1.8vw;
    }
    .watermark {
        width: 70%;
    }
    #save-pdf-btn.visible {
        display: block;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .header-container {
        margin-top: 0vh;
    }
    .menu-container {
        height: 9vh;
    }
    .nav-menu ul {
        top: 9vh;
    }
    .nav-links {
        top: 9vh;
        width: 90%;
    }
    .menu-logo {
        height: 13vw;
    }
    body {
        padding-top: 0;
        padding-left: 0;
    }
    h1 {
        font-size: 5.5vw;
    }
    h2 {
        font-size: 1.2rem;
    }
    .logo-left {
        width: 15vw;
    }
    .input-section {
        display: block;
        text-align: center;
        width: 100%;
        padding: 2vw 4vw;
    }
    input, select {
        
       width: 100% ;
        font-size: 0.7rem;
        padding: 0.6rem 0;
    }
   
    .qibla-section {
        font-size: 4.5vw;
    }
    table {
        width: 100%;
    }
    th, td {
        font-size: 1.8vw;
    }
    th {
        font-size: 1.8vw;
    }
}
/* موبائل میں horizontal scroll کے لیے */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .input-section {
        width: 95%;
        padding: 1rem;
    }
    
    .input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .input-group {
        margin-bottom: 1rem;
    }
    
    .input-group label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    input, select {
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }
    
    .button-container {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    button {
        width: 100%;
        padding: 0.8rem;
        font-size: 1.3rem;
    }
    
    .output-section {
        padding: 0 5px;
    }
    
    .table-container {
        margin: 1rem 2.5%;
        width: 95%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem;
    }
    
    table {
        min-width: 650px;
        font-size: 0.8rem;
    }
    
    th, td {
        font-size: 0.7rem;
        padding: 0.3rem 0.1rem;
        white-space: nowrap;
    }
    
    th {
        font-size: 0.75rem;
    }
    
    /* PDF button کو موبائل میں بہتر بنانے کے لیے */
    .pdf-button-container {
        width: 100%;
        padding: 0 10px;
        margin: 15px 0;
    }
    
    #save-pdf-btn {
        width: 100%;
        max-width: 250px;
        padding: 12px 20px;
        font-size: 1.1rem;
    }
}

/* چھوٹی سکرین کے لیے */
@media screen and (max-width: 480px) {
    .table-container {
        margin: 0.5rem 1%;
        width: 98%;
        padding: 0.5rem;
    }
    
    table {
        min-width: 600px;
    }
    
    th, td {
        font-size: 0.65rem;
        padding: 0.2rem 0.05rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .input-group label {
        font-size: 0.8rem;
    }
    
    button {
        font-size: 0.8rem;
        padding: 0.7rem;
    }
}

/* Layout overrides: mobile input 2x2 and desktop city/qibla 2-column */
@media screen and (max-width: 768px) {
    #prayerForm .input-row:nth-of-type(2),
    #prayerForm .input-row:nth-of-type(3) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
        width: 100%;
    }
    #prayerForm .input-row:nth-of-type(2) .input-group,
    #prayerForm .input-row:nth-of-type(3) .input-group {
        margin: 0 !important;
        width: 100%;
    }
}

@media screen and (min-width: 769px) {
    .output-section {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }
    .output-section > .city-name-section,
    .output-section > .qibla-section {
        display: flex;
        width: 50%;
        max-width: 50%;
        box-sizing: border-box;
        margin: 0;
    }
    .output-section > .city-name-section {
        padding-right: 0.5rem;
    }
    .output-section > .qibla-section {
        padding-left: 0.5rem;
    }
    .output-section > :not(.city-name-section):not(.qibla-section) {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


/* Unified city/qibla typography + alignment across mobile and desktop */
.city-name-section,
.qibla-section {
    font-size: 1.0rem;
    text-align: center;
    direction: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

