/* EngrAssist Website Styles - Complete Consolidated Version */
/* ====================================
   TEMPLATE LOADING OPTIMIZATION
   ==================================== */

/* Prevent flash of unstyled content during template loading */
body {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.templates-loaded {
    opacity: 1;
}

/* Loading spinner (optional but recommended) */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.page-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
}

/* Grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(52, 152, 219, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 152, 219, 0.08) 1px, transparent 1px);
    background-size: 25px 25px;
    z-index: -2;
}

/* Coffee stain effect */
body::after {
    content: '';
    position: fixed;
    bottom: 500px;
    right: 500px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.12) 0%, rgba(160, 82, 45, 0.06) 40%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: subtle-pulse 8s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { transform: scale(1); opacity: 0.12; }
    50% { transform: scale(1.05); opacity: 0.06; }
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.favicon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: bold;
}

.brand-name a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #f39c12;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-btn:hover {
    color: #f39c12;
}

/* Mobile Menu Styles */
.mobile-menu {
    position: fixed;
    top: 70px;
    right: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    width: 250px;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.3);
    border-radius: 0 0 0 15px;
    padding: 1rem 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
}

.mobile-menu.show {
    transform: translateX(0);
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    margin: 0;
}

.mobile-menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 500;
    transition: background 0.3s ease;
    border-left: 4px solid transparent;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: rgba(255,255,255,0.1);
    border-left-color: #f39c12;
    color: #f39c12;
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

/* Hero Section - Homepage */
.hero-section {
    background: linear-gradient(135deg, rgba(46, 134, 193, 0.1), rgba(155, 89, 182, 0.1));
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto;
}

/* Page Header - Document/Content Pages */
.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, rgba(46, 134, 193, 0.1), rgba(155, 89, 182, 0.1));
}

.page-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Contact Page Header Override */
.contact-page .page-header {
    padding: 4rem 0 2rem;
}

.contact-page .page-title {
    font-size: 3rem;
}

.contact-page .page-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
    background: white;
    margin: 2rem 0;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Contact Grid */
.contact-section {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Info Cards */
.info-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #f39c12;
}

.info-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.info-text {
    color: #7f8c8d;
    line-height: 1.6;
}

/* Contact Info Cards */
.contact-info {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.info-item:hover {
    background: #e9ecef;
}

.info-icon.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.info-content h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.info-content p {
    color: #7f8c8d;
    margin: 0;
}

/* Typography */
.section-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin: 2.5rem 0 1.5rem 0;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
}

/* Alternative section title styling (for document pages) */
.section-title.document-style {
    font-size: 1.8rem;
    border-bottom: 2px solid #f39c12;
}

.section-title.document-style::after {
    display: none;
}

.content-text {
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.section-content {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.section-content p {
    margin-bottom: 1rem;
}

.section-content ul,
.section-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.section-content li {
    margin-bottom: 0.5rem;
}

/* Last Updated */
.last-updated {
    background: #e8f4f8;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 600;
    color: #2c3e50;
    border-left: 4px solid #3498db;
}

/* Table of Contents */
.toc {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    border-left: 4px solid #3498db;
}

.toc h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.toc ul {
    list-style: none;
    margin: 0;
}

.toc li {
    margin: 0.5rem 0;
}

.toc a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.toc a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Highlight and Info Boxes */
.highlight-box {
    background: linear-gradient(135deg, #e8f4f8, #f0f8ff);
    border-left: 4px solid #3498db;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.info-box {
    background: #e8f5e8;
    border-left: 4px solid #27ae60;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.info-box h4 {
    color: #27ae60;
    margin-bottom: 0.5rem;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.danger-box {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.danger-box h4 {
    color: #721c24;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.danger-box p {
    color: #721c24;
    margin: 0;
}

.acceptance-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.acceptance-box h4 {
    color: #0c5460;
    margin-bottom: 0.5rem;
}

.acceptance-box p {
    color: #0c5460;
    margin: 0;
}

/* Disclaimer */
.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.disclaimer-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 0.5rem;
}

.disclaimer-text {
    color: #856404;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #e74c3c;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Service Boxes */
.service-boxes {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.service-box {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 3px solid #3498db;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.service-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.service-letter {
    font-size: 80px;
    font-weight: bold;
    color: #3498db;
    transition: opacity 0.3s ease;
}

.service-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.service-box:hover .mechanical-placeholder {
    opacity: 0.3;
}

.service-box:hover .under-construction {
    opacity: 0.3;
}

.service-box:hover .service-letter {
    opacity: 0;
}

.service-box:hover .service-content {
    opacity: 1;
}

.service-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background-color: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border-radius: 8px;
}

.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ecf0f1;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><rect width="40" height="40" fill="%23bdc3c7"/><text x="20" y="25" text-anchor="middle" fill="%23fff" font-size="12">IMG</text></svg>');
    background-repeat: repeat;
    background-size: 40px 40px;
    opacity: 0.3;
}

.under-construction {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/UnderConstruction.png');
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.mechanical-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/Mechanical_Room_1001.png');
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
}

/* Forms */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-form h3 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f39c12;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-full {
    width: 100%;
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    background: #6c757d;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* Mission Section */
.mission-section {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 4rem 0;
    text-align: center;
    border-radius: 15px;
    margin: 3rem 0;
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Quote Section */
.quote-section {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 4rem 0;
    text-align: center;
    border-radius: 15px;
    margin: 2rem 0;
}

.quote-section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.quote-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #f39c12;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
}

.faq-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.faq-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    border: none;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-answer {
    padding: 1.5rem;
    color: #7f8c8d;
    display: none;
    line-height: 1.8;
}

.faq-answer.active {
    display: block;
}

/* Success and Loading States */
.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: none;
    border-left: 4px solid #28a745;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: none;
    border-left: 4px solid #dc3545;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Mechanical Page Specific Styles */
.mechanical-section {
    margin-bottom: 4rem;
}

/* Tools Grid Styles */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.tool-category {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.category-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3498db;
}

.tool-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.tool-link-uc {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.tool-link:hover {
    background: #e8f4f8;
    border-left-color: #3498db;
    transform: translateX(5px);
}

.tool-link-uc:hover {
    background-image: url('images/coming-soon-banner.png');
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    border-left-color: #3498db;
    transform: translateX(5px);
    opacity: 1;
}

.tool-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 40px;
}

.tool-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.tool-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Reference Materials Grid */
.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.reference-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #2c3e50;
    text-align: center;
    transition: transform 0.3s ease;
}

.reference-card:hover {
    transform: translateY(-5px);
}

.reference-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.reference-card h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.reference-card p {
    color: #7f8c8d;
    margin: 0;
}

.reference-card-uc {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #2c3e50;
    text-align: center;
    transition: transform 0.3s ease;
}

.reference-card-uc:hover {
    background-image: url('images/UnderConstruction.png');
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    border-left-color: #3498db;
    transform: translateX(5px);
    opacity: 1;
}

.reference-card-uc h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.reference-card-uc p {
    color: #7f8c8d;
    margin: 0;
}

/* Design Guides Grid */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.guide-card {
    background: linear-gradient(135deg, #e8f4f8, #f0f8ff);
    padding: 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: #2c3e50;
    text-align: center;
    transition: transform 0.3s ease;
    border-left: 4px solid #3498db;
}

.guide-card:hover {
    transform: translateY(-5px);
}

.guide-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.guide-card h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.guide-card p {
    color: #7f8c8d;
    margin: 0;
}

.guide-card-uc {
    background-image: url('images/UnderConstruction.png');
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    border-left-color: #3498db;
    transform: translateX(5px);
    opacity: 1;
}

.guide-card-uc:hover {
    transform: translateY(-5px);
}

.guide-card-uc h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.guide-card-uc p {
    color: #7f8c8d;
    margin: 0;
}

/* Educational Resources Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.education-card {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: #2c3e50;
    text-align: center;
    transition: transform 0.3s ease;
    border-left: 4px solid #f39c12;
}

.education-card:hover {
    transform: translateY(-5px);
}

.education-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.education-card h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.education-card p {
    color: #856404;
    margin: 0;
}

.education-card-uc {
    background-image: url('images/UnderConstruction.png');
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    border-left-color: #3498db;
    transform: translateX(5px);
    opacity: 1;
}

.education-card-uc:hover {
    transform: translateY(-5px);
}

.education-card-uc h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.education-card-uc p {
    color: #856404;
    margin: 0;
}

/* Conversion Calculator Specific Styles */
.conversion-calculator {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.calculator-interface {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-controls {
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-group label {
    font-weight: 600;
    color: #2c3e50;
    min-width: 80px;
}

.control-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    min-width: 200px;
    cursor: pointer;
}

.control-group select:focus {
    outline: none;
    border-color: #3498db;
}

/* Conversion Interface Grid */
.conversion-interface-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.input-section, .output-section {
    text-align: center;
}

.input-section h3, .output-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.unit-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.unit-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.unit-group input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
}

.unit-group input:focus, .unit-group select:focus {
    outline: none;
    border-color: #3498db;
}

.conversion-arrow {
    font-size: 2rem;
    color: #3498db;
    font-weight: bold;
}

/* Converter Buttons Container */
.converter-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Reference Tables */
.reference-tables {
    margin: 4rem 0;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.reference-table {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.reference-table h3 {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 1rem;
    margin: 0;
    text-align: center;
}

.reference-table table {
    width: 100%;
    border-collapse: collapse;
}

.reference-table th,
.reference-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.reference-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.reference-table tbody tr:hover {
    background: #f8f9fa;
}

/* Constants Section */
.constants-section {
    margin: 4rem 0;
}

.constants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.constant-card {
    background: linear-gradient(135deg, #e8f5e8, #f0f8ff);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border-left: 4px solid #27ae60;
}

.constant-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.constant-card p {
    color: #27ae60;
    font-weight: 600;
    margin: 0;
}

/* Boiler Calculator Specific Styles */
.boiler-results-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #e8f4f8, #f0f8ff);
    border-radius: 15px;
}

.boiler-results-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.boiler-result-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.boiler-result-item .result-label {
    font-weight: 600;
    color: #2c3e50;
}

.boiler-result-item .result-value {
    font-size: 1.3rem;
    font-weight: bold;
}

.boiler-result-blue {
    border-left: 4px solid #3498db;
}

.boiler-result-blue .result-value {
    color: #f39c12;
}

.boiler-result-green {
    border-left: 4px solid #27ae60;
}

.boiler-result-green .result-value {
    color: #27ae60;
}

.boiler-result-orange {
    border-left: 4px solid #f39c12;
}

.boiler-result-orange .result-value {
    color: #f39c12;
}

.boiler-result-purple {
    border-left: 4px solid #9b59b6;
}

.boiler-result-purple .result-value {
    color: #9b59b6;
}

.selected-system-section {
    margin-top: 3rem;
}

/* Ductulator Specific Styles */
.ductulator-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.input-panel, .results-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.subsection-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.unit-display {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: normal;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-item input[type="radio"] {
    width: auto;
    margin: 0;
}

.radio-item label {
    margin: 0;
    font-weight: 500;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.result-label {
    font-weight: 600;
    color: #2c3e50;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f39c12;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 2px solid #f39c12;
}

.error-box {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    color: #721c24;
}

.results-container {
    margin-top: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    text-align: left;
    flex: 1;
    min-width: 150px;
}

.footer-center {
    text-align: center;
    flex: 2;
}

.footer-right {
    text-align: right;
    flex: 1;
    min-width: 150px;
}

/* Page Counter Styles */
.page-counter {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-block;
}

.counter-label {
    opacity: 0.8;
    margin-right: 0.5rem;
}

.counter-value {
    font-weight: bold;
    color: #f39c12;
    font-size: 1.1rem;
}

/* Buy Me a Coffee Button */
.coffee-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #FF5E5B;
    color: #FFFFFF;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.coffee-button:hover {
    background: #FF7675;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.coffee-icon {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ductulator-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .contact-page .page-title {
        font-size: 2rem;
    }

    .content-section {
        padding: 2rem;
        margin: 1rem 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-boxes {
        flex-direction: column;
        align-items: center;
    }

    .service-box {
        max-width: 90%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding: 2rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .reference-grid,
    .guide-grid,
    .education-grid {
        grid-template-columns: 1fr;
    }

    .conversion-interface-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .conversion-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group label {
        min-width: auto;
        margin-bottom: 0.5rem;
    }

    .control-group select {
        min-width: auto;
    }

    .converter-buttons {
        flex-direction: column;
        width: 100%;
    }

    .converter-buttons .btn,
    .converter-buttons .btn-secondary {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .tables-grid {
        grid-template-columns: 1fr;
    }

    .constants-grid {
        grid-template-columns: 1fr;
    }

    .conversion-calculator {
        padding: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        text-align: center;
    }

    nav {
        padding: 0 1rem;
    }

    .boiler-result-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .boiler-result-item .result-value {
        margin-top: 0.5rem;
    }

    .input-panel,
    .results-panel {
        padding: 1.5rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .reference-table th,
    .reference-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .constant-card {
        padding: 1.5rem;
    }

}
