/* --- Root Variables for Theming (Midnight Navy & Cyan) --- */
:root {
    --bg-color: #1a202c; /* Midnight Navy */
    --primary-card-bg: #2d3748; /* Dark Slate */
    --secondary-card-bg: #475569; /* Lighter Gray */
    --text-color: #e5e7eb; /* Soft White */
    --text-muted-color: #a1a1aa; /* Medium Gray */
    --heading-color: #ffffff;
    --accent-color: #22d3ee; /* Bright Cyan */
    --accent-hover-color: #06b6d4;
    --border-color: #4b5563;
    --error-color: #f87171;
    --success-color: #34d399;
    --shadow-color: rgba(0, 0, 0, 0.35);
    --font-family: 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
}

/* --- Main Wrapper & Layout --- */
.hero_section { margin: 0; background-color: var(--bg-color); }
.exp-calc-wrapper {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2.5rem;
    max-width: 100%;
    margin: 2rem auto;
	  
}

.exp-calc-header { text-align: center; margin-bottom: 3rem; }
.exp-calc-main-title { font-size: 2.5rem; font-weight: 700; color: var(--heading-color); margin: 0 0 0.5rem 0; }
.exp-calc-subtitle { font-size: 1.15rem; color: var(--text-muted-color); max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* --- Calculator UI --- */
.exp-calculator-ui {
    background-color: var(--primary-card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 40px var(--shadow-color);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}
.exp-input-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.exp-input-group { display: flex; flex-direction: column; }
.exp-label { font-size: 0.95rem; margin-bottom: 0.6rem; color: var(--text-muted-color); font-weight: 500; }
.exp-input {
    width: 100%; padding: 0.9rem 1rem; background-color: var(--secondary-card-bg);
    border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-color);
    font-size: 1.1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.exp-input:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3); }

/* --- Buttons --- */
.exp-calc-button, .exp-calc-reset-button, .exp-utility-button {
    padding: 0.9rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: 8px;
    cursor: pointer; transition: all 0.2s ease; border: 1px solid transparent;
}
.exp-calc-button { background-color: var(--accent-color); color: #1a202c; width: 100%; margin-top: 0.5rem; }
.exp-calc-button:hover { background-color: var(--accent-hover-color); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2); }
.exp-calc-reset-button { background-color: var(--secondary-card-bg); color: var(--text-muted-color); border-color: var(--border-color); width: 100%; margin-top: 0.75rem; }
.exp-calc-reset-button:hover { border-color: var(--text-muted-color); color: var(--text-color); }

/* --- Results Area (with animation) --- */
.exp-result-area {
    margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-color); 
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height 0.6s ease-in-out, opacity 0.6s ease-in-out, margin-top 0.6s ease-in-out, padding-top 0.6s ease-in-out;
}
.exp-result-area.visible { max-height: 1000px; opacity: 1; margin-top: 2rem; padding-top: 2rem; }
.exp-result-full-width { grid-column: 1 / -1; }
.exp-result-label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted-color); margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.exp-result-output { font-size: 1.7rem; font-weight: 700; color: var(--success-color); background-color: var(--secondary-card-bg); padding: 0.85rem 1rem; border-radius: 8px; word-wrap: break-word; }
.exp-result-steps { font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 1rem; background-color: var(--secondary-card-bg); padding: 1rem; border-radius: 8px; white-space: pre-wrap; line-height: 1.8; color: var(--text-color); }
.exp-utility-button { background: var(--secondary-card-bg); color: var(--text-muted-color); border-color: var(--border-color); padding: 8px 14px; font-size: 0.9rem; }
.exp-utility-button:hover { color: var(--text-color); border-color: var(--accent-color); }
.exp-error-message { color: var(--error-color); text-align: center; margin-top: 1rem; font-weight: 500; min-height: 20px; transition: opacity 0.3s; }

/* --- Utility & Content Sections --- */
.exp-utility-bar, .exp-fullwidth-content-wrapper { margin-top: 3.5rem; }
.exp-section-heading { font-size: 1.8rem; font-weight: 600; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); margin-bottom: 2rem; color: var(--heading-color); }
.exp-utility-bar { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: flex-start; }
.exp-settings-section .exp-utility-button { width: 100%; }
.exp-history-list { list-style-type: none; padding: 0.5rem; margin: 0; max-height: 240px; overflow-y: auto; background: var(--primary-card-bg); border-radius: 8px; border: 1px solid var(--border-color); }
.exp-history-list li { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-color); color: var(--text-muted-color); font-size: 0.95rem; }
.exp-history-list li:last-child { border-bottom: none; }

/* --- NEW Full-Width Content Panel Style --- */
.exp-content-panel {
    display: flex; gap: 1.5rem; align-items: flex-start;
    background-color: var(--primary-card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem; margin-bottom: 1.5rem; border-radius: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.exp-content-panel:hover { transform: scale(1.02); border-color: var(--accent-color); }
.exp-content-icon {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px;
    background-color: var(--secondary-card-bg);
    display: grid; place-items: center;
}
.exp-content-icon svg { width: 28px; height: 28px; color: var(--accent-color); }
.exp-content-title { font-size: 1.4rem; font-weight: 600; color: var(--heading-color); margin: 0 0 0.75rem 0; }
.exp-content-details { font-size: 1.05rem; line-height: 1.8; color: var(--text-muted-color); margin: 0; }

/* --- Conclusion & FAQ Styles --- */
.exp-conclusion-block { background-color: var(--primary-card-bg); padding: 2rem; border-radius: 12px; border-left: 5px solid var(--accent-color); }
.exp-conclusion-block p { margin: 0; font-size: 1.1rem; line-height: 1.8; color: var(--text-muted-color); }
.exp-faq-container { display: flex; flex-direction: column; gap: 1rem; }
.exp-faq-item { background-color: var(--primary-card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; transition: border-color 0.3s ease; }
.exp-faq-item:hover { border-color: var(--accent-color); }
.exp-faq-question {
    width: 100%; background: none; border: none; padding: 1.25rem 1.5rem; text-align: left; font-size: 1.15rem; font-weight: 600;
    color: var(--text-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.exp-faq-question::after { content: '+'; font-size: 1.8rem; color: var(--accent-color); transition: transform 0.3s ease; }
.exp-faq-item.active .exp-faq-question::after { transform: rotate(45deg); }
.exp-faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out; }
.exp-faq-answer p { padding: 0 1.5rem 1.5rem 1.5rem; margin: 0; color: var(--text-muted-color); line-height: 1.8; font-size: 1.05rem; }

/* --- Responsive Design Media Queries --- */

/* For Large Tablets and Small Laptops (e.g., <= 992px) */
@media (max-width: 992px) {
    .exp-calc-wrapper {
        padding: 2rem;
        margin: 1.5rem auto;
    }
    
    /* Stack the utility bar content */
    .exp-utility-bar {
        grid-template-columns: 1fr;
        gap: 2.5rem; /* Keep a healthy gap when stacked */
    }

    .exp-history-list {
        max-height: 200px; /* Slightly reduce max-height */
    }
}

/* For Tablets and Large Phones (e.g., <= 768px) */
@media (max-width: 768px) {
    .exp-calc-wrapper {
        padding: 1.5rem;
        margin: 1rem auto;
    }

    .exp-calculator-ui, .exp-content-panel, .exp-conclusion-block {
        padding: 1.5rem;
    }

    /* Adjust main headings */
    .exp-calc-main-title {
        font-size: 2rem;
    }
    .exp-calc-subtitle {
        font-size: 1rem;
    }
    .exp-section-heading {
        font-size: 1.5rem;
    }

    /* Stack the main input grid */
    .exp-input-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Stack the results grid */
    .exp-result-area {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Stack the content panel items vertically */
    .exp-content-panel {
        flex-direction: column;
        align-items: center; /* Center the icon */
        text-align: center;
        transform: none !important; /* Disable hover effect on touch devices */
    }
    .exp-content-panel:hover {
        border-color: var(--border-color); /* Disable hover effect on touch devices */
    }
    .exp-content-title {
        font-size: 1.25rem;
    }
    .exp-content-details {
        font-size: 1rem;
    }

    .exp-faq-question {
        font-size: 1.05rem;
        padding: 1rem 1.25rem;
    }
}

/* For Small Mobile Devices (e.g., <= 576px) */
@media (max-width: 576px) {
    .exp-calc-wrapper {
        padding: 1rem;
        margin: 0;
        border-radius: 0;
    }
    
    /* Remove rounded corners and extra shadows on the main card for a more seamless mobile view */
    .exp-calculator-ui {
        padding: 1.5rem 1rem;
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Reduce heading sizes further */
    .exp-calc-main-title {
        font-size: 1.75rem;
    }
    .exp-calc-subtitle {
        font-size: 0.95rem;
    }
    .exp-section-heading {
        font-size: 1.3rem;
        padding-bottom: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    /* Adjust input and label font sizes for better readability */
    .exp-label {
        font-size: 0.9rem;
    }
    .exp-input {
        padding: 0.8rem;
        font-size: 1rem;
    }

    /* Make buttons and text slightly smaller to fit */
    .exp-calc-button, .exp-calc-reset-button, .exp-utility-button {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Adjust result text size */
    .exp-result-output {
        font-size: 1.5rem;
    }
    .exp-result-steps {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* Adjust content panel elements for small screens */
    .exp-content-panel {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    .exp-content-icon {
        width: 40px;
        height: 40px;
    }
    .exp-content-icon svg {
        width: 24px;
        height: 24px;
    }
    .exp-content-title {
        font-size: 1.15rem;
    }

    /* Adjust FAQ elements */
    .exp-faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
    .exp-faq-question::after {
        font-size: 1.5rem;
    }
    .exp-faq-answer p {
        padding: 0 1rem 1rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Reduce margins between major sections */
    .exp-calculator-ui, .exp-utility-bar, .exp-fullwidth-content-wrapper {
        margin-bottom: 2rem;
        margin-top: 2rem;
    }
}

/* Specific fine-tuning for very small devices (e.g., iPhone SE) */
@media (max-width: 375px) {
    .exp-calc-wrapper {
        padding: 1rem 0.5rem;
    }
    .exp-calc-header {
        margin-bottom: 2rem;
    }
    .exp-calc-main-title {
        font-size: 1.6rem;
    }
    .exp-calc-subtitle {
        font-size: 0.9rem;
    }
}

