/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5f2d;
    --secondary-color: #97bc62;
    --dark-bg: #1a1a1a;
    --light-bg: #f5f5f5;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --accent-color: #4a9d4f;
    --hover-color: #3d8b42;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #ffffff;
    font-size: 16px;
}

/* Header and Navigation */
header {
    background-color: var(--dark-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    border-radius: 8px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-color);
    background-color: rgba(151, 188, 98, 0.1);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    position: relative;
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-content {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.95), rgba(151, 188, 98, 0.95));
    color: #ffffff;
}

.hero-content h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    line-height: 1.3;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-content .lead {
    color: rgba(255, 255, 255, 0.95);
}

/* Content Sections */
section {
    margin-bottom: 3rem;
}

article {
    background-color: #ffffff;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--secondary-color);
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

h4 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

h5 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.5rem;
    text-align: justify;
    color: var(--text-dark);
}

/* Image Containers */
.image-container {
    margin: 2rem 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Links */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-content p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    main {
        padding: 1rem;
    }

    .lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        width: 50px;
        height: 50px;
    }
}

/* Accessibility */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header,
    footer {
        display: none;
    }

    main {
        max-width: 100%;
    }

    a {
        text-decoration: underline;
    }
}

/* Ensure the parent container allows its children to size correctly */
.access-portal {
    /* If it's a flex container, ensure it allows children to take full width */
    display: block; /* Or flex, but ensure width: 100% is effective */
    width: 100%; /* Ensure the container itself takes full available width */
    max-width: 100%; /* Prevent it from expanding beyond its parent */
    overflow: hidden; /* Important: Prevents children from breaking out of this container */
    padding: 1rem 0; /* Example padding, adjust as needed */
}

.portal-link-input {
    display: block; /* Make it a block-level element */
    width: 100%; /* Crucial: Make the input take 100% of its parent's width */
    box-sizing: border-box; /* Include padding and border in the element's total width */
    padding: 10px; /* Adjust padding as needed for visual comfort */
    border: 1px solid var(--border-color); /* Use your defined border color */
    border-radius: 5px; /* Slightly rounded corners for aesthetics */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Inherit font for consistency */
    font-size: 30px; /* Consistent font size */
    color: var(--text-dark); /* Consistent text color */
    background-color: var(--light-bg); /* Consistent background */

    /* These are key for handling long text without breaking layout */
    white-space: nowrap; /* Keep text on a single line */
    overflow-x: auto; /* Add horizontal scrollbar if content overflows */
    -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS devices */
    min-width: 0; /* Allows the input to shrink if necessary within flex/grid contexts */
}

/* Optional: Adjust other elements to ensure they don't push the layout */
.portal-title,
.portal-status,
p {
    max-width: 100%; /* Ensure these elements don't cause horizontal overflow */
    word-break: break-word; /* Break long words if necessary */
    margin-bottom: 0.5rem; /* Add some spacing */
}
