/**
 * Postulante Page Styles
 * Panel dashboard for applicants
 * 
 * @package Bootscore_Child
 * @since 1.0.0
 */

/* ========================================
   PUCP Brand Colors & Variables
   ======================================== */
:root {
    --pucp-primary: #003B71;
    --pucp-primary-dark: #002347;
    --pucp-primary-light: #1a5a9e;
    --pucp-secondary: #00A0DC;
    --pucp-accent: #F7941D;
    --pucp-gold: #C4A35A;
    --pucp-gradient: linear-gradient(135deg, var(--pucp-primary) 0%, var(--pucp-primary-dark) 100%);
}

/* ========================================
   Hero Section
   ======================================== */
.postulante-hero {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.kissflow-panel-title {
    color: #ffffff;
}

/* Background Image */
.postulante-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Blue Overlay */
.postulante-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 59, 113, 0.92) 0%,
            rgba(0, 35, 71, 0.85) 50%,
            rgba(0, 59, 113, 0.75) 100%);
    z-index: 1;
}

/* ========================================
   Main Container Layout
   ======================================== */
.postulante-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
    min-height: calc(100vh - 80px);
}

@media (max-width: 991.98px) {
    .postulante-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
        align-items: flex-start;
    }
}

/* ========================================
   Left Panel: Title & Description
   ======================================== */
.postulante-panel {
    color: #ffffff;
    animation: fadeInUp 0.8s ease-out;
}

.postulante-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.postulante-description {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 350px;
}

.postulante-prompt {
    margin-top: 2rem;
}

.postulante-question {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
}

/* Speech Bubble Hint */
.postulante-hint-bubble {
    position: relative;
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: var(--pucp-primary);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-width: 280px;
}

.postulante-hint-bubble::before {
    content: '';
    position: absolute;
    left: 20px;
    top: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(255, 255, 255, 0.95);
}

/* ========================================
   Cards Grid Area
   ======================================== */
.postulante-cards-area {
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

/* Return link for mobile */
.postulante-return-mobile {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    color: var(--pucp-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    width: fit-content;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.postulante-return-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    color: var(--pucp-primary);
}

@media (max-width: 991.98px) {
    .postulante-return-mobile {
        display: inline-flex;
    }
}

/* Return link wrapper (desktop) */
.postulante-return-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.postulante-return-link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
}

.postulante-return-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.postulante-return-link i {
    font-size: 1rem;
}

@media (max-width: 991.98px) {
    .postulante-return-wrapper {
        display: none;
    }
}

.postulante-cards-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.25rem;
    max-width: 450px;
}

@media (max-width: 767.98px) {
    .postulante-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
    }
}

/* ========================================
   Individual Cards
   ======================================== */
.postulante-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.postulante-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Card Header */
.postulante-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.postulante-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 59, 113, 0.1);
    border-radius: 0.5rem;
    color: var(--pucp-primary);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.postulante-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--pucp-primary);
    margin: 0;
    line-height: 1.3;
}

/* Card Description */
.postulante-card-description {
    font-size: 0.875rem;
    color: #4a5568;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

/* Card Options List */
.postulante-card-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.postulante-card-options li {
    margin-bottom: 0.375rem;
}

.postulante-card-options li:last-child {
    margin-bottom: 0;
}

.postulante-card-options li a {
    display: block;
    font-size: 0.875rem;
    color: #4a5568;
    text-decoration: none;
    padding: 0.375rem 0.5rem;
    margin-left: -0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.postulante-card-options li a:hover {
    color: var(--pucp-primary);
    background: rgba(0, 59, 113, 0.08);
}

/* ========================================
   Animation Keyframes
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   Page Template Overrides
   ======================================== */
body.page-template-page-postulante #content.site-content {
    padding: 0 !important;
    margin: 0 !important;
}

body.page-template-page-postulante .entry-content {
    margin: 0;
    padding: 0;
}

body.page-template-page-postulante #main.site-main {
    padding: 0;
}

/* Remove default WordPress block margins */
body.page-template-page-postulante .wp-block-group,
body.page-template-page-postulante .wp-block-columns,
body.page-template-page-postulante .wp-block-column {
    margin: 0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 991.98px) {
    .postulante-hero {
        min-height: auto;
    }

    .postulante-panel {
        text-align: center;
    }

    .postulante-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .postulante-hint-bubble {
        max-width: 100%;
    }

    .postulante-hint-bubble::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 767.98px) {
    .postulante-title {
        font-size: 1.75rem;
    }

    .postulante-description {
        font-size: 1rem;
    }

    .postulante-card {
        padding: 1rem 1.25rem;
    }

    .postulante-card-title {
        font-size: 1rem;
    }

    .postulante-card-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .postulante-container {
        padding: 1.5rem 1rem;
    }

    .postulante-hint-bubble {
        font-size: 0.875rem;
        padding: 0.875rem 1.25rem;
    }
}

/* ========================================
   Kissflow Slide-in Panel
   (Shared styles from lider-proyecto.css)
   ======================================== */

/* Prevent body scroll when panel is open */
body.kissflow-panel-open {
    overflow: hidden;
}

/* Panel Container */
.kissflow-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.4s, opacity 0.4s ease;
}

.kissflow-panel.is-active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s linear 0s, opacity 0.4s ease;
}

/* Dark Overlay */
.kissflow-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 35, 71, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kissflow-panel.is-active .kissflow-panel-overlay {
    opacity: 1;
}

/* Panel Content - Slide from right */
.kissflow-panel-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 92%;
    max-width: 1200px;
    background: #ffffff;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel Header */
.kissflow-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--pucp-primary) 0%, var(--pucp-primary-dark) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Header Actions (toggle + close buttons) */
.kissflow-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.kissflow-panel-mode-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.kissflow-panel-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.05);
}

.kissflow-panel-mode-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.kissflow-panel.is-active .kissflow-panel-content {
    transform: translateX(0);
}

/* ========================================
   Kissflow Panel - Fullscreen Mode
   ======================================== */

.kissflow-panel.is-fullscreen .kissflow-panel-content {
    width: 100%;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
}

.kissflow-panel.is-fullscreen .kissflow-panel-overlay {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
}

/* Panel Body */
.kissflow-panel-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    flex-direction: row;
}

/* Loader */
.kissflow-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    z-index: 10;
}

.kissflow-loader p {
    margin-top: 1rem;
    color: var(--pucp-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.kissflow-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 59, 113, 0.1);
    border-top-color: var(--pucp-accent);
    border-radius: 50%;
    animation: kissflow-spin 1s linear infinite;
}

@keyframes kissflow-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Iframe */
.kissflow-panel-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ========================================
   Kissflow Panel - Responsive
   ======================================== */

@media (max-width: 991.98px) {
    .kissflow-panel-content {
        width: 90%;
    }
}

@media (max-width: 767.98px) {
    .kissflow-panel-content {
        width: 100%;
        max-width: none;
    }

    .kissflow-panel-header {
        padding: 1rem 1.25rem;
    }

    .kissflow-panel-title {
        font-size: 1rem;
    }

    .kissflow-panel-close {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
}

@media (max-width: 575.98px) {
    .kissflow-panel-header {
        padding: 0.875rem 1rem;
    }

    .kissflow-panel-title {
        font-size: 0.9375rem;
    }
}

/* ========================================
   Kissflow Panel - Description Sidebar
   ======================================== */

/* Sidebar */
.kissflow-panel-sidebar {
    width: 280px;
    min-width: 280px;
    background: linear-gradient(180deg, var(--pucp-primary-dark, #002347) 0%, var(--pucp-primary, #003B71) 100%);
    color: #ffffff;
    flex-shrink: 0;
    overflow-y: auto;
    position: relative;
}

.kissflow-panel-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.kissflow-sidebar-inner {
    padding: 2rem 1.5rem;
}

.kissflow-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.3;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.kissflow-sidebar-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* Main content area (iframe + loader) */
.kissflow-panel-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.kissflow-panel-main .kissflow-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    z-index: 10;
}

.kissflow-panel-main iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Sidebar responsive */
@media (max-width: 991.98px) {
    .kissflow-panel-sidebar {
        width: 240px;
        min-width: 240px;
    }

    .kissflow-sidebar-inner {
        padding: 1.5rem 1.25rem;
    }

    .kissflow-sidebar-title {
        font-size: 1.125rem;
    }

    .kissflow-sidebar-text {
        font-size: 0.875rem;
    }
}

@media (max-width: 767.98px) {
    .kissflow-panel-body {
        flex-direction: column;
    }

    .kissflow-panel-sidebar {
        width: 100%;
        min-width: 100%;
    }

    .kissflow-sidebar-inner {
        padding: 1rem 1.25rem;
    }

    .kissflow-sidebar-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .kissflow-sidebar-text {
        font-size: 0.8125rem;
        line-height: 1.5;
    }

    .kissflow-panel-main {
        flex: 1;
    }
}