/* General Body and Layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    line-height: 1.6;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.main-header {
    background-color: #003366;
    color: #fff;
    padding: 0.5rem 0; /* Adjusted padding for logo height */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- NEW: Logo Image Styling --- */
.logo-image {
    height: 50px; /* Controls the height of the logo */
    width: auto;  /* Allows width to scale proportionally */
    display: block; /* Removes extra space below the image */
}
/* --- End of New Styles --- */

.main-header .logo h1 {
    margin: 0;
    font-size: 1.8rem;
}
.main-header .logo a {
    color: #fff;
    text-decoration: none;
}
.main-header .main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-header .main-nav ul li {
    display: inline-block;
    margin-left: 1.5rem;
}
.main-header .main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}
.main-header .main-nav a:hover {
    border-color: #fff;
}

/* Main Content Area (for search pages) */
.main-content {
    padding: 2.5rem 0;
}
.main-content > .container {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.07);
}

/* Footer */
.main-footer {
    background-color: #343a40;
    color: #adb5bd;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2.5rem;
}

/* Search Form */
.search-form {
    border: 1px solid #e0e0e0;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    background-color: #fafafa;
}
.search-form h2 {
    margin-top: 0;
    border-bottom: 2px solid #003366;
    padding-bottom: 0.5rem;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.form-group input, .form-group select {
    padding: 0.7rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}
.btn-primary {
    background-color: #0056b3;
    color: white;
}
.btn-primary:hover {
    background-color: #004494;
}
.btn-secondary {
    background-color: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* Old Results Table - Kept for Statutes page */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}
.results-table th, .results-table td {
    padding: 0.8rem 1rem;
    border: 1px solid #e0e0e0;
    text-align: left;
}
.results-table th {
    background-color: #f2f2f2;
    font-weight: 600;
}
.results-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.results-table a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
}
.results-table a:hover {
    text-decoration: underline;
}

.no-results {
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: #666;
}

/* Single View Page (Statutes) */
.embed-container {
    position: relative;
    padding-bottom: 141.42%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border: 1px solid #ccc;
}
.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Homepage Styles */
.main-content {
    padding: 0;
}
.hero-section {
    background-color: #003366;
    color: #fff;
    padding: 4rem 0;
    display: flex;
    align-items: center;
}
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}
.hero-content { flex: 1; text-align: left; }
.hero-content h2 { font-size: 2.8rem; margin-bottom: 1rem; color: #fff; }
.hero-content p { font-size: 1.2rem; max-width: 700px; margin: 0 0 2rem 0; color: rgba(255, 255, 255, 0.9); }
.cta-buttons .btn { padding: 0.8rem 2rem; font-size: 1.1rem; margin-right: 1rem; }
.hero-profile { flex-shrink: 0; }
.profile-card { background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px; padding: 1.5rem; text-align: center; width: 300px; }
.profile-image { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; margin-bottom: 1rem; }
.profile-details { color: #fff; }
.profile-name { font-size: 1.4rem; font-weight: 700; }
.profile-designation { font-size: 1rem; color: rgba(255, 255, 255, 0.8); margin: 0.25rem 0 0.75rem; }
.profile-phone { font-size: 1.1rem; font-weight: 500; }
.features-section { padding: 4rem 0; background-color: #fff; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; text-align: center; }
.feature-card h3 { color: #003366; font-size: 1.5rem; }
.recent-additions { padding: 4rem 0; background-color: #f0f2f5; }
.recent-additions h2 { text-align: center; font-size: 2.2rem; margin-bottom: 2.5rem; }
.recent-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.recent-column h3 { border-bottom: 2px solid #0056b3; padding-bottom: 0.5rem; margin-bottom: 1rem; }
.recent-list { list-style: none; padding: 0; }
.recent-item a { display: block; padding: 0.8rem 0; border-bottom: 1px solid #e0e0e0; text-decoration: none; color: #0056b3; font-weight: 500; transition: background-color 0.2s; }
.recent-item a:hover { background-color: #e9ecef; }
@media (max-width: 992px) { .hero-container { flex-direction: column; text-align: center; } .hero-content { text-align: center; } .hero-content p { margin: 0 auto 2rem; } }
@media (max-width: 768px) { .recent-columns { grid-template-columns: 1fr; } }

/* Judgment/Statute View Page Styles */
.view-header-top { text-align: center; margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #ddd; }
.view-header-top h2 { font-size: 2rem; color: #003366; margin: 0; }
.view-header-top p { font-size: 1.1rem; color: #555; margin: 0.5rem 0 0; }
.meta-table { width: 100%; border-collapse: collapse; margin-bottom: 2.5rem; font-size: 1rem; background-color: #fff; }
.meta-table th, .meta-table td { padding: 1rem; border: 1px solid #e9ecef; text-align: left; vertical-align: top; }
.meta-table th { background-color: #f8f9fa; font-weight: 700; color: #343a40; width: 25%; }
.final-remarks-box { background-color: #eef7ff; border-left: 5px solid #0056b3; padding: 1.5rem; margin-bottom: 3rem; border-radius: 4px; }
.final-remarks-box h4 { margin-top: 0; margin-bottom: 0.5rem; color: #003366; }
.final-remarks-box p:first-child { margin-top: 0; }
.final-remarks-box p:last-child { margin-bottom: 0; }
.judgment-body-container { max-width: 850px; margin: 0 auto; background-color: #fff; padding: 2rem; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }


/* Redesigned Search Results List */
.results-heading {
    font-size: 1.8rem;
    color: #343a40;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}
.results-list {
    margin-top: 2rem;
}
.result-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto; /* Content on left, actions on right */
    gap: 1rem 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.result-meta {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem; /* row-gap column-gap */
    align-items: center;
    margin-bottom: 1rem;
}
.meta-citation {
    font-size: 1.2rem;
    font-weight: 700;
    color: #003366;
}
.meta-court {
    font-size: 1rem;
    color: #555;
    padding-left: 1.5rem;
    border-left: 2px solid #ccc;
}
.result-remarks {
    grid-column: 1 / -1; /* Span full width */
    grid-row: 2 / 3;
    color: #444;
    line-height: 1.5;
}
.result-actions {
    grid-column: 2 / 3;
    grid-row: 1 / 2; /* Align with the top meta info */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}
.btn.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    text-align: center;
}
@media (max-width: 600px) {
    .result-item {
        grid-template-columns: 1fr; /* Stack everything on small screens */
    }
    .result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .meta-court {
        padding-left: 0;
        border-left: none;
    }
    .result-actions {
        grid-row: 3 / 4; /* Move actions to the bottom */
        flex-direction: row;
        margin-top: 1rem;
    }
}