/* layout.css - Layout and structure styles */

/* Main Container */
.enrolment-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-gray-50);
}

/* Left Panel */
.left-panel {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
    color: var(--color-white);
    padding: var(--spacing-2xl) var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

/* Logo at the top of the left panel */
.left-panel-logo {
    width: 160px;
    height: auto;
    margin-bottom: var(--spacing-x1);
}

.cta-section {
    margin-top: var(--spacing-3xl);
    text-align: center;
}

.cta-section h2 {
    color: var(--color-white);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-xl);
}

.highlight {
    color: var(--color-primary-light);
    font-weight: var(--font-weight-semibold);
}

/* Main Form Panel */
.form-panel {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
    margin-top: auto;
}

.left-panel-logo {
    width: 120px;
}

.trustpilot-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.trustpilot-logo {
    width: 40px;
    height: 40px;
}

.rating-info {
    display: flex;
    flex-direction: column;
}

.rating-text {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.rating-score {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.stars {
    display: flex;
    gap: 2px;
    margin-top: var(--spacing-xs);
}

.star {
    color: #00b67a;
    font-size: var(--font-size-lg);
}

.star.half {
    position: relative;
    color: var(--color-gray-400);
}

.star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #00b67a;
}

.awards-badge img {
    width: 160px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Mobile CTA */
.mobile-cta {
    display: none;
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: var(--z-index-fixed);
    text-align: right;
}

.mobile-cta h2 {
    color: var(--color-white);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
}

.btn-talk-mobile {
    display: flex;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .enrolment-container {
        flex-direction: column;
    }
    
    .left-panel {
        position: static;
        width: 100%;
        padding: var(--spacing-lg) var(--spacing-md);
        min-height: auto;
    }
    
    .form-panel {
        margin-left: 0;
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .cta-section {
        margin-top: 0;
        margin-bottom: var(--spacing-lg);
    }

    .cta-section h2 {
        font-size: var(--font-size-xl);
    }

    .btn-talk-to-us {
        display: none;
    }

    .btn-talk-mobile {
        /* styles here if needed */
    }
  
    .cta-section {
        display: none;
    }

    .mobile-cta {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .trust-badges {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        margin-top: var(--spacing-lg);
    }
    
    .awards-badge img {
        width: 120px;
    }
}

@media (max-width: 640px) {
    .trust-badges {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .form-panel {
        padding: var(--spacing-md);
    }

    /* Hide mobile CTA heading on small screens */
    .mobile-cta h2 {
        display: none;
    }

    /* Trustpilot widget fix on small screens */
    .trustpilot-widget {
        max-width: 95vw !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
        white-space: normal !important;
    }
}

/* Space below the "Talk to us" button */
.cta-section .btn-talk-to-us {
    margin-bottom: var(--spacing-xl);
}

/* Add some spacing between Trustpilot widget and awards badge */
.trust-badges > .trustpilot-widget {
    margin-bottom: var(--spacing-md);
}

/* Add padding inside trust-badges container */
.trust-badges {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

/* Optional: control Trustpilot widget width and center it */
.trustpilot-widget {
    width: 100%;
    max-width: 340px; /* Increased width to prevent cutoff */
    margin: 0 auto var(--spacing-md);
    box-sizing: border-box;
    padding: 0 15px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    white-space: normal !important;
}
