/*
Theme Name: Musad
Theme URI: https://github.com/musad/musad-theme
Author: Musad
Description: A lightweight business and portfolio WordPress theme built with Bootstrap 5. No page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: musad
Tags: portfolio, business, bootstrap, custom-logo, custom-menu, post-formats, threaded-comments
*/

/* =========================================================
   Theme Base Styles
   Bootstrap 5 handles the heavy lifting. These styles
   layer on theme-specific design decisions.
   ========================================================= */

:root {
    --musad-primary:        #0d6efd;
    --musad-dark:           #111827;
    --musad-gray:           #6b7280;
    --musad-light-bg:       #f8f9fa;
    --musad-border:         #e5e7eb;
    --musad-radius:         0.5rem;
    --musad-transition:     0.2s ease;
    --musad-main-padding-y: 4rem;

    /* Reset WordPress block editor root padding so it doesn't
       add extra space on pages that use the_content(). */
    --wp--style--root--padding-top:    0px;
    --wp--style--root--padding-bottom: 0px;
    --wp--style--root--padding-left:   0px;
    --wp--style--root--padding-right:  0px;
}

/* ----- Page content area — consistent across all templates ----- */
/* ID selector naturally overrides Bootstrap's .py-5 class         */
main#primary {
    padding-top:    var(--musad-main-padding-y);
    padding-bottom: var(--musad-main-padding-y);
}

/* Reset block editor's default block-gap/content spacing so pages
   using the_content() don't receive extra top/bottom spacing.      */
.wp-site-blocks {
    padding-top:    0 !important;
    padding-bottom: 0 !important;
}

.entry-content .wp-block-group,
.entry-content .wp-block-cover {
    margin-top:    0;
    margin-bottom: 0;
}

/* ----- Global ----- */
body {
    font-family: 'Bitter', Georgia, serif;
    color: #1f2937;
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6,
.btn,
.site-name {
    font-family: 'Open Sans', system-ui, sans-serif;
}

a {
    color: var(--musad-primary);
    text-decoration: none;
    transition: color var(--musad-transition);
}

a:hover {
    color: #0a58ca;
}

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

/* ----- Layout ----- */
.site-content {
    min-height: calc(100vh - 140px);
}

/* ----- Top Contact Bar ----- */
.topbar {
    background-color: #1a7be4;
    font-size: 0.8125rem;
    padding: 0.45rem 0;
}

.topbar-inner {
    min-height: 1.5rem;
}

.topbar-item {
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.topbar-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

a.topbar-item {
    text-decoration: none;
    transition: color var(--musad-transition);
}

a.topbar-item:hover {
    color: #fff;
}

@media (max-width: 575.98px) {
    .topbar-inner {
        justify-content: center !important;
    }
}

/* ----- Header / Navbar ----- */
.site-header {
    border-bottom: 1px solid var(--musad-border);
    background: #fff;
}

.navbar-logo-img {
    max-height: 48px;
    width: auto;
    display: block;
}

.navbar-nav .nav-link {
    font-family: 'Bitter', Georgia, serif;
    font-weight: 500;
    color: #374151;
    padding-inline: 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--musad-primary);
}

.navbar-nav .nav-link.active {
    color: var(--musad-primary);
    position: relative;
}

/* Underline indicator for the active nav item (desktop only) */
@media (min-width: 992px) {
    .navbar-nav .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 1rem;
        right: 1rem;
        height: 2px;
        background-color: var(--musad-primary);
        border-radius: 2px;
    }
}

/* ----- Hero (front page) ----- */
.hero-section {
    padding: 7rem 0 6rem;
    background: linear-gradient(135deg, #0d1b2e 0%, #1a4a7a 60%, #1a7be4 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.hero-headline {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.18;
    color: #fff;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.78);
    max-width: 620px;
    margin-inline: auto;
    line-height: 1.7;
}

.btn-hero-primary {
    background-color: #1a7be4;
    border-color: #1a7be4;
    color: #fff;
    font-weight: 600;
    transition: background-color var(--musad-transition), border-color var(--musad-transition), transform var(--musad-transition);
}

.btn-hero-primary:hover {
    background-color: #1568c4;
    border-color: #1568c4;
    color: #fff;
    transform: translateY(-2px);
}

.btn-hero-outline {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    font-weight: 600;
    transition: border-color var(--musad-transition), background-color var(--musad-transition), transform var(--musad-transition);
}

.btn-hero-outline:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

/* ----- Intro Section (front page) ----- */
.intro-section {
    padding: 4rem 0;
    background: #fff;
    border-bottom: 1px solid var(--musad-border);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--musad-dark);
    margin: 0;
}

/* ----- Core Services Section (front page) ----- */
.core-services-section {
    padding: 5rem 0;
    background: var(--musad-light-bg);
}

.core-services-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--musad-dark);
    margin-bottom: 2.5rem;
    text-align: center;
}

.core-services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
    max-width: 780px;
    margin-inline: auto;
}

.core-services-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--musad-dark);
    background: #fff;
    border: 1px solid var(--musad-border);
    border-radius: var(--musad-radius);
    padding: 0.9rem 1.25rem;
}

.cs-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--musad-dark);
}

@media (max-width: 575.98px) {
    .core-services-list {
        grid-template-columns: 1fr;
    }
}

/* ----- Featured Projects Section (front page) ----- */
.featured-projects-section {
    padding: 5rem 0;
    background: #fff;
}

.featured-projects-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--musad-dark);
    margin-bottom: 2.5rem;
    text-align: center;
}

.fp-card {
    border: 1px solid var(--musad-border);
    border-radius: var(--musad-radius);
    padding: 2rem 1.75rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow var(--musad-transition), transform var(--musad-transition);
    background: #fff;
}

.fp-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.fp-card-number {
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #e5e7eb;
    line-height: 1;
    margin-bottom: 0.75rem;
    letter-spacing: -0.04em;
}

.fp-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--musad-dark);
    margin-bottom: 0.9rem;
    line-height: 1.45;
}

.fp-card-client {
    font-size: 0.8125rem;
    color: var(--musad-gray);
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.fp-label {
    display: block;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #1a7be4;
    margin-bottom: 0.15rem;
}

.fp-card-impact {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex: 1;
}

.fp-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a7be4;
    text-decoration: none;
    margin-top: auto;
    transition: gap var(--musad-transition), color var(--musad-transition);
}

.fp-card-link:hover {
    color: #1568c4;
    gap: 0.6rem;
}

.fp-placeholder-link {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ----- Why Choose Us Section (front page) ----- */
.why-us-section {
    padding: 5rem 0;
    background: var(--musad-light-bg);
    border-top: 1px solid var(--musad-border);
}

.why-us-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--musad-dark);
    margin-bottom: 2rem;
    text-align: center;
}

.why-us-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.why-us-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    color: var(--musad-dark);
    background: #fff;
    border: 1px solid var(--musad-border);
    border-radius: var(--musad-radius);
    padding: 1rem 1.4rem;
    line-height: 1.5;
}

.why-us-check {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--musad-dark);
}

/* ----- Section ----- */
.section-title {
    font-weight: 700;
    color: var(--musad-dark);
}

/* ----- Single Project Gallery ----- */
.project-gallery-section {
    margin-bottom: 3rem;
}

.project-gallery-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--musad-dark);
    margin-bottom: 1.25rem;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.project-gallery-item {
    display: block;
    border-radius: var(--musad-radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.project-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--musad-transition);
}

.project-gallery-item:hover .project-gallery-thumb {
    transform: scale(1.04);
}

/* ----- Projects Archive List ----- */
.project-list {
    display: flex;
    flex-direction: column;
}

.project-list-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--musad-border);
}

.project-list-item:first-child {
    border-top: 1px solid var(--musad-border);
}

.project-list-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

.project-list-title a {
    color: var(--musad-dark);
    text-decoration: none;
    transition: color var(--musad-transition);
}

.project-list-title a:hover {
    color: var(--musad-primary);
}

.project-list-location {
    font-size: 0.8125rem;
    color: var(--musad-gray);
    margin: 0;
}

.project-list-overview {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.65;
    margin: 0.25rem 0 0.75rem;
}

.project-list-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--musad-primary);
    text-decoration: none;
    border: 1.5px solid var(--musad-primary);
    border-radius: var(--musad-radius);
    padding: 0.4rem 0.9rem;
    transition: background-color var(--musad-transition), color var(--musad-transition);
}

.project-list-link svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.project-list-link:hover {
    background-color: var(--musad-primary);
    color: #fff;
}

/* ----- Single Project Meta Sidebar ----- */
.project-meta-card {
    background: var(--musad-light-bg);
    border: 1px solid var(--musad-border);
    border-radius: var(--musad-radius);
    padding: 1.5rem;
    position: sticky;
    top: 1.5rem;
}

.project-meta-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.project-meta-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--musad-border);
}

.project-meta-item:first-child {
    padding-top: 0;
}

.project-meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-meta-item dt {
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--musad-gray);
    margin-bottom: 0.2rem;
}

.project-meta-item dd {
    font-size: 0.9375rem;
    color: var(--musad-dark);
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

/* ----- Project Cards ----- */
.project-card {
    border: 1px solid var(--musad-border);
    border-radius: var(--musad-radius);
    overflow: hidden;
    transition: box-shadow var(--musad-transition), transform var(--musad-transition);
    background: #fff;
}

.project-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.09);
    transform: translateY(-3px);
}

.project-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.project-card .card-title a {
    color: var(--musad-dark);
    font-weight: 600;
}

.project-card .card-title a:hover {
    color: var(--musad-primary);
}

/* ----- Team Members ----- */
.team-list {
    display: flex;
    flex-direction: column;
}

.team-member {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--musad-border);
    overflow: hidden;
}

.team-member:first-child {
    border-top: 1px solid var(--musad-border);
}

.member-photo {
    float: right;
    margin-left: 2.5rem;
    margin-bottom: 2rem;
    width: 220px;
    height: 260px;
    object-fit: cover;
    border-radius: var(--musad-radius);
    display: block;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--musad-dark);
    margin-bottom: 0.2rem;
}

.member-designation {
    font-size: 1rem;
    font-weight: 600;
    color: var(--musad-primary);
    margin-bottom: 1rem;
}

.member-details {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #4b5563;
}

.member-details p:last-child {
    margin-bottom: 0;
}

@media (max-width: 575px) {
    .member-photo {
        float: none;
        margin-left: 0;
        margin-bottom: 1.25rem;
        width: 100%;
        height: 240px;
    }
}

/* ----- Post / Page ----- */
.post-header .post-title {
    font-weight: 800;
    color: var(--musad-dark);
}

.post-meta {
    font-size: .875rem;
    color: var(--musad-gray);
}

.post-meta a {
    color: var(--musad-gray);
}

.post-meta a:hover {
    color: var(--musad-primary);
}

.entry-content {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: .75rem;
    font-weight: 700;
    color: var(--musad-dark);
}

.entry-content p { margin-bottom: 1.25rem; }

.entry-content blockquote {
    border-left: 4px solid var(--musad-primary);
    padding-left: 1.25rem;
    color: var(--musad-gray);
    font-style: italic;
}

/* ----- Featured Image ----- */
.post-thumbnail img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--musad-radius);
}

/* ----- Pagination ----- */
.pagination .page-link {
    color: var(--musad-primary);
    border-color: var(--musad-border);
}

.pagination .page-item.active .page-link {
    background-color: var(--musad-primary);
    border-color: var(--musad-primary);
}

/* ----- Footer ----- */
.site-footer {
    background: var(--musad-dark);
    color: #9ca3af;
    padding: 4rem 0 0;
}

.site-footer a {
    color: #9ca3af;
    text-decoration: none;
    transition: color var(--musad-transition);
}

.site-footer a:hover {
    color: #fff;
}

.footer-heading {
    font-family: 'Open Sans', system-ui, sans-serif;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 1.25rem;
}

.footer-intro {
    font-size: 0.875rem;
    line-height: 1.8;
    color: #9ca3af;
    margin: 0;
}

/* Contact list */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.6;
}

.footer-contact-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: #9ca3af;
}

/* Quick links nav */
.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-nav-list li a {
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer-nav-list li a:hover {
    color: #fff;
}

@media (min-width: 992px) {
    .footer-nav-list--right {
        align-items: flex-end;
    }
}

/* Copyright bar */
.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0;
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
}

.footer-copy a {
    color: #9ca3af;
}

.footer-copy a:hover {
    color: #fff;
}

/* ----- 404 ----- */
.error-404 {
    padding: 6rem 0;
    text-align: center;
}

.error-404 .error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--musad-border);
    line-height: 1;
}

/* ----- Utility ----- */
.text-muted { color: var(--musad-gray) !important; }
