/* === Tagaytay City Portal Theme - styles.css === */

/* --- 1. Global Settings & Variables --- */
:root {
    --primary-color: #006837; /* Tagaytay Green */
    --primary-color-dark: #004d2a;
    --primary-color-light: #e6f0eb;
    
    --secondary-color: #f3f4f6; /* Light gray background */
    
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    
    --border-color: #d1d5db;
    --white: #ffffff;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: var(--font-sans);
    background-color: var(--secondary-color);
    color: var(--text-medium);
    margin: 0;
    line-height: 1.5;
}

*, *::before, *::after {
    box-sizing: border-box;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}
a:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* --- 2. Re-usable Layout & Utility Classes (from Tailwind) --- */
.container {
    width: 100%;
    max-width: 1280px; /* from container.mx-auto */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;  /* px-4 */
    padding-right: 1rem; /* px-4 */
}
@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem; /* sm:px-6 */
        padding-right: 1.5rem;
    }
}
@media (min-width: 1024px) {
    .container {
        padding-left: 2rem; /* lg:px-8 */
        padding-right: 2rem;
    }
}

/* Margins & Padding */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-6 { padding-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: -2.5rem; } /* -mt-10 */
.mt-16 { margin-top: 4rem; }
.ml-auto { margin-left: auto; }

/* Flex & Grid */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:mt-0 { margin-top: 0; }
}

/* Sizing */
.w-full { width: 100%; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.w-48 { width: 12rem; }
.w-56 { width: 14rem; }
.h-48 { height: 12rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.min-h-screen { min-height: 100vh; }
.w-px { width: 1px; }

/* Borders & Shadows & Appearance */
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-transparent { border-color: transparent; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: var(--border-color); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.overflow-hidden { overflow: hidden; }
.object-cover { object-fit: cover; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-20 { top: 5rem; }
.top-44 { top: 11rem; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.right-0 { right: 0; }
.hidden { display: none; }
.block { display: block; }

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Colors (Base) */
.bg-white { background-color: var(--white); }
.bg-gray-100 { background-color: var(--secondary-color); }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-black { background-color: #000; }
.bg-opacity-50 { opacity: 0.5; } /* Simplified */

.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: var(--text-light); }
.text-gray-600 { color: var(--text-medium); }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: var(--text-dark); }
.text-white { color: var(--white); }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-yellow-500 { color: #eab308; }
.text-green-600 { color: #16a34a; }

/* --- 3. Themed Component Styles (Tagaytay Green Theme) --- */

/* Backgrounds (Blue -> Green) */
.bg-blue-700, .bg-blue-600, .bg-blue-800 {
    background-color: var(--primary-color) !important;
}
.bg-blue-900 {
    background-color: var(--primary-color-dark) !important;
}
.bg-blue-50 {
    background-color: var(--primary-color-light) !important;
}
.bg-blue-100 {
    background-color: var(--primary-color-light) !important;
}
.bg-green-600 { background-color: var(--primary-color); }

/* Text Colors (Blue -> Green) */
.text-blue-700, .text-blue-600, .text-blue-800 {
    color: var(--primary-color) !important;
}
.text-blue-100, .text-blue-200 {
    color: #cde2d6 !important;
}
.text-blue-500 {
    color: var(--primary-color) !important;
}

/* Hover/Focus States (Blue -> Green) */
.hover\:bg-blue-700:hover, .hover\:bg-blue-800:hover {
    background-color: var(--primary-color-dark) !important;
}
.hover\:bg-blue-200:hover {
    background-color: #cde2d6 !important; /* Darker light green */
}
.hover\:text-blue-700:hover, .hover\:text-blue-500:hover {
    color: var(--primary-color-dark) !important;
}
.hover\:text-white:hover {
    color: var(--white);
}

.focus\:ring-blue-500:focus {
    --tw-ring-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color);
}
.focus\:border-blue-500:focus {
    border-color: var(--primary-color);
}

/* --- 4. Forms (Inputs, Selects, Buttons) --- */
input[type="text"],
input[type="email"],
input[type="password"],
select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input::placeholder {
    color: #9ca3af;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-light);
}
input:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray-700);
}

button {
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease-in-out;
}

/* Primary Button (replaces .bg-blue-600) */
.bg-blue-600 {
    display: inline-flex;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--white);
    background-color: var(--primary-color);
}
.bg-blue-600:hover {
    background-color: var(--primary-color-dark);
}
.bg-blue-600:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Secondary Button (replaces .bg-blue-100) */
.bg-blue-100 {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    background-color: var(--primary-color-light);
    color: var(--primary-color-dark);
}
.bg-blue-100:hover {
    background-color: #cde2d6; /* Darker light green */
}

/* --- 5. Specific Components --- */

/* Header */
nav.bg-white {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}
nav .h-16 {
    height: 4rem;
}
nav .w-px {
    width: 1px;
    background-color: #e5e7eb;
}
/* User Dropdown */
#auth-dropdown {
    position: relative;
}
#dropdown-menu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: var(--white);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    z-index: 50;
}
#dropdown-menu a, #dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-gray-700);
    background: none;
    border: none;
}
#dropdown-menu a:hover, #dropdown-menu button:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
}


/* Hero Headers */
header.bg-blue-800 {
    position: relative;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 0;
}
header.bg-blue-800 h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
header.bg-blue-800 p {
    font-size: 1.125rem;
    color: #cde2d6; /* text-blue-100 */
}

/* Footer */
footer.bg-blue-900 {
    background-color: var(--primary-color-dark);
    color: var(--white);
    margin-top: 4rem;
}
footer h5 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}
footer p, footer li {
    font-size: 0.875rem;
    color: #cde2d6; /* text-blue-200 / 100 */
}
footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
footer .space-y-2 > :not([hidden]) ~ :not([hidden]) { 
    margin-top: 0.5rem; 
}
footer a {
    color: #cde2d6;
}
footer a:hover {
    color: var(--white);
}
footer .border-t {
    border-color: #008a48; /* border-blue-700 */
}

/* Modal */
#details-modal {
    z-index: 60;
    background-color: rgba(0, 0, 0, 0.5);
}
#details-modal img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-radius: 0.375rem;
    margin-top: 1rem;
}
#modal-close-btn-footer {
    background-color: var(--text-medium);
}
#modal-close-btn-footer:hover {
    background-color: var(--text-dark);
}


/* Progress Bar */
.bg-gray-200.rounded-full {
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 0.625rem;
}
.bg-green-600.h-2\.5 {
    background-color: var(--primary-color);
    height: 0.625rem;
}
.bg-yellow-500.h-2\.5 {
    background-color: #eab308;
    height: 0.625rem;
}
.bg-red-500.h-2\.5 {
    background-color: #ef4444;
    height: 0.625rem;
}

/* --- 6. Animation --- */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* --- Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(10px); /* Start slightly lower */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}