/* HEAT GmbH Building Stock Model Style Sheet - Single Page Version */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap');

/* HEAT Color Palette */
:root {
    --heat-green-primary: #62d32f;
    --heat-green-light: #daf100;
    --heat-green-dark: #00953c;
    --heat-blue-dark: #005ca8;
    --heat-blue-medium: #00afd7;
    --heat-blue-light: #e6f4ff;
    --heat-text-dark: #333333;
    --heat-text-medium: #666666;
    --heat-text-light: #999999;
    --heat-background: #ffffff;
    --heat-background-light: #f8f9fa;
    --heat-border: #e9ecef;
    --heat-shadow: rgba(0, 92, 168, 0.1);
    --heat-danger: #dc3545;
    --heat-warning: #ffc107;
    --heat-success: #28a745;
    --heat-info: #17a2b8;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--heat-text-dark);
    background: linear-gradient(135deg, var(--heat-blue-light) 0%, var(--heat-background) 100%);
    min-height: 100vh;
}

/* Container */
.heat-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--heat-background);
    box-shadow: 0 10px 40px var(--heat-shadow);
}

/* Header */
.heat-header {
    background: linear-gradient(135deg, var(--heat-green-dark) 0%, var(--heat-blue-dark) 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.heat-logo-section h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
    border: none;
    padding: 0;
}

.heat-subtitle {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.95;
    color: var(--heat-green-light);
}

.heat-branding {
    display: flex;
    gap: 10px;
}

.heat-tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Sticky Navigation Bar */
.heat-nav {
    background: var(--heat-background);
    border-bottom: 3px solid var(--heat-green-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: sticky;
    top: 108px; /* Height of header */
    z-index: 99;
    box-shadow: 0 2px 10px var(--heat-shadow);
}

.heat-nav-link {
    flex: 0 1 300px;
    padding: 18px 30px;
    text-decoration: none;
    color: var(--heat-text-medium);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-right: 1px solid var(--heat-border);
    position: relative;
}

.heat-nav-link:last-child {
    border-right: none;
}

.heat-nav-link:hover {
    background: rgba(98, 211, 47, 0.1);
    color: var(--heat-green-dark);
}

.heat-nav-link.active {
    background: linear-gradient(135deg, rgba(98, 211, 47, 0.1) 0%, rgba(0, 92, 168, 0.05) 100%);
    color: var(--heat-blue-dark);
    border-bottom: 3px solid var(--heat-green-primary);
    margin-bottom: -3px;
}

.heat-nav-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--heat-green-primary);
}

.nav-icon {
    font-size: 20px;
}

/* Main Content */
.heat-main-content {
    padding: 0;
    background: var(--heat-background);
}

/* Sections */
.heat-section {
    padding: 40px 30px 60px;
    border-bottom: 2px solid var(--heat-border);
    scroll-margin-top: 180px; /* Account for sticky header and nav */
}

.heat-section:last-child {
    border-bottom: none;
}

/* Section Headers */
.heat-section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--heat-green-primary);
}

.heat-section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--heat-blue-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.heat-section-header h2::before {
    content: "●";
    color: var(--heat-green-primary);
    margin-right: 12px;
}

.heat-section-description {
    color: var(--heat-text-medium);
    font-size: 16px;
    margin-left: 28px;
}

/* Cards */
.heat-card {
    background: var(--heat-background-light);
    border: 2px solid var(--heat-border);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.heat-card:hover {
    box-shadow: 0 4px 20px var(--heat-shadow);
    border-color: var(--heat-green-primary);
}

.heat-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--heat-blue-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--heat-green-primary);
}

.heat-highlight-card {
    background: linear-gradient(135deg, rgba(98, 211, 47, 0.05) 0%, rgba(0, 92, 168, 0.05) 100%);
    border: 2px solid var(--heat-green-primary);
}

.heat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.heat-card-header h3 {
    margin-bottom: 0;
    border: none;
    padding: 0;
}

/* Forms */
.heat-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.heat-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.heat-form-group.full-width {
    grid-column: 1 / -1;
}

.heat-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--heat-text-dark);
}

.heat-input,
.heat-select,
.heat-textarea {
    padding: 10px 14px;
    border: 2px solid var(--heat-border);
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--heat-background);
}

.heat-input:focus,
.heat-select:focus,
.heat-textarea:focus {
    outline: none;
    border-color: var(--heat-green-primary);
    box-shadow: 0 0 0 3px rgba(98, 211, 47, 0.1);
}

.heat-input.heat-readonly {
    background: var(--heat-background-light);
    color: var(--heat-text-medium);
    cursor: not-allowed;
}

.heat-textarea {
    resize: vertical;
    min-height: 80px;
}

.heat-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--heat-green-primary);
}

.heat-helper-text {
    font-size: 12px;
    color: var(--heat-text-medium);
    font-style: italic;
}

/* Buttons */
.heat-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--heat-blue-dark);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.heat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 92, 168, 0.3);
}

.heat-button-primary {
    background: linear-gradient(135deg, var(--heat-green-primary) 0%, var(--heat-green-dark) 100%);
}

.heat-button-primary:hover {
    box-shadow: 0 4px 12px rgba(98, 211, 47, 0.4);
}

.heat-button-secondary {
    background: var(--heat-text-medium);
}

.heat-button-success {
    background: var(--heat-success);
}

.heat-button-danger {
    background: var(--heat-danger);
    font-size: 12px;
    padding: 8px 16px;
}

.heat-button-info {
    background: var(--heat-info);
}

.heat-button-large {
    padding: 16px 32px;
    font-size: 16px;
}

.heat-button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.heat-button-group-center {
    justify-content: center;
    margin-bottom: 20px;
}

/* Next Section Button */
.heat-next-section {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--heat-border);
}

/* Progress Bar */
.heat-progress-container {
    background: var(--heat-background-light);
    border-radius: 10px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid var(--heat-border);
}

.heat-progress-container h4 {
    color: var(--heat-blue-dark);
    margin-bottom: 12px;
    font-size: 16px;
}

.heat-progress-bar {
    background: var(--heat-border);
    border-radius: 20px;
    height: 30px;
    overflow: hidden;
    position: relative;
}

.heat-progress-fill {
    background: linear-gradient(135deg, var(--heat-green-primary) 0%, var(--heat-green-dark) 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.heat-progress-status {
    margin-top: 12px;
    color: var(--heat-text-medium);
    font-size: 13px;
}

/* Metrics Grid */
.heat-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.heat-metric-card {
    background: linear-gradient(135deg, var(--heat-green-dark) 0%, var(--heat-blue-dark) 100%);
    color: white;
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.heat-metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--heat-shadow);
}

.heat-metric-card h4 {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 12px;
    color: white;
}

.heat-metric-value {
    font-size: 28px;
    font-weight: 700;
}

/* Charts Grid */
.heat-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.heat-chart-container {
    background: var(--heat-background);
    border: 2px solid var(--heat-border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px var(--heat-shadow);
    position: relative;
    min-height: 300px;
}

.heat-chart-container h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--heat-blue-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--heat-green-primary);
}

.heat-chart-container.heat-full-width {
    grid-column: span 2;
}

.heat-chart-container canvas {
    max-height: 280px;
}

/* Building Typology Cards */
.heat-typology-card {
    background: var(--heat-background-light);
    border: 1px solid var(--heat-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.heat-typology-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.heat-typology-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--heat-green-primary);
}

.heat-typology-header h4 {
    color: var(--heat-blue-dark);
    font-weight: 600;
    margin: 0;
}

.heat-summary-section {
    background: linear-gradient(135deg, var(--heat-blue-light) 0%, var(--heat-background) 100%);
    padding: 15px;
    border-radius: 8px;
}

.heat-button-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Tables */
.heat-table-container {
    overflow-x: auto;
}

.heat-table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.heat-table-container th {
    background: var(--heat-green-primary);
    color: white;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border: 1px solid var(--heat-green-dark);
}

.heat-table-container td {
    padding: 10px 12px;
    border: 1px solid var(--heat-border);
    color: var(--heat-text-dark);
}

.heat-table-container tr:nth-child(even) {
    background: var(--heat-background-light);
}

.heat-table-container tr:hover {
    background: rgba(98, 211, 47, 0.05);
}

/* Airtable Integration Styles */
.heat-airtable-panel {
    background: linear-gradient(135deg, rgba(0, 175, 215, 0.05) 0%, rgba(98, 211, 47, 0.05) 100%);
    border: 2px solid var(--heat-blue-medium);
}

.heat-integration-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 20px 0;
}

.heat-integration-method {
    padding: 20px;
    background: var(--heat-background);
    border-radius: 8px;
    border: 1px solid var(--heat-border);
    text-align: center;
}

.heat-integration-method h4 {
    color: var(--heat-blue-dark);
    margin-bottom: 10px;
    font-size: 16px;
}

.heat-integration-method .heat-helper-text {
    margin-bottom: 15px;
}

.heat-integration-status {
    padding: 15px;
    background: var(--heat-background);
    border-radius: 6px;
    margin-top: 20px;
}

.heat-status-message {
    color: var(--heat-text-medium);
    font-size: 14px;
    margin: 0;
}

/* Loading Overlay */
.heat-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.heat-loading-content {
    background: var(--heat-background);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.heat-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--heat-border);
    border-top: 4px solid var(--heat-green-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.heat-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 6px;
    background: var(--heat-background);
    box-shadow: 0 4px 20px var(--heat-shadow);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
    max-width: 350px;
    font-size: 14px;
    font-weight: 600;
}

.heat-notification.show {
    transform: translateX(0);
}

.heat-notification-success {
    border-left: 4px solid var(--heat-success);
    color: var(--heat-success);
}

.heat-notification-error {
    border-left: 4px solid var(--heat-danger);
    color: var(--heat-danger);
}

.heat-notification-info {
    border-left: 4px solid var(--heat-info);
    color: var(--heat-info);
}

/* Scroll to Top Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.heat-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .heat-charts-grid {
        grid-template-columns: 1fr;
    }

    .heat-chart-container.heat-full-width {
        grid-column: span 1;
    }

    .heat-header {
        position: relative;
    }

    .heat-nav {
        top: 0;
    }

    .heat-section {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 768px) {
    .heat-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }

    .heat-logo-section h1 {
        font-size: 24px;
    }

    .heat-nav {
        flex-direction: column;
        position: relative;
    }

    .heat-nav-link {
        border-right: none;
        border-bottom: 1px solid var(--heat-border);
        width: 100%;
    }

    .heat-form-grid {
        grid-template-columns: 1fr;
    }

    .heat-metrics-grid {
        grid-template-columns: 1fr;
    }

    .heat-button-group {
        flex-direction: column;
    }

    .heat-button {
        width: 100%;
        justify-content: center;
    }

    .heat-section {
        padding: 30px 15px 40px;
        scroll-margin-top: 0;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .heat-container {
        box-shadow: none;
    }

    .heat-header {
        position: relative;
        background: none;
        color: var(--heat-text-dark);
        border-bottom: 3px solid var(--heat-green-primary);
        page-break-after: avoid;
    }

    .heat-header h1 {
        color: var(--heat-green-dark);
    }

    .heat-subtitle {
        color: var(--heat-blue-dark);
    }

    .heat-nav,
    .heat-button-group,
    .heat-progress-container,
    .heat-next-section {
        display: none !important;
    }

    .heat-section {
        page-break-before: always;
        padding: 20px 0;
    }

    .heat-section:first-of-type {
        page-break-before: avoid;
    }

    .heat-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--heat-border);
    }

    .heat-chart-container {
        page-break-inside: avoid;
        height: auto !important;
        min-height: 200px;
    }

    .heat-metric-card {
        background: none;
        border: 2px solid var(--heat-green-primary);
        color: var(--heat-text-dark);
    }

    .heat-metric-card h4 {
        color: var(--heat-blue-dark);
    }

    .heat-metric-value {
        color: var(--heat-green-dark);
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}