/*
    style.css - Main stylesheet for the site
    ---------------------------------------
    This CSS is designed for a clean, modern, and mobile-first experience.
*/

:root {
    --primary-color: #4CAF50; /* A nice green for actions */
    --background-color: #f4f4f9;
    --text-color: #333;
    --secondary-text-color: #666;
    --light-grey: #e0e0e0; /* For table rows */
    --dark-grey: #333;
    --header-height: 50px;
    --menu-width: 250px;
}

/* General Body and Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-height); /* To account for the fixed header */
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header and Page Title */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* REMOVED: height: var(--header-height); to allow it to grow with content */
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 10px 15px; /* ADJUSTED PADDING to create space on top and bottom */
    box-sizing: border-box;
    z-index: 1000;
}

.page-title {
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--dark-grey);
}

/* Menu Icon - Always visible */
.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 20px;
    cursor: pointer;
    margin-right: 15px; /* ADDED MARGIN to separate it from the text */
}

.menu-icon .bar {
    height: 3px;
    width: 100%;
    background-color: var(--dark-grey);
    border-radius: 2px;
}

/* Sliding Menu - Always a sliding side menu */
.menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100% - var(--header-height));
    width: var(--menu-width);
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
}

/* State for open menu */
.menu.open {
    transform: translateX(0);
}

/* Menu links */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-list li a {
    display: block;
    padding: 10px 15px;
    color: var(--dark-grey);
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.menu-list li a:hover,
.menu-list li a.active {
    background-color: var(--light-grey);
    color: var(--primary-color);
}

/* Main Content Styling */
.main-content {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    z-index: 900;
    position: relative;
}

/* Styling for main page title to save space */
.main-content .page-title-main {
    font-size: 1.8em;
    margin-top: 10px;
    margin-bottom: 15px;
}

.hero-section {
    text-align: center;
    padding: 40px 0;
}

.hero-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Spacing between icon and title */
}

.hero-icon {
    width: 50px; /* Adjust size as needed */
    height: auto;
}

.hero-title {
    font-size: 2.5em;
    color: var(--primary-color);
    margin: 0; /* Resetting margin to be handled by container */
}

.hero-description {
    font-size: 1.1em;
    color: var(--secondary-text-color);
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.cta-button:hover {
    background-color: #45a049;
}

/* Table styling for future pages */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--primary-color);
    color: white;
    text-transform: uppercase;
    font-size: 0.9em;
}

tr:nth-child(even) {
    background-color: var(--light-grey);
}

/* Makes tables horizontally scrollable on small screens */
.table-container {
    overflow-x: auto;
}

/* Visual feedback for clickable table rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: #dcdcdc; /* Lighter grey on hover */
}

.clickable-row.clicked {
    background-color: #a0f0a0; /* A soft green color on click */
}
/* Highlight effect for clickable rows on hover and touch */
.data-table tbody .clickable-row:hover {
    background-color: var(--primary-color);
    color: white; /* Change text color for readability on green background */
}

/*
    NEW FIX for horizontal view.
    This media query targets devices in landscape orientation and
    forces the menu to behave like a mobile burger menu.
*/
@media only screen and (orientation: landscape) {
    .menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        height: calc(100% - var(--header-height));
        width: var(--menu-width);
        background-color: #fff;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        overflow-y: auto;
    }

    .menu.open {
        transform: translateX(0);
    }
}

