/* Custom styles for P2R Consortium website */

/* Footer link color fix */
.text-black { 
    color: #000 !important; 
}
.text-black:visited { 
    color: #000 !important; 
}

/* Footer border top with padding and opacity */
.footer-border-top {
    border-top: 1px solid rgba(12, 105, 168, 0.2);
    padding: 6px;
    margin-top: 10px;
}

/* Typography system loaded from p2r-typography.css */

/* Custom properties for consistent theming */
:root {
    --p2r-charcoal: #393e46;
    --p2r-lavender: #ada7c9;
    --p2r-blue: #0c69a8;
    --p2r-blue-light: #137dc5;
    --p2r-gray: #e0e1dd;
}

.bg-p2r-lavender {
    background-color: var(--p2r-lavender) !important;
}

/* Base typography - now uses Montserrat from p2r-typography.css */
body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--p2r-charcoal);
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Fixed header compensation */
body {
    padding-top: 140px; /* Account for fixed header height */
}

/* Anchor section offset for fixed header */
.anchor-section {
    scroll-margin-top: 240px; /* Header height + additional offset */
}

/* Global scroll offset for all anchor targets */
[id] {
    scroll-margin-top: 180px;
}

/* Mobile responsive header spacing */
@media (max-width: 768px) {
    body {
        padding-top: 72px; /* Reduced height for mobile header */
    }
    
    .anchor-section {
        scroll-margin-top: 172px; /* Mobile header + additional offset */
    }
}

/* Main content area adjustment */
main {
    position: relative;
}

/* Focus management for anchor targets - suppress focus outline */
.anchor-section h1,
.anchor-section h2,
.anchor-section h3,
h1[tabindex="-1"],
h2[tabindex="-1"],
h3[tabindex="-1"],
h4[tabindex="-1"],
h5[tabindex="-1"],
h6[tabindex="-1"] {
    outline: none !important;
    box-shadow: none !important;
}

/* Suppress all focus outlines on headings when programmatically focused */
h1:focus,
h2:focus,
h3:focus,
h4:focus,
h5:focus,
h6:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Active anchor link highlighting */
a.active-anchor {
    background-color: var(--p2r-blue);
    color: white !important;
    border-radius: 4px;
    padding: 2px 8px;
    margin: -2px -8px;
    transition: all 0.3s ease;
}

/* Active section highlighting */
.anchor-section.in-view {
    position: relative;
}

/* Fix for cursor-pointer tiles that should be fully clickable */
.cursor-pointer {
    position: relative;
}

.cursor-pointer:has(a[href]) {
    cursor: pointer;
}

/* Style for making the entire clickable area work */
.cursor-pointer a[href] {
    position: static;
}

.cursor-pointer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.anchor-section.in-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--p2r-blue), var(--p2r-blue-light));
    border-radius: 2px;
    opacity: 0;
    animation: slideInLeft 0.5s ease forwards;
}

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

/* Enhanced anchor section transitions */
.anchor-section {
    transition: all 0.3s ease;
}

.anchor-section.in-view .p2rSectionTitle {
    color: var(--p2r-blue);
    transition: color 0.3s ease;
}

/* Heading styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.font-bebas {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Navigation enhancements */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:visible {
    visibility: visible;
}

/* Card hover effects */
.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* P2R Utility Classes */
.bg-p2r-blue {
    background-color: var(--p2r-blue) !important;
    background: #0C69A8;
}

.bg-p2r-blue-light {
    background-color: var(--p2r-blue-light) !important;
    background: #137dc5;
}

.bg-p2r-charcoal {
    background-color: var(--p2r-charcoal) !important;
}

.text-p2r-blue {
    color: var(--p2r-blue) !important;
    color: #0C69A8;
}

.text-p2r-blue-light {
    color: var(--p2r-blue-light) !important;
}

.text-p2r-charcoal {
    color: var(--p2r-charcoal) !important;
}

.border-p2r-blue {
    border-color: var(--p2r-blue) !important;
}

.hover\:text-p2r-blue-light:hover {
    color: var(--p2r-blue-light) !important;
}

.hover\:bg-p2r-blue-light:hover {
    background-color: var(--p2r-blue-light) !important;
}

.hover\:bg-p2r-blue-dark:hover {
    background: #0b5a8f !important;
}

/* Button styles */
.btn-primary {
    background-color: var(--p2r-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--p2r-blue-light);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--p2r-lavender);
    color: var(--p2r-charcoal);
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: rgba(173, 167, 201, 0.8);
    text-decoration: none;
}

/* Form styling */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--p2r-blue);
    box-shadow: 0 0 0 3px rgba(12, 105, 168, 0.1);
}

/* Hero section background overlay */
.hero-overlay {
    background: linear-gradient(rgba(57, 62, 70, 0.7), rgba(57, 62, 70, 0.7));
}

/* Card styles */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Responsive image handling */
img {
    max-width: 100%;
    height: auto;
}

/* Calendar styling */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
}

.calendar-cell {
    background-color: white;
    padding: 0.5rem;
    min-height: 100px;
    border: 1px solid #e5e7eb;
}

.calendar-event {
    font-size: 0.75rem;
    background-color: var(--p2r-blue);
    color: white;
    padding: 0.25rem;
    border-radius: 0.25rem;
    margin: 0.125rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Expandable sections */
.expandable-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.expandable-header {
    background-color: var(--p2r-blue);
    color: white;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expandable-content {
    padding: 1rem;
    background-color: white;
}

.expandable-content ul {
    list-style: none;
    padding: 0;
}

.expandable-content li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.expandable-content li:last-child {
    border-bottom: none;
}

/* Footer enhancements */
footer {
    background-color: #f9fafb;
}

/* Section Title Styling */
.p2rSectionTitle {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 600; /* font-semibold */
    color: var(--p2r-blue); /* Changed to P2R blue */
    margin-bottom: 1.5rem; /* mb-6 */
    position: relative;
    padding-bottom: 0.75rem;
}

.p2rSectionTitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 240px; /* Doubled width */
    height: 3px;
    background-color: #ada7c9; /* P2R lavender color */
    border-radius: 2px;
}

/* Utility classes */
.text-p2r-charcoal {
    color: var(--p2r-charcoal);
}

.text-p2r-blue {
    color: var(--p2r-blue);
}

.text-p2r-blue-light {
    color: var(--p2r-blue-light);
}

.bg-p2r-charcoal {
    background-color: var(--p2r-charcoal);
}

.bg-p2r-lavender {
    background-color: var(--p2r-lavender);
}

.bg-p2r-blue {
    background-color: var(--p2r-blue);
}

.bg-p2r-blue-light {
    background-color: var(--p2r-blue-light);
}

.bg-p2r-gray {
    background-color: var(--p2r-gray);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-bebas.text-6xl {
        font-size: 2.5rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .hero-overlay {
        padding: 2rem 1rem;
    }
    
    .grid.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--p2r-blue);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Dropdown collapse override - force hide dropdowns when collapsed */
.dropdown-collapsed .absolute {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.dropdown-collapsed:hover .absolute {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}