/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --gold: #d4af37;
    --gold-rgb: 212, 175, 55;
    --gold-gradient: linear-gradient(135deg, #f3e5ab, #d4af37, #aa7c11);
    --gold-glow: 0 0 15px rgba(212, 175, 55, 0.4);
    
    /* Dark Mode Defaults */
    --bg-main: #0a1410; /* Deep Islamic Emerald Black */
    --bg-card: rgba(16, 28, 23, 0.65);
    --bg-nav: rgba(10, 20, 16, 0.8);
    --text-main: #f0f7f4;
    --text-muted: #ffffff;
    --border-color: rgba(214, 175, 55, 0.25);
    --input-bg: rgba(26, 43, 36, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-main: #f4f7f5;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-nav: rgba(244, 247, 245, 0.85);
    --text-main: #14281e;
    --text-muted: #4a6b5c;
    --border-color: rgba(212, 175, 55, 0.35);
    --input-bg: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
    position: relative;
}

/* Force high-contrast readable colors for Bootstrap muted/secondary helpers */
.text-muted {
    color: var(--text-muted) !important;
}
.text-secondary {
    color: var(--text-muted) !important;
}
.text-white-50 {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Islamic Pattern Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M30 0 L60 30 L30 60 L0 30 Z" fill="none" stroke="rgba(212, 175, 55, 0.03)" stroke-width="1"/></svg>');
    z-index: -1;
    pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f3e5ab;
}

/* Amiri Font for Arabic text / Titles */
.font-amiri {
    font-family: 'Amiri', serif;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
}

/* Glass Navbar */
.glass-nav {
    background: var(--bg-nav);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-speed);
}

/* Buttons */
.btn-gold {
    background: var(--gold-gradient);
    color: #14281e !important;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    box-shadow: var(--gold-glow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold) !important;
    border: 2px solid var(--gold);
    border-radius: 50px;
    padding: 8px 22px;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn-outline-gold:hover {
    background: var(--gold-gradient);
    color: #14281e !important;
    box-shadow: var(--gold-glow);
    transform: translateY(-2px);
}

/* Text 3D & Gold Glow */
.text-gold {
    color: var(--gold);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-glow {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.text-3d {
    font-family: 'Amiri', serif;
    font-weight: 700;
    color: #d4af37;
    text-shadow: 0 1px 0 #aa7c11, 0 2px 0 #996e0f, 0 3px 0 #88620e, 0 4px 0 #77560c, 0 5px 0 #664a0b, 
                 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 
                 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 
                 0 20px 20px rgba(0,0,0,.15), 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Luxury Islamic Frame Container */
.luxury-frame {
    position: relative;
    padding: 30px;
    border-radius: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.luxury-frame::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 15px;
    pointer-events: none;
}

.luxury-frame::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px dashed rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    pointer-events: none;
}

/* Corner Ornaments */
.frame-corner {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 2px solid var(--gold);
    pointer-events: none;
}
.corner-tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.corner-tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.corner-br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

/* Navbar Glow Hover */
.navbar-nav .nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    transition: all var(--transition-speed);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: all var(--transition-speed);
    transform: translateX(-50%);
    box-shadow: var(--gold-glow);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--gold) !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-main);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.islamic-loader {
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: var(--gold);
    border-bottom-color: var(--gold);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    position: relative;
}

.islamic-loader::after {
    content: '۞';
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    color: var(--gold);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: counter-spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes counter-spin {
    0% { transform: translate(-50%, -50%) rotate(360deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}

/* Floating Scroll to Top */
#btn-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 99;
    background: var(--gold-gradient);
    color: #14281e;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s;
}
#btn-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(212,175,55,0.6);
}

/* Footer Links Hover */
.footer-social-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s;
    display: inline-block;
    margin-right: 15px;
}

.footer-social-icon:hover {
    color: var(--gold);
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(212,175,55,0.7));
}

/* Card Numbers/Badge styles */
.counter-box {
    text-align: center;
    padding: 20px;
}
.counter-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
}

/* Form Styles */
.form-control, .form-select {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
}
.form-control:focus, .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--gold);
    color: var(--text-main);
    box-shadow: var(--gold-glow);
}
.form-label {
    font-weight: 500;
    color: var(--text-main);
}

/* Custom Text Colors requested by User */
.text-custom-green {
    color: #99ff99 !important;
}
.text-custom-grey {
    color: #cccccc !important;
}
