/* In www/styles/main.css */

html, body {
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 100vh;
}

body {
    background-color: #f0f7ff; /* A light, soft blue */
    color: #333;
    position: relative;
    overflow-y: auto;
    min-height: 100vh;
    margin: 0;
    padding: 0 0 120px 0; /* Increased padding at bottom for footer */
}

footer {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    height: 40px;
    background-color: #f0f7ff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    font-size: 0.85rem;
    color: #666;
    user-select: none;
}

.top-left-layout { 
    font-family: sans-serif; 
    margin: 0 auto;
    padding: 0;
    position: relative;
    width: 100%;
    max-width: 840px; /* 800px content + 20px padding on each side */
    overflow-x: hidden;
    background-color: #f0f7ff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-header {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
    background: url('/images/hills_village_background.jpeg') center/cover no-repeat;
    border-radius: 5px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.page-header h1 {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 20px;
    color: #005a9c;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.nav-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.nav-link {
    text-decoration: none;
    background-color: #005a9c;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1 1 auto;
    min-width: 140px;
    max-width: 200px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link:hover {
    background-color: #0077cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.source-list {
    list-style: none;
    padding: 0;
    width: 100%;
    max-width: 800px;
}

.source-list li {
    margin-bottom: 2em;
    padding: 0 20px;
}

.source-list a {
    text-decoration: none;
    color: #005a9c;
    display: block;
    margin-bottom: 0.5em;
    font-size: 1.1em;
}

.source-list .domain {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 0.3em;
}

.source-list .new-window {
    color: #666;
    font-size: 0.8em;
    font-style: italic;
}

.top-left-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: url('/images/hills_village_background.jpeg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
    z-index: -1;
    border-radius: 5px;
}
#main-heading { 
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #005a9c;
    margin: 20px 0;
    padding: 15px;
    background-color: transparent;
    width: 100%;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
    line-height: 1.2;
    word-wrap: break-word;
}

.top-left-layout h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #005a9c;
    text-align: center;
    max-width: 800px;
    margin: 15px auto 20px auto !important;
    padding: 0 20px;
    line-height: 1.4;
            display: block;
            box-sizing: border-box;
            width: 100%;
        }

        .top-left-layout h2:first-of-type {
            margin-top: 320px;
            margin-bottom: 30px;
        }

        .top-left-layout h2:not(:first-of-type) {
            margin-top: 40px;
            margin-bottom: 30px;
            white-space: normal;
            hyphens: auto;
        }

        .top-left-layout p {
            font-size: 1rem;
            line-height: 1.6;
            margin: 0 auto 30px auto;
            width: 100%;
            max-width: 800px;
            color: #333;
            text-align: justify;
            padding: 0 20px;
            box-sizing: border-box;
        }
        
        .top-left-layout p:last-of-type {
            margin-bottom: 160px;
            padding-bottom: 40px;
        }
        p {
            font-size: clamp(1.2rem, 4vw, 1.5rem);
            max-width: 600px;
            margin: 0 auto;
            line-height: 1.5;
            padding: 0 15px;
        }
        #flex-container {
            display: flex;
            justify-content: space-between;
            margin: 20px 0;
        }
        #flex-container > div {
            flex: 1;
            padding: 10px;
            background-color: #fff;
            border: 1px solid #eee;
            text-align: center;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            height: 100%;
        }

        .footer-left,
        .footer-right {
            display: inline-block;
            line-height: 40px;
            cursor: default;
        }

        .footer-content span {
            color: #666;
        }

        /* Table Styles */
        .tors-table {
            width: 100%;
            max-width: 800px;
            margin: 30px auto 160px auto;
            border-collapse: collapse;
            background-color: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border-radius: 5px;
            overflow: hidden;
        }

        .tors-table th,
        .tors-table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #e0e0e0;
        }

        .tors-table th {
            background-color: #005a9c;
            color: white;
            font-weight: 500;
            font-size: 0.95rem;
        }

        .tors-table td {
            font-size: 0.9rem;
            color: #333;
        }

        .tors-table tbody tr:hover {
            background-color: #f8f9fa;
        }

        .tors-table tbody tr:last-child td {
            border-bottom: none;
        }

        /* Make table responsive */
        @media (max-width: 768px) {
            .tors-table {
                display: block;
                overflow-x: auto;
                white-space: nowrap;
                margin: 20px 10px 160px 10px;
            }
        }

        .footer-left {
            text-align: left;
        }

        .footer-right {
            text-align: right;
        }

        /* Make footer responsive on mobile */
        @media (max-width: 768px) {
            .footer-content {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }

            .footer-left,
            .footer-right {
                text-align: center;
                width: 100%;
            }
        }
        
        /* Table Styles */
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            background-color: #ffffff;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            overflow: hidden;
        }
        
        th {
            background-color: #005a9c;
            color: white;
            padding: 12px;
            text-align: left;
        }
        
        td {
            padding: 12px;
            border-bottom: 1px solid #e0e0e0;
        }
        
        tr:last-child td {
            border-bottom: none;
        }
        
        tr:nth-child(even) {
            background-color: #f8f9fa;
        }
        
        tr:hover {
            background-color: #f0f7ff;
        }


        /* Link styling */
        p a {
            text-decoration: none;
            color: #005a9c;  
        }

        p a:hover {
            color: #0077cc;
        }
