/* 
   OVPA Website - Premium Institutional Design 
   Refining traditional UP identity with modern aesthetics.
*/

/* ===== Imports ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Merriweather:wght@400;700;900&display=swap');

/* ===== CSS Variables ===== */
:root {
    /* Refined Institutional Color Palette (HSL for precision) */
    --color-maroon-primary: hsl(348, 83%, 28%);
    --color-maroon-dark: hsl(348, 83%, 20%);
    --color-maroon-light: hsl(348, 83%, 40%);
    --color-maroon-soft: hsla(348, 83%, 28%, 0.1);
    
    --color-gold: hsl(45, 100%, 50%);
    --color-forest: hsl(145, 63%, 32%);
    
    /* Neutrals */
    --color-bg-base: hsl(210, 40%, 98%);
    --color-bg-card: hsl(0, 0%, 100%);
    --color-text-main: hsl(222, 47%, 11%);
    --color-text-muted: hsl(215, 25%, 40%);
    --color-border: hsl(214, 32%, 91%);
    
    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Elevation & Shadows */
    --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);
    
    /* Spacing & Layout */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --container-max: 1280px;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== High Contrast Accessibility Mode ===== */
body.high-contrast {
    background-color: #000000 !important;
    color: #FFFF00 !important;
}

body.high-contrast p,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast span,
body.high-contrast li,
body.high-contrast div {
    color: #FFFFFF !important;
}

body.high-contrast a {
    color: #00FFFF !important;
    text-decoration: underline !important;
}

body.high-contrast .card,
body.high-contrast section,
body.high-contrast header,
body.high-contrast footer,
body.high-contrast nav,
body.high-contrast div[style*="background"] {
    background-color: #121212 !important;
    border-color: #FFFFFF !important;
}

body.high-contrast .btn,
body.high-contrast button {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    border: 2px solid #FFFFFF !important;
    font-weight: 800 !important;
}

/* ===== Reset & Base Styles ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-base);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); position: relative; padding-bottom: 1rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--color-maroon-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

/* ===== Layout ===== */
.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Modern Search Components V2 */
.search-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.search-group:focus-within {
    background: white;
    border-color: var(--color-maroon-primary);
    box-shadow: 0 10px 15px -3px rgba(121, 23, 23, 0.2), 0 4px 6px -2px rgba(121, 23, 23, 0.1);
    transform: translateY(-2px);
}

.search-input-field {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-main);
    background: transparent;
    outline: none;
    font-weight: 500;
}

.search-submit-btn {
    background: var(--color-maroon-primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-heading);
}

.search-submit-btn:hover {
    background: var(--color-maroon-dark);
    box-shadow: 0 4px 12px rgba(121, 23, 23, 0.3);
}

/* Professional Select Component */
.form-select-premium {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25em;
    padding: 0.85rem 2.5rem 0.85rem 1.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-main);
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-select-premium:focus {
    border-color: var(--color-maroon-primary);
    outline: none;
}

/* Premium Form Input Components */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-maroon-primary);
    box-shadow: 0 0 0 4px rgba(121, 23, 23, 0.1);
}

.form-control::placeholder {
    color: #94a3b8;
}

.section {
    padding: clamp(4rem, 8vw, 6rem) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-maroon-primary);
    border-radius: 2px;
}

/* ===== Header & Navigation ===== */
.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-base);
}

.header-top {
    background: var(--color-text-main);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-main {
    padding: 1rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-title {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 800;
    color: var(--color-maroon-primary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.site-description {
    font-size: 0.813rem;
    color: var(--color-text-muted);
}

/* Navigation */
.main-navigation {
    padding: 0.25rem 0;
    background: white;
    border-top: 1px solid var(--color-border);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-menu a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-text-main);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.nav-menu a:hover, .nav-menu a.active {
    background: var(--color-maroon-soft);
    color: var(--color-maroon-primary);
}

/* ===== Mega Menu Styles ===== */
.nav-menu li.has-dropdown {
    position: relative;
}

.nav-menu li {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: max-content;
    max-width: 80vw;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    pointer-events: none;
    padding: 1.5rem;
}

.nav-menu li.has-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Ensure empty space between item and menu doesn't break hover */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
}

.mega-menu-content {
    display: flex;
    gap: 3rem;
}

.mega-column {
    min-width: 200px;
    text-align: left;
}

.mega-column h4 {
    font-size: 0.813rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mega-column ul li {
    margin: 0;
    padding: 0;
}

.mega-column ul li a {
    color: var(--color-text-main);
    font-size: 0.875rem;
    padding: 0.4rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: var(--radius-sm);
    display: block;
    font-weight: 500;
    font-family: var(--font-body);
}

.mega-column ul li a:hover {
    background: var(--color-maroon-soft);
    color: var(--color-maroon-primary);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: clamp(4rem, 10vw, 8rem) 0;
    background-color: #ffffff;
    background: radial-gradient(circle at 20% 80%, hsla(145, 63%, 45%, 0.25) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, hsla(348, 83%, 28%, 0.1) 0%, transparent 50%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 86c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm76-65c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM54 54c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%238b0000' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero-tagline {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-maroon-primary);
    margin-bottom: 1.5rem;
    display: inline-block;
    font-size: 0.875rem;
}

/* ===== Cards & Grids ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-maroon-soft);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.card-meta {
    font-size: 0.813rem;
    color: var(--color-maroon-primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: block;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.938rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    gap: 0.5rem;
    text-align: center;
}

.btn-primary {
    background: var(--color-maroon-primary);
    color: white;
    box-shadow: 0 4px 14px 0 hsla(348, 83%, 28%, 0.25);
}

.btn-primary:hover {
    background: var(--color-maroon-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 hsla(348, 83%, 20%, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-maroon-primary);
    color: var(--color-maroon-primary);
}

.hero .btn-outline {
    border-color: var(--color-maroon-primary);
    color: var(--color-maroon-primary);
}

.hero .btn-outline:hover {
    background: var(--color-maroon-primary);
    color: white;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-text-main);
    color: white;
    padding: 5rem 0 2rem;
    margin-top: 4rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.1);
}

.footer-widget h3 {
    color: var(--color-gold);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget a {
    color: hsla(0, 0%, 100%, 0.7);
    display: block;
    padding: 0.4rem 0;
    font-size: 0.938rem;
}

.footer-widget a:hover {
    color: var(--color-gold);
    padding-left: 0.25rem;
}

.site-footer .btn-outline {
    border-color: hsla(0, 0%, 100%, 0.4);
    color: hsla(0, 0%, 100%, 0.8);
}

.site-footer .btn-outline:hover {
    background: white;
    color: var(--color-text-main);
    border-color: white;
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: hsla(0, 0%, 100%, 0.5);
}

/* ===== Utility Classes ===== */
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* ===== Responsive Toggle ===== */
.menu-toggle {
    display: none;
    background: var(--color-maroon-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin: 0 auto;
}

/* ===== Responsive Fixes ===== */
@media (max-width: 1024px) {
    .nav-menu { gap: 0.25rem; }
    .nav-menu a { padding: 0.625rem 0.5rem; font-size: 0.813rem; }
}

@media (max-width: 768px) {
    .site-branding { flex-direction: column; text-align: center; }
    .section { padding: 4rem 0; }
    .hero { text-align: center; padding: 4rem 0; }
    
    .menu-toggle { display: block; }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }
    
    .nav-menu.active { display: flex; }
    
    .btn { width: 100%; }
    .btn + .btn { margin-left: 0 !important; margin-top: 1rem; }
}
/* ===== Refined Minimalist Page Layouts ===== */
.breadcrumb {
    display: flex !important;
    justify-content: center;
    gap: 0.5rem;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto 2rem !important;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin-right: 0.5rem;
    color: #cbd5e1;
}

.breadcrumb-item a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--color-maroon-primary);
}

.content-body {
    max-width: 850px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--color-text-main);
}

.content-body p {
    margin-bottom: 1.8rem;
}

.content-body h3 {
    margin: 5rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    font-size: 2.2rem;
    color: var(--color-text-main);
    font-family: var(--font-heading);
}

.content-body h4 {
    margin: 3.5rem 0 1.2rem;
    color: var(--color-maroon-primary);
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content-body ul, .content-body ol {
    margin: 2rem 0 3rem;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 1rem;
}

.content-body strong {
    color: var(--color-text-main);
}
