/* Completed by Dominic del Rosario, 
   Claude AI was only used for reference if I did not know how to style a certain element.
   (no code generated by AI was taken for this page) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid white/*#e0e0e0*/;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    width: 80px;
    height: 80px;
    /*border-radius: 50%; /* Remove if you don't want circular */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 40px auto; /* This centers it horizontally */
    overflow: hidden;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-item {
    color: #000;
    text-decoration:none;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item:hover {
    background-color: #f5f5f5;
}

.nav-item-active {
    background-color: #fff5f5;
    color: #cd0102;
    text-decoration:none;
    font-weight: 500;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icon {
    font-size: 18px;
}

.admin-login {
    position: absolute;
    bottom: 20px;
    left: 110px;
    padding-left: 18px;
    text-decoration:none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
}

.admin-login:hover {
    color: #cd0102;
}

.contact-link {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding-left: 12px;
    text-decoration:none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
}

.contact-link:hover {
    color: #cd0102;
}

.contact-link-active {
    position: absolute;
    bottom: 20px;
    left: 20px;
    padding-left: 12px;
    text-decoration: none;
    color: #cd0102;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px 40px;
    background-color: #f1f1f1;
}

/* Header */
.header {
    position: sticky;
    background-color: white;
    padding: 20px 40px;
    margin: -20px -40px 30px -40px;
    border-bottom: 1px solid white/*#e0e0e0*/;
}

.search-container {
    position: relative;
    max-width: 500px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #cd0102;
}

/* Content Wrapper */
.content-wrapper {
    padding: 0;
}

/* Page Header with Button */
.page-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0 24px;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.download-pdf-btn {
    background-color: #cd0102;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-pdf-btn:hover {
    background-color: #a0182f;
}

/* Section */
.section {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-header {
    background-color: #cd0102;
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.section-header:hover {
    background-color: #8a1629;
    transition: background-color 0.2s;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.section-arrow {
    transition: transform 0.3s;
    font-size: 20px;
    color: white;
}

.section-arrow.open {
    transform: rotate(180deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.section-content.open {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
}

.card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-image {
    display: none; /* Hide image placeholder */
}

.card-policy-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-section-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.4;
}

.card-policy-id {
    font-size: 13px;
    color: #999;
    line-height: 1.4;
}

/* Legacy support for old card structure */
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 13px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* Contact Page */
.contact-content {
    max-width: 800px;
    padding: 0 20px;

}

.contact-header {
    font-size: 48px;
    font-weight: 600;
    color: #333;
    margin-bottom: 40px;
}

.contact-section {
    margin-bottom: 40px;
}

.contact-section-title {
    font-size: 32px;
    font-weight: 520;
    color: #333;
    margin-bottom: 16px;
}

.contact-text {
    font-size: 20px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.contact-text-link {
    color: #333;
    text-decoration: none;
}

.contact-text-link:hover {
    color: #cd0102;
    text-decoration: underline;
    transition: .15s;
}

/* Suggestions Page*/

.suggestion-content {
    max-width: 900px;
    padding: 0 20px;
}

.suggestion-heading {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

.suggestion-form {
    width: 100%;
}

.form-group {
    margin-bottom: 40px;
}

.form-label {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 400;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    color: #333;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background-color: white;
    outline: none;
    transition: border-color 0.2s;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    color: #333;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

.form-input:hover {
    border-color: #cd0102;
}

.form-input:focus {
    border-color: #cd0102;
}

.form-input::placeholder {
    color: #999;
}

.form-select:hover {
    border-color: #cd0102;
}

.form-select:focus {
    border-color: #cd0102;
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    color: #333;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background-color: white;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 280px;
}

.form-textarea:hover {
    border-color: #cd0102;
}

.form-textarea:focus {
    border-color: #cd0102;
}

.form-textarea:placeholder {
    color: #999;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.submit-btn {
    background-color: #cd0102;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.submit-btn:hover {
    background-color: #a01830;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Success message */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #c3e6cb;
    display: none;
}

.success-message.show {
    display: block;
}

/* Policy Detail Page */
.policy-detail-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 0 24px;
}

.policy-main {
    background-color: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.back-button {
    display: inline-block;
    margin-bottom: 20px;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.back-button:hover {
    color: #cd0102;
}

.policy-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.policy-number {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.policy-updated {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

.policy-title {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.2;
}

.policy-content {
    font-size: 20px;
    line-height: 1.8;
    color: #555;
}

.policy-content p {
    margin-bottom: 20px;
}

/* Policy Sidebar */
.policy-sidebar {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #cd0102;
    margin-bottom: 20px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.sidebar-link {
    display: block;
    padding: 10px 0;
    font-size: 15px;
    color: #333;
    text-decoration: underline;
    transition: color 0.2s;
    line-height: 1.5;
}

.sidebar-link:hover {
    color: #cd0102;
}

.sidebar-link-small {
    display: block;
    padding: 8px 0;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.5;
}

.sidebar-link-small:hover {
    color: #cd0102;
}

/* Bylaw Detail Page Specific Styles */
.bylaw-section {
    margin-bottom: 40px;
}

.bylaw-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.bylaw-list {
    margin-left: 20px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.bylaw-list li {
    margin-bottom: 12px;
    color: #555;
    font-size: 20px;
}

.bylaw-list ul,
.bylaw-list ol {
    margin-top: 12px;
    margin-left: 20px;
}

.policy-content .bylaw-section p {
    font-size: 20px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        padding: 15px 20px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .contact-heading {
        font-size: 36px;
    }

    .contact-section-title {
        font-size: 24px;
    }

    .contact-text {
        font-size: 16px;
    }

    .suggestion-heading {
        font-size: 36px;
    }

    .form-label {
        font-size: 14px;
    }

    .form-select,
    .form-textarea {
        font-size: 14px;
    }

    .submit-btn {
        width: 100%;
    }

    .policy-detail-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .policy-sidebar {
        order: 2;
    }

    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .section-content,
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .policy-main {
        padding: 25px;
    }

    .policy-title {
        font-size: 32px;
    }

    .policy-content {
        font-size: 18px;
    }

    .policy-metadata {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .bylaw-section-title {
        font-size: 18px;
    }

    .bylaw-list li {
        font-size: 18px;
    }

    .policy-content .bylaw-section p {
        font-size: 18px;
    }
}