:root {
    --primary: #274c77;
    --primary-color: #274c77;
    --secondary-color: #6096ba;
    --secondary: #6096ba;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --font-sans: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.25rem;
    --border-radius-lg: 0.3rem;
    --border-radius-sm: 0.2rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: #343a40;
    background: url('/theme/image/background.svg') no-repeat center center fixed;
    background-size: cover;
    background-color: #f0f3fb;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-top:70px;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    flex: 1;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Header Styles */
.tophead {
    background: transparent;
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.tophead h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--primary) ;
}

.tophead p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    color: var(--secondary) ;
}

/* Tool Grid - Improved for Mobile */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    width: 100%;
}

@media (min-width: 400px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 576px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

.tool-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--white);
    transition: var(--transition);
}

@media (min-width: 576px) {
    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-size: 1rem;
}

@media (min-width: 576px) {
    .tool-card h3 {
        font-size: 1.1rem;
    }
}

.tool-card p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 0;
}

@media (min-width: 576px) {
    .tool-card p {
        font-size: 0.9rem;
    }
}

/* Color classes for tool icons */
.tool-icon.electric {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.tool-icon.weight {
    background: linear-gradient(45deg, #a18cd1, #fbc2eb);
}

.tool-icon.temp {
    background: linear-gradient(45deg, #ffc3a0, #ffafbd);
}

.tool-icon.voltage {
    background: linear-gradient(45deg, #84fab0, #8fd3f4);
}

.tool-icon.area {
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
}

.tool-icon.length {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
}

.tool-icon.data {
    background: linear-gradient(45deg, #d4fc79, #96e6a1);
}

.tool-icon.time {
    background: linear-gradient(45deg, #f6d365, #fda085);
}

.tool-icon.pressure {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.tool-icon.speed {
    background: linear-gradient(45deg, #5ee7df, #b490ca);
}

.tool-icon.volume {
    background: linear-gradient(45deg, #c471f5, #fa71cd);
}

.tool-icon.torque {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
}

/* Ad Containers */
.ad-container {
    margin: 2rem auto;
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
}

.top-ad {
    margin-top: 0;
}

.bottom-ad {
    margin-bottom: 0;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    width: 100%;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Intro Section */
.intro-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .intro-section {
        padding: 4rem 0;
        margin-bottom: 3rem;
    }
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .intro-grid {
        gap: 2rem;
        margin-top: 2rem;
    }
}

.intro-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .intro-card {
        padding: 2rem;
    }
}

.intro-card:hover {
    transform: translateY(-5px);
}

.intro-card i {
    font-size: 2rem;
    color: #4a6bff;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .intro-card i {
        font-size: 2.5rem;
    }
}

/* Benefits Section */
.benefits-section {
    padding: 3rem 0;
    background-color: #fff;
}

@media (min-width: 768px) {
    .benefits-section {
        padding: 5rem 0;
    }
}

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

@media (min-width: 768px) {
    .benefits-grid {
        gap: 2rem;
        margin-top: 3rem;
    }
}

.benefit-card {
    background: #f9fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #eef2f6;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .benefit-card {
        padding: 2rem;
    }
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4a6bff 0%, #6a11cb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .benefit-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
}

.benefit-icon i {
    color: white;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .benefit-icon i {
        font-size: 1.5rem;
    }
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
    background: #f8fafc;
}

@media (min-width: 768px) {
    .faq-section {
        padding: 5rem 0;
    }
}

.accordion {
    max-width: 800px;
    margin: 1.5rem auto 0;
}

@media (min-width: 768px) {
    .accordion {
        margin: 2rem auto 0;
    }
}

.accordion-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.accordion-button {
    width: 100%;
    padding: 1.25rem;
    text-align: left;
    background: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

@media (min-width: 768px) {
    .accordion-button {
        padding: 1.5rem;
        font-size: 1.1rem;
    }
}

.accordion-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .accordion-icon {
        font-size: 1.2rem;
    }
}

.accordion-button.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    background: white;
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

@media (min-width: 768px) {
    .accordion-content {
        padding: 0 1.5rem;
    }
}

.accordion-content p {
    padding-bottom: 1.25rem;
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .accordion-content p {
        padding-bottom: 1.5rem;
        font-size: 1rem;
    }
}

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

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    text-align: center;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Responsive adjustments for very small screens */
@media (max-width: 360px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.75rem;
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tool-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .tool-card h3 {
        font-size: 0.9rem;
    }
    
    .tool-card p {
        font-size: 0.8rem;
    }
}


/* Content Sections */
.content-section {
    padding: 1rem 0;
    background: var(--white);
}

.content-section:nth-child(even) {
    background: #f9f9f9;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.content-card {
    background: transparent;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.feature-list i {
    position: absolute;
    left: 0;
    top: 0.2rem;
    color: var(--primary-color);
}

/* Use Cases */
.use-case-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .use-case-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.use-case-card {
    background: transparent;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-5px);
}

.use-case-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

.fa-check {
    color: #4CAF50;
}

.fa-times {
    color: #F44336;
}

/* FAQ Section */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-card {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.faq-question {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: white;
}

.faq-answer.show {
    padding: 1.5rem;
    max-height: 500px;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 0;
}

.cta-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--primary);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.primary-btn:hover {
    background: var(--gray);
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}