/* ============================
   AP ASTROLOGER - SHARED CSS
   ============================ */

/* Fix: sections hidden under sticky navbar when jumping via anchor links */
html {
    scroll-padding-top: 72px;
}
section, #home, #about, #services, #why-us, #gallery, #pricing, #blog, #contact {
    scroll-margin-top: 72px;
}

:root {
    --primary: #0a192f;
    --secondary: #d4af37;
    --dropdown-bg: #2a2a2a;
    --dropdown-hover: #ff7700;
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-light: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { background-color: var(--bg-light); color: var(--text-dark); font-family: 'Poppins', sans-serif; line-height: 1.7; }
h1, h2, h3, .logo { font-family: 'Playfair Display', serif; }

/* ====== NAVBAR ====== */
.navbar { background-color: var(--primary); padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; position: fixed; top: 0; left: 0; right: 0; z-index: 1000; border-bottom: 3px solid var(--secondary); box-shadow: 0 4px 6px rgba(0,0,0,0.15); }
body { padding-top: 72px; }
.logo { color: var(--secondary); font-size: 24px; font-weight: 600; text-decoration: none; letter-spacing: 1px; }

.nav-links { list-style: none; display: flex; gap: 5px; align-items: center; }
.nav-links > li { position: relative; }
.nav-links > li > a { color: var(--text-light); text-decoration: none; font-size: 14px; text-transform: uppercase; transition: 0.3s; font-weight: 400; letter-spacing: 0.5px; padding: 10px 14px; display: block; }
.nav-links > li > a:hover, .nav-links > li:hover > a { background-color: var(--dropdown-hover); color: #fff; }

/* Dropdown */
.dropdown { position: absolute; top: 100%; left: 0; background-color: var(--dropdown-bg); min-width: 230px; list-style: none; display: none; flex-direction: column; box-shadow: 0 8px 20px rgba(0,0,0,0.3); border-top: 2px solid var(--dropdown-hover); z-index: 999; }
.nav-links > li:hover > .dropdown { display: flex; }
.dropdown li { position: relative; border-bottom: 1px solid #3a3a3a; }
.dropdown li:last-child { border-bottom: none; }
.dropdown li a { display: flex; justify-content: space-between; align-items: center; color: #ddd; text-decoration: none; padding: 11px 18px; font-size: 13.5px; transition: 0.2s; }
.dropdown li:hover > a { background-color: var(--dropdown-hover); color: #fff; }
.has-submenu > a::after { content: '❯'; font-size: 10px; opacity: 0.7; }

/* Sub-dropdown */
.sub-dropdown { position: absolute; top: 0; left: 100%; background-color: var(--dropdown-bg); min-width: 230px; list-style: none; display: none; flex-direction: column; box-shadow: 8px 8px 20px rgba(0,0,0,0.3); border-top: 2px solid var(--dropdown-hover); z-index: 1000; }
.has-submenu:hover > .sub-dropdown { display: flex; }
.sub-dropdown li { border-bottom: 1px solid #3a3a3a; }
.sub-dropdown li:last-child { border-bottom: none; }
.sub-dropdown li a { color: #ddd; padding: 10px 18px; font-size: 13px; display: block; text-decoration: none; transition: 0.2s; }
.sub-dropdown li a:hover { background-color: var(--dropdown-hover); color: #fff; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; background: none; border: none; padding: 5px; }
.hamburger span { display: block; width: 25px; height: 2px; background: var(--secondary); transition: 0.3s; border-radius: 2px; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ====== FOOTER ====== */
footer { background-color: var(--primary); color: var(--text-light); padding: 50px 5% 25px; text-align: center; }
.social-icons { margin-bottom: 25px; }
.social-icons a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: rgba(255,255,255,0.08); color: var(--secondary); font-size: 18px; margin: 0 8px; border-radius: 50%; transition: 0.3s; text-decoration: none; }
.social-icons a:hover { background: var(--secondary); color: var(--primary); transform: translateY(-3px); }
.footer-links { margin: 20px 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: #a0aec0; text-decoration: none; font-size: 14px; transition: 0.3s; }
.footer-links a:hover { color: var(--secondary); }
.copyright { color: #718096; font-size: 13px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 18px; margin-top: 18px; }

/* ====== WHATSAPP ====== */
.whatsapp-float { position: fixed; bottom: 28px; right: 28px; background-color: #25d366; color: white; border-radius: 50px; padding: 12px 22px; display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); z-index: 9999; transition: transform 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.05); }
.whatsapp-float svg { width: 22px; height: 22px; fill: white; }

/* ====== SECTION COMMON ====== */
section { padding: 80px 5%; }
.section-title { text-align: center; color: var(--primary); font-size: 34px; margin-bottom: 50px; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); width: 70px; height: 3px; background: var(--secondary); }

/* ====== PAGE HEADER (sub-pages) ====== */
.page-header { background: linear-gradient(135deg, var(--primary) 0%, #112240 100%); padding: 60px 5%; text-align: center; color: var(--text-light); border-bottom: 4px solid var(--secondary); }
.page-header h1 { font-size: 40px; color: var(--secondary); margin-bottom: 10px; }
.page-header p { font-size: 16px; color: #a0aec0; max-width: 600px; margin: auto; }

/* ====== CONTENT CARDS (sub-pages) ====== */
.content-section { padding: 60px 5%; max-width: 1100px; margin: auto; }
.card { background: #fff; padding: 40px; border-radius: 15px; box-shadow: 0 5px 25px rgba(0,0,0,0.06); margin-bottom: 35px; border-left: 5px solid var(--secondary); }
.card h2 { color: var(--primary); font-size: 26px; margin-bottom: 18px; text-transform: uppercase; border-bottom: 2px solid #eee; padding-bottom: 12px; }
.card h3 { color: var(--secondary); font-size: 20px; margin: 20px 0 12px; }
.card p { margin-bottom: 18px; font-size: 16px; color: #444; text-align: justify; line-height: 1.85; }
.card ul, .card ol { padding-left: 22px; color: #444; font-size: 15.5px; line-height: 2; }
.card ul li, .card ol li { margin-bottom: 8px; }

/* Grid layout inside cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: start; }
.img-box { border-radius: 10px; overflow: hidden; border: 3px solid #eee; }
.img-box img { width: 100%; height: auto; display: block; }

/* Position items (Vastu Mandala page) */
.pos-item { background: #fdfbf7; padding: 18px 20px; border-radius: 8px; margin-bottom: 12px; border-left: 3px solid var(--dropdown-hover); }
.pos-item strong { color: var(--dropdown-hover); font-size: 17px; display: block; margin-bottom: 4px; }

/* Service page styles */
.service-intro { background: linear-gradient(135deg, #fdfbf7, #fff); border-radius: 15px; padding: 35px; margin-bottom: 30px; border: 1px solid #e8e0cc; }
.service-intro h3 { color: var(--primary); font-size: 22px; margin-bottom: 15px; }
.service-highlight { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 25px 0; }
.highlight-box { background: var(--primary); color: #fff; padding: 20px; border-radius: 10px; text-align: center; }
.highlight-box i { font-size: 30px; color: var(--secondary); margin-bottom: 10px; display: block; }
.highlight-box h4 { font-size: 15px; color: var(--secondary); margin-bottom: 6px; }
.highlight-box p { font-size: 13px; color: #a0aec0; }
.cta-box { background: linear-gradient(135deg, var(--primary), #112240); border-radius: 12px; padding: 30px; text-align: center; margin-top: 30px; color: #fff; }
.cta-box h3 { color: var(--secondary); margin-bottom: 12px; font-size: 22px; }
.cta-box p { color: #a0aec0; margin-bottom: 20px; }
.btn { background-color: var(--secondary); color: var(--primary); padding: 13px 30px; text-decoration: none; font-weight: 600; border-radius: 30px; font-size: 16px; transition: all 0.3s ease; display: inline-block; box-shadow: 0 4px 15px rgba(212,175,55,0.3); }
.btn:hover { background-color: #fff; transform: translateY(-2px); }

/* Tips list */
.tips-list { padding-left: 20px; color: #333; line-height: 1.9; font-size: 15.5px; }
.tips-list li { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed #eee; }
.tips-list li:last-child { border-bottom: none; }

/* Benefits grid */
.benefit-list h3 { color: var(--dropdown-hover); font-size: 20px; margin: 22px 0 12px; }
.benefit-list ol { padding-left: 20px; color: #444; line-height: 1.9; font-size: 15.5px; }
.benefit-list ol li { margin-bottom: 8px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        border-top: 2px solid var(--secondary);
        padding: 10px 0;
        gap: 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    .nav-links.open { display: flex; }
    .nav-links > li { width: 100%; }
    .nav-links > li > a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 14px; }
    .dropdown { position: static; display: none; box-shadow: none; border-top: none; background: rgba(0,0,0,0.2); min-width: 100%; }
    .nav-links > li.open > .dropdown { display: flex; }
    .dropdown li a { padding-left: 35px; font-size: 13px; }
    .sub-dropdown { position: static; display: none; box-shadow: none; border-top: none; background: rgba(0,0,0,0.15); left: 0; min-width: 100%; }
    .has-submenu.open > .sub-dropdown { display: flex; }
    .sub-dropdown li a { padding-left: 50px; }
    .has-submenu > a::after { content: '▾'; }
    .page-header h1 { font-size: 26px; }
    .page-header p { font-size: 14px; }
    .grid-2 { grid-template-columns: 1fr; gap: 20px; }
    .card { padding: 22px 16px; }
    .card h2 { font-size: 20px; }
    .card h3 { font-size: 17px; }
    .card p, .card ul, .card ol { font-size: 14px; }
    .content-section { padding: 30px 4%; }
    .whatsapp-float span { display: none; }
    .whatsapp-float { padding: 14px; border-radius: 50%; }
    .service-highlight { grid-template-columns: 1fr 1fr; gap: 12px; }
    .highlight-box { padding: 15px 10px; }
    .highlight-box i { font-size: 24px; }
    .section-title { font-size: 24px; margin-bottom: 30px; }
    section { padding: 50px 4%; }
    footer { padding: 35px 5%; }
    .footer-links { flex-wrap: wrap; gap: 10px; justify-content: center; }
    .blog-hero h1 { font-size: 22px !important; }
    .blog-body h2 { font-size: 20px !important; }
    .direction-grid, .colour-grid { grid-template-columns: 1fr 1fr !important; }
    .faq-section-wrap { padding: 0 4%; }
    .faq-page-hero h1 { font-size: 24px !important; }
}

@media (max-width: 480px) {
    .page-header h1 { font-size: 22px; }
    .service-highlight { grid-template-columns: 1fr; }
    .direction-grid, .colour-grid { grid-template-columns: 1fr !important; }
    .card { padding: 18px 14px; }
    .btn { font-size: 14px; padding: 11px 22px; }
}


/* ======================================
   MOBILE FRIENDLY IMPROVEMENTS
   ====================================== */

/* Touch targets — min 44px for all buttons/links */
.btn, .whatsapp-cta, a.btn, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Better tap highlight */
a, button { -webkit-tap-highlight-color: rgba(212,175,55,0.2); }

/* No horizontal overflow */
body, html { overflow-x: hidden; max-width: 100vw; }

/* Images always responsive */
img { max-width: 100%; height: auto; }

/* ---- TABLET (768px) ---- */
@media (max-width: 768px) {
    /* Navbar */
    .navbar { padding: 0 4%; }
    .logo { font-size: 18px; }

    /* Blog preview grid */
    .blog-preview-grid { grid-template-columns: 1fr !important; gap: 18px !important; }

    /* Why choose us */
    #why-us > div { grid-template-columns: 1fr 1fr !important; }

    /* Pricing tabs */
    .pricing-tabs { gap: 6px; }
    .ptab { padding: 8px 14px; font-size: 12px; }

    /* Stats — 2 column */
    .stats-grid { grid-template-columns: repeat(2,1fr); }

    /* Contact */
    .contact-grid { grid-template-columns: 1fr !important; }

    /* Footer */
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 10px; }
    footer { text-align: center; }
    .social-icons { justify-content: center; }

    /* Page hero */
    .page-header { padding: 60px 4% 40px !important; }
    .page-header h1 { font-size: 24px !important; }

    /* Content cards */
    .grid-2 { grid-template-columns: 1fr !important; }
    .card { padding: 20px 16px !important; }
}

/* ---- MOBILE (480px) ---- */
@media (max-width: 480px) {
    /* Hero section */
    .hero { padding: 80px 4% 60px !important; }

    /* Why us — single column on small mobile */
    #why-us > div { grid-template-columns: 1fr !important; }

    /* Buttons full width on mobile */
    .hero-btns { flex-direction: column; align-items: center; }
    .hero-btns a { width: 100%; max-width: 280px; text-align: center; }

    /* Blog preview cards */
    .bp-card-img-placeholder { height: 140px !important; }

    /* Gallery — single column */
    .gallery-grid { grid-template-columns: 1fr !important; }
    .gallery-item { height: 220px !important; }

    /* Pricing */
    .pricing-tabs { justify-content: center; }
    .ptab { font-size: 11px; padding: 7px 10px; }

    /* Section titles */
    .section-title { font-size: 22px !important; }

    /* Service cards */
    .services-grid { grid-template-columns: 1fr !important; }

    /* About section */
    .about-grid { grid-template-columns: 1fr !important; }
    .about-img-container { height: 240px !important; }

    /* Contact form */
    .contact-form input,
    .contact-form select,
    .contact-form textarea { font-size: 16px; } /* Prevents iOS zoom on focus */

    /* Contact buttons */
    .contact-form > div { flex-direction: column !important; }
    .contact-form button { width: 100%; }

    /* Stats bar */
    .stats-grid { grid-template-columns: repeat(2,1fr); gap: 15px; }
    .stat-item h3 { font-size: 28px; }
    .stat-item p { font-size: 12px; }

    /* WhatsApp float — perfectly circular */
    .whatsapp-float { 
        width: 54px !important; 
        height: 54px !important; 
        padding: 0 !important;
        bottom: 20px !important;
        right: 16px !important;
        border-radius: 50% !important;
    }
    .whatsapp-float span { display: none !important; }

    /* Testimonials */
    .testi-card { width: 230px !important; padding: 18px 14px !important; }
    .testi-text { font-size: 12px !important; }

    /* FAQ */
    .faq-question h4 { font-size: 14px !important; }

    /* Reduce section padding */
    section { padding: 45px 4% !important; }
}

/* ---- SMALL MOBILE (375px) ---- */
@media (max-width: 375px) {
    .hero h1 { font-size: 22px !important; }
    .logo { font-size: 16px; }
    .testi-card { width: 200px !important; }
    .stat-item h3 { font-size: 24px; }
    .section-title { font-size: 20px !important; }
    .price { font-size: 32px !important; }
    .btn { font-size: 13px; padding: 10px 18px; }
}

/* ---- LANDSCAPE MOBILE ---- */
@media (max-width: 768px) and (orientation: landscape) {
    .hero { padding: 60px 5% 40px !important; }
    .hero h1 { font-size: 24px !important; }
    .about-img-container { height: 200px !important; }
}
