/**
 * KSTPA Public Website — Interior Pages Stylesheet
 * Covers: About Us, Contact Us, Gallery, Events, News, Notices, Committee, Legal Pages
 * Author: Antigravity
 * Version: 1.0 (Production Institutional)
 */

/* ==========================================================================
   1. SHARED INTERIOR COMPONENTS
   ========================================================================== */

.kstpa-interior-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 991px) {
    .kstpa-interior-grid {
        grid-template-columns: 1fr;
    }
}

.kstpa-main-col {
    min-width: 0;
    width: 100%;
}

.kstpa-content-card {
    background-color: #ffffff;
    border: 1px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--kstpa-shadow-sm);
    margin-bottom: 2rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kstpa-content-card h2,
.kstpa-content-card h3 {
    color: var(--kstpa-navy);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.kstpa-content-card h2:first-child,
.kstpa-content-card h3:first-child {
    margin-top: 0;
}

.kstpa-content-card p {
    color: var(--kstpa-text-primary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.kstpa-content-card ul,
.kstpa-content-card ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.kstpa-content-card li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Sidebar Widgets */
.kstpa-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.kstpa-widget {
    background-color: #ffffff;
    border: 1px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-lg);
    padding: 1.75rem;
    box-shadow: var(--kstpa-shadow-sm);
}

.kstpa-widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--kstpa-navy);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--kstpa-gold);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kstpa-widget-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.kstpa-widget-links a {
    color: var(--kstpa-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--kstpa-border-light);
    transition: all var(--kstpa-transition);
}

.kstpa-widget-links a:hover {
    color: var(--kstpa-blue);
    padding-left: 0.35rem;
}

/* ==========================================================================
   2. ABOUT US PAGE
   ========================================================================== */

.kstpa-about-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 3rem;
}

@media (max-width: 991px) {
    .kstpa-about-hero-grid {
        grid-template-columns: 1fr;
    }
}

.kstpa-about-map-box {
    background: #f8fafc;
    border: 2px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-xl);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--kstpa-shadow-md);
    position: relative;
}

.kstpa-about-map-box img {
    max-height: 380px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08));
}

.kstpa-map-badge {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    background-color: var(--kstpa-navy);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: var(--kstpa-radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: var(--kstpa-shadow-md);
}

.kstpa-objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.kstpa-objective-card {
    background: #ffffff;
    border: 1px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-md);
    padding: 1.5rem;
    box-shadow: var(--kstpa-shadow-sm);
    transition: all var(--kstpa-transition);
    border-left: 4px solid var(--kstpa-blue);
}

.kstpa-objective-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--kstpa-shadow-md);
}

.kstpa-objective-icon {
    font-size: 1.75rem;
    color: var(--kstpa-blue);
    margin-bottom: 0.75rem;
}

.kstpa-objective-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--kstpa-navy);
    margin-bottom: 0.5rem;
}

.kstpa-objective-card p {
    font-size: 0.875rem;
    color: var(--kstpa-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Timeline */
.kstpa-history-timeline,
.kstpa-timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
    border-left: 3px solid var(--kstpa-pub-border, rgba(215, 166, 67, 0.28));
}

.kstpa-history-timeline::after,
.kstpa-timeline::after {
    content: "";
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--kstpa-pub-primary), var(--kstpa-pub-accent));
    transform-origin: top center;
    transform: scaleY(var(--kstpa-scroll-progress, 1));
    transition: transform 120ms linear;
    pointer-events: none;
}

.kstpa-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.kstpa-timeline-item:last-child {
    margin-bottom: 0;
}

.kstpa-timeline-dot {
    position: absolute;
    left: -2.6rem;
    top: 0.2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--kstpa-gold);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px var(--kstpa-navy);
    z-index: 2;
}

.kstpa-timeline-year {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--kstpa-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kstpa-timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--kstpa-navy);
    margin: 0.25rem 0 0.5rem 0;
}

/* ==========================================================================
   3. CONTACT US PAGE
   ========================================================================== */

.kstpa-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 991px) {
    .kstpa-contact-grid {
        grid-template-columns: 1fr;
    }
}

.kstpa-contact-card {
    background: #ffffff;
    border: 1px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--kstpa-shadow-md);
}

.kstpa-secretariat-box {
    background: var(--kstpa-pub-panel-gradient);
    color: var(--kstpa-pub-text-inverse, #ffffff);
    border: 1px solid var(--kstpa-pub-accent-border);
    border-radius: var(--kstpa-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--kstpa-pub-shadow-lg), var(--kstpa-pub-btn-top-edge);
    position: relative;
    overflow: hidden;
}

.kstpa-secretariat-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--kstpa-pub-panel-shine, none);
    pointer-events: none;
    z-index: 0;
}

.kstpa-secretariat-box > * {
    position: relative;
    z-index: 1;
}

.kstpa-secretariat-box h3 {
    color: var(--kstpa-gold);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.kstpa-contact-detail {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.kstpa-contact-icon {
    width: 44px;
    height: 44px;
    background: var(--kstpa-pub-accent-soft);
    color: var(--kstpa-gold);
    border: 1px solid var(--kstpa-pub-accent-border);
    border-radius: var(--kstpa-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.kstpa-contact-detail-body h5 {
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.kstpa-contact-detail-body p,
.kstpa-contact-detail-body a {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
    text-decoration: none;
}

.kstpa-contact-detail-body a:hover {
    color: var(--kstpa-gold);
}

/* Contact Form */
.kstpa-form-group {
    margin-bottom: 1.5rem;
}

.kstpa-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kstpa-navy);
    margin-bottom: 0.5rem;
}

.kstpa-form-group label .req {
    color: #ef4444;
}

.kstpa-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--kstpa-text-primary);
    background-color: #f8fafc;
    border: 1px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-md);
    transition: all var(--kstpa-transition);
    font-family: inherit;
}

.kstpa-form-control:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--kstpa-blue);
    box-shadow: 0 0 0 3px var(--kstpa-pub-focus-ring);
}

.kstpa-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .kstpa-form-row {
        grid-template-columns: 1fr;
    }
}

.kstpa-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--kstpa-radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kstpa-alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.kstpa-alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   4. GALLERY PAGES
   ========================================================================== */

.kstpa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

.kstpa-album-card {
    background: #ffffff;
    border: 1px solid var(--kstpa-border);
    border-radius: var(--kstpa-radius-lg);
    overflow: hidden;
    box-shadow: var(--kstpa-shadow-sm);
    transition: all var(--kstpa-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.kstpa-album-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--kstpa-shadow-lg);
    border-color: var(--kstpa-gold);
}

.kstpa-album-cover-wrap {
    position: relative;
    height: 210px;
    background-color: var(--kstpa-pub-media-surface, var(--kstpa-pub-primary-deep));
    overflow: hidden;
    flex-shrink: 0;
}

.kstpa-album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--kstpa-transition-slow);
}

.kstpa-album-card:hover .kstpa-album-cover {
    transform: scale(1.05);
}

.kstpa-album-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background-color: var(--kstpa-pub-primary-deep);
    color: var(--kstpa-gold);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.32rem 0.75rem;
    border-radius: var(--kstpa-radius-full);
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--kstpa-pub-accent-border);
    font-variant-numeric: tabular-nums;
}

.kstpa-album-body {
    padding: 1.35rem 1.4rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.kstpa-album-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--kstpa-navy);
    margin: 0 0 0.85rem 0;
    line-height: 1.38;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.95rem;
}

.kstpa-album-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--kstpa-border-light, #f1f5f9);
    margin-top: auto;
}

.kstpa-album-date {
    font-size: 0.8125rem;
    color: var(--kstpa-text-subtle);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.kstpa-album-cta-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--kstpa-pub-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* Gallery Photo Grid */
.kstpa-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1.5rem;
}

.kstpa-photo-item {
    position: relative;
    border-radius: var(--kstpa-radius-md);
    overflow: hidden;
    height: 200px;
    background-color: var(--kstpa-pub-media-surface, var(--kstpa-pub-primary-deep));
    cursor: pointer;
    box-shadow: var(--kstpa-shadow-sm);
    transition: all var(--kstpa-transition);
}

.kstpa-photo-item:hover {
    transform: scale(1.03);
    box-shadow: var(--kstpa-shadow-lg);
}

.kstpa-photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kstpa-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 10, 14, 0.35) 0%, var(--kstpa-pub-primary-deep) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--kstpa-transition);
    color: #ffffff;
    font-size: 1.75rem;
}

.kstpa-photo-item:hover .kstpa-photo-overlay {
    opacity: 1;
}

/* Lightbox Modal */
.kstpa-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.kstpa-lightbox.active {
    display: flex;
}

.kstpa-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--kstpa-radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.kstpa-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    line-height: 1;
}

@media (max-width: 600px) {
    .kstpa-objectives-grid,
    .kstpa-news-grid,
    .kstpa-gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    .kstpa-objective-card {
        padding: 1rem !important;
    }
    .kstpa-about-map-box {
        padding: 1rem !important;
    }
    .kstpa-history-timeline,
    .kstpa-timeline {
        padding-left: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .kstpa-content-card {
        padding: 1.35rem 1rem;
    }
    .kstpa-widget {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 360px) {
    .kstpa-content-card {
        padding: 1rem 0.65rem;
    }
    .kstpa-widget {
        padding: 1rem 0.65rem;
    }
}

/* ==========================================================================
   V9: INTERIOR CARDS, GALLERY LIGHTBOX & FILTER TRANSITION REFINEMENTS
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {
    .kstpa-album-card.is-revealed,
    .kstpa-event-card.is-revealed,
    .kstpa-news-card.is-revealed,
    .kstpa-notice-card.is-revealed,
    .kstpa-notice-row-card.is-revealed,
    .kstpa-link-card.is-revealed,
    .kstpa-comm-member-card.is-revealed,
    .kstpa-objective-card.is-revealed {
        transition: opacity var(--kstpa-motion-reveal, 760ms) var(--kstpa-motion-ease) var(--kstpa-stagger-delay, 0ms),
                    transform var(--kstpa-motion-reveal, 760ms) var(--kstpa-motion-ease) var(--kstpa-stagger-delay, 0ms),
                    box-shadow var(--kstpa-motion-normal, 260ms) var(--kstpa-motion-ease),
                    border-color var(--kstpa-motion-normal, 260ms) var(--kstpa-motion-ease);
    }

    .kstpa-album-card.is-revealed:hover,
    .kstpa-event-card.is-revealed:hover,
    .kstpa-news-card.is-revealed:hover,
    .kstpa-notice-card.is-revealed:hover,
    .kstpa-link-card.is-revealed:hover,
    .kstpa-comm-member-card.is-revealed:hover {
        transform: translateY(-3px);
        box-shadow: var(--kstpa-pub-shadow-card-hover);
        border-color: var(--kstpa-pub-accent);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .kstpa-lightbox.active .kstpa-lightbox-img {
        animation: kstpaLightboxZoomIn var(--kstpa-motion-normal, 260ms) var(--kstpa-motion-ease) forwards;
    }
}

@keyframes kstpaLightboxZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}



/* ==========================================================================
   PUBLIC INTERIOR FILTER & SEARCH BARS (News, Notices, Events)
   ========================================================================== */
.kstpa-events-filter-bar,
.kstpa-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    background: var(--kstpa-surface, var(--kstpa-pub-surface, #ffffff));
    color: var(--kstpa-text-primary, var(--kstpa-pub-text-primary, #0f172a));
    border: 1px solid var(--kstpa-border, var(--kstpa-pub-border, #e2e8f0));
    border-radius: var(--kstpa-radius-lg, 12px);
    padding: 1.25rem 1.75rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
    box-shadow: var(--kstpa-shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}

@media (max-width: 768px) {
    .kstpa-events-filter-bar,
    .kstpa-filter-bar {
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        gap: 1rem;
    }
}
