/* =========================================
   1. CSS VARIABLES & THEME SETUP
   ========================================= */
:root { 
    /* --- Colors --- */
    --primary-bg: #ecfdf5; 
    --gradient-bg: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 50%, #a7f3d0 100%);
    --card-bg: rgba(255, 255, 255, 0.9); 
    --card-border: rgba(16, 185, 129, 0.2); 
    --navbar-bg: rgba(255, 255, 255, 0.95);
    
    --gold: #d97706; 
    --teal: #059669; 
    --teal-light: #34d399;
    
    --text-main: #1f2937; 
    --text-muted: #6b7280; 
    --shadow-soft: 0 10px 30px rgba(5, 150, 105, 0.1);
    
    --input-bg: #fff;
    --input-border: #e5e7eb;
    --box-bg: #fff;
    
    --msg-box-bg: #fffbf0;
    --msg-box-border: #fcd34d;
    --msg-box-text: #1f2937;
    
    --mobile-menu-bg: #ffffff;
    
    /* Page Specific Variables */
    --extra-sec-bg: #fff;
    --extra-sec-border: #e5e7eb;
    --islamic-card-bg: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
    --sacred-border: #d97706;
}

/* --- DARK MODE OVERRIDES --- */
body.dark-mode {
    --primary-bg: #1a3c4a; 
    --gradient-bg: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --card-bg: rgba(255, 255, 255, 0.06); 
    --card-border: rgba(255, 255, 255, 0.1); 
    --navbar-bg: rgba(15, 32, 39, 0.98);

    --gold: #ffca28; 
    --teal: #4db6ac; 
    --teal-light: #26a69a;

    --text-main: #ffffff; 
    --text-muted: rgba(255, 255, 255, 0.7); 
    --shadow-soft: 0 15px 40px rgba(0, 0, 0, 0.4);

    --input-bg: rgba(30, 41, 59, 0.8);
    --input-border: rgba(255, 255, 255, 0.1);
    --box-bg: rgba(255, 255, 255, 0.05); 

    --msg-box-bg: rgba(255, 202, 40, 0.15);
    --msg-box-border: var(--gold);
    --msg-box-text: #fff;

    --mobile-menu-bg: #1a262f;
    
    --extra-sec-bg: rgba(255,255,255,0.03);
    --extra-sec-border: rgba(255,255,255,0.1);
    --islamic-card-bg: rgba(0, 77, 64, 0.4);
    --sacred-border: #ffca28;
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Poppins', sans-serif; 
    background: var(--gradient-bg); 
    background-attachment: fixed; 
    color: var(--text-main); 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow-x: hidden; 
    line-height: 1.6; 
    transition: background 0.3s ease, color 0.3s ease;
}

@media screen and (-webkit-min-device-pixel-ratio:0) { 
    select:focus, textarea:focus, input:focus { font-size: 16px; }
}

/* =========================================
   3. NAVBAR & MOBILE MENU
   ========================================= */
.navbar { 
    width: 100%; height: 80px; background: var(--navbar-bg); padding: 0 20px; 
    display: flex; justify-content: space-between; align-items: center; 
    border-bottom: 1px solid var(--card-border); position: sticky; top: 0; 
    z-index: 1000; box-shadow: 0 4px 20px rgba(0,0,0,0.1); backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

.logo-section { display: flex; align-items: center; z-index: 2; }
.logo { font-size: 1.2rem; color: var(--teal); font-weight: bold; text-decoration: none; display: flex; align-items: center; gap: 8px; white-space: nowrap; }

.date-time-container { position: absolute; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; align-items: center; z-index: 1; }

.today-hijri-badge { 
    background: var(--box-bg); color: var(--teal); padding: 8px 25px; 
    border-radius: 50px; font-size: 1rem; border: 1px solid var(--card-border); 
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); white-space: nowrap; font-weight: 600;
}

.nav-links { display: flex; justify-content: flex-end; gap: 9px; align-items: center; z-index: 2; }
.nav-item { color: var(--text-main); text-decoration: none; font-size: 0.95rem; padding: 5px 10px; border-radius: 8px; transition: 0.3s; white-space: nowrap; font-weight: 500; cursor: pointer; border:none; background:transparent;}
.nav-item:hover { background: rgba(128, 128, 128, 0.1); color: var(--teal); }
.nav-item.active { color: var(--teal); background: rgba(128,128,128,0.1); }

#langBtn { 
    border: 2px solid var(--teal); padding: 6px 18px; border-radius: 25px; 
    background: transparent; width: auto; text-align: center; display: inline-block; 
    color: var(--teal) !important; font-weight: 700; font-size: 1.05rem; 
}
#langBtn:hover { background: var(--teal); color: #fff !important; }

#themeToggle { 
    font-size: 1.2rem; width: 40px; height: 40px; display: flex; 
    align-items: center; justify-content: center; border-radius: 50%; 
    border: 1px solid var(--card-border); color: var(--teal); transition: 0.3s; 
}
#themeToggle:hover { background: var(--teal); color: #fff; transform: rotate(15deg); }

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; color: var(--teal); margin-right: 15px; }
.mobile-menu-container { display: none; }

/* =========================================
   4. LAYOUT & CONTAINERS
   ========================================= */
.container { 
    width: 100%; flex: 1; display: flex; flex-direction: column; 
    align-items: center; padding: 20px 15px; overflow-x: hidden;
}

.content-box { 
    width: 100%; max-width: 1100px; 
    background: var(--card-bg); 
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); 
    border: 1px solid var(--card-border); border-radius: 30px; 
    padding: 35px; box-shadow: var(--shadow-soft); 
    margin-bottom: 30px; margin-top: 10px;
    transition: background 0.3s ease;
    overflow: hidden;
}

.content-box.calc-main { min-height: 600px; border-radius: 25px; } 

.header-section { text-align: center; margin-bottom: 35px; border-bottom: 1px solid var(--card-border); padding-bottom: 20px;}
.content-box.calc-main .header-section { margin-bottom: 25px; border-bottom: none; }

h1 { font-size: 2.2rem; margin-bottom: 8px; color: var(--teal); font-weight: 800; text-shadow: none;}
.subtitle { font-size: 1rem; color: var(--text-muted); }

/* Buttons */
.action-btn { 
    padding: 12px 35px; 
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%); 
    color: #fff; font-weight: bold; border: none; border-radius: 50px; 
    cursor: pointer; font-size: 1rem; box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3); 
    transition: 0.3s; display: inline-block; text-decoration: none;
    min-width: 140px; 
}
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4); }

/* =========================================
   5. STANDARD CONTENT (Privacy, Terms, About)
   ========================================= */
.text-block { margin-bottom: 30px; line-height: 1.8; color: var(--text-main); text-align: justify;}
.text-block h2 { color: var(--gold); margin-bottom: 15px; font-size: 1.4rem; display: flex; align-items: center; gap: 10px;}
.text-block h3 { color: var(--teal); margin-bottom: 10px; font-size: 1.1rem; font-weight: 700; margin-top: 15px; }
.text-block p { margin-bottom: 15px; font-size: 1rem; }

/* =========================================
   6. BLOG POST SPECIFICS (New)
   ========================================= */
.breadcrumb { margin-bottom: 20px; font-size: 0.9rem; color: var(--text-muted); }
.breadcrumb a { color: var(--teal); text-decoration: none; font-weight: 500; }
.breadcrumb span { margin: 0 5px; opacity: 0.5; }

.blog-header { text-align: center; margin-bottom: 40px; border-bottom: 1px solid var(--card-border); padding-bottom: 25px; }
.blog-title { font-size: 2.2rem; color: var(--text-main); font-weight: 800; line-height: 1.3; margin-bottom: 15px; }
.blog-subtitle { color: var(--gold); font-size: 1.1rem; margin-bottom: 15px; font-weight: 600; display: block; }
.blog-meta { color: var(--text-muted); font-size: 0.9rem; display: flex; justify-content: center; gap: 20px; align-items: center; }

.blog-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-main); }
.blog-content p { margin-bottom: 25px; text-align: left; }
.blog-content h2 { 
    color: var(--teal); font-size: 1.6rem; margin-top: 40px; margin-bottom: 20px; 
    font-weight: 700; display: flex; align-items: center; gap: 12px; 
    border-left: 4px solid var(--gold); padding-left: 15px; 
}
.blog-content h3 { color: var(--text-main); font-size: 1.3rem; margin-top: 30px; margin-bottom: 15px; font-weight: 600; }

/* Feature List (Used in Blog & Text Pages) */
.feature-list { list-style: none; padding: 0; margin-bottom: 25px; }
.feature-list li { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 12px; font-size: 1.05rem; }
.feature-list i { color: var(--teal); margin-top: 6px; font-size: 0.9em; }
.feature-list.negative i { color: #ef4444; } /* Red cross for negative lists */

/* Quran Quote Box */
.quran-quote {
    background: var(--primary-bg); border-radius: 15px; padding: 30px; 
    margin: 35px 0; border: 1px solid var(--card-border); text-align: center; position: relative;
}
.quran-quote::before { 
    content: '\f10d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; 
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%); 
    background: var(--teal); color: #fff; width: 40px; height: 40px; 
    display: flex; align-items: center; justify-content: center; border-radius: 50%; 
}
.quran-text { font-family: 'Poppins', serif; font-size: 1.2rem; font-style: italic; color: var(--text-main); display: block; margin-bottom: 10px; }
.quran-ref { font-weight: bold; color: var(--gold); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* Blog Tables */
.table-container { overflow-x: auto; margin: 30px 0; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.blog-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.blog-table th, .blog-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--card-border); }
.blog-table th { background: var(--teal); color: #fff; font-weight: 600; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.5px; }
.blog-table td { background: var(--box-bg); color: var(--text-main); font-size: 0.95rem; }
.blog-table tr:last-child td { border-bottom: none; }
.blog-table tr:nth-child(even) td { background: rgba(0,0,0,0.02); }

/* Highlight/Alert Box */
.highlight-box {
    background: var(--msg-box-bg); border: 1px solid var(--msg-box-border); 
    border-left: 5px solid var(--gold); padding: 25px; 
    border-radius: 8px; margin: 30px 0; color: var(--msg-box-text);
}
.highlight-box h3 { margin-top: 0; color: var(--gold); display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }

/* Conclusion Box */
.conclusion-box { 
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%); 
    padding: 30px; border-radius: 20px; color: white; margin-top: 40px; text-align: center; 
}
.conclusion-box h2 { color: white; border: none; padding: 0; justify-content: center; margin-top: 0; }
.conclusion-box p { color: rgba(255,255,255,0.9); margin-bottom: 0; text-align: center;}


/* =========================================
   7. CLOCK PAGE SPECIFICS (New)
   ========================================= */
.clock-card { 
    width: 100%; max-width: 1100px; background: var(--card-bg); 
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); 
    border: 1px solid var(--card-border); border-radius: 30px; padding: 35px; 
    box-shadow: var(--shadow-soft); margin-bottom: 30px; margin-top: 10px; 
    text-align: center; position: relative; overflow: hidden;
}
.clock-card::before { content: ''; position: absolute; top: -50px; left: -50px; width: 150px; height: 150px; background: var(--teal); filter: blur(80px); opacity: 0.2; border-radius: 50%; z-index: 0; }
.clock-card::after { content: ''; position: absolute; bottom: -50px; right: -50px; width: 150px; height: 150px; background: var(--gold); filter: blur(80px); opacity: 0.2; border-radius: 50%; z-index: 0; }

.clock-content { position: relative; z-index: 1; }
.day-name { font-size: 1.8rem; color: var(--gold); font-weight: 600; margin-bottom: 5px; letter-spacing: 2px; text-transform: uppercase; }

.digital-time { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 5px 0; }
.time-digits { font-family: 'Orbitron', sans-serif; font-size: 5rem; font-weight: 700; color: var(--teal); text-shadow: 0 0 20px rgba(5, 150, 105, 0.2); line-height: 1; }
body.dark-mode .time-digits { text-shadow: 0 0 30px rgba(77, 182, 172, 0.4); }

.seconds { font-size: 2.5rem; color: var(--text-muted); opacity: 0.8; }
.ampm { font-size: 1.8rem; color: var(--text-main); font-weight: 600; margin-top: 10px; background: var(--box-bg); padding: 2px 20px; border-radius: 50px; border: 1px solid var(--card-border); display: inline-block; }

.dates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.date-box { background: var(--box-bg); padding: 25px; border-radius: 20px; border: 1px solid var(--card-border); transition: transform 0.3s, box-shadow 0.3s; }
.date-box:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--teal-light); }
body.dark-mode .date-box { background: rgba(255, 255, 255, 0.03); }

.date-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; text-transform: uppercase; letter-spacing: 1px; }
.date-value { font-size: 1.6rem; font-weight: 700; color: var(--text-main); }
.date-sub { font-size: 1.1rem; color: var(--teal); margin-top: 5px; display: block; }


/* =========================================
   8. HOMEPAGE & CALCULATOR ELEMENTS
   ========================================= */
.input-area { display: flex; gap: 15px; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 35px; }
.date-selectors { display: flex; gap: 15px; justify-content: center; width: 100%; max-width: 500px; }
.custom-select { 
    padding: 12px 11px; border-radius: 12px; border: 2px solid var(--input-border); 
    font-size: 1.1rem; font-family: 'Poppins', sans-serif; background: var(--input-bg); 
    color: var(--text-main); outline: none; cursor: pointer; flex: 1; text-align: center; 
    transition: all 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
body.dark-mode .custom-select option { background: #203a43; }
.custom-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1); }

#resultSection { display: none; margin-top: 20px; }
.ages-wrapper { display: flex; gap: 20px; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; }
.main-age-display { 
    flex: 1; min-width: 260px; text-align: center; padding: 25px; 
    background: var(--box-bg); border-radius: 18px; border: 1px solid var(--card-border); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.main-age-display h3 { color: var(--text-muted); font-size: 1rem; margin: 0; padding: 0; font-weight: bold; }
.main-age-display h2 { font-size: 1.8rem; color: var(--gold); margin-top: 10px; font-weight: 700; }
.islamic-age-box { background: linear-gradient(145deg, var(--teal), #047857); color: #fff !important; border: none; }
.islamic-age-box h3, .islamic-age-box h2, .islamic-age-box span { color: #fff !important; }

.life-stats-container { background: var(--box-bg); border-radius: 15px; padding: 25px; margin-bottom: 30px; text-align: center; border: 1px solid var(--card-border); }
.progress-track { width: 100%; height: 14px; background: rgba(128,128,128,0.2); border-radius: 10px; overflow: hidden; margin: 15px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--teal-light), var(--teal)); width: 0%; transition: width 1.5s ease-in-out; }
.stage-badge { background: var(--gold); color: #fff; padding: 5px 15px; border-radius: 20px; font-weight: bold; display: inline-block; margin-bottom: 10px; }

.islamic-card { 
    background: var(--islamic-card-bg); border: 1px solid var(--teal); padding: 25px; 
    border-radius: 18px; text-align: center; margin-bottom: 30px; position: relative; 
    overflow: hidden; box-shadow: 0 4px 15px rgba(5, 150, 105, 0.05);
}
.islamic-card h2 { color: var(--teal); margin-top: 10px;}
body.dark-mode .islamic-card h2 { color: #fff; }
.hijri-controls { display: flex; justify-content: center; gap: 15px; margin-top: 15px; align-items: center; }
.adj-btn { width: 35px; height: 35px; border-radius: 50%; background: rgba(255,255,255,0.2); color: var(--text-main); border: 1px solid var(--card-border); cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; }
.adj-btn:hover { background: var(--teal); color: #fff; }

.time-row { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; }
.time-box { flex: 1; min-width: 100px; background: var(--box-bg); padding: 15px 5px; border-radius: 12px; text-align: center; border: 1px solid var(--card-border); }
.time-box strong { font-size: 1.2rem; color: var(--teal); display: block; }
body.dark-mode .time-box strong { color: #81ecec; }

.grid-container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-bottom: 30px; }
.info-card { 
    background: var(--box-bg); padding: 20px; border-radius: 15px; text-align: center; 
    border: 1px solid var(--card-border); display: flex; flex-direction: column; 
    justify-content: center; align-items: center; transition: transform 0.3s; 
}
.info-card:hover { transform: translateY(-5px); border-color: var(--teal-light); }
.info-card i { font-size: 1.8rem; margin-bottom: 12px; color: var(--teal); }
.info-card p { font-size: 1.1rem; font-weight: bold; margin-top: 5px; color: var(--text-main); }

.message-box { background: var(--msg-box-bg); border: 1px solid var(--msg-box-border); padding: 20px; border-radius: 15px; text-align: center; margin-bottom: 30px; }
.message-text { font-style: italic; color: var(--msg-box-text); font-size: 1.1rem; }

.extra-section { background: var(--extra-sec-bg); border: 1px solid var(--extra-sec-border); border-radius: 15px; padding: 20px; margin-bottom: 25px; text-align: center; }
.extra-title { color: var(--gold); margin-bottom: 15px; border-bottom: 1px solid var(--card-border); display: inline-block; padding-bottom: 5px; font-size: 1.2rem; font-weight: 700;}
body:not(.dark-mode) #historicalFact { color: #b45309; }
body.dark-mode #historicalFact { color: var(--gold); }

.converter-box { background: var(--box-bg); padding: 25px; border-radius: 15px; margin-top: 30px; border: 1px solid var(--teal); }
body:not(.dark-mode) .converter-box { background: #f0fdf4; border-color: var(--teal-light); }
.converter-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
.converter-col { flex: 1; min-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.converter-input { padding: 12px; border-radius: 12px; border: 2px solid var(--input-border); background: var(--input-bg); color: var(--text-main); text-align: center; font-weight: bold; width: 100%; box-sizing: border-box; font-size: 1rem; }
.h-input-group { display: flex; gap: 10px; justify-content: center; width: 100%; }

.share-container { display: flex; justify-content: center; width: 100%; margin-top: 20px; }
.share-btn { background: #f97316; color: white; border: none; padding: 12px 35px; border-radius: 50px; cursor: pointer; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.welcome-info { color: var(--text-muted); margin-bottom: 20px; display: flex; justify-content: center; gap: 10px; align-items: center; }

.article-section { 
    width: 100%; max-width: 1100px; background: var(--card-bg); padding: 40px; 
    border-radius: 20px; margin-top: 20px; line-height: 2.2; text-align: justify; 
    border: 1px solid var(--card-border); color: var(--text-main);
}
.article-section h2 { color: var(--teal); border-bottom: 1px solid var(--card-border); padding-bottom: 10px; display: inline-block; }

/* =========================================
   9. ISLAMIC MONTHS (RTL GRID)
   ========================================= */
.intro-text { text-align: center; max-width: 800px; margin: 0 auto 30px auto; color: var(--text-main); }
.months-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; margin-top: 30px; direction: rtl; }

.month-card {
    background: var(--box-bg); border: 1px solid var(--card-border); border-radius: 20px;
    padding: 25px; position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; overflow: hidden;
    direction: ltr; text-align: left;
}
.month-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.month-card.sacred { border: 2px solid var(--sacred-border); }
.month-card.sacred::before {
    content: "Sacred Month"; position: absolute; top: 0; right: 0;
    background: var(--gold); color: #fff; font-size: 0.7rem; font-weight: 700;
    padding: 5px 15px; border-bottom-left-radius: 15px; text-transform: uppercase;
}
.month-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; border-bottom: 1px solid var(--card-border); padding-bottom: 10px; }
.month-number { font-size: 3rem; font-weight: 900; color: rgba(5, 150, 105, 0.1); line-height: 1; }
.month-titles { text-align: right; }
.month-name-en { font-size: 1.4rem; font-weight: 700; color: var(--teal); display: block; }
.month-name-ar { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.3rem; color: var(--text-main); margin-top: -5px; display: block; direction: rtl; }
.month-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 15px; flex-grow: 1; }
.alert-box { background: var(--msg-box-bg); border-left: 4px solid var(--msg-box-border); padding: 10px 15px; border-radius: 8px; font-size: 0.85rem; color: var(--msg-box-text); margin-top: auto; }
.alert-box strong { color: var(--gold); display: block; margin-bottom: 3px; }

/* =========================================
   10. BLOG LIST
   ========================================= */
.header-title { font-size: 2.5rem; color: var(--teal); font-weight: 800; margin-bottom: 10px; }
.header-subtitle { color: var(--text-muted); font-size: 1.1rem; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; width: 100%; max-width: 1200px; margin-bottom: 50px; }

.blog-card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px;
    overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px); display: flex; flex-direction: column; height: 100%;
}
.blog-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-soft); }
.card-icon-area { height: 180px; background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3rem; }
.card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.card-meta { font-size: 0.85rem; color: var(--gold); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.card-title { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin-bottom: 15px; line-height: 1.4; }
.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }
.read-more-btn { display: inline-block; color: var(--teal); font-weight: 700; text-decoration: none; font-size: 0.95rem; transition: 0.3s; margin-top: auto; }
.read-more-btn:hover { color: var(--gold); padding-left: 5px; }

/* =========================================
   11. CONTACT PAGE
   ========================================= */
.contact-cta { text-align: left; margin-top: 40px; border-top: 1px solid var(--card-border); padding-top: 30px; }
.contact-cta h2 { color: #d97706; display: flex; align-items: center; gap: 10px; }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 20px; width: 100%; }
.contact-info-col h3 { color: var(--gold); margin-bottom: 15px; font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.contact-methods { margin-top: 30px; }
.contact-item { 
    display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding: 15px; 
    background: var(--box-bg); border-radius: 12px; border: 1px solid var(--card-border); 
    transition: 0.3s; max-width: 100%;
}
.contact-item:hover { transform: translateY(-3px); border-color: var(--teal); }
.contact-icon { width: 45px; height: 45px; background: rgba(5, 150, 105, 0.1); color: var(--teal); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.form-col { background: var(--box-bg); padding: 30px; border-radius: 20px; border: 1px solid var(--card-border); max-width: 100%; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; color: var(--text-main); font-weight: 500; font-size: 0.95rem; }
.form-input { 
    width: 100%; padding: 12px 15px; border-radius: 12px; border: 2px solid var(--input-border); 
    background: var(--input-bg); color: var(--text-main); font-family: 'Poppins', sans-serif; 
    outline: none; transition: 0.3s; font-size: 1rem; max-width: 100%; box-sizing: border-box; 
}
.form-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1); }
textarea.form-input { resize: vertical; min-height: 120px; }
.submit-btn {
    width: 100%; padding: 12px; background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
    color: #fff; font-weight: bold; border: none; border-radius: 50px; cursor: pointer;
    font-size: 1rem; box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3); transition: 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4); }

/* =========================================
   12. FOOTER
   ========================================= */
.main-footer { width: 100%; background: var(--navbar-bg); margin-top: 50px; border-top: 1px solid var(--card-border); padding-top: 50px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding: 0 20px 40px 20px; text-align: left; }
.footer-col h3 { color: var(--teal); margin-bottom: 20px; font-size: 1.2rem; font-weight: 700; }
.footer-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-main); text-decoration: none; font-size: 0.95rem; transition: 0.3s; }
.footer-links a:hover { color: var(--teal); padding-left: 5px; }
.footer-bottom { text-align: center; padding: 20px; border-top: 1px solid var(--card-border); color: var(--text-muted); font-size: 0.85rem; background: rgba(0,0,0,0.02); }

/* =========================================
   13. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 1200px) {
    .nav-item.desktop-only { display: none; }
    .hamburger { display: block; }
    .navbar { padding: 0 15px; justify-content: space-between; height: 70px; }
    .date-time-container { left: 50%; }
    .logo span { display: none; }
    .today-hijri-badge { padding: 5px 15px; font-size: 0.85rem; }
    
    .mobile-menu-container {
        display: block; position: fixed; top: 70px; left: -100%; width: 250px;
        height: calc(100vh - 70px); background: var(--mobile-menu-bg);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1); transition: 0.3s ease;
        padding: 20px; z-index: 999; border-right: 1px solid var(--card-border);
    }
    .mobile-menu-container.active { left: 0; }
    .mobile-nav-link { display: block; padding: 15px 10px; border-bottom: 1px solid var(--card-border); color: var(--text-main); text-decoration: none; font-weight: 500; }
    .mobile-nav-link:hover { color: var(--teal); padding-left: 15px; transition: 0.2s; }
    .nav-links { gap: 8px; }
    #langBtn { padding: 4px 12px; font-size: 0.9rem; }
    #themeToggle { width: 35px; height: 35px; font-size: 1rem; }
}

@media (max-width: 768px) {
    .container { padding: 5px 10px; }
    .content-box, .clock-card { backdrop-filter: none !important; background: var(--box-bg); padding: 20px; min-height: auto; margin-top: 5px;}
    .content-box.calc-main { padding: 25px 15px; } 
    
    .grid-container { grid-template-columns: 1fr 1fr; }
    .share-btn { width: 100%; }
    
    /* Footer & Grid Stacking */
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .months-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; padding: 0 10px; }
    
    /* Contact Form Stacking */
    .contact-wrapper { grid-template-columns: 1fr; gap: 30px; }
    .form-col { padding: 20px; }
    
    /* Clock Specific Mobile */
    .time-digits { font-size: 3.5rem; }
    .seconds { font-size: 1.5rem; }
    .dates-grid { grid-template-columns: 1fr; gap: 15px; margin-top: 25px; }

    /* Text Sizes */
    .header-title, .blog-title { font-size: 1.8rem; }
    h1 { font-size: 1.8rem; }
    .form-input { width: 100%; min-width: 0; }
}

@media (max-width: 480px) {
    .today-hijri-badge span { font-size: 0.8rem; }
    .logo { display: none; }
}

/* Printing Mode */
.printing-mode .content-box { background: var(--primary-bg) !important; border: none; }
.printing-mode .btn-group, .printing-mode .input-area, .printing-mode .share-container, .printing-mode .hijri-controls, .printing-mode .welcome-info, .printing-mode .navbar, .printing-mode .converter-box { display: none !important; }
/* --- SUCCESS MESSAGE BOX STYLE --- */
.success-box {
    background: #d1fae5; /* Light Green */
    color: #065f46;      /* Dark Green Text */
    border: 1px solid #34d399;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: fadeIn 0.5s ease;
}

.success-box i {
    font-size: 1.5rem;
    color: #059669;
}

/* Animation for smooth appearance */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dark Mode Adjustment for Message */
body.dark-mode .success-box {
    background: rgba(16, 185, 129, 0.2);
    color: #fff;
    border-color: #059669;
}