/* ==========================================================================
   Project: Job Portal Frontend Styles
   File: style.css (For root pages)
   Version: 1.3 (Final with All Sections)
   ========================================================================== */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #111827;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
body { 
    font-family: 'Poppins', sans-serif; 
    color: var(--secondary-color); 
    line-height: 1.6;
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}
.section-title { 
    text-align: center; 
    font-size: 2.5rem; 
    font-weight: 700; 
    margin-bottom: 50px; 
}

/* ==================== Header ==================== */
.main-header { 
    background: #fff; 
    padding: 15px 0; 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}
.main-header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.logo { 
    font-size: 1.8rem; 
    font-weight: 700; 
    color: var(--primary-color); 
    text-decoration: none; 
}
.nav-links { 
    list-style: none; 
    display: flex; 
    gap: 30px; 
    margin: 0; 
}
.nav-links a { 
    text-decoration: none; 
    color: var(--text-light); 
    font-weight: 500; 
    transition: color 0.2s; 
}
.nav-links a.active, .nav-links a:hover { 
    color: var(--primary-color); 
}
.header-actions { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}
.login-btn { 
    color: var(--text-light); 
    font-weight: 500; 
    text-decoration: none; 
}
.register-btn { 
    background-color: var(--primary-color); 
    color: white; 
    padding: 10px 20px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 500; 
    transition: background-color 0.2s; 
}
.register-btn:hover { 
    background-color: var(--primary-dark); 
}
.menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
}

/* ==================== Hero Section ==================== */
.hero-section {
    background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    color: #ffffff;
    text-align: center;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before, .hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}
.hero-section::before { width: 300px; height: 300px; top: -100px; left: -100px; }
.hero-section::after { width: 400px; height: 400px; bottom: -150px; right: -150px; }
.hero-section .container { position: relative; z-index: 2; }
.hero-section h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 15px; line-height: 1.2; color: #ffffff; }
.hero-section .subtitle { font-size: 1.2rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }
.search-form-container { display: flex; background: #fff; border-radius: 12px; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); max-width: 800px; margin: 0 auto; padding: 10px; }
.search-field { display: flex; align-items: center; flex: 1; padding: 0 15px; }
.search-field i { color: #9ca3af; margin-right: 10px; }
.search-field input { border: none; outline: none; width: 100%; padding: 15px 0; font-size: 1rem; color: var(--secondary-color); }
.search-btn { background-color: var(--primary-color); color: white; padding: 0 30px; border-radius: 8px; border: none; font-size: 1rem; font-weight: 500; cursor: pointer; }
.popular-tags { margin-top: 20px; }
.popular-tags span { font-weight: 500; margin-right: 10px; color: rgba(255, 255, 255, 0.9); }
.popular-tags a { color: #ffffff; text-decoration: none; background: rgba(255, 255, 255, 0.1); padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.9rem; display: inline-block; margin: 5px; }
.popular-tags a:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.3); }

/* ==================== How It Works Section ==================== */
.how-it-works-section { padding: 80px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; text-align: center; }
.step-icon { background: var(--primary-light); color: var(--primary-color); width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px auto; }
.step-icon i { font-size: 2rem; }
.step-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 10px; }
.step-card p { color: var(--text-light); }

/* ==================== Featured Jobs Section ==================== */
.featured-jobs-section { padding: 80px 0; background: var(--bg-light); }
.job-listing-cards { display: grid; gap: 20px; }
.job-card-full { background-color: #fff; border-radius: 12px; padding: 20px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border-color); transition: box-shadow 0.2s; }
.job-card-full:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.07); }
.job-card-main { display: flex; gap: 20px; align-items: center; }
.job-card-main img { width: 50px; height: 50px; border-radius: 8px; }
.job-details h3 { font-weight: 600; }
.job-details p { color: var(--text-light); font-size: 0.9rem; }
.job-apply-btn { background-color: var(--primary-color); color: white; text-decoration: none; padding: 10px 20px; border-radius: 8px; }
.view-all-container { text-align: center; margin-top: 40px; }
.view-all-btn { color: var(--primary-color); font-weight: 600; text-decoration: none; font-size: 1.1rem; }

/* ==================== Statistics Section ==================== */
.stats-section { background: var(--secondary-color); color: white; padding: 60px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item h3 { font-size: 3rem; font-weight: 700; }
.stat-item p { font-size: 1.1rem; opacity: 0.8; }

/* ==================== Featured Companies Section ==================== */
.companies-section { padding: 80px 0; }
.company-logos { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 20px; }
.company-logos img { max-width: 150px; opacity: 0.6; filter: grayscale(100%); transition: all 0.3s; }
.company-logos img:hover { opacity: 1; filter: grayscale(0); }

/* ==================== Testimonials Section ==================== */
.testimonials-section { padding: 80px 0; background: var(--bg-light); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }
.testimonial-card { background: #fff; padding: 30px; border-radius: 12px; box-shadow: var(--shadow); }
.testimonial-card p { font-style: italic; color: var(--text-light); margin-bottom: 20px; line-height: 1.7; position: relative; padding-left: 20px; }
.testimonial-card p::before { content: '“'; position: absolute; left: -10px; top: -10px; font-size: 3rem; color: var(--primary-color); opacity: 0.2; }
.author-info { display: flex; align-items: center; gap: 15px; }
.author-info img { width: 50px; height: 50px; border-radius: 50%; }
.author-info h4 { font-weight: 600; margin: 0; }
.author-info span { font-size: 0.9rem; color: var(--text-light); }

/* ==================== Footer ==================== */
.main-footer { background-color: var(--secondary-color); color: #d1d5db; padding: 60px 0 20px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.footer-about .logo { color: #fff; }
.footer-about p { margin-top: 15px; line-height: 1.7; }
.footer-links h3 { color: #fff; font-size: 1.2rem; margin-bottom: 20px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #d1d5db; text-decoration: none; }
.newsletter-form { display: flex; margin-top: 15px; }
.newsletter-form input { flex: 1; border: none; padding: 12px; border-radius: 8px 0 0 8px; outline: none; }
.newsletter-form button { border: none; background: var(--primary-color); color: #fff; padding: 0 15px; border-radius: 0 8px 8px 0; cursor: pointer; }
.footer-bottom { text-align: center; margin-top: 50px; padding-top: 20px; border-top: 1px solid #374151; }

/* ==================== Responsive Design ==================== */
@media (max-width: 992px) {
    .main-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: white; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
    .main-nav.active { display: block; }
    .nav-links { flex-direction: column; padding: 20px; gap: 0; }
    .nav-links li { padding: 15px 0; border-bottom: 1px solid var(--border-color); }
    .nav-links li:last-child { border-bottom: none; }
    .menu-toggle { display: block; }
    .header-actions .login-btn, .header-actions .register-btn { display: none; }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    .hero-section, .how-it-works-section, .featured-jobs-section, .companies-section, .testimonials-section, .stats-section, .main-footer { padding: 60px 15px; }
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section .subtitle { font-size: 1rem; }
    .search-form-container { flex-direction: column; gap: 10px; box-shadow: none; background: transparent; padding: 0; }
    .search-field { background: #fff; border-radius: 8px; border: 1px solid var(--border-color); }
    .search-btn { padding: 15px; }
    .section-title { font-size: 2rem; }
    .job-card-full { flex-direction: column; align-items: flex-start; gap: 15px; }
    .job-card-actions { width: 100%; }
    .job-apply-btn { width: 100%; text-align: center; }
    .footer-grid, .testimonial-grid { text-align: center; }
    .testimonial-card p::before { display: none; }
    .author-info { justify-content: center; }
    .newsletter-form { justify-content: center; }
}
/* ==================== Responsive Design for Mobile (768px and below) ==================== */
@media (max-width: 768px) {
    body { font-size: 14px; }
    .container { padding: 0 10px; }
    .main-header .container { flex-direction: column; align-items: flex-start; }
    .logo { margin-bottom: 15px; }
    .nav-links { display: none !important; } /* Hide mobile nav by default */
    .main-nav.active { display: block !important; }
    .header-actions { width: 100%; justify-content: space-between; }
    .header-actions .login-btn, .header-actions .register-btn { display: inline-block; padding: 8px 15px; font-size: 0.9rem; }
    .header-actions .register-btn { margin-left: 5px; }
    .menu-toggle { display: block; }

    .hero-section { padding: 80px 15px; text-align: left; }
    .hero-section h1 { font-size: 2rem; }
    .hero-section .subtitle { font-size: 1rem; margin-left: 0; margin-right: 0; }
    .search-form-container { flex-direction: column; gap: 10px; box-shadow: none; background: transparent; padding: 0; }
    .search-field { background: #fff; border-radius: 8px; border: 1px solid var(--border-color); }
    .search-btn { padding: 15px; width: 100%; }
    .popular-tags { text-align: left; }
    .popular-tags a { margin: 2px; }

    .how-it-works-section, .featured-jobs-section, .companies-section, .testimonials-section, .stats-section, .main-footer { padding: 60px 15px; }
    .section-title { font-size: 1.8rem; margin-bottom: 30px; }

    .steps-grid { grid-template-columns: 1fr; }
    .step-card { text-align: left; padding: 20px; border-bottom: 1px solid var(--border-color); }
    .step-card:last-child { border-bottom: none; }
    .step-icon { margin-left: 0; margin-bottom: 15px; }

    .job-card-full { flex-direction: column; align-items: flex-start; gap: 15px; }
    .job-card-actions { width: 100%; }
    .job-apply-btn { width: 100%; text-align: center; padding: 12px; font-size: 1rem; }

    .stats-grid { grid-template-columns: 1fr; }
    .stat-item { text-align: center; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .stat-item:last-child { border-bottom: none; }
    .stat-item h3 { font-size: 2.5rem; }
    .stat-item p { font-size: 1rem; }

    .company-logos { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .company-logos img { max-width: 100%; }

    .testimonial-grid { grid-template-columns: 1fr; }
    .testimonial-card p::before { display: none; }
    .author-info { justify-content: flex-start; }

    .footer-grid { grid-template-columns: 1fr; text-align: left; }
    .footer-links { margin-bottom: 20px; }
    .newsletter-form { flex-direction: column; align-items: stretch; }
    .newsletter-form input { border-radius: 8px; margin-bottom: 10px; }
    .newsletter-form button { border-radius: 8px; }
    .footer-bottom { text-align: center; padding: 20px; }
}