/*
Theme Name: Call2Owner Custom Theme
Theme URI: https://call2owner.in/
Author: Call2Owner India
Author URI: https://call2owner.in/
Description: A modern, premium vehicle safety alert ecosystem and blogging theme for WordPress. Manage anonymous contact QR dashboards and write safety blogs seamlessly.
Version: 1.1.0
License: Apache-2.0
Text Domain: call2owner-theme
*/

/* --- Google Fonts Integration --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Core Color Tokens & Variables --- */
:root {
    --font-sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Outfit", sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-bg: #f8fafc;
    --color-card-bg: #ffffff;
    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #cbd5e1;
    --color-border-light: #e2e8f0;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

/* --- Base Reset & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-hover);
}

/* --- Layout Wrappers --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Premium Navigation Header --- */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.site-header .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo .logo-badge {
    width: 38px;
    height: 38px;
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    font-size: 14px;
}

.site-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-text);
}

.site-title span {
    color: var(--color-primary);
}

.site-tagline {
    font-size: 9px;
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -3px;
    font-weight: 600;
    display: block;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.main-navigation a {
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation li.current-menu-item a {
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.05);
}

/* --- Hero Banner Section --- */
.hero-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--color-border-light);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(#e2e8f0 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0.7;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 15px;
    line-height: 1.15;
}

.hero-content h1 span {
    color: var(--color-primary);
}

.hero-content p {
    color: var(--color-text-muted);
    font-size: 16px;
    margin-bottom: 25px;
    max-width: 480px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.hero-feature-item span.icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
}

.hero-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

/* --- Blog Post Feed Grid --- */
.blog-feed-section {
    padding: 60px 0;
}

.section-title {
    font-size: 26px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* --- Post Card Styles (Glassmorphic Elements) --- */
.post-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.2);
}

.post-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #e2e8f0;
    overflow: hidden;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content-wrap {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.post-title {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.35;
}

.post-excerpt {
    color: var(--color-text-muted);
    font-size: 13.5px;
    margin-bottom: 18px;
    flex-grow: 1;
}

.post-readmore {
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- Single & Page Templates --- */
.site-main {
    padding: 60px 0;
}

.post-detail-wrap {
    background: #ffffff;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.post-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 25px;
}

.post-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.post-header .post-meta {
    font-size: 11px;
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-entry-content {
    font-size: 16px;
    line-height: 1.8;
}

.post-entry-content p {
    margin-bottom: 20px;
}

/* --- Call2Owner Secure Widgets (WordPress Plugin Styling compatibility) --- */
.c2o-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--color-border-light);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: c2o-spin 1s ease-in-out infinite;
}

@keyframes c2o-spin {
    to { transform: rotate(360deg); }
}

.c2o-secure-widget {
    background: #ffffff !important;
    border: 1px solid var(--color-border-light) !important;
    box-shadow: var(--shadow-lg) !important;
    box-sizing: border-box !important;
}

.c2o-secure-widget input,
.c2o-secure-widget select,
.c2o-secure-widget textarea {
    width: 100% !important;
    background: #f8fafc !important;
    border: 1.5px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    color: var(--color-text) !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.c2o-secure-widget input:focus,
.c2o-secure-widget select:focus,
.c2o-secure-widget textarea:focus {
    outline: none !important;
    border-color: var(--color-primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.c2o-btn {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    font-weight: bold !important;
    padding: 12px 24px !important;
    border-radius: var(--radius-md) !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s;
    width: 100% !important;
}

.c2o-btn:hover {
    background: var(--color-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.c2o-alert-pill {
    font-size: 11px;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    background: #e0f2fe;
    color: #0369a1;
    font-family: var(--font-mono);
}

.c2o-badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.c2o-card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: 18px;
    background: #ffffff;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.c2o-success-msg {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: bold;
}

.c2o-error-msg {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: bold;
}

.c2o-grid-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 580px) {
    .c2o-grid-cols {
        grid-template-columns: 1fr;
    }
}

/* --- Premium Footer --- */
.site-footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #1e293b;
    font-size: 13px;
}

.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.site-footer-logo .logo-badge {
    width: 28px;
    height: 28px;
    background: #3b82f6;
    color: #ffffff;
    font-weight: 850;
    font-size: 11px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-footer-logo span {
    font-family: var(--font-display);
    color: #ffffff;
    font-weight: 800;
}

.site-footer p.attribution {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #475569;
    margin-top: 10px;
}

/* --- Print Utility Styles --- */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-qr-card, #printable-qr-card * {
        visibility: visible;
    }
    #printable-qr-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 3in;
        height: 5in;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
        color: black !important;
    }
}

/* --- Responsive Adaptations --- */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .hero-content p {
        margin: 0 auto 25px auto;
    }
    .hero-features {
        align-items: center;
    }
    .main-navigation {
        display: none; /* Can be toggled or responsive */
    }
    .post-detail-wrap {
        padding: 24px;
    }
}
