:root {
    --primary-color: #ffcd00;
    --accent-color: #d71920;
    --dark-bg: #2c3e50;
    --light-bg: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-bg);
}

/* Header & Navigation */
header {
    background: var(--dark-bg);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    width: 32px;
    height: 32px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffd740 100%);
    color: var(--text-color);
    padding: 3rem 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.85;
    color: var(--dark-bg);
}

/* Calculator Section */
.calculator-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.calculator-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.calculator-container {
    max-width: 800px;
    margin: 0 auto;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 0.5rem;
    align-items: end;
}

.input-row input {
    width: 100%;
}

.input-row select {
    width: 140px;
}

.unit-placeholder {
    width: 140px;
    visibility: hidden;
}

.calc-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: #ecf0f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.hint {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

.calc-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.calc-btn:hover {
    transform: translateY(-2px);
    background: #b71519;
    box-shadow: 0 4px 12px rgba(215, 25, 32, 0.3);
}

.results {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.results h3 {
    color: var(--dark-bg);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
}

.results p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.results p:last-of-type {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffd740 100%);
    font-weight: 600;
    font-size: 1.2rem;
}

.results span {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
    text-align: right;
}

.results p:last-of-type span {
    color: var(--dark-bg);
}

/* Content Sections */
.content-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.content-section h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

/* How It Works */
.how-it-works {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.how-it-works h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.formula-steps {
    display: grid;
    gap: 2rem;
}

.step {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.step h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.formula-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 5px;
    border: 2px solid var(--primary-color);
    margin: 1rem 0;
}

.formula-box p {
    margin-bottom: 0.5rem;
}

.formula-box .note {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
}

.diagram {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 1.5rem auto;
    display: block;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Process Diagram Styles */
.process-diagram-wrapper {
    width: 100%;
    margin: 2rem 0;
    padding: 1rem 0;
}

.process-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.process-step {
    flex: 0 1 auto;
    min-width: 100px;
    max-width: 150px;
    padding: 1.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffd740 100%);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.process-step h4 {
    color: var(--dark-bg);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.process-step p {
    color: var(--dark-bg);
    font-size: 0.85rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.process-arrow {
    flex: 0 0 auto;
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: bold;
    text-align: center;
    padding: 0 0.25rem;
}

/* Responsive scaling for process diagram */
@media (max-width: 1024px) {
    .process-step {
        min-width: 85px;
        max-width: 120px;
        padding: 1.1rem 0.6rem;
    }
    
    .process-step h4 {
        font-size: 0.88rem;
    }
    
    .process-step p {
        font-size: 0.8rem;
    }
    
    .process-arrow {
        font-size: 1.35rem;
    }
}

@media (max-width: 768px) {
    .process-diagram-wrapper {
        margin: 1.5rem 0;
        padding: 0.75rem 0;
    }
    
    .process-diagram {
        gap: 0.5rem;
    }
    
    .process-step {
        min-width: 70px;
        max-width: 100px;
        padding: 0.9rem 0.5rem;
    }
    
    .process-step h4 {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .process-step p {
        font-size: 0.72rem;
    }
    
    .process-arrow {
        font-size: 1.2rem;
        padding: 0 0.2rem;
    }
}

@media (max-width: 640px) {
    .process-diagram {
        gap: 0.4rem;
    }
    
    .process-step {
        min-width: 60px;
        max-width: 85px;
        padding: 0.75rem 0.4rem;
    }
    
    .process-step h4 {
        font-size: 0.72rem;
        margin-bottom: 0.35rem;
    }
    
    .process-step p {
        font-size: 0.65rem;
    }
    
    .process-arrow {
        font-size: 1rem;
        padding: 0 0.15rem;
    }
}

@media (max-width: 480px) {
    .process-diagram {
        gap: 0.3rem;
    }
    
    .process-step {
        min-width: 52px;
        max-width: 72px;
        padding: 0.65rem 0.3rem;
    }
    
    .process-step h4 {
        font-size: 0.65rem;
        margin-bottom: 0.3rem;
    }
    
    .process-step p {
        font-size: 0.6rem;
    }
    
    .process-arrow {
        font-size: 0.9rem;
        padding: 0 0.1rem;
    }
}

/* Use Cases */
.use-cases {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.use-cases h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.use-case-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.use-case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.use-case-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn:hover {
    background: #b71519;
    transform: translateX(5px);
}

/* Examples */
.examples {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.examples h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.example-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.example-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.example-card ul,
.example-card ol {
    margin-left: 1.5rem;
}

.example-card li {
    margin-bottom: 0.5rem;
}

/* Tables */
.comparison-table,
.pitch-table {
    width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

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

th {
    background: #34495e;
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* Material Cards */
.material-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.material-card h3,
.material-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.material-card ul {
    margin-left: 1.5rem;
}

.material-card li {
    margin-bottom: 0.5rem;
}

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

.conversion-card {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.conversion-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.conversion-card ul {
    list-style: none;
}

.conversion-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.conversion-card li:last-child {
    border-bottom: none;
}

/* Boxes */
.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 1.5rem 0;
}

.recommendation-box {
    padding: 2rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.temp-guide {
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.warning-box {
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    background: #fff5f5;
    border: 2px solid #fee;
}

.recommendation-box h3,
.temp-guide h3,
.warning-box h4 {
    color: var(--dark-bg);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.recommendation-box ul,
.temp-guide ul,
.warning-box ul {
    margin-left: 1.5rem;
}

.recommendation-box li,
.temp-guide li,
.warning-box li {
    margin-bottom: 0.5rem;
}

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

/* FAQ */
.faq {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.faq h2 {
    color: var(--dark-bg);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
}

.faq-item {
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark-bg);
    transition: background 0.3s;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
    font-weight: bold;
}

.faq-question.active::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-answer.active {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-answer p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Testimonials */
.testimonials {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.testimonials h2 {
    color: var(--dark-bg);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

.testimonial {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.testimonial:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.testimonial-info {
    flex: 1;
}

.stars {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.author {
    font-weight: 600;
    color: var(--dark-bg);
    margin: 0;
    font-size: 1rem;
}

.author-role {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
}

.testimonial-text {
    margin-top: 1rem;
    font-style: italic;
    color: #555;
    line-height: 1.6;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

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

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        display: none;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        padding: 0.75rem 2rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    main {
        padding: 1rem;
    }

    .calculator-section,
    .content-section,
    .how-it-works,
    .use-cases,
    .examples,
    .faq,
    .testimonials {
        padding: 1.5rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .input-row select {
        width: 100%;
    }

    .use-case-grid,
    .example-grid,
    .testimonial-grid,
    .conversion-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }
}
