/*
Theme Name: JE Solar
Theme URI: https://jesolar.example.com
Author: JE Solar
Author URI: https://jesolar.example.com
Description: Custom WordPress theme for JE Solar — Powering Pakistan With Smart Solar Energy. Converted from the original JE Solar one-page design into a full multi-page WordPress theme with dynamic Services & Team post types, a real blog, and a working contact form.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: je-solar
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =====================================================
   CSS Variables / Design Tokens
   ===================================================== */
:root {
    --primary: #2E8B57;
    --primary-light: #43a66d;
    --primary-dark: #1e5c3a;
    --secondary: #0f172a;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   Reset / Base
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.section-padding {
    padding: 100px 0;
}

.screen-reader-text {
    position: absolute !important;
    left: -9999px;
    top: -9999px;
}

/* =====================================================
   Header & Nav
   ===================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

header.scrolled {
    background: var(--glass);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--glass-border);
}

nav.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    max-height: 40px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--secondary);
    position: relative;
}

.nav-links li a:hover,
.nav-links li.current-menu-item > a,
.nav-links li.current_page_item > a {
    color: var(--primary);
}

.nav-links li.current-menu-item > a::after,
.nav-links li.current_page_item > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.header-cta {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
    white-space: nowrap;
}

.header-cta:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(46, 139, 87, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(46, 139, 87, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* =====================================================
   Animations & Floating Shapes
   ===================================================== */
.floating-shape {
    position: absolute;
    z-index: -1;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 50px); }
}

/* =====================================================
   Page Content Wrapper
   ===================================================== */
#content {
    padding-top: 80px;
    min-height: 80vh;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
    position: relative;
    padding: 80px 0 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--secondary);
    margin-bottom: 24px;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.hero-card {
    position: absolute;
    background: var(--glass);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    z-index: 2;
}

.card-1 { top: 20%; left: -40px; }
.card-2 { bottom: 10%; right: -20px; }

.page-header {
    padding: 160px 0 80px;
}

.page-header h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
}

/* =====================================================
   Glass Cards
   ===================================================== */
.glass-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* =====================================================
   Stats
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item h2 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 8px;
}

/* =====================================================
   Service Cards
   ===================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card .img-box {
    height: 200px;
    overflow: hidden;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover img {
    transform: scale(1.1);
}

.service-info {
    padding: 30px;
}

.service-info .service-icon {
    width: 50px;
    height: 50px;
    background: rgba(46, 139, 87, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* =====================================================
   Team Cards
   ===================================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.team-card {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.team-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 25px;
    object-fit: cover;
    border: 4px solid var(--primary);
    padding: 5px;
}

/* =====================================================
   Blog
   ===================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card-img {
    height: 220px;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-category {
    background: rgba(46, 139, 87, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.blog-search-form {
    position: relative;
    width: 300px;
}

.blog-search-form input[type="search"],
.blog-search-form input[type="text"] {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border-radius: 50px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.95rem;
}

.blog-search-form button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Single post content */
.single-post-content {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-content img {
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.single-post-content h2,
.single-post-content h3 {
    margin: 30px 0 15px;
    color: var(--secondary);
}

.single-post-content p {
    margin-bottom: 18px;
}

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 18px 20px;
    list-style: revert;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.pagination-wrap a,
.pagination-wrap span {
    padding: 10px 18px;
    border-radius: 50px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    color: var(--secondary);
}

.pagination-wrap .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* =====================================================
   Contact Form
   ===================================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact-info-panel {
    background: var(--primary);
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-info-panel a {
    color: white;
}

.contact-form-panel {
    padding: 60px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    outline: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.form-notice {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 25px;
    font-weight: 600;
}

.form-notice.success {
    background: rgba(46, 139, 87, 0.1);
    color: var(--primary-dark);
    border: 1px solid var(--primary);
}

.form-notice.error {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    border: 1px solid #dc2626;
}

.contact-map {
    margin-top: 50px;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #e2e8f0;
    position: relative;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-map .map-pin-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-align: center;
    pointer-events: none;
}

/* =====================================================
   Footer
   ===================================================== */
footer.site-footer {
    background: var(--secondary);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-col p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-links a:hover {
    background: var(--primary);
}

.newsletter-form {
    display: flex;
    background: rgba(255,255,255,0.05);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
}

.newsletter-form input {
    background: transparent;
    border: none;
    padding: 10px 15px;
    color: white;
    outline: none;
    flex: 1;
    min-width: 50px;
}

.newsletter-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
    color: #64748b;
    font-size: 0.85rem;
}

/* =====================================================
   Floating Buttons
   ===================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: var(--shadow);
}

/* =====================================================
   404 / misc
   ===================================================== */
.error-404 {
    text-align: center;
    padding: 160px 0 120px;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary);
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text p { margin-inline: auto; }
    .hero-btns { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-links.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }
    .mobile-menu-btn { display: block; }
    .hero-card { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .section-padding { padding: 60px 0; }
    .form-row { grid-template-columns: 1fr; }
    .blog-search-form { width: 100%; }
}
