:root {
    --bg-cream: #F5EEDC; 
    --text-brown: #2D1B18;
    --accent-gold: #A67C52;
    --accent-gold-light: #D4B499;
    --card-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 15px 35px rgba(45, 27, 24, 0.1);
    --glass-border: 1px solid rgba(166, 124, 82, 0.15);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --rainbow-grad: linear-gradient(
        45deg, 
        #FF9800, #212121, #E65100, #FF9800
    );
    --orange-black-grad: linear-gradient(
        45deg, 
        #FF9800, #000000, #E65100, #FF9800
    );
}

@font-face {
    font-family: 'Jameel Noori Nastaleeq';
    src: url('https://cdn.jsdelivr.net/gh/nafeespp/urdu-fonts/fonts/JameelNooriNastaleeq.ttf');
    font-display: swap;
}

@keyframes glow-pulse {
    0% { box-shadow: 0 0 5px rgba(255,193,7,0.2); }
    50% { box-shadow: 0 0 20px rgba(255,193,7,0.4); }
    100% { box-shadow: 0 0 5px rgba(255,193,7,0.2); }
}

.wave-bar {
    width: 3px;
    height: 10px;
    background: var(--accent-gold);
    border-radius: 2px;
    animation: wave-anim 0.5s ease-in-out infinite;
}
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }

@keyframes wave-anim {
    0%, 100% { height: 5px; }
    50% { height: 18px; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-cream);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(141, 110, 99, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(141, 110, 99, 0.05) 0%, transparent 40%);
    color: var(--text-brown);
    font-family: 'Outfit', 'Poppins', 'Jameel Noori Nastaleeq', 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
/* Force consistent premium font and UPPERCASE for all English headers, buttons, and labels */
h1, h2, h3, .en-brand, .s-nav-item, .s-section-title, .s-service-card h3, .s-rev-name, .s-cta-btn, .logo, .glow-text, .s-main-title, .en-text, .footer-contact span, .st-city, .st-date, label, .p-row span {
    font-family: 'Outfit', 'Poppins', 'Segoe UI', Arial, sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 1px;
}

/* Force Jameel Noori for ONLY Urdu-specific elements */
.urdu-text, .urdu-inline, .s-urdu-title, .s-brand .urdu-text, .footer-address .urdu-text, 
h1 .urdu-inline, h2 .urdu-inline, h3 .urdu-inline, .section-title .urdu-inline, .s-hero-desc.urdu-text {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif !important;
    text-transform: none !important; /* Prevent English uppercase from breaking Urdu font rendering */
    direction: rtl;
    display: inline-block; /* Ensure better rendering */
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.03;
    z-index: -1;
}

.urdu-inline {
    margin-left: 10px;
    font-size: 0.9em; /* Slightly larger for better readability */
}

header {
    padding: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* YouTube Rescue Styling */
.yt-rescue-card {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.yt-rescue-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yt-rescue-card:hover img {
    transform: scale(1.05);
}

.yt-play-overlay {
    position: absolute;
    background: rgba(255, 0, 0, 0.9);
    width: 80px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.yt-play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid white;
    margin-left: 5px;
}

.yt-rescue-card:hover .yt-play-overlay {
    background: #ff0000;
    transform: scale(1.1);
}

/* Entertainment Buttons Synchronization */
/* Entertainment Buttons Synchronization - Phase 5 */
.cinema-box .download-btn {
    min-width: 210px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    color: #FFFFFF !important;
    text-decoration: none;
    transition: all 0.3s ease;
    background: var(--orange-black-grad);
    background-size: 200% 200%;
    animation: rainbow-flow 5s linear infinite;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    margin: 5px;
}

.cinema-box .download-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    filter: brightness(1.2);
}

.cinema-box .download-btn:active {
    transform: translateY(0);
}

@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10%; /* SLIM PATI */
    background: var(--orange-black-grad); /* MIRROR ANIMATION */
    background-size: 300% 300%;
    animation: rainbow-flow 10s linear infinite;
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
    height: 70px; /* Fixed height for absolute mirror */
}



.logo {
    font-size: 2.8rem; /* Larger */
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #FFFFFF; /* High contrast white */
    text-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #FFFFFF; /* Constant white */
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.hero {
    min-height: 30vh; /* Shorter header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 20px 20px; /* Reduced vertical gap */
}

.glow-text {
    font-size: 4rem; /* Slightly smaller for compactness */
    line-height: 1.1;
    margin-bottom: 25px; /* Tighter gap */
    font-weight: 800;
    letter-spacing: -2px;
    background: var(--rainbow-grad);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-flow 8s linear infinite;
    padding: 10px 0; /* Extra space */
}

.s-hero-desc-urdu {
    transform: translateY(-40px);
    position: relative;
    z-index: 11;
}

/* Removed redundant .animated-word as it's now global on headers */


@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero p {
    font-size: 2rem;
    max-width: 900px;
    color: var(--accent-gold);
    font-weight: 500;
}

.section {
    padding: 30px 6%; /* Reduced from 10% for better laptop fit */
}

.section-header {
    text-align: center;
    margin-bottom: 30px; /* Tighter gap */
    margin-top: 20px;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 800;
    background: var(--rainbow-grad);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-flow 8s linear infinite;
    color: var(--primary-brown);
}

.section-title span {
    display: inline-block;
    font-size: 1.1rem;
    margin-left: 15px;
    opacity: 0.9;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* ORIGINAL 3-COLUMN MEGA SYNC */
    gap: 30px;
    margin-top: 40px;
}

.gadget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* COMPACT SYNC */
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    justify-content: space-between; /* Ensures content stays balanced */
    height: 100%;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none; /* Critical: Allows clicks to pass through to buttons */
}

.card:hover {
    transform: translateY(-20px) scale(1.03);
    box-shadow: 0 40px 80px rgba(62, 39, 35, 0.15);
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.95);
}

.card:hover::before {
    opacity: 1;
    transform: translate(20%, 20%);
}

.icon {
    font-size: 2rem;
    margin-bottom: 0px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.card label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-brown);
    text-align: center;
}

/* Quality Settings Panel */
.settings-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.6); /* Higher opacity for better visibility */
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 10px;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
    height: 155px; /* THE UNBREAKABLE SYNC HEIGHT */
    justify-content: center;
    overflow: hidden;
}

.settings-panel input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--orange-black-grad);
    background-size: 400% 400%;
    animation: rainbow-flow 2.5s linear infinite;
    outline: none;
    cursor: pointer;
}
.settings-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #E65100;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

button {
    color: #FFFFFF !important;
    border: none !important;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto; 
    height: 45px; 
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* UNIVERSAL ANIMATED FLOWING GRADIENT TABS */
    background: var(--orange-black-grad) !important;
    background-size: 400% 400% !important;
    animation: rainbow-flow 2.5s linear infinite !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4) !important;
    filter: brightness(1.2);
}

/* EXEMPTIONS FOR MICRO-UTILITY BUTTONS SO THEY DON'T BREAK THE UI */
button.exp-del-btn, button.journal-copy-btn, button[style*="transparent"] {
    background: transparent !important;
    animation: none !important;
    box-shadow: none !important;
    color: inherit !important;
}
button.journal-copy-btn {
    background: rgba(166, 124, 82, 0.2) !important;
    color: var(--text-brown) !important;
}
button.journal-copy-btn:hover {
    background: var(--accent-gold) !important;
    color: #fff !important;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
}

.dashboard-category {
    background: rgba(255, 255, 255, 0.4);
    padding: 45px;
    border-radius: 40px;
    border: var(--glass-border);
    transition: var(--transition);
}

.dashboard-category:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
}

.dashboard-category h3 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--text-brown);
    padding-bottom: 10px;
    display: inline-block;
    background: var(--orange-black-grad);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-flow 8s linear infinite;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.links a {
    text-decoration: none;
    color: var(--text-brown);
    font-weight: 600;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.links a::after {
    content: '→';
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: 0.3s;
}

.links a:hover {
    background: var(--text-brown);
    color: var(--bg-cream);
    transform: translateX(10px);
    border-color: var(--accent-gold);
}

.links a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

footer {
    display: flex;
    flex-direction: column; /* Centered multi-line */
    justify-content: center;
    align-items: center;
    padding: 10px 10%; 
    height: 90px; /* Increased width/thickness as requested */
    background: var(--orange-black-grad); 
    background-size: 300% 300%;
    animation: rainbow-flow 10s linear infinite;
    color: #FFFFFF;
    margin-top: 60px;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.1);
}

.footer-rainbow, footer .copyright {
    text-align: center;
    margin: 2px 0; /* Tight spacing in center */
}

.hero p {
    font-size: 2rem;
    max-width: 900px;
    font-weight: 700;
    line-height: 2.8; /* Maximum room to prevent Urdu cutoff */
    background: var(--orange-black-grad);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-flow 10s linear infinite;
    display: inline-block;
    padding-bottom: 25px; /* Prevent descender clip */
}

.footer-rainbow {
    font-size: 1.1rem;
    font-weight: 800;
    color: #FFFFFF !important;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin: 0;
}

.footer-rainbow.lead {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px; /* Tighter gap */
    opacity: 0.9;
    color: var(--primary-brown);
}

footer .copyright {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    color: #FFFFFF;
    margin: 0;
}

.status {
    font-size: 0.9rem;
    margin-top: 15px;
    font-weight: 600;
    color: var(--accent-gold);
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--text-brown);
    color: var(--bg-cream);
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: var(--transition);
}

#backToTop:hover {
    background: var(--accent-gold);
    transform: translateY(-5px);
}

#editorCanvas {
    max-height: 250px; /* Reduced from 350px as requested */
    width: auto;
    max-width: 100%;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
    border: 1px solid #ccc;
    background: #eee;
}

/* --- Robust PDF Render Utility --- */
.pdf-render-fix {
    display: none;
    z-index: 10000;
}

.word-perfect-page {
    width: 210mm !important;
    min-height: 297mm !important;
    padding: 25.4mm !important; /* Standard 1-inch Word Margin */
    background: white !important;
    color: #000000 !important;
    box-sizing: border-box !important;
    position: relative !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.1) !important;
    line-height: 1.5 !important;
    font-size: 11pt !important;
}

.word-perfect-page p, .word-perfect-page h1, .word-perfect-page h2, .word-perfect-page div {
    margin-bottom: 0.15in !important;
    display: block !important;
}

/* RTL Specifics */
.word-rtl {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', 'Times New Roman', serif !important;
}

/* LTR Specifics */
.word-ltr {
    direction: ltr !important;
    text-align: left !important;
    font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif !important;
}

/* Dashboard Phase 4: Flux Boxes & Autocomplete */
.header-gadget-box {
    padding: 6px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none; /* Removed transition to stop jitter */
    position: relative;
    overflow: hidden;
}

.monospaced-clock {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    width: 100%;
    text-align: center;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.weather-temp-bold {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

/* AI Photo Editor Premium Styles */
.editor-card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 35px !important;
}

.editor-controls {
    background: rgba(255, 255, 255, 0.4);
    padding: 25px;
    border-radius: 20px;
    border: var(--glass-border);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-brown);
    text-transform: uppercase;
    opacity: 0.8;
}

.control-group input[type="range"] {
    accent-color: var(--accent-gold);
}

#editorPlaceholder {
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    background: rgba(255, 255, 255, 0.2);
}

#editorPlaceholder:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: var(--accent-gold) !important;
}

/* --- Smart Utilities / Gadget Styles --- */
.gadget-card {
    min-height: 280px;
    justify-content: flex-start !important;
}

.tasbeeh-display {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-brown);
    margin: 10px 0;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.4);
    width: 100%;
    text-align: center;
    border-radius: 12px;
}

.tasbeeh-btn:active {
    transform: scale(0.95);
    filter: brightness(1.2);
}

.prayer-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.p-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.p-row span:last-child {
    color: var(--accent-gold);
    font-family: 'Roboto Mono', monospace;
}

.rates-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 10px;
}

.rate-item {
    padding: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-item span:first-child {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.7;
}

#zakatResult {
    padding: 10px;
    background: var(--bg-cream);
    border-radius: 8px;
    border: 1px dashed var(--accent-gold);
}

#urduTextResult:focus {
    outline: 2px solid var(--accent-gold);
    background: #fff;
}

.flux-box-anim {
    background: var(--orange-black-grad);
    background-size: 300% 300%;
    animation: rainbow-flow 10s linear infinite;
    box-shadow: 
        inset 1px 1px 3px rgba(255, 255, 255, 0.3), 
        0 4px 15px rgba(0, 0, 0, 0.4);
}

.header-gadget-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.search-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 250px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px;
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.search-dropdown input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 10px;
    color: #fff;
    margin-bottom: 5px;
    outline: none;
}

#search-results {
    max-height: 200px;
    overflow-y: auto;
}

.search-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #fff;
    transition: 0.2s;
}

.search-item:hover {
    background: rgba(255,255,255,0.15);
}

.glow-text-anim {
    background: var(--orange-black-grad);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-flow 10s linear infinite;
}

#digital-clock {
    text-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .glow-text { font-size: 4rem; }
}

@media (max-width: 768px) {
    .grid, .dashboard-grid, .gadget-grid { 
        grid-template-columns: 1fr !important; 
    }
    .footer { flex-direction: column; height: auto; padding: 30px 5%; margin-top: 30px; }
    .glow-text {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }
    header { padding: 10px; position: relative; }
    nav { 
        padding: 15px !important; 
        flex-direction: column; 
        gap: 15px; 
        height: auto !important;
        justify-content: center !important;
    }
    nav ul { display: none; }
    .logo { font-size: 2rem; }
    .hero { min-height: 30vh; padding: 40px 15px 20px 15px; }
    .hero p { font-size: 1.2rem; line-height: 1.8; }
    .section { padding: 40px 15px; }
    .dashboard-category { padding: 25px; }
    #backToTop { bottom: 20px; right: 20px; width: 45px; height: 45px; }
    
    /* Overrides for inline min-width causing overflow */
    div[style*="min-width: 340px"], 
    div[style*="min-width: 280px"],
    div[style*="min-height: 480px"] {
        min-width: 100% !important;
        min-height: auto !important;
    }
    
    /* Ensure gadgets like the prayer city search and inputs are 100% wide */
    .gadget-card input, .gadget-card button, .gadget-card div {
        max-width: 100% !important;
    }

    /* Fix header gadget sizes */
    .header-gadget-box { width: 100% !important; min-width: auto !important; padding: 12px 15px; margin: 5px 0; }
    
    /* Ensure widgets take full width on mobile */
    .gadget-card, .converter-card, #pak-live-hub .card > div > div {
        width: 100% !important;
    }
    
    /* Fix header layout on mobile */
    nav > div:first-child { width: 100%; justify-content: center; }
    nav > div:last-child { width: 100%; justify-content: center; flex-wrap: wrap; }
    
    /* Fix custom links inputs on mobile */
    #custom-links .card > div:first-child {
        flex-direction: column;
    }
    #custom-links .card > div:first-child input,
    #custom-links .card > div:first-child button {
        width: 100%;
        flex: none !important;
    }
    
    body { overflow-x: hidden; }
}

@media (max-width: 480px) {
    .glow-text {
        font-size: 1.8rem;
    }
    .hero p { font-size: 1rem; }
    .dashboard-category h3 { font-size: 1.4rem; font-weight: 700; }
    .section-title { font-size: 1.6rem; }
    .cinema-box .download-btn { width: 100%; min-width: unset; }
}

.pulse-anim {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(196, 48, 43, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(196, 48, 43, 0); }
    100% { box-shadow: 0 0 0 0 rgba(196, 48, 43, 0); }
}

/* --- Productivity Hub Styles --- */
.pulse-anim-on {
    animation: pomodoro-pulse 2s infinite;
    border-color: #f44336 !important;
    color: #f44336 !important;
}

@keyframes pomodoro-pulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

.expense-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.6);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
}
.expense-row:hover { background: #fff; }
.exp-del-btn {
    background: transparent; color: #f44336; font-size: 1rem; padding: 0 5px; height: auto; border: none; box-shadow: none; cursor: pointer;
}
.exp-del-btn:hover { background: rgba(244,67,54,0.1); transform: none; box-shadow: none; }

/* Journal Items List */
.journal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-brown);
    transition: 0.2s;
}
.journal-item:nth-child(odd) {
    background: rgba(255, 255, 255, 0.4);
}
.journal-item:nth-child(even) {
    background: rgba(166, 124, 82, 0.15);
}
.journal-item:hover {
    background: rgba(255, 255, 255, 0.8);
}
.journal-copy-btn {
    background: rgba(166, 124, 82, 0.2);
    border: none;
    color: var(--text-brown);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}
.journal-item:hover .journal-copy-btn {
    opacity: 1;
}
.journal-copy-btn:hover {
    background: var(--accent-gold);
    color: #fff;
}

/* --- [ASIM PHOTO STUDIO - STUDIO OVERLAY CSS] --- */

/* Tab Switching Control */
.s-tab-content {
    display: none;
    animation: sFadeIn 0.5s ease;
}
@keyframes sFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Master Nav */
:root {
    --bg-cream: #F5EEDC; 
    --text-brown: #2D1B18;
    --accent-gold: #A67C52;
    --orange-black-grad: linear-gradient(45deg, #FF9800, #000000, #E65100, #FF9800);
}

.s-master-nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--orange-black-grad);
    background-size: 300% 300%;
    animation: rainbow-flow 10s linear infinite;
    padding: 10px 0;
    border-bottom: 4px solid var(--accent-gold);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    min-height: 90px;
    display: flex;
    align-items: center;
    overflow: visible;
}
@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.s-nav-container {
    max-width: 1300px; /* Reduced from 1400px to avoid tight fit on laptops */
    width: 95%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.s-brand {
    flex-shrink: 0;
    white-space: nowrap; /* STOP THE STACKING */
}
.s-logo-text {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 2px; 
}
.en-brand {
    letter-spacing: 2px;
    color: #FFFFFF !important; /* CONSTANT WHITE */
    text-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
}
.s-brand .urdu-text {
    font-size: 2.22rem !important; /* FIT TO SLIM HEADER */
    color: #FFFFFF !important; 
    display: block !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1;
}
/* Header Gadgets Style */
.header-gadgets {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}
.header-gadget-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.header-small-gadget {
    width: 115px !important;
    height: 55px !important;
    padding: 5px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}
.flux-box-anim {
    animation: flux-glow 3s linear infinite;
    border: 1px solid var(--accent-gold) !important;
}
@keyframes flux-glow {
    0%, 100% { border-color: var(--accent-gold); box-shadow: 0 0 5px var(--accent-gold); }
    50% { border-color: #fff; box-shadow: 0 0 15px #fff; }
}
.s-nav-gadgets {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-shrink: 0;
}
.s-nav-links {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-right: auto; /* Push nav links to the left, closer to brand */
    margin-left: 30px;
}
.s-nav-item {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important; /* FORCE WHITE */
    border: 1px solid rgba(166, 124, 82, 0.5) !important;
    padding: 0 20px !important;
    font-size: 0.8rem !important;
    min-width: 90px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700 !important;
    text-transform: uppercase;
    opacity: 1 !important; /* FORCE VISIBILITY */
}
#nav-admin {
    color: #fff !important;
    opacity: 1 !important;
}
.s-nav-item:hover {
    background: rgba(166, 124, 82, 0.6) !important;
}
.s-nav-item.active {
    background: var(--accent-gold) !important;
    border-color: #fff !important;
    color: #fff !important;
}
.s-nav-item.active {
    background: var(--accent-gold) !important;
    border-color: var(--accent-gold) !important;
    color: #fff !important;
}
.s-portal-btn {
    font-weight: 800 !important;
}
.s-nav-item:active { transform: scale(0.95); }

/* Hero Section */
.s-hero {
    min-height: 85vh;
    background: transparent !important; /* BYPASS ALL DARK OVERLAYS */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 60px 20px 80px;
}
.s-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}
.s-main-title {
    font-size: 4.5rem;
    font-weight: 1000;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-style: italic;
    color: #ffffff !important; /* PURE SOLID WHITE ONLY */
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    animation: none !important;
}
.s-urdu-title {
    font-family: 'Jameel Noori Nastaleeq', serif;
    font-size: 3.5rem;
    margin: 0;
    color: #ffffff !important; /* PURE SOLID WHITE ONLY */
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    animation: none !important;
}

.s-hero-divider {
    width: 100px;
    height: 4px;
    background: var(--accent-gold);
    margin: 20px 0;
    border-radius: 2px;
}
.s-hero-desc {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #ffffff !important;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,1), 0 0 5px rgba(0,0,0,1);
}
.s-hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections & Grid */
.s-section { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }
.s-section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-brown);
    position: relative;
}
.s-section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gold);
}

.s-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
/* CUSTOM PORTFOLIO GRID TO PREVENT EXTRA LARGE IMAGES */
.portfolio-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 992px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    .portfolio-grid { grid-template-columns: 1fr !important; }
}
.s-gallery-item {
    border-radius: 20px;
    overflow: hidden;
    height: 350px; /* INCREASED FIXED HEIGHT FOR BETTER IMPACT */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.s-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.s-gallery-item:hover { transform: scale(1.03); }

.s-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.s-service-card {
    background: #fff;
    padding: 30px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.s-service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.s-service-card .s-icon { font-size: 3rem; margin-bottom: 20px; }
.s-service-card h3 { font-size: 1.3rem; margin-bottom: 10px; }

/* Buttons Custom */
.s-cta-btn {
    background: var(--accent-gold) !important;
    color: #fff !important;
    padding: 12px 35px !important;
    border-radius: 50px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: 0 10px 20px rgba(166,124,82,0.3) !important;
    transition: all 0.3s ease !important;
    animation: none !important;
}
.s-cta-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(166,124,82,0.5) !important; }
.s-cta-btn.secondary { background: var(--text-brown) !important; }

/* WhatsApp Float */
.s-whatsapp-float {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 65px;
    height: 65px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37,211,102,0.4);
    z-index: 10000;
    transition: all 0.3s ease;
    text-decoration: none;
}
.s-whatsapp-float img { width: 35px; height: 35px; }
.s-wa-tooltip {
    position: absolute;
    left: 80px;
    background: #fff;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
    color: #333;
}
.s-whatsapp-float:hover .s-wa-tooltip { opacity: 1; }
.s-whatsapp-float:hover { transform: scale(1.1); }

/* Review System Styles */
.s-review-form { 
    max-width: 600px; 
    margin: 0 auto 50px; 
    padding: 30px !important; 
    background: #3d2b25 !important; 
    border-radius: 24px;
    color: #fff;
}
.s-form-group { margin-bottom: 20px; text-align: left; }
.s-form-group input {
    width: 60%; /* Smaller name box */
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    outline: none;
    color: #fff !important;
    font-family: inherit;
}
.s-form-group textarea {
    width: 100%; /* Larger review box */
    height: 150px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    outline: none;
    color: #fff !important;
    font-family: 'Jameel Noori Nastaleeq', serif;
    font-size: 1.2rem;
}
#star-rating { font-size: 1.8rem; color: #666; cursor: pointer; display: flex; gap: 5px; justify-content: center; margin-bottom: 15px; }
#star-rating span.active { color: #f2c94c; }

/* Review Marquee System */
.s-marquee-container {
    width: 100%;
    overflow: hidden;
    background: rgba(255,255,255,0.3);
    padding: 30px 0;
    border-top: 1px solid rgba(166,124,82,0.1);
    border-bottom: 1px solid rgba(166,124,82,0.1);
    margin-top: 30px;
}

.s-marquee-content {
    display: flex;
    gap: 30px;
    animation: sMarquee 60s linear infinite;
    width: max-content;
}

.s-marquee-content:hover {
    animation-play-state: paused;
}

@keyframes sMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.s-review-card { 
    background: #3d2b25; /* BROWN */
    padding: 25px; 
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.3); 
    text-align: left; 
    width: 350px; 
    flex-shrink: 0;
    color: #fff !important; /* WHITE AS REQUESTED */
    border: 1px solid rgba(242, 201, 76, 0.2);
    font-size: 1.1rem !important; /* LARGER AS REQUESTED */
}
.s-rev-stars { color: #f2c94c !important; margin-bottom: 10px; font-size: 1.2rem; }
.s-rev-name { font-weight: 800; font-size: 1.2rem; margin-bottom: 8px; color: #fff; text-transform: uppercase !important; }
.s-rev-msg { font-size: 1.1rem; line-height: 1.6; color: #fff !important; }

/* Admin Utility */
.s-admin-rev { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid #eee; }
.s-del-btn { background: #ff4444 !important; color: #fff !important; width: auto !important; height: auto !important; padding: 5px 12px !important; font-size: 0.75rem !important; animation: none !important; border-radius: 5px !important; box-shadow: none !important; margin-left: 5px; }
.s-edit-btn { background: #4CAF50 !important; color: #fff !important; width: auto !important; height: auto !important; padding: 5px 12px !important; font-size: 0.75rem !important; animation: none !important; border-radius: 5px !important; box-shadow: none !important; margin-left: 5px; }

/* Tab Portal Adjustments */
#tab-portal { background: var(--bg-cream); }
/* SHARED GLOBAL FOOTER (OUTSIDE ALL TABS) */
.main-footer {
    background: var(--orange-black-grad);
    background-size: 300% 300%;
    animation: rainbow-flow 10s linear infinite;
    padding: 30px 5%; /* Flexible padding */
    color: #fff;
    text-align: center;
    border-top: 4px solid var(--accent-gold);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
    margin-top: 20px;
    height: auto !important;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Force Jameel Noori for all Urdu bits */
.urdu-text, .urdu-inline, .s-urdu-title, .s-brand .urdu-text, .footer-address .urdu-text {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif !important;
}

.s-hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #000 !important; /* SOLID BLACK BG FOR SLIDES */
}
.s-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    filter: none !important; /* BYPASS DIM FILTERS */
}
.s-slide.active {
    opacity: 1 !important; /* FULL ROSHNI */
    z-index: 1;
}
.main-footer {
    color: #FFFFFF !important;
    padding: 15px 10% !important;
    text-align: center;
    border-top: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.footer-contact span {
    color: #FFFFFF !important; /* ENSURE WHITE TEXT */
}
.footer-address {
    margin-bottom: 8px; 
    line-height: 1.3;
}
.footer-address .urdu-text {
    font-size: 1.2rem !important; /* BALANCED SIZE */
    display: block;
    margin-bottom: 5px; 
    color: #FFFFFF !important; /* PURE WHITE */
    line-height: 1.3;
    font-weight: 700;
}
.footer-address .en-text {
    font-size: 0.85rem !important; 
    font-weight: 700;
    color: #FFFFFF !important;
    opacity: 1 !important;
}
.footer-bottom {
    margin-top: 12px !important; 
    padding-top: 8px !important; 
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem !important; 
    color: #FFFFFF !important;
    opacity: 0.9 !important;
    font-weight: 600;
}
/* Our Work Horizontal Slider */
.s-work-slider-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none; /* Hide scrollbar for clean look */
    -ms-overflow-style: none;
}
.s-work-slider-container::-webkit-scrollbar {
    display: none;
}
.s-work-slider {
    display: flex;
    gap: 25px;
    padding: 0 5%;
    width: max-content;
    animation: slideWork 40s linear infinite; /* Optional: Auto-slide */
}
.s-work-slider:hover {
    animation-play-state: paused;
}
.s-work-item {
    width: 350px;
    height: 250px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.4s ease;
}

/* Lightbox Modal */
.s-lightbox {
    display: none;
    position: fixed;
    z-index: 10000; /* HIGH Z-INDEX */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}
.s-lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 95%;
    max-height: 85vh;
    object-fit: contain;
    border: 4px solid var(--accent-gold);
    border-radius: 12px;
    animation: zoom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none; /* PREVENT CLICKS ON IMAGE ITSELF */
}
.s-work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.s-work-item:hover {
    transform: scale(1.05) translateY(-10px);
}

@keyframes slideWork {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* Wedding Grid Specifics (If needed in future, currently unused) */
.wedding-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 5%;
}

/* --- LOCATION CARD & MAP OVERLAY --- */
.s-location-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent-gold);
    border-radius: 24px;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: 1fr 200px; /* Two columns: Info and QR */
    align-items: center;
    gap: 40px;
    text-align: left;
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    animation: sFadeIn 0.8s ease;
}

.s-loc-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.s-loc-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 5px 15px rgba(166,124,82,0.3));
}

.s-loc-info h3 {
    font-size: 1.8rem;
    color: var(--text-brown);
    margin-bottom: 5px;
}

.s-loc-qr {
    text-align: center;
    border-left: 1px solid rgba(166,124,82,0.2);
    padding-left: 20px;
}

.s-loc-qr img {
    width: 150px;
    height: 150px;
    border: 3px solid var(--accent-gold);
    border-radius: 12px;
    padding: 5px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.s-loc-qr p {
    font-size: 0.85rem !important;
    line-height: 1.4;
    color: var(--text-brown);
    font-weight: 700;
}

.s-loc-info p {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.4;
}

.s-loc-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text-brown);
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
}

.s-loc-btn:hover {
    background: var(--accent-gold);
    transform: translateY(-2px);
}

.s-map-container {
    position: relative; /* REQUIRED FOR OVERLAY */
}

.s-map-marker-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 100;
    pointer-events: none; /* ALLOW CLICKS ON MAP */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.s-floating-camera {
    font-size: 45px;
    animation: markerBounce 2s infinite ease-in-out;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

@keyframes markerBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@media (max-width: 900px) {
    .s-location-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 25px;
        gap: 25px;
    }
    .s-loc-content {
        flex-direction: column;
        gap: 15px;
    }
    .s-loc-qr {
        border-left: none;
        border-top: 1px solid rgba(166,124,82,0.2);
        padding-left: 0;
        padding-top: 20px;
    }
    .s-loc-icon { font-size: 3rem; }
    .s-loc-info h3 { font-size: 1.5rem; }
}



/* === RESPONSIVE DESIGN (MOBILE & TABLET) === */

/* Mobile Menu Toggle Button */
.s-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.s-menu-toggle span {
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Toggle Animation */
.s-menu-toggle.active span:nth-child(1) { transform: rotate(45deg); }
.s-menu-toggle.active span:nth-child(2) { opacity: 0; }
.s-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg); }

/* Tablet & Mobile (900px and below) */
@media (max-width: 900px) {
    .s-menu-toggle {
        display: flex; /* Show hamburger on mobile */
    }

    .s-nav-links {
        display: none; /* Hide standard links */
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 40px 0;
        gap: 20px;
        z-index: 10000;
        border-bottom: 2px solid var(--accent-gold);
        text-align: center;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    }

    .s-nav-links.active {
        display: flex; /* Toggle via JS */
    }

    .s-nav-item {
        width: 80%;
        margin: 0 auto;
        padding: 15px !important;
        font-size: 1.1rem !important;
    }

    .s-master-nav {
        padding: 10px 3% !important;
    }

    .header-gadgets {
        display: flex !important; /* Restore gadgets on mobile */
        gap: 5px !important;
        transform: scale(0.85);
        transform-origin: right center;
    }
    
    .header-small-gadget {
        padding: 4px 8px !important;
        min-width: auto !important;
    }
}

/* Phones (768px and below) */
@media (max-width: 768px) {
    .s-main-title {
        font-size: 2.2rem !important;
    }
    .s-urdu-title {
        font-size: 1.8rem !important;
    }
    
    .s-gallery-grid {
        grid-template-columns: 1fr !important;
    }

    .s-rev-grid {
        grid-template-columns: 1fr !important;
    }

    .main-footer {
        flex-direction: column;
        gap: 20px;
        padding: 30px 5% !important;
    }
}

/* === LAPTOP & LARGE TABLET OPTIMIZATION (1024px - 1440px) === */
@media screen and (min-width: 1024px) and (max-width: 1440px) {
    .s-main-title { font-size: 3.5rem !important; }
    .s-urdu-title { font-size: 2.8rem !important; }
    .s-hero-desc { font-size: 1.3rem !important; }
    .s-nav-item { padding: 0 12px !important; min-width: 80px !important; font-size: 0.75rem !important; }
    .s-section { padding: 40px 40px !important; }
    .section { padding: 30px 5% !important; }
    .grid, .portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* PakPortal Header Refactored Classes */
.portal-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    min-height: 80px;
    flex-wrap: wrap; /* Allow wrapping on very small screens */
    gap: 10px;
}

.portal-nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.portal-nav-links {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

.portal-nav-links a {
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    font-weight: 700;
}

.portal-back-btn {
    font-size: 0.75rem !important;
    background: var(--accent-gold);
    color: #fff !important;
    padding: 6px 10px !important;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    height: auto !important;
    width: auto !important;
    display: inline-flex !important;
    margin: 0 !important;
    white-space: nowrap;
}

.portal-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 600px) {
    .portal-header-nav {
        flex-direction: column;
        padding: 15px 5%;
        height: auto;
        text-align: center;
    }
    .portal-nav-left, .portal-nav-right {
        justify-content: center;
        width: 100%;
    }
    .s-brand .urdu-text {
        font-size: 0.9rem !important;
    }
    .s-hero-desc.urdu-text {
        font-size: 1.25rem !important;
        line-height: 2 !important;
        font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif !important;
        margin-top: 10px !important;
    }
}
