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

:root {
    --primary-blue: #003366;
    --dark-blue: #002244;
    --light-blue: #e6f0ff;
    --primary-green: #346c07;
    --light-green: #d4e8c9;
    --white: #ffffff;
    --light-gray: #f3f4f6;
    --medium-gray: #9ca3af;
    --dark-gray: #374151;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    max-width: 100vw;
    touch-action: pan-y;
}

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

/* Header Styles */
.site-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--white);
    text-decoration: none;
    display: block;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.logo-image {
    height: 50px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 0.8;
}

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

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s;
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.lang-current:hover {
    background: rgba(255,255,255,0.3);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    list-style: none;
    min-width: 150px;
    margin-top: 0rem;
    display: none;
	height: 550px;
    overflow: auto;
}

.language-switcher:hover .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.lang-dropdown a:hover {
    background: var(--light-gray);
}

.flag {
    width: 20px;
    height: 15px;
    display: inline-block;
    border-radius: 2px;
}

.flag-en { background: linear-gradient(to bottom, #012169 25%, #012169 25%, white 25%, white 75%, #C8102E 75%); }
.flag-es { background: linear-gradient(to bottom, #AA151B 33.33%, #F1BF00 33.33%, #F1BF00 66.66%, #AA151B 66.66%); }
.flag-fr { background: linear-gradient(to right, #0055A4 33.33%, white 33.33%, white 66.66%, #EF4135 66.66%); }
.flag-de { background: linear-gradient(to bottom, black 33.33%, #DD0000 33.33%, #DD0000 66.66%, #FFCE00 66.66%); }
.flag-tr { background: linear-gradient(to bottom, #E30A17 40%, white 40%, white 60%, #E30A17 60%); }
.flag-hi { background: linear-gradient(to bottom, #FF9933 33.33%, white 33.33%, white 66.66%, #138808 66.66%); }
.flag-ie { background: linear-gradient(to right, #169B62 33.33%, white 33.33%, white 66.66%, #FF883E 66.66%); }
.flag-it { background: linear-gradient(to right, #009246 33.33%, white 33.33%, white 66.66%, #CE2B37 66.66%); }
.flag-ku { background: linear-gradient(to bottom, #EE1C25 33.33%, white 33.33%, white 50%, #007A3D 50%); }
.flag-nl { background: linear-gradient(to bottom, #AE1C28 33.33%, white 33.33%, white 66.66%, #21468B 66.66%); }
.flag-pl { background: linear-gradient(to bottom, white 50%, #DC143C 50%); }
.flag-ro { background: linear-gradient(to right, #002B7F 33.33%, #FCD116 33.33%, #FCD116 66.66%, #CE1126 66.66%); }
.flag-sv { background: linear-gradient(to right, #006AA7 40%, #FECC00 40%, #FECC00 60%, #006AA7 60%); }
.flag-th { background: linear-gradient(to bottom, #A51931 20%, white 20%, white 40%, #2D2A4A 40%, #2D2A4A 60%, white 60%, white 80%, #A51931 80%); }
.flag-vi { background: linear-gradient(to bottom, #DA251D 50%, #FFCD00 50%); }
.flag-fa { background: linear-gradient(to bottom, #239F40 33.33%, white 33.33%, white 66.66%, #DA0000 66.66%); }
.flag-ar { background: linear-gradient(to bottom, #006C35 100%);}

/* Main Content */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
}

/* Converter Section */
.converter-section {
    text-align: center;
}

.converter-section h1 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #003366;
    margin-bottom: 2rem;
}

.converter-tool {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    margin: 0 auto;
}

.converter-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.converter-input input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.toggle-btn {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.toggle-btn:hover {
    background: var(--dark-blue);
}

.converter-result {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 1rem 0;
}

.main-result {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.temp-context {
    font-size: 1.5rem;
    color: var(--primary-green);
    font-weight: 600;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--light-green);
    border-radius: 6px;
    text-align: center;
}

.kelvin-display {
    font-size: 1.2rem;
    color: var(--dark-gray);
    background: var(--light-gray);
    padding: 0.75rem;
    border-radius: 6px;
    margin: 1rem 0;
    text-align: center;
}


.comparison-table h5 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 1.1rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
}

.comparison-table th {
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(2) {
    background: var(--light-green);
    font-weight: 600;
}



.calculation-steps h4 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.step-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #eee;
}

.step-item strong {
    display: block;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
}

.step-formula {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.final-step {
    border-left-color: var(--primary-green);
    background: var(--light-green);
}

.final-step strong {
    color: var(--primary-green);
}

.final-step .step-formula {
    background: var(--white);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-green);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

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

.share-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.3s;
}

.share-btn:hover {
    opacity: 0.8;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: var(--white);
}

.share-btn.facebook {
    background: #1877F2;
    color: var(--white);
}

/* Formulas Section */
.formulas-section {
    padding: 3rem 0;
}

.formulas-section h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 2rem;
}

.formula-card {
    background: var(--light-blue);
    margin-bottom: 2rem;
}

.formula-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.formula-card h4 {
    color: var(--primary-green);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.formula-card.educational {
    background: var(--white);
}

.educational-content {
    margin-top: 1rem;
}

.educational-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.understanding-box,
.step-by-step-box,
.practice-box,
.tips-box {
    background: #ede9fe59;
    padding: 1.5rem;
    border-radius: 3px;
    margin: 1rem 0;
    border: 1px solid #eee;
}



.practice-box {
    background: #fff8e63d;
}

.tips-box {
    background: #ede9fe59;
}

.understanding-box p,
.step-by-step-box p,
.practice-box p,
.tips-box p {
    margin: 0;
    line-height: 1.8;
}

.formula-display {
    background: #eeeeee36;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    text-align: left;
    font-size: 1.5rem;
}

/* Two Column Grid for Step-by-Step and Practice */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
}

.two-column-grid .column {
    display: flex;
    flex-direction: column;
}

.two-column-grid .step-by-step-box,
.two-column-grid .practice-box {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

/* Units Section */
.units-section {
    padding: 3rem 0;
    background: var(--light-gray);
    margin: 2rem 0;
    border-radius: 8px;
}

.units-section h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 2rem;
}

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

.unit-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
}

.unit-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

/* Conversion Table */
.conversion-table-section {
    padding: 3rem 0;
}

.conversion-table-section h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 1rem;
}

.conversion-table-section > p {
    text-align: center;
    color: var(--medium-gray);
    margin-bottom: 2rem;
}

.table-responsive {
    overflow-x: auto;
}

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

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

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

.conversion-table tr:hover {
    background: var(--light-gray);
}

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

.table-wrapper {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.table-wrapper h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

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

/* Facts Section */
.facts-section {
    padding: 3rem 0;
}

.facts-section h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 2rem;
}

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

.fact-card {
    background: #e6f0ff63;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #eeee;
}

/* Blog Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: box-shadow 0.3s;
}

.blog-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.blog-card h2 {
    margin-bottom: 0.5rem;
}

.blog-card h2 a {
    color: var(--primary-blue);
    text-decoration: none;
}

.blog-card h2 a:hover {
    text-decoration: underline;
}

.post-meta {
    color: var(--medium-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.blog-post h1 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.post-content {
    margin-top: 2rem;
    line-height: 1.8;
}

.post-content h2 {
    color: var(--dark-blue);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Content Pages */
.content-page {
    max-width: 800px;
    margin: 2rem auto;
    line-height: 1.8;
}

.content-page h2 {
    color: var(--primary-blue);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-page p {
    margin-bottom: 1rem;
}

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* FAQ Styles */
.faq-list {
    max-width: 800px;
    margin: 2rem auto;
}

.faq-item {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    color: var(--primary-blue);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--dark-blue);
}

/* Footer Styles */
.site-footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links h3 {
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    line-height: 2;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .result-actions,
    .share-buttons,
    .mobile-menu-toggle,
    .language-switcher {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .converter-result {
        border: 2px solid var(--dark-gray);
        padding: 1rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--primary-blue);
        flex-direction: column;
        padding: 1rem;
        display: none;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
    }
    
    .language-switcher {
        width: 100%;
        margin-top: 1rem;
    }
    
    .lang-dropdown {
        position: static;
        display: none;
        margin-top: 0rem;
    }
    
    .language-switcher.active .lang-dropdown {
        display: block;
    }
    
    .converter-section h1 {
        font-size: 2rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .units-grid,
    .facts-grid {
        grid-template-columns: 1fr;
    }
    
    .eeat-container {
        flex-direction: column;
        text-align: center;
    }
    
    .eeat-photo {
        margin-bottom: 1.5rem;
    }
}

/* EEAT Section (Expert Verification) */


.eeat-section h2 {
    text-align: center;
    color: var(--dark-blue);
    margin-bottom: 2rem;
}

.eeat-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0 auto;
    background: #eee;
    padding: 1rem;
    border-radius: 4px;
	border: 1px solid #cccccc54;
}

.eeat-photo {
    flex-shrink: 0;
}
.eeat-photo img {
	
    border-radius: 50%;
}

.professor-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-green);
}

.eeat-content h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.professor-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 0.5rem 0;
}

.professor-title {
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 1rem;
}

.professor-description {
    line-height: 1.6;
    color: var(--text-color);
    margin: 1rem 0;
}

.credentials {
    margin: 1.5rem 0;
}

.credentials h4 {
    color: var(--primary-blue);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.credentials ul {
    list-style: none;
    padding: 0;
}

.credentials li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-color);
}

.credentials li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0077B5;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    margin-top: 1rem;
}

.linkedin-link:hover {
    background: #005885;
}

.linkedin-link svg {
    width: 20px;
    height: 20px;
}

/* KaTeX Override - Force left alignment */
.katex-display>.katex {
    display: block;
    text-align: left !important;
    white-space: nowrap;
}
