@font-face {
    font-family: 'Horizon';
    src: url('fonts/horizon.otf') format('opentype'); 
    font-weight: normal;
    font-style: normal;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'BebasNeue';
    src: url('fonts/bebasneue.otf') format('opentype'); 
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, Geneva, Verdana, sans-serif;
    position: relative; /* Important for overlay positioning */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120vh;
    background-color: #f0f4f8; /* Fallback color */
}

/* Create a pseudo-element for the background image */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/background4.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.5; 
    filter: brightness(0.5);
    z-index: -1; /* Place it behind all other content */
}

/* Ensure content remains sharp and visible */
.main-container, .form-container, .dashboard-container, .header {
    position: relative; /* Ensures these elements appear above the background */
    z-index: 1;
}

.barangay img.pic {
    width: 750px;
    height: 750px;
    position: relative;
    margin-right: 660px;
}
 
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    background-color: #f8d775;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header img.logo {
    height: 60px;
    width: 60px;
    border: none;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header h1.title{
    font-family: 'Horizon', Horizon;
    font-size: 28px;
    margin-top: 24px;
    margin-left: 80px;
    position: absolute;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.header p.subtitle{
    font-family: 'BebasNeue';
    font-size: 16px;
    margin-top: 30px;
    margin-left: 80px;
    position: absolute;
    letter-spacing: 0.5px;
}

.header .search-container {
    display: flex;
    align-items: center;
}

.header input[type="text"] {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.header .user-controls {
    display: relative;
    margin-left: auto;
}

.main-container {
    width: 90%; /* Changed from 100vh to 90% for better responsiveness */
    max-width: 1200px; /* Added max-width for very large screens */
    margin: 80px auto 20px;
    padding: 20px;
    position: relative;
    margin: 5 0 auto;
}

.form-container {
    width: 100%;
    max-width: 450px;
    padding: 25px; /* Increased padding */
    background-color: #fff;
    border-radius: 12px; /* Increased border radius */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    margin: 0 auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-container {
    width: 100%;
    padding: 25px; /* Increased padding */
    background-color: #fff;
    border-radius: 12px; /* Increased border radius */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    margin: 0 auto;
    margin-top: 50px;
    transition: transform 0.2s ease;
}

.dashboard-container:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
    flex-wrap: wrap; /* Added to prevent overflow on small screens */
}

.nav-tab {
    padding: 10px 20px;
    background-color: #f2f2f2;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-tab:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-tab.active {
    background-color: #444;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

h1, h2, h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

h1 {
    font-size: 26px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8d775;
    margin-bottom: 30px;
}

h2 {
    font-size: 22px;
    position: relative;
    padding-bottom: 10px;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: #f8d775;
}

h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    color: #333;
    transition: all 0.3s;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #f8d775;
    box-shadow: 0 0 0 2px rgba(248, 215, 117, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.05);
    outline: none;
}

select {
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0 0l6 6 6-6z" fill="%23333"/></svg>');
    padding-right: 30px;
}

/* Table styles - Improved for better readability and responsiveness */
.table-container {
    overflow-x: auto; /* Enables horizontal scrolling for wide tables */
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: left;
    padding: 12px 15px;
    border: 1px solid #ddd;
    position: sticky;
    top: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

td {
    padding: 10px 15px;
    border: 1px solid #ddd;
    vertical-align: middle;
    transition: background-color 0.2s;
}

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

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

/* Add some horizontal scrolling for tables that might overflow */
.table-responsive {
    overflow-x: auto;
    max-width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 10px;
    display: block;
    background-color: rgba(231, 76, 60, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
}

.success-message {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #27ae60;
    background-color: #e8f5e9;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Global Button Consistency Fix */
button,
.btn,
.btn-primary,
.btn-cancel,
.btn-secondary,
input[type="submit"],
input[type="button"] {
    /* Reset inconsistent properties */
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* Consistent dimensions */
    min-height: 42px;
    padding: 10px 20px;
    
    /* Consistent typography */
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    
    /* Consistent appearance */
    border: none;
    border-radius: 20px;
    margin: 0 3px 15px;
    
    /* Consistent behavior */
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    
    /* Consistent effects */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Prevent text wrapping causing issues */
    white-space: nowrap;
}

/* Specific styling variants without changing dimensions */
.btn {
    background-color: rgb(239, 235, 100);
    color: black;
}

.btn-primary {
    background-color: #444;
    color: white;
}

.btn-cancel {
    background-color: #e74c3c;
    color: white;
}

.btn-secondary {
    background-color: #3498db;
    color: white;
}

/* Consistent hover states */
button:hover,
.btn:hover,
.btn-primary:hover,
.btn-cancel:hover,
.btn-secondary:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background-color: #333;
}

.btn-cancel:hover {
    background-color: #c0392b;
}

/* Fix for buttons in tables that might have unusual styling */
table button,
table .btn,
table input[type="submit"],
table input[type="button"],
td button,
td .btn,
td input[type="submit"],
td input[type="button"] {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 14px;
    margin: 2px;
    vertical-align: middle;
}

/* Fix for inline forms with buttons */
form[style*="display: inline"] button,
form[style*="display: inline"] .btn,
form[style*="display:inline"] button,
form[style*="display:inline"] .btn,
form[style*="display: inline;"] button,
form[style*="display: inline;"] .btn {
    margin: 0 2px;
    vertical-align: middle;
}

/* Improved action buttons container */
.action-buttons {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

/* Responsive button adjustments */
@media (max-width: 768px) {
    button,
    .btn,
    .btn-primary,
    .btn-cancel,
    .btn-secondary,
    input[type="submit"],
    input[type="button"] {
        padding: 8px 16px;
        font-size: 14px;
        min-height: 38px;
    }
}


form {
    padding: 20px;
}

label {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 6px;
    display: block;
    font-weight: 600;
}

.auth-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #7f8c8d;
}

.auth-link a {
    color: #f8d775;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.auth-link a:hover {
    text-decoration: underline;
    color: #f5c542;
}

/* Enhanced Card Styles */
.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #f8d775;
    padding-bottom: 8px;
}

.card-content {
    font-size: 14px;
    line-height: 1.6;
}

/* Dashboard Grid Layout */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-summary .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Statistics Card */
.stat-card {
    text-align: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background-color: #f9f9f9;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #444;
    margin: 10px 0;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background-color: #4CAF50;
    color: white;
}

.status-pending {
    background-color: #FF9800;
    color: white;
}

.status-inactive {
    background-color: #F44336;
    color: white;
}

.attendance-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.attendance-registered {
    background-color: #2196F3;
    color: white;
}

.attendance-attended {
    background-color: #4CAF50;
    color: white;
}

.attendance-absent {
    background-color: #F44336;
    color: white;
}

/* Detail table for user profiles */
.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th {
    width: 200px;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
    background-color: #f8f8f8;
}

.detail-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

/* Form groups for profile pages */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group small {
    display: block;
    color: #777;
    font-size: 12px;
    margin-top: 5px;
}

/* Announcements styling */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.announcement-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
}

.announcement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.announcement-header {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.announcement-header h3 {
    margin: 0 0 5px 0;
    color: #333;
    text-align: left;
}

.announcement-date {
    font-size: 14px;
    color: #777;
}

.announcement-content {
    margin-bottom: 10px;
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    color: #f8d775;
    font-weight: bold;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Responsive table containment */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Ensure tables don't break layout on small screens */

@media (max-width: 1200px) {
    .main-container {
        width: 95%;
        max-width: 100%;
    }
    
    .dashboard-summary {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .header h1.title {
        font-size: 24px;
    }
    
    .header p.subtitle {
        font-size: 14px;
    }
    
    .report-generators {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        min-height: 100vh;
    }
    
    .header {
        padding: 5px 10px;
        flex-wrap: wrap;
    }
    
    .header h1.title {
        font-size: 20px;
        margin-left: 70px;
    }
    
    .header p.subtitle {
        font-size: 12px;
        margin-left: 70px;
    }
    
    .header img.logo {
        height: 50px;
        width: 50px;
    }
    
    .header .user-controls {
        margin-top: 5px;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    
    .main-container {
        width: 100%;
        padding: 15px;
        margin-top: 100px;
    }
    
    .form-container, .dashboard-container {
        padding: 15px;
    }
    
    .detail-table th {
        width: 120px;
    }
    
    .barangay img.pic {
        width: 100%;
        height: auto;
        margin-right: 0;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button,
    .action-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .header h1.title {
        font-size: 18px;
        margin-top: 20px;
        margin-left: 60px;
    }
    
    .header p.subtitle {
        font-size: 10px;
        margin-top: 25px;
        margin-left: 60px;
    }
    
    .header img.logo {
        height: 40px;
        width: 40px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    .form-container, .dashboard-container {
        padding: 12px;
        border-radius: 8px;
    }
    
    .nav-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        padding: 10px;
        font-size: 14px;
    }
    
    .feedback-btn {
        padding: 8px 15px;
        font-size: 12px;
        bottom: 15px;
        right: 15px;
    }
    
    .dashboard-summary {
        grid-template-columns: 1fr;
    }
    
    .report-generators {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

/* Fixed position elements adjustment for smaller screens */
@media (max-height: 700px) {
    .header {
        position: absolute;
    }
    
    .feedback-btn {
        position: static;
        display: block;
        margin: 20px auto;
        width: fit-content;
    }
}

/* Improved table responsiveness */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        overflow: hidden;
    }
    
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    td:before {
        position: absolute;
        top: 12px;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
        content: attr(data-label);
    }
    
    td:last-child {
        border-bottom: 0;
    }
    
    .detail-table td, .detail-table th {
        text-align: left;
        display: block;
        width: 100%;
    }
    
    .detail-table td {
        padding-left: 12px;
    }
}

/* Ensure flex items wrap properly on small screens */
@media (max-width: 480px) {
    .nav-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-tab {
        margin-bottom: 5px;
        text-align: center;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) {
    .btn, button, input[type="submit"], input[type="button"] {
        padding: 12px 20px; /* Larger touch targets */
    }
    
    select {
        padding: 14px 12px; /* Larger touch targets for dropdowns */
    }
    
    input[type="checkbox"], input[type="radio"] {
        transform: scale(1.2); /* Slightly larger checkboxes and radio buttons */
    }
}
@media (max-width: 768px) {
    .main-container {
        width: 95%;
        padding: 10px;
    }
    
    .form-container, .dashboard-container {
        width: 100%;
        padding: 15px;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .nav-tab {
        font-size: 14px;
        padding: 8px 15px;
        margin-bottom: 5px;
    }

    th, td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .stat-card, .card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    button, .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

/* Event detail styling */
.event-details table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.event-details th {
    width: 150px;
    text-align: left;
    padding: 12px;
    background-color: #f2f2f2;
    border: 1px solid #ddd;
}

.event-details td {
    padding: 12px;
    border: 1px solid #ddd;
}

.registration-badge {
    display: inline-block;
    background-color: #f8d775;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge {
    display: inline-block;
    background-color: #f2f2f2;
    color: #333;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 14px;
    margin: 2px;
}

.action-buttons {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Report generators styling */
.report-generators {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.report-generator-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.report-generator-item:hover {
    background-color: #f0f4f8;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.report-generator-item h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    text-align: left;
}

.report-generator-item form {
    margin-top: 15px;
}

/* Feedback button styling */
.feedback-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #f8d775;
    color: #333;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.feedback-btn:hover {
    background-color: #f5c542;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}
