/* Modern Typography System for Gain Enerji Report */

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Typography */
:root {
    /* Font Family */
    --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Font Sizes */
    --font-size-xs: 10px;
    --font-size-sm: 11px;
    --font-size-base: 13px;
    --font-size-lg: 14px;
    --font-size-xl: 16px;
    --font-size-2xl: 19px;
    --font-size-3xl: 26px;
    --font-size-4xl: 32px;

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Letter Spacing */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
}

/* Base Typography */
body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    color: #2C3E50;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1,
.h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 0.75rem;
}

h2,
.h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 0.5rem;
}

h3,
.h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 0.5rem;
}

h4,
.h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: 0.5rem;
}

h5,
.h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: 0.5rem;
}

h6,
.h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: 0.5rem;
}

/* Text Styles */
.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.font-light {
    font-weight: var(--font-weight-light);
}

.font-normal {
    font-weight: var(--font-weight-regular);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

/* Custom Table Typography */
.dash-table-container {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
}

.dash-header-cell {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

.dash-cell {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular);
    color: #14293e !important;
}

/* White borders between table headers */
table thead th {
    border-right: 1px solid white !important;
}

table thead th:last-child {
    border-right: none !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #285A84;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1E4A6F;
}

/* ================================
   MOBILE RESPONSIVE STYLES
   ================================ */

/* Navbar wrapper styles */
.navbar-wrapper {
    list-style: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: white;
    width: 100vw;
    padding: 10px 25px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    flex-shrink: 0;
    max-width: 250px;
}

.navbar-logo img {
    width: 100%;
    height: auto;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu li {
    display: inline-block;
}

.navbar-menu a {
    display: block;
    padding: 8px 16px;
    color: #1E4A6F;
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-md);
    transition: all 0.2s ease;
    border-radius: 6px;
}

.navbar-menu a:hover {
    background: #f0f4f8;
}

.date-card {
    padding: 6px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: default;
    min-width: 100px;
}

.date-card-label {
    font-size: var(--font-size-xs);
    color: #7F8C8D;
    font-weight: var(--font-weight-medium);
}

.date-card-value {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: #1E4A6F;
}

/* Hamburger button - hidden by default */
.hamburger-button {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1001;
}

.hamburger-button span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #1E4A6F;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-button span:nth-child(1) {
    margin-bottom: 5px;
}

.hamburger-button span:nth-child(2) {
    margin-bottom: 5px;
}

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

.hamburger-button.active span:nth-child(2) {
    opacity: 0;
}

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

/* Responsive container class */
.responsive-container {
    padding: 0 100px;
}

/* ================================
   MOBILE STYLES (max-width: 768px)
   ================================ */
@media screen and (max-width: 768px) {

    /* Mobile font size adjustments */
    :root {
        --font-size-4xl: 22px;
        --font-size-3xl: 18px;
        --font-size-2xl: 15px;
        --font-size-xl: 14px;
    }

    h1,
    .h1 {
        font-size: 22px;
        margin-bottom: 0.5rem;
    }

    h2,
    .h2 {
        font-size: 18px;
    }

    h3,
    .h3 {
        font-size: 15px;
    }

    /* Container padding - mobile */
    .responsive-container {
        padding: 0 12px !important;
    }

    /* Navbar mobile styles */
    .navbar-wrapper {
        padding: 8px 12px;
        flex-wrap: wrap;
    }

    .navbar-logo {
        max-width: 140px;
    }

    /* Hide hamburger button on mobile - no menu needed */
    .hamburger-button {
        display: none !important;
    }

    /* Hide menu completely on mobile */
    .navbar-menu {
        display: none !important;
    }

    .date-card {
        display: none;
    }

    /* Section header margins - reduced for mobile */
    .section-header {
        margin-top: 70px !important;
    }

    /* Card padding - smaller on mobile */
    .mantine-Card-root {
        padding: 12px !important;
    }

    /* Table container - horizontal scroll */
    .dash-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Smaller table font */
    .dash-table-container,
    .dash-header-cell,
    .dash-cell {
        font-size: 10px !important;
    }

    /* Graph containers - ensure proper sizing */
    .js-plotly-plot {
        max-width: 100%;
        min-height: 280px;
    }

    .js-plotly-plot .plotly {
        min-height: 280px;
    }

    /* Reduce margins between sections */
    .mantine-Container-root {
        margin-bottom: -40px !important;
    }

    /* Footer/disclaimer text smaller */
    .disclaimer-text {
        font-size: 10px !important;
    }
}

/* ================================
   TABLET STYLES (769px - 1024px)
   ================================ */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .responsive-container {
        padding: 0 40px !important;
    }

    .navbar-logo {
        max-width: 200px;
    }
}

/* ================================
   DESKTOP STYLES (min-width: 769px)
   ================================ */
@media screen and (min-width: 769px) {

    /* Ensure hamburger is hidden on desktop */
    .hamburger-button {
        display: none !important;
    }

    /* Ensure menu is always visible on desktop */
    .navbar-menu {
        display: flex !important;
        position: static;
        box-shadow: none;
        padding: 0;
    }
}