@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&display=swap');

        :root {
            --bg-color: #FFFFFF;
            --text-color: #333333;
            --header-bg: #FFFFFF;
            --footer-bg: #dddddd;
            --accent-color: #718916;
            --card-bg: #FFFFFF;
            --card-hover-bg: #3498db;
            --card-hover-text: #FFFFFF;
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --accent-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
            --transition: all 0.3s ease;
            --font-heading: 'Oswald', sans-serif;
            --font-body: 'Montserrat', sans-serif;
            --sidebar-width: 332px;
			--hero-bg: linear-gradient(-11deg, rgba(58, 61, 91, 0.1), rgb(255 255 255 / 72%));
            /* Additional colors for PDF tools */
            --primary-color: #e74c3c;
            --primary-dark: #c0392b;
            --border-color: #f0f0f0;
            --gray-text: #5d6d7e;
            --light-gray: #f8f9fa;
            --scrollbar-bg: rgba(0, 0, 0, 0.05);
            --scrollbar-thumb: #e74c3c;
            --menu-hover-bg: rgba(52, 152, 219, 0.1);
            --dropdown-bg: #FFFFFF;
            --dropdown-border: #f0f0f0;
            --dropdown-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
            --icon-bg: #f0f7ff;
			/* additional colors for quran pdf pages */
			--button-hover: #e0e0e0;
			--button-active: #d6d6d6;
			--display-bg: #ffffff;
			--display-text: #333333;
			--border-color: #dddddd;
			--audio-section: linear-gradient(145deg, #fff9e6, #f1dda2);
			--track-info: #1a472a;
			--play-btn: linear-gradient(135deg, #d4af37, #b8860b);
			--top-bg: linear-gradient(to right, #8bdcca, #6cb3cf);
			--nav-next-bg: linear-gradient(to left, #034b83 0%, #2f9db3 100%);
			--nav-prev-bg: linear-gradient(to right, #034b83 0%, #2f9db3 100%);
        }

        [data-theme="dark"] {
            --bg-color: #8f8f9b;
            --text-color: #EAEAEA;
            --header-bg: #2B2D42;
            --footer-bg: #38383e;
            --accent-color: #FFD700;
            --card-bg: #3A3D5B;
            --card-hover-bg: #FFD700;
            --card-hover-text: #1E1E2F;
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            --accent-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
			--hero-bg: linear-gradient(-11deg, rgb(247 248 255 / 72%), rgb(0 0 0));
            /* Additional colors for PDF tools in dark mode */
            --primary-color: #e74c3c;
            --primary-dark: #c0392b;
            --border-color: #3a3e5c;
            --gray-text: #b0b0b0;
            --light-gray: #25273d;
            --scrollbar-bg: rgba(255, 255, 255, 0.05);
            --scrollbar-thumb: #e74c3c;
            --menu-hover-bg: rgba(231, 76, 60, 0.2);
            --dropdown-bg: #2d3047;
            --dropdown-border: #3a3e5c;
            --dropdown-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
            --icon-bg: rgba(58, 62, 92, 0.5);
			/* aditional colors for quran pdf pages */
			--button-hover: #444;
			--button-active: #555;
			--display-bg: #3A3D5B;
			--display-text: #fff;
			--border-color: #444;
			--audio-section: linear-gradient(145deg, #a88411, #45370b);
			--track-info: #13f764;
			--play-btn: linear-gradient(135deg, #4fd437, #1ab80b);
			--top-bg: linear-gradient(to right, #0d755f, #076285);
        }
		
		/* start nav introduction */
		.mobile-only {
			display: none;
		}
		
		@media (max-width: 768px) {
			.mobile-only {
				display: block;
			}
		}
		/* end nav introduction */

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
		
		body {
            background-color: var(--bg-color);
            color: var(--text-color);
            line-height: 1.6;
            font-family: var(--font-body);
            transition: var(--transition);
        }

        h1, h2, h3, h4, h5, h6 {
            font-family: var(--font-heading);
			color: var(--accent-color);
        }

        h1 {
			font-size: 2.8rem;
        }

        h2 {
			font-size: 2.4rem;
			margin-bottom: 1rem;
        }

        h3 {
			font-size: 2rem;
        }
		h4 {
			font-size: 1.6rem;
		}
		
		p a {
			color: var(--accent-color);
			font-family: var(--font-heading);
		}
		/* START DROPDOWN MENUS RESPONSIVE CSS CODES */
        /* Custom scrollbar for mobile */
        .mobile-scroll-container {
            max-height: 60vh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding-right: 5px;
        }

        /* Beautiful scrollbar styling */
        .mobile-scroll-container::-webkit-scrollbar {
            width: 6px;
        }

        .mobile-scroll-container::-webkit-scrollbar-track {
            background: var(--scrollbar-bg);
            border-radius: 10px;
        }

        .mobile-scroll-container::-webkit-scrollbar-thumb {
            background: var(--scrollbar-thumb);
            border-radius: 10px;
        }

        .mobile-scroll-container::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

        /* For Firefox */
        .mobile-scroll-container {
            scrollbar-width: thin;
            scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-bg);
        }
		/* END DROPDOWN MENUS RESPONSIVE CSS CODES */
		

        /* START HEADER CSS CODES */
        .site-header {
            background-color: var(--header-bg);
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 1000;
            padding: 0 20px;
            transition: var(--transition);
			font-family: var(--font-heading);
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        /* Logo styling */
        .logo {
			display: flex;
			align-items: center;
			gap: 0.5rem;
			text-decoration: none;
		}

		.logo-icon {
			width: 50px;
			height: 50px;
		}

        .logo-text {
            font-size: 22px;
        }

        .logo-subtext {
            color: var(--primary-color);
            font-weight: 600;
        }

        /* Main navigation */
        .main-nav {
            display: flex;
            align-items: center;
        }

        /* Navigation list */
        .nav-list {
            display: flex;
            list-style: none;
        }

        .nav-item {
            position: relative;
            margin-right: 8px;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 10px;
            text-decoration: none;
            color: var(--h1-color);
            font-weight: 500;
            border-radius: 6px;
            transition: var(--transition);
            white-space: nowrap;
            font-family: var(--font-heading);
        }

        .nav-link:hover {
            background-color: var(--accent-color);
            color: var(--card-hover-text);
        }

        .nav-link.active, .dropdown-link.active, .calculator-cell.active {
            background-color: rgba(231, 76, 60, 0.1);
            color: var(--accent-color);
            font-weight: 600;
        }

        [data-theme="dark"] .nav-link.active {
            background-color: rgba(231, 76, 60, 0.2);
        }

        /* Dropdown menu styling */
        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: -100px;
            background: var(--dropdown-bg);
            box-shadow: var(--dropdown-shadow);
            border-radius: 10px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(15px);
            transition: var(--transition);
            z-index: 1000;
            padding: 25px;
            max-width: 95vw;
            overflow: hidden;
            border: 1px solid var(--dropdown-border);
			font-family: var(--font-heading);
        }

        .nav-item:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(5px);
        }

        /* Multi-column layout for dropdown */
        
		.dropdown-columns-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
			min-width: 700px;
            gap: 30px;
        }
		
		.dropdown-columns-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
			min-width: 600px;
            gap: 30px;
        }
		
		.dropdown-columns-2 {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
			min-width: 400px;
            gap: 30px;
        }
		
		.dropdown-columns {
            display: grid;
            gap: 30px;
        }
		
		/* end 1 to 4 columns */

        .dropdown-section {
            margin-bottom: 0;
			font-family: var(--font-heading);
        }

        .dropdown-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--h1-color);
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            font-family: var(--font-heading);
        }

        .dropdown-icon {
            width: 18px;
            height: 18px;
            margin-right: 10px;
            background-color: var(--primary-color);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 10px;
        }

        .dropdown-list {
            list-style: none;
        }

        .dropdown-item {
            margin-bottom: 8px;
        }

        .dropdown-link {
            display: flex;
            align-items: center;
            padding: 8px 0;
            text-decoration: none;
            color: var(--gray-text);
            font-size: 14px;
            transition: var(--transition);
            border-radius: 4px;
            font-family: var(--font-heading);
        }

        .dropdown-link:hover {
            color: var(--primary-color);
        }

        .item-icon {
            width: 16px;
            height: 16px;
            margin-right: 10px;
            background-color: var(--icon-bg);
            border-radius: 3px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--gray-text);
            font-size: 9px;
        }

        /* Header actions */
        .header-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .theme-toggle {
            display: flex;
            align-items: center;
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 24px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ddd;
            transition: .4s;
            border-radius: 24px;
			box-shadow: inset 1px 0px 5px 3px;
        }

        [data-theme="dark"] .toggle-slider {
            background-color: #555;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: var(--accent-color);
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .toggle-slider {
            background-color: var(--primary-color);
        }

        input:checked + .toggle-slider:before {
            transform: translateX(26px);
        }

        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 24px;
            color: var(--h1-color);
            cursor: pointer;
            padding: 5px;
            transition: var(--transition);
        }
		
		/* PNG icon styling for when you add them */
        .png-icon {
            width: 30px;
            height: 30px;
            margin-right: 10px;
            object-fit: contain;
        }

        .png-icon-small {
            width: 16px;
            height: 16px;
            margin-right: 10px;
        }
		/* END HEADER CSS CODES */
		
		/* START MAIN PAGE CSS */
		.main-content {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 1rem;
            display: flex;
            gap: 2rem;
        }
		/* END MAIN PAGE CSS */

        .highlight {
            color: var(--primary-color);
            font-weight: 600;
        }
		
		/* START SEARCH SECTION CSS */
		.search-container {
			max-width: 600px;
			margin: 2rem auto;
			padding: .7rem;
		}

		.search-box {
			display: flex;
			align-items: center;
			background-color: var(--card-bg);
			border-radius: 50px;
			padding: 0.8rem 1.5rem;
			box-shadow: var(--shadow);
			transition: var(--transition);
			border: 2px solid transparent;
		}

		.search-box:focus-within {
			border-color: var(--accent-color);
			box-shadow: var(--accent-shadow);
		}

		.search-box input {
			flex: 1;
			border: none;
			outline: none;
			background: transparent;
			font-size: 1rem;
			color: var(--text-color);
			padding: 0.5rem;
			font-family: var(--font-body);
		}

		.search-box input::placeholder {
			color: rgba(0, 0, 0, 0.5);
		}

		[data-theme="dark"] .search-box input::placeholder {
			color: rgba(255, 255, 255, 0.5);
		}

		.search-icon {
			color: var(--accent-color);
			font-size: 1.2rem;
			margin-right: 0.5rem;
		}
		/* END SEARCH SECTION CSS */

		
		/* START MAIN CONTENT LAYOUT */
		
		.calculator-content {
            flex: 1;
            background-color: var(--card-bg);
            border-radius: 12px;
            padding: 5px;
            box-shadow: var(--shadow);
        }
		
		.calculator-body {
			display: flex;
			padding: 25px;
			gap: 20px;
		}
		
		/* END MAIN CONTENT LAYOUT */
		
		/* start surah CSS */
        .container {
            max-width: 1200px;
			width: 100%;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 25px;
        }

        /* top Styling */
        .top {
            text-align: center;
            padding: 20px;
			background: var(--hero-bg);
			box-shadow: var(--shadow);
        }

        .top h1 {
            font-family: 'Amiri', serif;
            font-size: 2rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
        }

        /* Main Content */
        .content-wrapper {
            display: grid;
			gap: 5px;
        }

        @media (max-width: 768px) {
            .content-wrapper {
                grid-template-columns: 1fr;
            }
        }

        /* PDF Section Styling - DYNAMIC HEIGHT BASED ON SCREEN */
        .pdf-section {
            border-radius: 15px;
            overflow: hidden;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            height: auto; /* Changed from fixed 1000px to auto */
            min-height: 400px; /* Minimum height */
            max-height: 90vh; /* Maximum height relative to viewport */
        }

        .pdf-header {
            background: var(--footer-bg);
            color: white;
            padding: 15px 20px;
            text-align: center;
            flex-shrink: 0;
        }

        .pdf-header h2 {
            font-family: 'Amiri', serif;
            font-size: 1.5rem;
            margin-bottom: 5px;
        }

        /* PDF Viewer Container - DYNAMIC HEIGHT */
        .pdf-viewer-container {
            flex: 1;
            overflow: hidden;
            position: relative;
            background: #f8f9fa;
            height: calc(80vh - 200px); /* Base dynamic height */
            min-height: 450px; /* Minimum comfortable viewing height */
            max-height: 800px; /* Maximum height for large screens */
        }

        /* Responsive height adjustments for different screen sizes */
        @media (min-width: 1600px) {
            .pdf-viewer-container {
                height: calc(85vh - 200px);
                max-height: 900px;
            }
        }

        @media (max-width: 1200px) {
            .pdf-viewer-container {
                height: calc(75vh - 180px);
                min-height: 400px;
            }
        }

        @media (max-width: 992px) {
            .pdf-viewer-container {
                height: calc(70vh - 160px);
                min-height: 380px;
            }
        }

        @media (max-width: 768px) {
            .pdf-viewer-container {
                height: calc(65vh - 140px);
                min-height: 350px;
            }
        }

        @media (max-width: 576px) {
            .pdf-viewer-container {
                height: calc(60vh - 120px);
                min-height: 300px;
            }
        }

        @media (max-width: 480px) {
            .pdf-viewer-container {
                height: calc(55vh - 100px);
                min-height: 280px;
            }
        }

        @media (max-width: 360px) {
            .pdf-viewer-container {
                height: calc(50vh - 80px);
                min-height: 250px;
            }
        }

        /* Landscape orientation adjustments */
        @media (orientation: landscape) and (max-height: 600px) {
            .pdf-viewer-container {
                height: calc(75vh - 100px);
                min-height: 250px;
            }
            
            .pdf-header {
                padding: 8px 15px;
            }
            
            .pdf-header h2 {
                font-size: 1.2rem;
            }
        }

        .pdf-loading {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: rgba(255, 255, 255, 0.9);
            z-index: 10;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #0d8b70;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 15px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* PDF Iframe */
        .pdf-iframe {
            width: 100%;
            height: 100%;
            border: none;
            display: block;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            background: white;
            transition: transform 0.2s ease;
            transform-origin: 0 0;
        }

        /* PDF Controls - Hover Visible */
        .pdf-controls {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.95);
            padding: 8px 15px;
            border-radius: 50px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
            z-index: 100;
            display: none;
            align-items: center;
            gap: 15px;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .pdf-viewer-container:hover .pdf-controls {
            display: flex;
        }

        /* Touch device support */
        .pdf-viewer-container.touch-device .pdf-controls {
            display: flex;
            opacity: 0.7;
        }

        .pdf-viewer-container.touch-device .pdf-controls:hover {
            opacity: 1;
        }

        .pdf-control-btn {
            background: none;
            border: none;
            font-size: 1.2rem;
            color: #1a5f7a;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .pdf-control-btn:hover {
            background: rgba(26, 95, 122, 0.1);
            color: #0d8b70;
            transform: scale(1.1);
        }

        .pdf-control-btn:active {
            transform: scale(0.95);
        }

        .pdf-page-info {
            display: none;
			font-size: 0.95rem;
            color: #333;
            padding: 0 10px;
            border-left: 1px solid #ddd;
            border-right: 1px solid #ddd;
        }

        .current-page, .total-pages {
            font-weight: 600;
            color: #0d8b70;
        }

        .zoom-level {
            font-size: 0.9rem;
            color: #666;
            min-width: 60px;
            text-align: center;
        }

        /* Download Section */
        .download-section {
            padding: 15px 20px;
            text-align: center;
            flex-shrink: 0;
        }

        .download-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 12px 30px;
            background: var(--accent-color);
			border: 2px solid var(--accent-color);
            color: white;
            text-decoration: none;
            border-radius: 50px;
            font-weight: 500;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            box-shadow: var(--shadow);
        }

        .download-btn:hover {
            background: white;
			color: var(--accent-color);
            transform: translateY(-3px);
        }

        .download-btn:active {
            transform: translateY(-1px);
        }

        /* Audio Player Section */
        .audio-section {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: var(--shadow);
            display: flex;
            flex-direction: column;
            height: fit-content;
        }

        /* Audio Player Styling - SIMPLIFIED */
        .audio-player {
            padding: 15px;
            background: var(--hero-bg);
        }

        .track-info {
            text-align: center;
            margin-bottom: 5px;
        }

        .track-duration {
            color: var(--accent-color);
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        .audio-controls {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }

        .progress-container {
            width: 100%;
            margin: 15px 0;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #e0e0e0;
            border-radius: 4px;
            overflow: hidden;
            cursor: pointer;
            margin-bottom: 8px;
        }

        .progress {
            width: 0%;
            height: 100%;
            background: var(--accent-color);
            transition: width 0.1s linear;
        }

        .time-display {
            display: flex;
            justify-content: space-between;
            width: 100%;
            font-size: 0.85rem;
            color: var(--text-color);
        }

        .control-buttons {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 25px;
            margin: 5px 0;
        }

        .control-btn {
            background: none;
            border: 2px solid var(--accent-color);
            font-size: 1.5rem;
            color: var(--accent-color);
            cursor: pointer;
            transition: all 0.3s ease;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        @media (max-width: 480px) {
            .control-btn {
                width: 45px;
                height: 45px;
                font-size: 1.3rem;
            }
        }

        .control-btn:hover {
            background: rgba(212, 175, 55, 0.1);
            color: #d4af37;
            transform: scale(1.1);
        }

        .play-pause-btn {
            background: linear-gradient(135deg, #d4af37, #b8860b);
            color: white;
            font-size: 1.8rem;
            width: 60px;
            height: 60px;
            box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
        }

        @media (max-width: 480px) {
            .play-pause-btn {
                width: 55px;
                height: 55px;
                font-size: 1.6rem;
            }
        }

        .play-pause-btn:hover {
            background: linear-gradient(135deg, #b8860b, #996515);
            transform: scale(1.05);
        }
		
		/* Audio Tabs Styling */
        .audio-tabs {
            display: flex;
            padding: 0;
			width: 50%;
			margin: 0 auto;
            overflow: hidden;
			gap: 10px;
			border-radius: 30px;
			border: 1px solid var(--accent-color);
        }

        .audio-tab {
            flex: 1;
            padding: 6px;
            text-align: center;
            cursor: pointer;
            font-family: var(--font-heading);
            font-size: 1.2rem;
            font-weight: 600;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .audio-tab:hover {
            color: var(--accent-color);
        }

        .audio-tab.active {
            color: white;
            background: var(--accent-color);
            box-shadow: var(--shadow);
        }

        @media (max-width: 768px) {
            .audio-tabs {
				width: 70%;
			}
			
			.audio-tab {
                font-size: 1rem;
                padding: 12px 5px;
            }
        }

        @media (max-width: 480px) {
            .audio-tabs {
				width: 100%;
			}
			
			.audio-tab {
                font-size: 0.9rem;
                padding: 10px 3px;
            }
        }
		
		/* Additional responsive adjustments */
        @media (max-width: 768px) {
            
            .top h1 {
                font-size: 1.8rem;
            }
            
            .pdf-header h2,
            .audio-header h2 {
                font-size: 1.3rem;
            }
            
            .track-title {
                font-size: 1.4rem;
            }
            
            .audio-player,
            .pdf-viewer-container {
                padding: 15px;
            }
            
            .control-buttons {
                gap: 20px;
            }

            .pdf-controls {
                padding: 5px 10px;
                gap: 10px;
            }

            .pdf-control-btn {
                width: 35px;
                height: 35px;
                font-size: 1rem;
            }

            .pdf-page-info {
                font-size: 0.85rem;
            }
        }

        @media (max-width: 480px) {
            .top h1 {
                font-size: 1.6rem;
            }
            
            .pdf-header,
            .audio-header {
                padding: 15px;
            }
            
            .control-buttons {
                gap: 15px;
            }
            
            .track-title {
                font-size: 1.3rem;
            }

            .pdf-controls {
                top: 10px;
                right: 10px;
                padding: 4px 8px;
            }

            .pdf-control-btn {
                width: 30px;
                height: 30px;
                font-size: 0.9rem;
            }
			
			.main-nav ul {
				display: block;
			}
        }

        /* Print styles */
        @media print {
            .audio-section,
            .download-section,
            .top,
            .pdf-controls {
                display: none;
            }
            
            .pdf-section {
                height: auto;
                box-shadow: none;
                border-radius: 0;
            }
            
            .pdf-viewer-container {
                height: auto;
            }
        }
		/* End surah CSS */
		
		/* start navigation buttons */
		/* Navigation Container */
        .surah-navigation {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            margin-top: 40px;
            flex-wrap: wrap;
        }

        /* Navigation Buttons */
        .nav-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px 28px;
            border-radius: 15px;
            text-decoration: none;
            font-size: 1.2rem;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: var(--shadow);
            border: 2px solid var(--accent-color);
			color: var(--accent-color);
            flex: 1;
            max-width: 280px;
            min-width: 150px;
            position: relative;
            overflow: hidden;
        }

        .nav-btn:hover {
            border: 2px solid var(--accent-color);
			background: transparent;
			color: var(--accent-color);
			transform: translateY(-5px);
        }

        .nav-btn i {
            margin: 0 12px;
            font-size: 1.4rem;
        }

        .prev-btn i {
            order: -1;
        }

        .next-btn i {
            order: 1;
        }

        .btn-content {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .btn-label {
            font-size: 0.9rem;
            opacity: 0.8;
            margin-bottom: 4px;
        }

        .nav-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transition: left 0.7s ease;
        }

        .nav-btn:hover::before {
            left: 100%;
        }

        /* Center Indicator */
        .surah-indicator {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #b8c7b8;
            padding: 10px 20px;
            min-width: 180px;
        }

        .current-surah {
            font-size: 1.1rem;
            margin-bottom: 5px;
        }

        .surah-number {
            background-color: #d4af37;
            color: #0c3b2e;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            font-weight: bold;
            box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
        }
		/* end navigation buttons*/
		
		/* START FOOTER CSS */
		footer {
            background-color: var(--footer-bg);
            color: var(--footer-text);
			font-family: var(--font-heading);
            padding: 3rem 0 0;
            margin-top: 3rem;
        }

        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 2rem;
        }

        .footer-column {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .footer-logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .footer-logo-icon {
            width: 40px;
            height: 40px;
        }

        .footer-logo-text {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--accent-color);
        }

        .footer-description {
            font-size: 0.9rem;
            line-height: 1.6;
            opacity: 0.8;
        }

        .footer-heading {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 1rem;
            color: var(--accent-color);
            position: relative;
            padding-bottom: 0.5rem;
        }

        .footer-heading::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 40px;
            height: 2px;
            background-color: var(--accent-color);
        }

        .footer-links {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .footer-link {
            color: var(--footer-text);
            text-decoration: none;
            transition: color 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
        }

        .footer-link:hover {
            color: var(--accent-color);
        }

        .footer-link-icon {
            width: 25px;
            height: 25px;
        }

        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }

        .social-link {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            background-color: rgba(255, 215, 0, 0.1);
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .social-link:hover {
            background-color: var(--accent-color);
            transform: translateY(-3px);
        }

        .social-icon {
            width: 18px;
            height: 18px;
        }

        .app-download {
            display: inline-block;
            margin-top: 1.5rem;
        }

        .app-store-icon {
            width: 200px;
            height: auto;
            border-radius: 5px;
            transition: transform 0.3s ease;
        }

        .app-store-icon:hover {
            transform: scale(1.05);
        }

        .copyright {
            background-color: var(--header-bg);
            padding: 1.5rem 0;
            margin-top: 3rem;
            text-align: center;
            font-size: 0.8rem;
            opacity: 0.7;
        }
		/* END FOOTER CSS */

        /* Mobile responsiveness */
        @media (max-width: 992px) {
            .mobile-menu-toggle {
                display: block;
            }
            
            .main-nav {
                position: fixed;
                top: 50px;
                left: 0;
                width: 75%;
                background: var(--header-bg);
                box-shadow: var(--shadow);
                padding: 20px;
                transform: translateY(-100%);
                opacity: 0;
                visibility: hidden;
                transition: var(--transition);
                z-index: 999;
                border-top: 1px solid var(--border-color);
                height: calc(100vh - 70px);
                display: flex;
                flex-direction: column;
            }
            
            .main-nav.active {
                transform: translateY(0);
                opacity: 1;
                visibility: visible;
            }
            
            .nav-list {
                flex-direction: column;
                width: 100%;
                flex: 1;
                overflow-y: auto;
                padding-right: 5px;
            }
            
            .nav-item {
                width: 100%;
                margin-right: 0;
                margin-bottom: 5px;
            }
            
            .nav-link {
                padding: 15px;
                border-radius: 8px;
                border-bottom: 1px solid var(--border-color);
            }
            
            .dropdown-menu {
                position: static;
                opacity: 1;
                visibility: visible;
                transform: none;
                box-shadow: none;
                padding: 0;
                min-width: auto;
                max-width: 100%;
                display: none;
                background: var(--light-gray);
                border-radius: 8px;
                margin-top: 5px;
                border: 1px solid var(--border-color);
                max-height: 400px;
                overflow-y: auto;
            }
            
            .dropdown-menu.active {
                display: block;
                padding: 15px;
            }
            
            .dropdown-columns {
                grid-template-columns: 1fr;
                gap: 20px;
            }
			
			/* Multi-column layout for dropdown */
        
			.dropdown-columns-4 {
				grid-template-columns: 1fr;
				gap: 20px;
			}
			
			.dropdown-columns-3 {
				grid-template-columns: 1fr;
				gap: 20px;
			}
			
			.dropdown-columns-2 {
				grid-template-columns: 1fr;
				gap: 20px;
			}
			
			/* end 1 to 4 columns */

            /* Make mobile dropdown scrollable */
            .dropdown-menu.active .dropdown-columns {
                max-height: 350px;
                overflow-y: auto;
                padding-right: 10px;
            }

            .dropdown-menu.active .dropdown-columns::-webkit-scrollbar {
                width: 5px;
            }

            .dropdown-menu.active .dropdown-columns::-webkit-scrollbar-track {
                background: var(--scrollbar-bg);
                border-radius: 10px;
            }

            .dropdown-menu.active .dropdown-columns::-webkit-scrollbar-thumb {
                background: var(--scrollbar-thumb);
                border-radius: 10px;
            }
            
            .hero-title {
                font-size: 36px;
            }
            
            .hero-subtitle {
                font-size: 18px;
            }
            
            .header-actions {
                gap: 10px;
            }
        }

        @media (max-width: 768px) {
            .hero-section {
                padding: 60px 20px;
            }
            
            .hero-title {
                font-size: 30px;
            }
            
            .hero-subtitle {
                font-size: 16px;
            }
            
            .categories-grid {
                grid-template-columns: 1fr;
            }
        }
		
		/* UNSTYLING HEADINGS */
.main-header,
.main-footer,
.calculator-sidebar {
    transition: font-family 0.3s ease;
}

h1 a, h2 a, h3 a {
    color: inherit;          /* Inherit the color from h1 */
    text-decoration: none;   /* Remove underline */
    font-weight: inherit;    /* Inherit font weight */
}

h1 a:hover, h1 a:focus, h1 a:active {
    color: inherit;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1150px) {
				
				.calculator-body {
					padding: 8px;
				}
			}

@media (max-width: 1024px) {
    .category-grid, .calculator-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-copyright {
        grid-column: span 2;
        text-align: center;
    }
    
    .category-card {
        height: 250px;
    }
	
	.main-content {
        flex-direction: column;
    }
            
    .calculator-content {
        order: 1;
    }
			
	.calculator-body {
		padding: 10px 80px;
		gap: 30px;
	}
}

@media (max-width: 992px) {
	.footer-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 2rem;
            }
	.calculator-body {
		padding: 10px 50px;
		gap: 20px;
	}		
}

@media (max-width: 768px) {
    .main-content{
		margin: 0rem auto;
	}
	
	.calculator-body {
		padding: 10px 30px;
		gap: 15px;
	}
	
	.tool-container {
		margin: 0rem auto;
	}
	
	.converter-box {
		padding: 10px;
	}
	
	.header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-nav ul {
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    h4 {
        font-size: 1.25rem;
    }		
}

@media (max-width: 600px) {
    .converter-box {
		padding: 10px;
	}
	
	.category-grid, .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
                grid-template-columns: 1fr;
                gap: 2rem;
            }
            
            .footer-column {
                align-items: center;
                text-align: center;
            }
            
            .footer-heading::after {
                left: 50%;
                transform: translateX(-50%);
            }
            
            .footer-links {
                align-items: center;
            }
    
    .hero-icons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calculator-list li {
        flex-direction: column;
    }
    
    .calculator-list li::after {
        content: none;
    }
    
    .calculator-list a {
        margin-bottom: 0.3rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    h3 {
        font-size: 1.4rem;
    }
    h4 {
        font-size: 1.2rem;
    }		
}

@media (max-width: 400px) {
    .calculator-body {
		padding: 10px;
		gap: 10px;
	}
    
    .main-nav a {
        padding: 0.5rem;
    }
	
	.main-nav ul {
		gap: .5rem;
	}
	
	.dropdown-content {
		width: 180px;
	}
    
    h1 {
        font-size: 1.7rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.3rem;
    }
    h4 {
        font-size: 1rem;
    }
	.toggle-label {
		font-size: 1.2rem;
	}
	
}

		
		/* START SIDEBAR ACCORDION STYLE */
		.calculator-sidebar {
			width: var(--sidebar-width);
			border-radius: 12px;
			box-shadow: var(--shadow);
			padding: 10px;
			display: flex;
			flex-direction: column;
			gap: 10px;
			height: fit-content; /* Add this to control height based on content */
			min-height: auto; /* Ensure it doesn't have a minimum height */
		}
		
		/* Calculator Table Styles */
		.calculator-table {
			display: table;
			width: 100%;
			border-collapse: collapse;
		}

		.calculator-row {
			display: grid;
		}

		.calculator-cell {
			display: table-cell;
			padding: 8px 15px;
			border: 1px solid var(--accent-color);
			cursor: pointer;
			transition: var(--transition);
			font-family: var(--font-heading);
			font-weight: 500;
			color: var(--accent-color);
			background-color: var(--card-bg);
			text-decoration: none;
		}

		.calculator-cell:hover {
			background-color: var(--accent-color);
			color: var(--card-hover-text);
			transform: translateY(-2px);
			box-shadow: var(--accent-shadow);
		}

		/* Accordion content adjustments */
		.accordion-content {
			max-height: 0;
			overflow: hidden;
			transition: max-height 0.3s ease;
			padding: 0 15px; /* Add padding for better spacing */
		}

		.accordion-content.active {
			max-height: 500px;
			padding: 2px; /* Add padding when active */
		}

		/* Ensure accordion items don't have extra spacing */
		.accordion-item {
			border-bottom: 1px solid rgba(0, 0, 0, 0.1);
			margin-bottom: 0; /* Remove any margin */
		}

		[data-theme="dark"] .accordion-item {
			border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		}

		/* Remove any extra margins from accordion headers */
		.accordion-header {
			padding: 1rem 1.5rem;
			background-color: var(--card-bg);
			cursor: pointer;
			display: flex;
			justify-content: space-between;
			align-items: center;
			transition: var(--transition);
			font-family: var(--font-heading);
			font-weight: 600;
			font-size: 1.1rem;
			margin: 0; /* Ensure no margin */
		}
		
        /* Accordion Styling */
        .accordion {
            width: 100%;
        }

        .accordion-item {
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        }

        [data-theme="dark"] .accordion-item {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .accordion-header {
            padding: 1rem 1.5rem;
            background-color: var(--footer-bg);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: var(--transition);
            font-family: var(--font-heading);
            font-weight: 600;
            font-size: 1.1rem;
			color: var(--accent-color);
        }

        .accordion-header:hover {
            background-color: rgba(52, 152, 219, 0.1);
        }

        [data-theme="dark"] .accordion-header:hover {
            background-color: rgba(255, 215, 0, 0.1);
        }

        .accordion-header.active {
            background: var(--accent-color);
			color: white;
        }

        .accordion-icon {
            transition: var(--transition);
        }

        .accordion-header.active .accordion-icon {
            transform: rotate(180deg);
        }

        .accordion-content {
            height: 30vh;
            transition: max-height 0.3s ease;
			overflow-y: auto;
        }

        /* START SIDEBAR ACCORDION CONTENT SCROLL FUNCTION */
		.accordion-content::-webkit-scrollbar {
            width: 8px;
        }
        
        .accordion-content::-webkit-scrollbar-track {
            background: var(--header-bg);
            border-radius: 10px;
        }
        
        .accordion-content::-webkit-scrollbar-thumb {
            background: var(--accent-color);
            border-radius: 10px;
        }
        
        .accordion-content::-webkit-scrollbar-thumb:hover {
            background: #fdbb2d;
        }
		/* END SIDEBAR ACCORDION CONTENT SCROLL FUNCTION */
		
		/* END SIDEBAR ACCORDION STYLE */
		
		@media (max-width: 1150px) {
				
				.calculator-body {
					padding: 8px;
				}
			}

        /* Responsive Design */
        @media (max-width: 1024px) {
            .main-content {
                flex-direction: column;
            }
            
            .calculator-sidebar {
                width: 100%;
                order: 2;
            }
            
            .calculator-content {
                order: 1;
            }
			
			.calculator-body {
				padding: 10px 80px;
				gap: 30px;
			}
        }
		
		@media (max-width: 900px) {
				.calculator-body {
					padding: 10px 20px;
					gap: 15px;
				}
				
				.nav-btn {
					max-width: 100%;
					width: 100%;
				}
				
				.surah-indicator {
					order: -1;
					margin-bottom: 20px;
				}
			}

        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .main-nav ul {
                gap: 1rem;
            }
            
            .footer-content {
                grid-template-columns: 1fr 1fr;
            }
            
            .footer-copyright {
                grid-column: span 2;
                text-align: center;
            }
            
            h1 {
                font-size: 2rem;
            }
            h2 {
                font-size: 1.5rem;
            }
            h3 {
                font-size: 1.3rem;
            }
            h4 {
                font-size: 1.1rem;
            }
            
            .keys-table {
                display: block;
                overflow-x: auto;
            }
			
			.calculator-body {
				padding: 5px;
				gap: 10px;
			}
			
			.top h1 {
                font-size: 1.8rem;
            }
            
            .pdf-header h2,
            .audio-header h2 {
                font-size: 1.3rem;
            }
            
            .track-title {
                font-size: 1.4rem;
            }
            
            .audio-player,
            .pdf-viewer-container {
                padding: 15px;
            }
            
            .control-buttons {
                gap: 20px;
            }
			
			.pdf-section {
                height: 1000px;
            }
            
            .content-wrapper {
                gap: 20px;
            }
			
			.nav-btn {
                padding: 14px 20px;
                font-size: 1.1rem;
            }
        }
		
		@media (max-width: 700px) {
				.calculator-body {
					flex-direction: column;
					padding: 8px;
					gap: 8px;
				}
				
			}

        @media (max-width: 600px) {
            .footer-content {
                grid-template-columns: 1fr;
                text-align: center;
            }
            
            .footer-logo {
                justify-content: center;
            }
            
            .footer-copyright {
                grid-column: span 1;
            }
            
            h1 {
                font-size: 2rem;
            }
            h2 {
                font-size: 1.6rem;
            }
            h3 {
                font-size: 1.4rem;
            }
            h4 {
                font-size: 1.2rem;
            }
        }
		
		@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
	
	.control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        }
		
	.play-pause-btn {
                width: 55px;
                height: 55px;
                font-size: 1.6rem;
            }
	.top h1 {
                font-size: 1.6rem;
            }
			
	.top {
		padding: 2px;
	}		
            
            .pdf-header,
            .audio-header {
                padding: 15px;
            }
            
            .control-buttons {
                gap: 15px;
            }
            
            .track-title {
                font-size: 1.3rem;
            }	

			.nav-btn {
                flex-direction: column;
                padding: 12px;
            }
            
            .nav-btn i {
                margin: 5px 0;
            }
            
            .btn-content {
                text-align: center;
            }	
	}

        @media (max-width: 400px) {
            .main-nav a {
                padding: 0.5rem;
            }
			
			.main-content {
				padding: 8px;
				margin: 1rem auto;
			}
			
			.main-nav ul {
				gap: .5rem;
			}
			
			.dropdown-content {
				width: 175px;
			}
			
			#toolsArticle {
				padding: .2rem;
			}
            
            h1 {
                font-size: 1.7rem;
            }
            h2 {
                font-size: 1.5rem;
            }
            h3 {
                font-size: 1.3rem;
            }
            h4 {
                font-size: 1rem;
            }
			
			.calculator-sidebar {
				padding: 2px;
			}
			
			.calculator-body {
				padding: 0px;
			}
        }
		
		/* START DUA SECTION CSS */
		.verse-row {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
		
		.section-label {
            display: block;
            font-size: 1rem;
            font-weight: bold;
            margin-bottom: 10px;
            color: var(--accent-color);
            text-transform: uppercase;
            letter-spacing: 1px;
			text-decoration: none;
        }
		
		.arabic {
            font-size: 2rem;
			font-weight: bold;
			text-shadow: 2px 2px 4px rgb(0 0 0 / 20%);
            text-align: right;
            line-height: 1.5;
            font-family: 'Traditional Arabic', 'Scheherazade New', serif;
            direction: rtl;
			color: var(--accent-color);
        }
        
        .urdu {
            font-size: 1.2rem;
            text-align: right;
            line-height: 1.5;
            font-family: 'Jameel Noori Nastaleeq', 'Urdu Typesetting', 'Noto Nastaliq Urdu', serif;
            direction: rtl;
        }
        
        .english {
            font-size: 1.2rem;
            line-height: 1.6;
            text-align: left;
			font-family: var(--font-heading);
        }
		
		/* Responsive Design */
        @media (max-width: 768px) {
            .arabic {
                font-size: 1.8rem;
            }
            
            .urdu {
                font-size: 1.3rem;
            }
            
            .english {
                font-size: 1.1rem;
            }
        }
        
        @media (max-width: 480px) {
            .arabic {
                font-size: 1.5rem;
            }
            
            .urdu {
                font-size: 1.1rem;
            }
            
            .english {
                font-size: 1rem;
            }
        }
		/* END DUA SECTION CSS */
		
		/* duas benefits css */
		/* Benefits Section */
        .benefits-section {
            margin-bottom: 3rem;
        }

        .benefits-list {
            max-width: 750px;
            margin: 0 auto;
            padding: 0;
            list-style: none;
        }

        .benefits-list li {
            padding: 0.8rem 1.2rem;
            border-bottom: 1px solid var(--accent-color);
            font-size: 0.95rem;
            color: var(--default-text);
            line-height: 1.6;
        }

        .benefits-list li:last-child {
            border-bottom: none;
        }

        .benefits-list li strong {
            color: var(--accent-color);
        }

        /* Hadith Section */
        .hadith-section {
            margin-bottom: 3rem;
        }

        .hadith-card {
            background: var(--card-bg);
            padding: 1.5rem 2rem;
            border-radius: 12px;
            margin-bottom: 1rem;
            border-left: 4px solid var(--accent-color);
        }

        .hadith-card blockquote {
            font-size: 0.95rem;
            color: var(--default-text);
            line-height: 1.8;
            font-style: italic;
            margin: 0;
            padding-left: 1rem;
            border-left: 3px solid var(--accent-color);
        }
		
		.note-section {
            max-width: 750px;
            margin: 2rem auto;
            padding: 1.2rem 1.8rem;
            background: var(--card-bg);
            border-radius: 10px;
            border-left: 4px solid var(--accent-color);
            font-size: 0.95rem;
            color: var(--accent-color);
        }

/* Surahs Section */
        .surahs-section {
            margin-bottom: 3rem;
        }

        .surah-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            max-width: 800px;
            margin: 0 auto;
        }

        .surah-grid-item {
            background: var(--card-bg);
            padding: 1rem;
            border-radius: 8px;
            text-align: center;
            border: 1px solid var(--accent-color);
        }

        .surah-note {
            text-align: center;
            margin-top: 1rem;
            color: var(--accent-color);
            font-style: italic;
        }