/*
Theme Name: Masjid Ul Haqq
Theme URI: https://muhb.org
Author: SRJ
Author URI: https://muhb.org
Description: A modern, Arabic-inspired WordPress theme for Masjid Ul Haqq with clean header and footer, optimized for mobile and compatible with page builders like Elementor.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: masjid-ul-haqq
Tags: custom-header, custom-menu, featured-images, threaded-comments, translation-ready, blog, islamic, mosque, masjid

Masjid Ul Haqq WordPress Theme, Copyright 2024 Masjid Ul Haqq
Masjid Ul Haqq is distributed under the terms of the GNU GPL
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    max-width: 200px;
    height: auto;
}

.site-logo img {
    display: block;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #8FB569;
}

.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
    color: #8FB569;
}

/* Sub-menus */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
}

.nav-menu li:hover > .sub-menu {
    display: block;
}

.nav-menu .sub-menu li {
    padding: 0;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #333;
}

.nav-menu .sub-menu a:hover {
    background-color: #f5f5f5;
    color: #8FB569;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    width: 30px;
    height: 3px;
    background-color: #333;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.mobile-menu-toggle.active .hamburger {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.site-content {
    min-height: 60vh;
    padding: 2rem 0;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Elementor compatibility */
.elementor-page .site-content {
    padding: 0;
}

.elementor-page .content-wrapper {
    padding: 0;
    max-width: 100%;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer {
    background-color: #8FB569;
    color: #fff;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Footer Branding */
.footer-branding {
    text-align: center;
}

.footer-logo {
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

.footer-contact {
    margin-bottom: 1.5rem;
}

.footer-contact p {
    margin: 0.3rem 0;
    font-size: 1.1rem;
    font-weight: 300;
}

.footer-contact a {
    color: #fff;
    transition: opacity 0.3s ease;
}

.footer-contact a:hover {
    opacity: 0.8;
}

/* Arabic Quote */
.footer-arabic-quote {
    margin: 2rem 0;
    text-align: center;
}

.arabic-text {
    font-size: 1.8rem;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    line-height: 1.8;
    margin-bottom: 1rem;
    direction: rtl;
}

.arabic-quote-image {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.quote-translation {
    font-size: 1rem;
    font-style: italic;
    line-height: 1.6;
    margin-top: 1rem;
    opacity: 0.95;
}

/* Social Media Icons */
.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.social-icon {
    color: #fff;
    font-size: 2rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
}

.social-icon:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

.social-icon svg,
.social-icon img {
    width: 40px;
    height: 40px;
    fill: #fff;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-info {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.95;
}

.footer-info p {
    margin: 0.3rem 0;
}

.footer-info a {
    color: #fff;
    text-decoration: underline;
}

.footer-info a:hover {
    opacity: 0.8;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 968px) {
    .header-container {
        padding: 1rem 1.5rem;
    }
    
    .site-logo {
        max-width: 150px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 5rem 2rem 2rem;
    }
    
    .main-navigation.active {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu li {
        border-bottom: 1px solid #f0f0f0;
        padding: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }
    
    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        background: #f9f9f9;
        padding: 0;
    }
    
    .nav-menu .sub-menu a {
        padding-left: 1.5rem;
        font-size: 1rem;
    }
    
    /* Mobile Overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .mobile-nav-overlay.active {
        display: block;
    }
    
    .content-wrapper {
        padding: 0 1.5rem;
    }
    
    .footer-container {
        padding: 0 1.5rem;
    }
    
    .arabic-text {
        font-size: 1.4rem;
    }
    
    .quote-translation {
        font-size: 0.9rem;
    }
    
    .footer-social {
        gap: 1.2rem;
    }
    
    .social-icon svg,
    .social-icon img {
        width: 35px;
        height: 35px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media screen and (max-width: 480px) {
    .header-container {
        padding: 0.75rem 1rem;
    }
    
    .site-logo {
        max-width: 120px;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-logo {
        max-width: 250px;
    }
    
    .footer-contact p {
        font-size: 1rem;
    }
    
    .arabic-text {
        font-size: 1.2rem;
    }
    
    .quote-translation {
        font-size: 0.85rem;
    }
    
    .footer-social {
        gap: 1rem;
    }
    
    .social-icon svg,
    .social-icon img {
        width: 30px;
        height: 30px;
    }
    
    .footer-info {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Mobile Menu Enhancements
   ========================================================================== */

body.mobile-menu-open {
    overflow: hidden;
}

.submenu-toggle {
    display: none;
}

@media screen and (max-width: 968px) {
    .submenu-toggle {
        display: inline-block;
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .submenu-toggle::after {
        content: '+';
        font-size: 1.5rem;
        color: #333;
    }
    
    .menu-item-has-children {
        position: relative;
    }
    
    .submenu-open .submenu-toggle::after {
        content: '−';
    }
    
    .nav-menu .sub-menu {
        display: none;
    }
    
    .submenu-open .sub-menu {
        display: block !important;
    }
}

/* ==========================================================================
   Blog & Archive Styling
   ========================================================================== */

.site-main article {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.site-main article:last-child {
    border-bottom: none;
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    margin-bottom: 0.5rem;
}

.entry-title a {
    color: #333;
}

.entry-title a:hover {
    color: #8FB569;
}

.entry-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: #8FB569;
}

.entry-meta a:hover {
    text-decoration: underline;
}

.entry-content {
    margin-bottom: 1.5rem;
}

.entry-footer {
    font-size: 0.9rem;
    color: #666;
}

.entry-footer a {
    color: #8FB569;
    margin-right: 1rem;
}

.post-thumbnail {
    margin-bottom: 1.5rem;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Pagination */
.posts-navigation,
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav-previous,
.nav-next {
    flex-basis: 48%;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #8FB569;
    color: #fff;
}

/* ==========================================================================
   Comments Styling
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid #e0e0e0;
}

.comments-title {
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.comment-list .children {
    list-style: none;
    margin-left: 2rem;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.comment-content {
    margin-bottom: 1rem;
}

.reply {
    font-size: 0.9rem;
}

.reply a {
    color: #8FB569;
}

.comment-respond {
    margin-top: 3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    margin-bottom: 1rem;
}

.comment-form textarea {
    min-height: 150px;
}

.comment-form input[type="submit"] {
    background: #8FB569;
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: #7a9d58;
}

/* ==========================================================================
   404 & Search Styling
   ========================================================================== */

.error-404,
.no-results {
    text-align: center;
    padding: 3rem 0;
}

.error-404 .page-header,
.no-results .page-header {
    margin-bottom: 2rem;
}

.helpful-links ul {
    list-style: none;
    padding: 0;
}

.helpful-links li {
    margin-bottom: 0.5rem;
}

.helpful-links a {
    color: #8FB569;
    font-size: 1.1rem;
}

.helpful-links a:hover {
    text-decoration: underline;
}

/* Search Form */
.search-form {
    display: flex;
    max-width: 500px;
    margin: 2rem auto;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-form input[type="submit"] {
    padding: 0.75rem 1.5rem;
    background: #8FB569;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-form input[type="submit"]:hover {
    background: #7a9d58;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
