/*
Theme Name: CabPartner
Theme URI: https://cabpartner.in
Author: CabPartner.in
Author URI: https://cabpartner.in
Description: Custom WordPress theme for CabPartner.in - India's taxi driver community platform. Includes driver job listings, driver requirement postings managed from a real database, a categorized blog, and lead-capturing forms (registration, post requirement, contact) that save submissions to the WordPress database and email the site admin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cabpartner
*/

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

:root {
    --primary: #0B3D91;
    --primary-dark: #082E6E;
    --secondary: #00A8E8;
    --secondary-light: #E6F6FE;
    --cta: #FF8C00;
    --cta-hover: #E67A00;
    --bg: #F7F9FC;
    --white: #FFFFFF;
    --gray-100: #F0F2F5;
    --gray-200: #E4E7EC;
    --gray-300: #CBD0D8;
    --gray-400: #9BA3B5;
    --gray-500: #6B7A8F;
    --gray-600: #4A5A6F;
    --gray-700: #2D3748;
    --gray-800: #1A202C;
    --shadow: 0 4px 24px rgba(11, 61, 145, 0.08);
    --shadow-hover: 0 8px 40px rgba(11, 61, 145, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--gray-700);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Accessibility: skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: var(--white);
    padding: 10px 16px;
    z-index: 10000;
}
.skip-link:focus { left: 10px; top: 10px; }
.screen-reader-text {
    position: absolute !important;
    left: -9999px;
    width: 1px; height: 1px; overflow: hidden;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: var(--font);
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(11, 61, 145, 0.3); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: #0092CC; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 168, 232, 0.3); }
.btn-cta { background: var(--cta); color: var(--white); }
.btn-cta:hover { background: var(--cta-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 140, 0, 0.35); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--gray-100); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.7; cursor: not-allowed; }

/* ===== HEADER / NAV ===== */
.header {
    background: var(--white);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--secondary);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.logo span { color: var(--secondary); }
.logo svg { flex-shrink: 0; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--primary); border-radius: 3px; transition: var(--transition); }

.nav-menu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; list-style: none; }
.nav-menu li { list-style: none; }
.nav-menu a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-600);
    transition: var(--transition);
    position: relative;
}
.nav-menu a:hover, .nav-menu li.current-menu-item > a { color: var(--primary); background: var(--gray-100); }
.nav-menu li.current-menu-item > a::after {
    content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px; background: var(--secondary); border-radius: 3px;
}
.nav-cta a, a.nav-cta { background: var(--cta) !important; color: var(--white) !important; padding: 8px 20px !important; border-radius: var(--radius-sm) !important; }
.nav-cta a:hover, a.nav-cta:hover { background: var(--cta-hover) !important; color: var(--white) !important; transform: translateY(-2px); }

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0B3D91 60%, var(--secondary) 100%);
    color: var(--white);
    padding: 60px 0 70px;
    position: relative;
    overflow: hidden;
}
.hero::after { content: ''; position: absolute; bottom: -60px; right: -60px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, 0.04); }
.hero::before { content: ''; position: absolute; top: -100px; left: -100px; width: 400px; height: 400px; border-radius: 50%; background: rgba(255, 255, 255, 0.03); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.hero-content h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero-content h1 .highlight { color: var(--cta); }
.hero-content p { font-size: 1.2rem; opacity: 0.9; max-width: 520px; margin-bottom: 28px; line-height: 1.7; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(8px); padding: 28px 24px; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, 0.1); }
.hero-stats .stat { text-align: center; }
.hero-stats .stat-number { font-size: 2rem; font-weight: 800; color: var(--cta); display: block; }
.hero-stats .stat-label { font-size: 0.9rem; opacity: 0.8; }

/* ===== SECTION HEADERS ===== */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.section-header p { color: var(--gray-500); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-header .badge { display: inline-block; background: var(--secondary-light); color: var(--secondary); font-size: 0.8rem; font-weight: 600; padding: 4px 16px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }

/* ===== CARDS ===== */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; transition: var(--transition); border: 1px solid var(--gray-200); }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.empty-state { text-align: center; color: var(--gray-500); padding: 30px; grid-column: 1/-1; }

/* ===== JOB CARDS ===== */
.job-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); border-left: 4px solid var(--secondary); transition: var(--transition); }
.job-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.job-card .job-title { font-size: 1.15rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.job-card .job-meta { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 0.9rem; color: var(--gray-500); margin-bottom: 12px; }
.job-card .job-meta span { display: flex; align-items: center; gap: 4px; }
.job-card .job-desc { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 14px; }
.job-card .job-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 14px; border-top: 1px solid var(--gray-200); }

/* ===== CITY CHIPS ===== */
.city-chip { display: inline-block; background: var(--white); padding: 10px 22px; border-radius: 30px; font-weight: 600; color: var(--primary); box-shadow: var(--shadow); border: 1px solid var(--gray-200); transition: var(--transition); font-size: 0.95rem; }
.city-chip:hover { background: var(--primary); color: var(--white); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.city-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ===== BENEFITS ===== */
.benefit-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--secondary-light); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 14px; color: var(--secondary); }
.benefit-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.benefit-card p { color: var(--gray-500); font-size: 0.95rem; }

/* ===== BLOG CARDS ===== */
.blog-card .blog-category { display: inline-block; background: var(--secondary-light); color: var(--secondary); font-size: 0.75rem; font-weight: 600; padding: 2px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 8px; }
.blog-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.blog-card h3 a { color: inherit; }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card p { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 10px; }
.blog-card .blog-meta { font-size: 0.8rem; color: var(--gray-400); }

/* ===== FORMS ===== */
.form-container { max-width: 720px; margin: 0 auto; background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.form-container h2 { font-size: 1.6rem; font-weight: 700; color: var(--gray-800); margin-bottom: 6px; }
.form-container .form-subtitle { color: var(--gray-500); margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--gray-700); margin-bottom: 4px; }
.form-group label .required { color: #E53E3E; margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
    font-size: 1rem; font-family: var(--font); transition: var(--transition); background: var(--white); color: var(--gray-700);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.12);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* form notices */
.form-notice { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; font-size: 0.95rem; }
.form-notice-success { background: #E6FAF0; color: #057A55; border: 1px solid #A6F0C6; }
.form-notice-error { background: #FDECEC; color: #C53030; border: 1px solid #F8B4B4; }
.form-notice-pending { background: var(--secondary-light); color: var(--primary); border: 1px solid #BCE3F8; }

/* ===== BLOG FILTER ===== */
.blog-category-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; justify-content: center; }
.blog-category-filter .filter-btn {
    display: inline-block; padding: 8px 20px; border-radius: 30px; border: 2px solid var(--gray-200);
    background: var(--white); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: var(--transition); color: var(--gray-600);
}
.blog-category-filter .filter-btn:hover, .blog-category-filter .filter-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-block; padding: 8px 16px; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-600); font-weight: 600; font-size: 0.9rem; }
.pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination a:hover { background: var(--gray-100); }

/* ===== SINGLE POST ===== */
.single-post-wrap { max-width: 760px; margin: 0 auto; background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.single-post-wrap h1 { font-size: 2rem; color: var(--gray-800); margin: 10px 0 14px; }
.single-post-wrap .single-post-content { color: var(--gray-700); font-size: 1.02rem; }
.single-post-wrap .single-post-content p { margin-bottom: 16px; }
.single-post-wrap .single-post-content h2, .single-post-wrap .single-post-content h3 { color: var(--gray-800); margin: 24px 0 10px; }
.single-post-wrap .single-post-content img { border-radius: var(--radius-sm); margin: 14px 0; }
.single-post-wrap .single-post-content ul, .single-post-wrap .single-post-content ol { margin: 0 0 16px 22px; }

/* ===== STATIC PAGE CONTENT ===== */
.page-content-wrap { max-width: 800px; margin: 0 auto; background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.page-content-wrap h1 { font-size: 1.8rem; color: var(--gray-800); margin-bottom: 16px; }
.page-content-wrap .page-body h2, .page-content-wrap .page-body h3 { color: var(--primary); margin: 20px 0 10px; }
.page-content-wrap .page-body p { color: var(--gray-600); margin-bottom: 16px; }
.page-content-wrap .page-body ul { color: var(--gray-600); padding-left: 20px; margin-bottom: 16px; }

/* ===== FOOTER ===== */
.footer { background: var(--gray-800); color: var(--gray-300); padding: 50px 0 20px; margin-top: auto; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-brand h3 { color: var(--white); font-size: 1.4rem; margin-bottom: 6px; }
.footer-brand h3 span { color: var(--secondary); }
.footer-brand p { font-size: 0.95rem; max-width: 320px; opacity: 0.8; }
.footer-links h4 { color: var(--white); font-size: 1rem; margin-bottom: 12px; }
.footer-links a { display: block; padding: 4px 0; font-size: 0.9rem; opacity: 0.75; transition: var(--transition); }
.footer-links a:hover { opacity: 1; color: var(--secondary); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; opacity: 0.6; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.85rem; color: var(--gray-500); padding: 16px 0 8px; }
.breadcrumbs a { color: var(--secondary); }
.breadcrumbs a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-stats { max-width: 500px; margin: 0 auto; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 16px 0 8px; gap: 4px; border-top: 1px solid var(--gray-200); margin-top: 10px; }
    .nav-menu.open { display: flex; }
    .nav-menu a { padding: 10px 14px; text-align: center; }
    .nav-menu li.current-menu-item > a::after { display: none; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .hero-stats { grid-template-columns: 1fr 1fr 1fr; padding: 20px 16px; }
    .hero-stats .stat-number { font-size: 1.5rem; }
    .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-container, .page-content-wrap, .single-post-wrap { padding: 24px 18px; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .section-header h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
    .hero-stats { grid-template-columns: 1fr; gap: 12px; }
    .hero-content h1 { font-size: 1.6rem; }
    .btn { width: 100%; justify-content: center; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.py-40 { padding-top: 40px; padding-bottom: 40px; }
.py-60 { padding-top: 60px; padding-bottom: 60px; }
.tag { display: inline-block; background: var(--gray-100); color: var(--gray-600); padding: 2px 12px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.status-pending-flag { display: inline-block; background: #FFF4E5; color: var(--cta); padding: 2px 10px; border-radius: 10px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; margin-left: 8px; }

/* scroll to top */
.scroll-top {
    position: fixed; bottom: 30px; right: 30px; background: var(--primary); color: var(--white);
    width: 48px; height: 48px; border-radius: 50%; border: none; font-size: 1.4rem; cursor: pointer;
    box-shadow: 0 4px 20px rgba(11, 61, 145, 0.3); transition: var(--transition); opacity: 0; visibility: hidden; z-index: 999;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-4px); background: var(--primary-dark); }
