/*
Theme Name: Apna Ghar Zameen
Theme URI: https://apnagharzameen.pk
Author: Apna Ghar Zameen Real Estate
Author URI: https://apnagharzameen.pk
Description: A premium, SEO-optimized WordPress theme for a modern real estate agency in Pakistan. Targets plots for sale in Pakistan, buy property in Pakistan, and real estate investment Pakistan.
Version: 2.0.0
Text Domain: apnaghar
Tags: real-estate, property, responsive, modern, seo, pakistan
*/

/* =============================================
   GLOBAL VARIABLES — Real Estate Design System
   ============================================= */
:root {
    --re-navy:         #0F2A1B;
    --re-gold:         #D4AF37;
    --re-gold-hover:   #C49D25;
    --re-light:        #F8FAFC;
    --re-gray:         #64748B;
    --text-main:       #1E293B;
    --border-color:    #E2E8F0;
    --shadow-re:       0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover:    0 20px 40px rgba(0,0,0,0.12);
    --radius-re:       12px;
    --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Legacy aliases (kept for backward compat) */
    --primary-blue:    var(--re-navy);
    --secondary-green: #006633;
    --accent-gold:     var(--re-gold);
    --bg-light:        var(--re-light);
    --bg-white-pure:   #FFFFFF;
    --text-muted:      var(--re-gray);
    --shadow-soft:     var(--shadow-re);
    --radius-md:       var(--radius-re);
    --radius-lg:       16px;
    --radius-full:     9999px;
    --transition-base: var(--transition);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--re-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--re-navy);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -1px; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.5px; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--re-gray);
    line-height: 1.7;
}

a { color: var(--re-gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--re-gold-hover); }

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

/* =============================================
   LAYOUT
   ============================================= */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 100px 0; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.text-center { text-align: center; }

/* =============================================
   BUTTONS — Premium RE Style
   ============================================= */
.btn, .btn-re {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    line-height: 1;
    white-space: nowrap;
}

.btn-solid, .btn-primary {
    background: var(--re-gold);
    color: #fff;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}
.btn-solid:hover, .btn-primary:hover {
    background: var(--re-gold-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
}

.btn-outline-white {
    border-color: rgba(255,255,255,0.7);
    color: white;
    background: transparent;
}
.btn-outline-white:hover {
    background: white;
    color: var(--re-navy);
    border-color: white;
}

.btn-outline {
    border-color: var(--re-navy);
    color: var(--re-navy);
    background: transparent;
}
.btn-outline:hover {
    background: var(--re-navy);
    color: white;
}

.btn-secondary {
    background: var(--re-navy);
    color: #fff;
}
.btn-secondary:hover {
    background: #1e293b;
    color: #fff;
    transform: translateY(-2px);
}

.btn-gold { background: var(--re-gold); color: #fff; }
.btn-gold:hover { background: var(--re-gold-hover); }

/* =============================================
   HEADER
   ============================================= */
.top-bar {
    background: var(--re-navy);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    padding: 8px 0;
}
.top-bar a { color: rgba(255,255,255,0.75); }
.top-bar a:hover { color: var(--re-gold); }

.site-header {
    background: #ffffff;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s;
}

.nav-menu { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav-menu a { color: var(--re-navy); font-weight: 600; font-size: 0.97rem; position: relative; }
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: var(--re-gold);
    transition: width 0.3s;
}
.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after { width: 100%; }
.nav-menu a:hover { color: var(--re-gold); }

.btn-header {
    background: var(--re-gold);
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}
.btn-header:hover { background: var(--re-gold-hover); color: #fff; transform: translateY(-1px); }

/* =============================================
   CARDS
   ============================================= */
.card {
    background: #fff;
    border-radius: var(--radius-re);
    padding: 2rem;
    box-shadow: var(--shadow-re);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.badge, .badge-green, .badge-blue {
    display: inline-flex;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.badge-green { background: rgba(0,102,51,0.08); color: #006633; }
.badge-blue  { background: rgba(212,175,55,0.12); color: var(--re-gold); }

/* =============================================
   SECTION HEADER UTILITY
   ============================================= */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--re-navy); color: rgba(255,255,255,0.8); }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: var(--re-gold) !important; }

/* =============================================
   FORMS
   ============================================= */
input, select, textarea {
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    width: 100%;
    font-size: 1rem;
    color: var(--re-navy);
    background: #f8fafc;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--re-gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
input::placeholder, textarea::placeholder { color: #94A3B8; }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: fadeInUp 0.7s ease forwards; }

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

/* ================================================================
   APNA GHAR ZAMEEN — FULL MOBILE RESPONSIVE FIX
   ================================================================ */

/* 1. Global Overflow & Container Fixes */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100vw; overflow-x: hidden; margin: 0; padding: 0; }
img, video, iframe, canvas { max-width: 100%; height: auto; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; box-sizing: border-box; }

/* 2. Fix Header / Logo / Sign-in on Mobile */
@media (max-width: 1024px) {
    .main-navigation .nav-menu { display: none !important; }
    .menu-toggle { display: block; }
}

@media (max-width: 991px) {
    .site-header { padding: 10px 0 !important; }
    .header-container { flex-direction: row !important; justify-content: space-between !important; align-items: center !important; flex-wrap: nowrap !important; }
    .site-logo { margin: 0 !important; max-width: 60% !important; }
    .main-navigation { width: auto !important; display: flex !important; justify-content: flex-end !important; }
    .nav-menu { display: none; }
    .top-bar { display: none !important; }
    
    /* Hide the huge buttons on mobile header to save space */
    .header-action-buttons { display: none !important; }
}

/* 3. Global Mobile Stack (Forces multi-columns to Single Column) */
@media (max-width: 768px) {
    /* Grids & Flexboxes */
    .grid-2, .grid-3, .grid-4, 
    .blog-layout, .article-grid, 
    .contact-grid, .form-row,
    .footer-main, .listings-grid,
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        display: grid !important;
        gap: 20px !important;
        width: 100% !important;
    }
    
    /* Fix Hero Sections & Typography */
    .hero-section, .blog-hero, .properties-hero, .contact-hero, .single-hero {
        padding: 40px 15px !important;
        text-align: center !important;
    }
    h1, .hero-title { font-size: 1.8rem !important; line-height: 1.3 !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    p { font-size: 1rem !important; line-height: 1.6 !important; }
    
    /* Buttons */
    .btn, .btn-re, .btn-solid, .btn-primary {
        width: 100% !important;
        max-width: 300px !important;
        margin: 10px auto !important;
        display: flex !important;
        justify-content: center !important;
        min-height: 48px !important;
    }
    .hero-buttons { flex-direction: column !important; align-items: center !important; }
    
    /* Fix Contact Page Cut-off */
    .contact-form-box, .contact-info-card, .article-card, .blog-card {
        padding: 20px 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 12px !important;
    }
    .info-item { gap: 12px !important; flex-wrap: wrap !important; }
    
    /* Fix Input Fields */
    input, select, textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px !important;
    }
    
    /* Remove weird margins that cause empty spaces */
    [style*="margin-top: 100px"], [style*="margin-top: 80px"] { margin-top: 30px !important; }
    [style*="margin-bottom: 80px"] { margin-bottom: 30px !important; }
    
    /* Fix Footer Layout */
    .site-footer { padding: 40px 15px 20px !important; }
    .site-footer > .container > div { grid-template-columns: 1fr !important; gap: 25px !important; text-align: left !important; }
}

/* 4. Extra Small Screens (iPhone SE, etc.) */
@media (max-width: 480px) {
    h1, .hero-title { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    .logo-text h1 { font-size: 1.2rem !important; }
    .btn, .btn-re, .btn-header { font-size: 0.95rem !important; }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}

:focus-visible {
    outline: 3px solid var(--re-gold);
    outline-offset: 3px;
}