/* Base styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    /*background-image: linear-gradient(0deg, green 20%, #006400 60%, #006400 40%, green 10%);
    background-size: 100% 80px;*/
    background-image: linear-gradient(0deg, green 25%, #006400 25%, #006400 50%, green 50%);
    background-size: 100% 100px; /* Repeat pattern every 40px horizontally */
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

a:link {
    text-decoration: none;
    color: #008000;
}

a:visited {
    text-decoration: none;
    color: #006400;
}

a:hover {
    text-decoration: underline;
    color: #004d00;
}

a:active {
    text-decoration: none;
    color: #003300;
}

table {
    width: auto;
    min-width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: auto;
}

table, th, td {
    border: 2px solid #fff;
}

th, td {
    text-align: left;
    padding: 8px;
}

th {
    background-color: #4CAF50;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #ddd;
}

.center {
    text-align: center;
}
.left {
    text-align: left;
}
.right {
    text-align: right;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .content {
        padding: 15px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 6px;
    }

    th, td, table {
        border: none;
    }

    tr {
        display: block;
        margin-bottom: 15px;
    }

    th, td {
        display: block;
        text-align: left;
    }

    td {
        border-bottom: 1px solid #ddd;
    }

    a {
        word-wrap: break-word;
    }
}

/* Desktop-specific styles */
@media (min-width: 1400px) {
    .content {
        padding: 20px;
        width: fit-content; /* Fit to content width */
        max-width: min(33%, 600px); /* Cap at 33% or 600px for homepage */
        margin: 0 auto; /* Center horizontally */
    }
    
    /* Wider content for pages with tables */
    body:has(table) .content {
        max-width: 1200px;
    }
}

@media (min-width: 768px) and (max-width: 1399px) {
    .content {
        padding: 20px;
        width: fit-content;
        max-width: min(60%, 900px);
        margin: 0 auto;
    }
    
    /* Wider for pages with tables */
    body:has(table) .content {
        max-width: 1000px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .content {
        padding: 15px;
        width: fit-content;
        max-width: 90%;
        margin: 0 auto;
    }
}

/* Mobile-specific styles */
@media (max-width: 480px) {

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }


    table {
        display: block;
        overflow-x: auto;
    }

    tbody tr {
        display: flex;
        flex-direction: column;
        border: 1px solid #ddd;
        margin-bottom: 15px;
    }

    th, td {
        display: block;
        padding: 10px;
        text-align: left;
    }

    td {
        font-size: 14px;
        border-bottom: 1px solid #ddd;
    }

    td:last-child {
        border-bottom: none;
    }

    th {
        display: none;
    }

    tbody tr td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 50%;
    }
}
