/* hero CSS Styles */
:root {
    --primary-color: #2563EB;
    --secondary-color: #F1F5F9;
    --accent-color: #4F46E5;
    --danger-color: #DC2626;
    --success-color: #2E7D32;
    --background-color: #f8fafc;
    --text-color: #1E293B;
    --muted-color: #64748B;
    /* Add transition variables */
    --transition-speed: 0.2s;
    --transition-function: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    /* Add smooth scrolling for the entire page */
    scroll-behavior: smooth;
}

.hero-section {
    padding: 40px 20px;
    background-color: var(--background-color);
    /* Improve rendering performance */
    transform: translateZ(0);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    /* Add containing block for properly positioned children */
    position: relative;
}

.hero-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 48px;
    line-height: 1.3;
    /* Add smooth transitions for text elements */
    transition: transform var(--transition-speed) var(--transition-function);
}

.hero-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    /* Ensure smooth transitions between flex layouts */
    transition: all var(--transition-speed) var(--transition-function);
}

.hero-cards-section {
    flex: 1;
    max-width: 60%;
    /* Improve rendering performance */
    will-change: transform;
    transform: translateZ(0);
}

.hero-form-section {
    flex: 1;
    max-width: 40%;
    position: sticky;
    top: 20px;
    height: fit-content;
    z-index: 10;
    min-width: 380px;
    will-change: transform, position;
    transform: translateZ(0);
    transition: top 0.2s ease-out, transform 0.2s ease-out, position 0.2s ease-out;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Prevent repaints by preparing for GPU acceleration */
    perspective: 1000px;
}

.enquiry-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 32px;
    transition: all 0.3s ease;
    width: 100%;
    /* Improve rendering performance */
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

.enquiry-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.enquiry-form h2 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #0A2647 0%, #116cd4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    text-align: left;
    letter-spacing: -0.5px;
}

.enquiry-form .form-group {
    margin-bottom: 16px;
    position: relative;
}

.enquiry-form input,
.enquiry-form select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    font-size: 15px;
    color: #1a202c;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    height: 46px;
}

.enquiry-form input:hover,
.enquiry-form select:hover {
    border-color: rgba(17, 108, 212, 0.3);
    background: rgba(255, 255, 255, 1);
}

.enquiry-form input:focus,
.enquiry-form select:focus {
    border-color: #116cd4;
    box-shadow: 0 0 0 3px rgba(17, 108, 212, 0.15);
    outline: none;
    background: #ffffff;
}

.enquiry-form .form-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0A2647 0%, #116cd4 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(17, 108, 212, 0.2);
    position: relative;
    overflow: hidden;
    height: 48px;
    margin-top: 16px;
}

.enquiry-form .form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 108, 212, 0.3);
    background: linear-gradient(135deg, #116cd4 0%, #0A2647 100%);
}

.enquiry-form .form-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(17, 108, 212, 0.2);
}

.enquiry-form .form-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.enquiry-form .form-submit-btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Form submission status */
.submission-status {
    margin-top: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.submission-status.success {
    display: block;
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(46, 125, 50, 0.3);
}

.submission-status.error {
    display: block;
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.submission-status.loading {
    display: block;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

/* Placeholder styling */
.enquiry-form input::placeholder,
.enquiry-form select::placeholder {
    color: #718096;
    opacity: 0.8;
}

/* Select dropdown styling */
.enquiry-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.hero-cards-section .container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.hero-cards-section .card {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-cards-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.hero-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

#container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    /* Improve container performance */
    transform: translateZ(0);
    will-change: contents;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* Improve card transitions */
    transition: transform 0.3s var(--transition-function), 
                box-shadow 0.3s var(--transition-function);
    will-change: transform, box-shadow;
    transform: translateZ(0);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-content {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.card-left {
    flex: 1;
}

.card-right {
    width: 200px;
    position: relative;
}

.card-right img {
    width: 100%;
    object-fit: cover;
}

.audience-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.audience-tag {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.tag-primary {
    background-color: #EEF2FF;
    color: var(--accent-color);
}

.tag-secondary {
    background-color: #E8F5E9;
    color: var(--success-color);
}

.card-logo {
    height: 48px;
    width: auto;
    margin-bottom: 32px;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 24px;
}

.batch-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.batch-label {
    font-size: 13px;
    color: var(--muted-color);
    font-weight: 500;
}

.batch-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.seats-info {
    font-size: 13px;
    color: var(--danger-color);
    font-weight: 500;
    margin-bottom: 16px;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.request-call-back-button,
.link-block-42,
.button-10942 {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.request-call-back-button {
    background-color: var(--primary-color);
    color: white;
}

.link-block-42 {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.button-10942 {
    background-color: var(--primary-color);
    color: white;
}

/* Image container to hold two images in a row */
.image-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    height: 100px;
    position: relative;
    overflow: hidden;
    /* Use GPU acceleration for image container */
    transform: translateZ(0);
    will-change: transform;
}

.image-container img:first-child {
    width: 100%;
    height: auto;
    max-height: 90%;
    object-fit: contain;
    z-index: 1;
}

.image-container .student-image {
    width: 60%;
    position: absolute;
    right: 0;
    top: -15px;
    height: 120%;
    object-fit: contain;
    z-index: 2;
}

.card h3 {
    color: #333;
    font-size: 18px;
    line-height: 1.3;
    margin: 8px 0;
    min-height: 46px;
    max-height: 46px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: left;
    /* Improve scrolling performance for static content */
    transform: translateZ(0);
}

.card h4 {
    margin: 4px 0;
    display: inline-block;
}

.card p {
    color: #555;
    margin: 6px 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    min-height: 20px;
    /* Improve scrolling performance for static content */
    transform: translateZ(0);
}

.card p strong {
    margin-right: 5px;
}

.card p a {
    display: block;
    text-align: center;
    width: 100%;
}

.card button {
    margin-top: 0;
    margin-bottom: 10px;
    height: 44px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    background-color: #0A2647;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.card button:hover {
    background-color: #00396b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    min-height: 32px;
    /* Improve scrolling performance for static content */
    transform: translateZ(0);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.purple {
    background-color: #8B5CF6;
    color: #ffffff;
}

.blue {
    background-color: #3B82F6;
    color: #ffffff;
}

.green {
    background-color: #10B981;
    color: #ffffff;
}

.yellow {
    background-color: #DC2626;
    color: #ffffff;
}

button {
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    margin: 10px 0;
}

button:hover {
    background-color: #0056b3;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.card-info {
    margin: 8px 0;
    min-height: 18px;
    display: flex;
    align-items: center;
    /* Improve scrolling performance for static content */
    transform: translateZ(0);
}

.card-info p {
    margin: 0;
}

p.know-more {
    display: none;
}

.card-cta-button {
    margin-top: 12px;
    margin-bottom: 0;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
    }

    .hero-cards-section,
    .hero-form-section {
        max-width: 100%;
        min-width: unset;
    }

    .hero-form-section {
        position: static;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }

    .card {
        min-height: 260px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 32px 16px;
        /* Optimize mobile performance */
        transform: none;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .card {
        min-height: 240px;
    }
    
    .card h3 {
        min-height: 50px;
        max-height: 50px;
        font-size: 16px;
    }

    .enquiry-form {
        padding: 24px;
    }

    .enquiry-form h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .enquiry-form input,
    .enquiry-form select {
        padding: 10px 14px;
        font-size: 14px;
        height: 42px;
    }

    .enquiry-form .form-submit-btn {
        padding: 12px 20px;
        font-size: 15px;
        height: 44px;
    }

    .hero-form-section {
        position: relative !important;
        top: 0 !important;
        margin-top: 30px;
        max-width: 100%;
        min-width: unset;
        will-change: auto;
        transform: none;
        transition: none;
        /* Remove unnecessary properties on mobile */
        perspective: none;
        backface-visibility: visible;
        -webkit-backface-visibility: visible;
    }

    .image-container.single-image {
        height: 120px;
    }
}

/* Hide the old button styles since we're using a tags instead */
.card button {
    display: none;
}

/* Form accessibility improvements */
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1a202c;
    font-size: 14px;
    text-align: left;
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #2563EB;
    outline-offset: 1px;
}

/* Add a container for the third card to ensure stable layout */
.hero-cards-section .card:nth-child(3) {
    position: relative;
    z-index: 1;
}

/* Add class for transitioning between positions */
.form-relative {
    position: relative !important;
    transition: top 0.3s var(--transition-function) !important;
}

/* Optimize animation performance site-wide */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Single image container for full-width images */
.image-container.single-image {
    justify-content: center;
    height: 150px;
    margin-bottom: 16px;
}

.full-width-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

