/**
 * Application Page Premium Design Styles
 * 
 * Following Gateway College architecture:
 * - Uses .cpt-scope namespace for isolation
 * - Works with cpt-isolation.css for Astra overrides
 * - Full-width sections with centered content containers
 * - Uses theme font-family (no custom imports)
 * 
 * Brand Colors:
 * - Navy: #262474
 * - Blue: #1b60aa
 * - Teal: #24906b
 * - Green: #6db460
 * 
 * @package Gateway_College
 * @since 1.0.0
 */

/* ==============================================
   CSS Variables & Base Styles
   ============================================== */

.cpt-scope[data-page="application"] {
    --gateway-navy: #262474;
    --gateway-blue: #1b60aa;
    --gateway-teal: #24906b;
    --gateway-green: #6db460;
    --gateway-gray-100: #f7f9fb;
    --gateway-gray-600: #6b7280;
    --gateway-gray-800: #374151;
    --gateway-black: #1a1a2e;
    --gateway-white: #ffffff;
}

/* ==============================================
   Hero Section - No Image Version
   ============================================== */

.cpt-scope .gw-application-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, #1a1a2e 0%, #262474 50%, #1e4d6b 100%);
    margin-top: -4em !important;
}

/* Decorative background elements */
.cpt-scope .gw-application-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(109, 180, 96, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cpt-scope .gw-application-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(27, 96, 170, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.cpt-scope .gw-application-hero-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    position: relative;
}

.cpt-scope .gw-application-hero-content {
    z-index: 2;
    position: relative;
    margin-bottom: 60px;
    padding-left: 24px;
    padding-right: 24px;
}

.cpt-scope .gw-application-display-title {
    margin: 0 0 2rem 0;
    color: var(--gateway-white);    opacity: 0;
    animation: fadeUpApplication 0.6s ease forwards 0.4s;
}

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

.cpt-scope .gw-application-hero-description {
    color: rgba(255, 255, 255, 0.9);
    max-width: 520px;
    opacity: 0;
    animation: fadeUpApplication 0.6s ease forwards 0.6s;
}

/* ==============================================
   Section Base Styles
   ============================================== */

.cpt-scope .gw-application-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 80px 24px;
}

.cpt-scope .gw-application-section-white {
    background: #ffffff;
}

.cpt-scope .gw-application-section-gray {
    background: var(--gateway-gray-100);
}

.cpt-scope .gw-application-section-dark {
    background: linear-gradient(180deg, var(--gateway-navy) 0%, #1e1c5c 100%);
}

.cpt-scope .gw-application-container {
    max-width: 1100px;
    margin: 0 auto;
}

.cpt-scope .gw-application-container-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cpt-scope .gw-application-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    margin-bottom: 12px;
}

.cpt-scope .gw-application-section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 40px 0;
    color: var(--gateway-black);
}

.cpt-scope .gw-application-title-white {
    color: #ffffff;
}

/* Color utilities */
.cpt-scope .gw-application-text-navy { color: var(--gateway-navy); }
.cpt-scope .gw-application-text-blue { color: var(--gateway-blue); }
.cpt-scope .gw-application-text-teal { color: var(--gateway-teal); }
.cpt-scope .gw-application-text-green { color: var(--gateway-green); }

/* ==============================================
   Target Learners Section - With Image
   ============================================== */

.cpt-scope .gw-application-target-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cpt-scope .gw-application-target-image {
    position: relative;
    overflow: hidden;
    border-radius: 60px 60px 0 60px;
    height: 400px;
}

.cpt-scope .gw-application-target-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cpt-scope .gw-application-target-content {
    padding-left: 20px;
}

.cpt-scope .gw-application-target-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cpt-scope .gw-application-target-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cpt-scope .gw-application-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 10px;
}

.cpt-scope .gw-application-dot-teal {
    background: var(--gateway-teal);
}

.cpt-scope .gw-application-dot-blue {
    background: var(--gateway-blue);
}

.cpt-scope .gw-application-target-item p {
    margin: 0;
    color: var(--gateway-gray-600);
}

.cpt-scope .gw-application-target-item strong {
    color: var(--gateway-navy);
    font-weight: 600;
}

/* ==============================================
   Entry Requirements Section - Vertical Tabs Layout
   ============================================== */

.cpt-scope .gw-application-entry-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: stretch;
}

.cpt-scope .gw-application-tabs-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 12px;
}

.cpt-scope .gw-application-tab-v {
    padding: 20px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    flex: 1;
}

.cpt-scope .gw-application-tab-v:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cpt-scope .gw-application-tab-v-active {
    background-color: var(--gateway-navy);
    box-shadow: 0 10px 30px rgba(38, 36, 116, 0.25);
    border-radius: 12px 0 0 12px;
}

/* Arrow indicator for active tab */
.cpt-scope .gw-application-tab-v::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border: 10px solid transparent;
    border-left-color: var(--gateway-navy);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cpt-scope .gw-application-tab-v-active::after {
    opacity: 1;
}

.cpt-scope .gw-application-tab-v-code {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gateway-navy);
    transition: color 0.25s ease;
}

.cpt-scope .gw-application-tab-v-active .gw-application-tab-v-code {
    color: white;
}

.cpt-scope .gw-application-tab-v-name {
    font-size: 0.8rem;
    color: var(--gateway-gray-600);
    line-height: 1.4;
    transition: color 0.25s ease;
}

.cpt-scope .gw-application-tab-v-active .gw-application-tab-v-name {
    color: rgba(255, 255, 255, 0.7);
}

.cpt-scope .gw-application-tab-content-wrapper {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 30px rgba(38, 36, 116, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cpt-scope .gw-application-tab-content {
    display: none;
}

.cpt-scope .gw-application-tab-content-active {
    display: block;
}

.cpt-scope .gw-application-requirements {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.cpt-scope .gw-application-requirement {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cpt-scope .gw-application-requirement-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gateway-teal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cpt-scope .gw-application-requirement-text {
    color: var(--gateway-gray-600);
    line-height: 1.7;
    font-size: 1.05rem;
}

.cpt-scope .gw-application-international-note {
    margin-top: 24px;
    color: var(--gateway-gray-600);
    line-height: 1.6;
}

.cpt-scope .gw-application-international-note strong {
    color: var(--gateway-navy);
}

.cpt-scope .gw-application-view-course-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--gateway-teal);
    color: var(--gateway-teal);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.cpt-scope .gw-application-view-course-btn:hover {
    background: var(--gateway-teal);
    color: white;
}

.cpt-scope .gw-application-view-course-btn::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2324906b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
    background-size: contain;
    transition: transform 0.25s ease;
}

.cpt-scope .gw-application-view-course-btn:hover::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
    transform: translateX(4px);
}


/* ==============================================
   Application Steps Section
   ============================================== */

.cpt-scope .gw-application-steps-layout {
    display: flex;
    gap: 48px;
    align-items: stretch;
}

.cpt-scope .gw-application-steps-image {
    flex: 1;
    min-height: 500px;
    border-radius: 60px 60px 0 60px;
    overflow: hidden;
    position: relative;
}

.cpt-scope .gw-application-steps-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.cpt-scope .gw-application-steps-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(38, 36, 116, 0.9), transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 32px;
}

.cpt-scope .gw-application-steps-image-overlay p {
    color: white;
    margin: 0;
}

.cpt-scope .gw-application-steps-content {
    flex: 1;
    padding-left: 20px;
}

.cpt-scope .gw-application-step {
    display: flex;
    gap: 20px;
    margin-bottom: 36px;
    position: relative;
}

.cpt-scope .gw-application-step-last {
    margin-bottom: 0;
}

.cpt-scope .gw-application-step-line {
    position: absolute;
    left: 17px;
    top: 44px;
    bottom: -36px;
    width: 2px;
    background-image: repeating-linear-gradient(
        to bottom,
        var(--gateway-teal) 0,
        var(--gateway-teal) 6px,
        transparent 6px,
        transparent 12px
    );
}

.cpt-scope .gw-application-step-last .gw-application-step-line {
    display: none;
}

.cpt-scope .gw-application-step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--gateway-teal);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.cpt-scope .gw-application-step-text {
    padding-top: 6px;
}

.cpt-scope .gw-application-step-text h4 {
    color: var(--gateway-navy);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 6px 0;
}

.cpt-scope .gw-application-step-text p {
    color: var(--gateway-gray-600);
    line-height: 1.6;
    margin: 0;
}

/* ==============================================
   Required Documents Section (Dark)
   ============================================== */

.cpt-scope .gw-application-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px 48px;
}

.cpt-scope .gw-application-document {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.cpt-scope .gw-application-document-check {
    flex-shrink: 0;
    margin-top: 2px;
}

.cpt-scope .gw-application-document-content {
    flex: 1;
}

.cpt-scope .gw-application-document-label {
    display: block;
    color: var(--gateway-green);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.cpt-scope .gw-application-document-content p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

/* ==============================================
   Key Dates Table
   ============================================== */

.cpt-scope .gw-application-dates-note {
    color: var(--gateway-gray-600);
    margin-bottom: 32px;
    max-width: 600px;
    line-height: 1.75;
    font-size: 1.05rem;
}

.cpt-scope .gw-application-table-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(38, 36, 116, 0.08);
}

.cpt-scope .gw-application-table {
    width: 100%;
    background: white;
}

.cpt-scope .gw-application-table-header {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    background: var(--gateway-navy);
}

.cpt-scope .gw-application-table-header .gw-application-table-cell {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    padding: 16px 20px;
}

.cpt-scope .gw-application-table-row {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    border-bottom: 1px solid #e8ecf0;
}

.cpt-scope .gw-application-table-row:last-child {
    border-bottom: none;
}

.cpt-scope .gw-application-table-row-alt {
    background: #fafbfc;
}

.cpt-scope .gw-application-table-cell {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    color: var(--gateway-gray-600);
}

.cpt-scope .gw-application-table-cell-program {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.cpt-scope .gw-application-table-cell-program strong {
    color: var(--gateway-navy);
    font-weight: 700;
}

.cpt-scope .gw-application-table-cell-program span {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* ==============================================
   Fees & Payment Section
   ============================================== */

.cpt-scope .gw-application-fees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 48px;
}

.cpt-scope .gw-application-prose {
    color: var(--gateway-gray-600);
    line-height: 1.75;
    font-size: 1.05rem;
}

.cpt-scope .gw-application-prose p {
    margin: 0 0 16px 0;
}

.cpt-scope .gw-application-prose p:last-child {
    margin-bottom: 0;
}

.cpt-scope .gw-application-prose strong {
    color: var(--gateway-navy);
    font-weight: 600;
}

.cpt-scope .gw-application-link {
    color: var(--gateway-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cpt-scope .gw-application-link:hover {
    color: var(--gateway-teal);
}

.cpt-scope .gw-application-seat-confirmation {
    margin-top: 48px;
    padding: 28px 32px;
    background: linear-gradient(135deg, var(--gateway-navy), var(--gateway-blue));
    border-radius: 16px;
}

.cpt-scope .gw-application-seat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0 0 4px 0;
}

.cpt-scope .gw-application-seat-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* ==============================================
   FAQ Section - Centered
   ============================================== */

.cpt-scope .gw-application-faq-list {
    width: 100%;
    max-width: 800px;
    text-align: left;
}

.cpt-scope .gw-application-faq-item {
    border-bottom: 1px solid #e8ecf0;
}

.cpt-scope .gw-application-faq-item:last-child {
    border-bottom: none;
}

.cpt-scope .gw-application-faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 24px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-family: inherit;
}

.cpt-scope .gw-application-faq-question span {
    color: var(--gateway-navy);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.5;
}

.cpt-scope .gw-application-faq-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--gateway-navy);
}

.cpt-scope .gw-application-faq-icon svg {
    transition: transform 0.3s ease;
}

.cpt-scope .gw-application-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.cpt-scope .gw-application-faq-answer p {
    color: var(--gateway-gray-600);
    line-height: 1.7;
    padding-right: 52px;
    margin: 0;
}

/* FAQ Open State */
.cpt-scope .gw-application-faq-open .gw-application-faq-icon {
    background: var(--gateway-teal);
    color: white;
}

.cpt-scope .gw-application-faq-open .gw-application-faq-icon svg {
    transform: rotate(180deg);
}

.cpt-scope .gw-application-faq-open .gw-application-faq-answer {
    max-height: 300px;
    padding-bottom: 24px;
}

/* ==============================================
   CTA Section
   ============================================== */

.cpt-scope .gw-application-cta {
    text-align: center;
}

.cpt-scope .gw-application-cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cpt-scope .gw-application-cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--gateway-navy);
    margin: 0 0 20px 0;
    font-weight: 600;
}

.cpt-scope .gw-application-cta-text {
    color: var(--gateway-gray-600);
    margin: 0 0 36px 0;
    font-size: 1.1rem;
}

.cpt-scope .gw-application-cta-button {
    display: inline-block;
    padding: 18px 56px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: var(--gateway-teal);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(36, 144, 107, 0.35);
    transition: all 0.3s ease;
    text-decoration: none;
}

.cpt-scope .gw-application-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 50px rgba(36, 144, 107, 0.45);
    color: white;
}

/* ==============================================
   Responsive Design
   ============================================== */

@media (max-width: 992px) {
    .cpt-scope .gw-application-entry-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .cpt-scope .gw-application-tabs-vertical {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding-right: 0;
    }
    
    .cpt-scope .gw-application-tab-v {
        flex: 1 1 auto;
        min-width: 150px;
        padding: 14px 16px;
    }
    
    .cpt-scope .gw-application-tab-v-active {
        border-radius: 12px;
    }
    
    .cpt-scope .gw-application-tab-v::after {
        display: none;
    }
    
    .cpt-scope .gw-application-tab-v-name {
        display: none;
    }
    
    .cpt-scope .gw-application-tab-content-wrapper {
        min-height: auto;
    }
    
    .cpt-scope .gw-application-target-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cpt-scope .gw-application-target-image {
        height: 300px;
    }
    
    .cpt-scope .gw-application-target-content {
        padding-left: 0;
    }
    
    .cpt-scope .gw-application-steps-layout {
        flex-direction: column;
    }
    
    .cpt-scope .gw-application-steps-image {
        min-height: 300px;
    }
    
    .cpt-scope .gw-application-steps-content {
        padding-left: 0;
    }
    
    .cpt-scope .gw-application-fees-grid {
        grid-template-columns: 1fr;
    }
    
    .cpt-scope .gw-application-table-header {
        display: none;
    }
    
    .cpt-scope .gw-application-table-row {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 16px;
    }
    
    .cpt-scope .gw-application-table-cell {
        padding: 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cpt-scope .gw-application-table-cell::before {
        content: attr(data-label);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: #9ca3af;
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    .cpt-scope .gw-application-table-cell-program::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .cpt-scope .gw-application-section {
        padding: 60px 20px;
    }
    
    .cpt-scope .gw-application-hero {
        min-height: 400px;
    }
    
    .cpt-scope .gw-application-display-title {
        font-size: 3rem;
    }
    
    .cpt-scope .gw-application-hero-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .cpt-scope .gw-application-tabs-vertical {
        flex-direction: column;
    }
    
    .cpt-scope .gw-application-tab-v {
        min-width: auto;
        width: 100%;
    }
    
    .cpt-scope .gw-application-tab-content-wrapper {
        padding: 24px;
        min-height: auto;
    }
    
    .cpt-scope .gw-application-documents-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .cpt-scope .gw-application-fees-grid {
        grid-template-columns: 1fr;
    }
    
    .cpt-scope .gw-application-faq-question span {
        font-size: 0.95rem;
    }
    
    .cpt-scope .gw-application-faq-answer p {
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .cpt-scope .gw-application-display-title {
        font-size: 2.5rem;
    }
    
    .cpt-scope .gw-application-section-title {
        font-size: 1.5rem;
    }
    
    .cpt-scope .gw-application-tab-v {
        padding: 14px 16px;
    }
    
    .cpt-scope .gw-application-tab-v-code {
        font-size: 0.85rem;
    }
    
    .cpt-scope .gw-application-cta-button {
        padding: 16px 40px;
        width: 100%;
    }
}