/* 
 * Aishi Distributor Website - Main Styles
 * Styles for the official Aishi capacitor distributor website
 */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a4e8c;
    --primary-dark: #0d3a6d;
    --secondary-color: #e63946;
    --accent-color: #f4a261;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --text-gray: #6c757d;
    --border-color: #dee2e6;
    --success-color: #2a9d8f;
    --warning-color: #e9c46a;
    --danger-color: #e76f51;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--primary-dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Header and Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    background-color: white;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: bold;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #c1121f;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-tertiary {
    background-color: var(--accent-color);
    color: white;
}

.btn-tertiary:hover {
    background-color: #e76f51;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-quaternary {
    background-color: var(--success-color);
    color: white;
}

.btn-quaternary:hover {
    background-color: #1d6f63;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-banner .container {
    max-width: 800px;
}

.hero-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-banner p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Sections */
section {
    padding: 3rem 0;
}

.core-advantages,
.solutions-applications,
.latest-news,
.solution-intro,
.support-intro,
.news-intro,
.company-intro,
.contact-intro {
    padding: 2rem 0;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Grids */
.advantages-grid,
.products-grid,
.solutions-grid,
.news-grid,
.categories-grid,
.articles-grid,
.engineers-grid,
.tools-grid,
.related-grid,
.cases-grid,
.certs-grid,
.contact-grid,
.offices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Cards */
.advantage-card,
.product-card,
.solution-card,
.news-card,
.category-card,
.article-card,
.engineer-card,
.tool-card,
.related-item,
.challenge-card,
.advantage-card,
.case-card,
.cert-card,
.office-card,
.contact-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.advantage-card:hover,
.product-card:hover,
.solution-card:hover,
.news-card:hover,
.category-card:hover,
.article-card:hover,
.engineer-card:hover,
.tool-card:hover,
.related-item:hover,
.challenge-card:hover,
.advantage-card:hover,
.case-card:hover,
.cert-card:hover,
.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card a,
.solution-card a,
.news-card a,
.category-card a,
.article-card a,
.related-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-card img,
.solution-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.news-category.company {
    background-color: #d1e7ff;
    color: #1a4e8c;
}

.news-category.industry {
    background-color: #fff3cd;
    color: #856404;
}

/* Tables */
.product-table-container,
.series-table-container,
.bom-table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

.product-table,
.series-table,
.bom-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    background-color: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.product-table th,
.product-table td,
.series-table th,
.series-table td,
.bom-table th,
.bom-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.product-table th,
.series-table th,
.bom-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.product-table tr:hover,
.series-table tr:hover,
.bom-table tr:hover {
    background-color: rgba(26, 78, 140, 0.05);
}

/* Forms */
.contact-form {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 78, 140, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group input {
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

/* Article Content */
.content-article {
    padding: 2rem 0;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.date-and-author {
    text-align: right;
}

.date-and-tags {
    text-align: right;
}

.date,
.author {
    display: block;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.article-content {
    margin: 2rem 0;
}

.article-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content ul li {
    margin-bottom: 0.5rem;
}

.article-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--box-shadow);
}

/* Tags */
.tags {
    margin-top: 0.5rem;
}

.tag {
    display: inline-block;
    background-color: #e9ecef;
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0.25rem;
}

/* Timeline */
.timeline {
    margin: 2rem 0;
}

.timeline-item {
    padding: 1rem 0;
    border-left: 3px solid var(--primary-color);
    padding-left: 1.5rem;
    position: relative;
    margin-left: 1rem;
}

.timeline-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.timeline-item:first-child {
    margin-top: 0;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Office Regions */
.offices-container {
    margin-top: 2rem;
}

.office-region {
    margin-bottom: 2rem;
}

.office-region h3 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.office-subregion {
    margin-top: 1.5rem;
}

.office-subregion h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.address {
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--light-bg);
}

.faq-item h3 {
    color: var(--primary-color);
}

/* CTA Section */
.cta-section {
    background-color: var(--light-bg);
    padding: 4rem 0;
    text-align: center;
}

.cta-section .container {
    max-width: 800px;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cta-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding-top: 3rem;
    margin-top: 3rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    max-width: 1200px;
    margin: 0 auto;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-banner h1 {
        font-size: 2rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .cta-buttons,
    .cta-options {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .author-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date-and-author {
        text-align: left;
    }
}